What is classless IP addressing?
Classless addressing, also called Classless Inter-Domain Routing (CIDR), is an improved IP addressing system. It increases the effectiveness of IP address allocation because of the absence of class distribution.
Structure
The CIDR block comprises two parts. These are as follows:
- Block id is used for the network identification, but the number of bits is not pre-defined as it is in the classful IP addressing scheme.
- Host id is used to identify the host part of the network.
Notation
CIDR IP addresses look as follows:
In the example above,
Rules
Requirements for CIDR are defined below:
- Addresses should be contiguous.
- The number of addresses in the block must be in the power of 2.
- The first address of every block must be divisible by the size of the block.
Block information
Given the following IP address, let's find the network and host bits.
The following illustration gives a clear understanding of the aforementioned IP address scheme:
To find the network and host bits, we will use the stated formula, where
This particular case, in which
Network address
To find the network address of a particular IP address, apply the AND operation to the IP address with its subnet mask. The subnet mask is obtained by making all the network bits 1 and host bits 0.
Example
To obtain the network address of the classless IP address 200.56.23.41/28, the following steps are needed:
- Convert the address into binary notation, as follows:
- Now apply the
ANDoperation on the converted IP address and its subnet mask. The resultant will be the network address in binary format.
- Convert the network address into decimal.
Benefits
Following are the benefits of classless IP addressing:
- Efficient IP address allocations.
- More balanced use of IP address ranges.
- More efficient routing.
Free Resources