In classfull representation Every network used to get same amount of host regarding of the class of the network. But that is a waste in many cases where if a user need 2^14 host and buy the class B network then 49152 network are wasted. To counter this situation IANA came up with a new technique –
It is also a 32 bit number but it has a special number which represents the number of bit present in block ID.
Here the number of Host present in the network is 2^(32-n) or here 2^12.
- All the IP addresses re contiguous. Means there can’t be any fragmentation.
- Block size must be power of 2(2^n). If the block size is 2^5 then the Host ID will contain 5 bits and the Block ID will be 27 bits.
- First IP address must be evenly divisible by the size of the block. Means the least significant part should always start with zeroes in Host ID.
- Check whether 184.108.40.206 to 220.127.116.11 is a valid IP address block or not?
- All the IP addresses are contiguous.
- Total number of IP addresses in the Block = 16 = 2^4
- 1st IP address: 100.1.2.00100000 . Since, Host Id will contains last 4 bits and all the least significant 4 bits are zero. Hence, first IP address is evenly divisible by the size of the block.
Suppose our CIDR address is 18.104.22.168/25 means the host ID is 7 bit 20.30.40.00001010
So the network ID will be 20.30.40.00000000 . Now If I want to divide the network in 2 part I will need to use 1 bit from the host ID. So the total ID part is now 26. 1st part : starting address is 20.30.40.00000000(22.214.171.124/26) & the direct broadcast address is 20.30.40.00111111(126.96.36.199/26).
2nd Part : Starting address is 20.30.40.01000000(188.8.131.52/26) & the direct broadcast address is 20.30.40.01111111(184.108.40.206/26). Same as if we wanted to divide the network in 4 parts we will have we will have ID part will be 27.