In the previous lesson, we learn that It is not easy to identify the network and the host portion of any dotted decimal IP address for the reason that the IP addresses are not actually four numbers. They actually consist of 32 different numbers or 32 bits. We learn that an IP address classes used to define the network and host portions. IPv4 addresses were grouped into five separate classes that are Class A, B, C, D, and E. Chart illustrate all important figures of IP address classes.
This network is 8-bit network prefix. The most significant bit of class A network is set to 0, this most significant bit is also called high order bit(HOB). This class contains a 7-bit network number and a 24-bit host number. Figure illustrate Class A, address bit distribution.
If the first bit (most significant bit) of the first octet of an IP address is a binary 0, the address is a Class A address. With that first bit being a 0, the lowest number is 00000000; decimal 0 and the highest number is 01111111, decimal 127. Any address that starts with a value between 0 -127 in the first octet is a Class A address. These two numbers, 0 and 127, are reserved and cannot be used as a network address. 0 and 127 will be explained later in this article.
Class A network can accommodate very large networks, so only the first octet is used to represent the network number. The other three octets or 24 bits are used to represent the host portion of the network. Each network of this class supports a maximum of 16,777,214 (2 24 -2) hosts per network. The two is subtracted because the lowest and highest addresses are reserved for the special purpose. The lowest address is 24, 0s in host portion and the highest address is 24, 1s in host portion.
Each network requires a network identification number that is used to refer to the entire range of hosts when building routing tables. The address that contains all 0s in the host portion is used as the network identification number. So address that has all 0s in host portion cannot be used with the individual host. 10.0.0.0 is a Class A Address. If we see the host portion which contains all 0s, so it is a network identification. Also, every network requires a broadcast address that can be used to send a message to each host on a network. This address contains all 1s on the host portion. For example, a broadcast address for network 10.0.0.0 would be 10.255.255.255.
As we learn that only the first octet is used as a network number, and it contains a value between 0 and 127; in which 0 and 127 are reserved, so 126 Class A networks exist. Each of the 126 Class A network has almost 17 million host addresses that make up 50 % of the entire IPv4 address space.
0.0.0.0 address is reserved for default route, the default route will be explained later. 127.0.0.1 address is reserved for the local loopback address, which is why Class A network range is from 1 – 126 and Class B addresses start from the address of 22.214.171.124.
A Class A network provides many possibilities for any organization or a company. Class A network provide a huge global network with those many hosts, the hosts in such a network could not function as members of the same logical group.
Network administrators require smaller logical groupings to control broadcasts, apply policies, and troubleshoot problems. This can be possible by applying subnet mask which allows subnetting. A subnetting breaks a large block of addresses into smaller groups called subnetworks. Subnetting avoids a waste of IP address and it’s also helpful for better efficiency.Default subnet mask for class A IP address is 255.0.0.0. Private IP address range for class A is 10.0.0.0 to 10.255.255.255.
Most significant bit or high order bit of class B addresses are starts with a binary 10 in the first 2 bits of the first octet. So, the lowest number of class B address is 10000000, decimal 128 and the highest number is 10111111, decimal 191. In the other words, class B IP address range in the first octet is from 128 – 191. Any address that starts with this range is class B IP address.
Class B network can accommodate medium size networks. So, the first two octets are used to represent the network, and the other two octets represent the host portion of the address. Class B has 16384 (214) Network addresses and 65534 (216-2) Host addresses. Remember that two, the lowest and highest values, which are reserved for special purposes. So, each Class B network can support up to 65,534 hosts. As you can see, that it is much smaller than the networks of Class A. Just like Class A networks, Class B addresses are also subnetted to improve network efficiency. The figure illustrates 32 bits distribution of Class B network.
As we can see in the above figure that the first 2 bits of a Class B address are always 10, So 14 bits are left in the network portion of the address, resulting in 214 or 16,384 Class B networks. The first octet of a Class B address has 64 possibilities that are from 128 to 191. The second octet has 256 possibilities, that are from 0 to 255. That give 16,384 networks. We can simply multiply 64 with 256 that will total possible network in class B.
Default subnet mask for class B IP addresses is 255.255.0.0. Class B addresses are also a private IP address range. Which is from 172.16.0.0 to 172.31.255.255
The high order bits for class C address are binary 110. So, the lowest number that starts with binary 110 is 11000000, which decimal is 192. The highest number that starts with binary 110 is 11011111, which decimal is 223. So IPv4 address the range of class C is from 192 to 223 in the first octet. Class C addresses were initially planned for a small network. The first three octets of a Class C address represent the network portion of IP address. The last octet represents the host number. The figure illustrates class C address bits distribution.
As we learn that the first 3 bits of a Class C address are always 110, So 21 bits are left in the network portion of the address, which results in 221 or 2,097,152 Class C networks. Each network containing a 254 (28 -2) hosts each. The two is reserved for network identification and broadcasting. Address with all-0s and all 1s in the host portion are subtracted, therefore only 254 hosts may be addressed on a Class C network.
Default subnet mask for class C IP addresses is 255.255.255.0. Class C addresses are also a private IP address range. Which is 192.168.0.0 to 192.168.255.255
A Class D address begins with binary 1110 in the first octet. So, the lowest number is binary 11100000 which decimal is 224 and the highest number is 11101111 which decimal is 239. So the range of class D addresses is from 224-239 in the first octet.Class D addresses are not used to address any individual host. Instead of individual host, each Class D address can be used to with a group of hosts called a host group. That group of host called multicast group.
When a single message is sent to several selected recipients that are called a multicast or multicasting. Class D addresses are also called multicast addresses which are used to send a message to a group of several. A multicast is different from a broadcast. Every device on a logical network must process a broadcast, whereas only devices configured to listen for a Class D address receive a multicast.
The first octet of class E IP address begins with 1111, the range of this class is starting with 11110000, decimal 240 and end with 11111111, decimal 255. So the range of class E is from 240 to 255 in the first octet. Class E addresses are reserved for experimental purposes and should not be used to address hosts or multicast groups.