Introduction to Networking

Classless IP Addressing

  • Classless IP addressing makes the allocation of IP addresses more flexible, which is also known as classless interdomain routing (CIDR).
  • In Classless IP addressing, the CIDR block contains the required number of IP Addresses as demanded by the user.

CIRD BLOCK Contains a required number of IP Addresses as demanded by the user. Whenever 

 Purpose of Classless Addressing

There were two major problems with Classful IP addressing

  • Wastage of IP Addresses: As there are almost 1-crore host IP addresses in class A. But these are too many hosts’ IP addresses for a single organization. So, it is a waste of IP addresses.
  • No Flexibility: If any user requires almost 1000 IP addresses, then there is no class of networking that will provide an exact 1000 IP addresses even after subnetting. If Class A provides 1000 IP addresses after submitting them to that organization, then there is still a high chance of wastage of remaining IP addresses. So, it does not provide the flexibility.

Solution of Classful Problem

Subnetting in Classless IP addressing is used for network flexibility. It provides the exact number of IP addresses that one organization or network requires.

Notation of CIDR

CIDR IP Addresses look like the following

a.b.c.d / n

  • Where “n” bits represent the identification of the network.
  • The remaining bits (if IPv4, then 32-n) are used for hosts in the network.

Example of Classless IP addressing 

An example of a CIDR IP Address is given below / 26


  • 26 bits represent the network.
  • The remaining bits (6 out of 32 in IPv4) are used for the identification of hosts in the network.

Rules For Creating CIDR Block

  • Rule-01: All the IP Addresses in the classless address must be contiguous
  • Rule-02: The number of IP addresses (for hosts) in a CIRD block must be in the power of 2 (i.e., 21, 22, 23, 24 and so on).
  • Rule-03: The first IP Address of the block in CIDR must be divisible by the size of the block.
Rule 3 Explanation: Any binary pattern of IP is divisible by 2n if and only if its least “n” significant bits are 0.

Examples: Consider a binary pattern of an IP address


  • The above IP is divisible by either 21, 22 23, 24,25or 26  Because its least 6 significant bits are zero.
  • It is divisible by 26since its least significant 6 bits are zero.
  • The above IP is not divisible by 27becuase its least 7 significant bits are not zero.

So, if the size of the CIDR Block is 21,  22, 23, 24,25, and 26 then Rule 3 is valid for above IP otherwise if size of CIRD Block is greater than 27 then Rule 3 in not valid for above IP.