When looking at the host portion of a network, the bigger the Subnet masks (that is, the more bits of the address it occupies), the fewer amount of hosts we can have. For example:
- Subnet mask =
/8, we have 24 bits available for hosts - Subnet mask =
/24, we have 8 bits available for hosts

Note
The IP addresses in the IP class scheme include various ranges, but there are also reserved Private Addresses in each class. Private addresses are valid for host assignment, but not routable on public internet (and thus should have no internet access). Private ranges are the following:
- Class A:
10.0.0.0to10.255.255.255- Class B:
172 .16.0.0to172.31.255.255- Class C:
192.168.0.0to192.168.255.255
Class A
Network addresses always start with 0, and default subnet mask is /8 (first octet). Valid network addresses from 1.0.0.0 to 126.0.0.0/8
These IP addresses are assigned to networks with very large numbers of hosts. To accomplish this, the higher order bit (that is, the first bit in the address) is always set to 0, with a default subnet mask of /8.
Because the high order bit is set to 0, the highest value that can be set in the first IPv4 octet is 127 (that is, 64 + 32 + 16 + 8 + 4 + 2 + 1). However, 127.0.0.0 is a reserved address, and thus the highest network address available is 126.0.0.0.
What this means is that we can have up to 126 networks and up to 16,777,214 hosts per network, since the host addresses range from 1.0.0.1 to 126.255.255.254 (note that 126.255.255.255 is the broadcast address for that network).
Reserved Class A Addresses
-
0.0.0.0/8signifies “this network”- Thus,
0.0.0.1to0.255.255.255are not valid host addresses - This also means that there are 16 million valid addresses that could be used to signify “this network”
- Thus,
-
127.0.0.0/8is reserved as the loopback address for testing local computer- Thus,
127.0.0.1to127.255.255.255are not valid host addresses either - Note that the “loopback” address therefore contains 16 million valid network addresses
- Thus,
Class B
Network addresses always start with 10 and the default subnet mask is /16 (second octet). Valid network addresses from 128.0.0.0 to 191.255.0.0/16.
Class B addresses were originally assigned to medium/large networks. This allows for 16,384 networks and 65,534 hosts per network.
Class C
Network addresses always start with 110 and default subnet mask is /24 (third octet). Valid network addresses from 192.0.0.0 to 223.255.255.0/24.
Class C addresses were originally assigned to small networks. This allows for 2,097,152 networks and 254 hosts per networks.
This is a reasonable size that could be allocated for a real world network, or subnetted into smaller subnets.
Class D
Class D addresses are reserved for IP multicast addresses. Their high-order bits always start with 1110 and thus compose addresses from 224.0.0.0 to 239.255.255.255. These are not allocated to hosts and have no default subnet mask.
Note
The range of
224to239is derived entirely from the first octet.224=11100011while239=11101111(the zero is required because Class D addresses always start with1110)
The way multicast works is that the sender will still send out a package with a SRC and DST header (as it does in unicast, normal traffic). However, the destination header will be set to an IP address in the multicast range (for example, 239.0.0.1). This will then be repeated by the switch and received by hosts that are “interested” in the data.
This is a lot like tuning into a radio station. The interesting destination hosts run an application that defines an interest in data from the 239.0.0.1 address, so they subscribe (note that this would have to be configured in the routers). This is useful to save on bandwidth.
Class E
Class E addresses are “experimental and reserved for future use”. They have high-order bits set to 1111, and have neither hosts nor default subnets. They range from 240.0.0.0 to 255.255.255.255 (although the 4x255 address is the broadcast address for this network, and is the only pre-defined ).
Note
255.255.255.255is the broadcast address for this network. Meaning that whatever network the host is on, messaging 4x255 will broadcast the message.