Examples of Classless IP Addressing

Example: Consider a classless IP address of 21.11.40.35 / 28. Find out the range of IP Addresses in the CIDR block or classless block.

Solution

  • 28 bits are used for network identification.
  • The remaining 4 bits are used for the host’s identification in the classless

Given CIDR IP Address may be represented as

00010101.00001011.00101000.00100011 / 28

So,

  • First IP Address = 00010100.00001010.00011110.00100000= 20.10.30.32
  • Last IP Address = 00010100.00001010.00011110.00101111= 20.10.30.47

Put all Host bits to zero for the first IP, and put all host bits to “1” for the Last IP of the Network.

Note: The direct broadcast IP address of a network is always the last IP of that Network.

Thus, Range of IP Addresses = [21.11.40.32 , 21.11.40.47]

Now Check all Three rules of the CIRD block

  • Rule 01: All IPs are contiguous ( 21.11.40.32 to 21.11.40.47). So, Rule 1 is satisfied.
  • Rule 02: Range ( 21.11.40.32 to 21.11.40.47) contains 16 IPs, which is the Power of 2. So, Rule 2 is satisfied.
  • Rule 03: According to the third rule, the First IP must be divisible by network size. As the Network Size is 24 and the last 4 bits of the first IP are Zero. So, it is divisible. Hence, Rule 3 is also satisfied.

As all 3 rules are valid, the classless block with 16 IPs is Valid.