Classless Addressing-
Classless Addressing is an improved IP Addressing system.
It makes the allocation of IP Addresses more efficient.
It replaces the older classful addressing system based on classes.
It is also known as Classless Inter Domain Routing (CIDR).
CIDR Block-
When a user asks for specific number of IP Addresses,
CIDR dynamically assigns a block of IP Addresses based on certain rules.
This block contains the required number of IP Addresses as demanded by the user.
This block of IP Addresses is called as a CIDR block.
Rules For Creating CIDR Block-
A CIDR block is created based on the following 3 rules-
Rule-01:
All the IP Addresses in the CIDR block must be contiguous.
Rule-02:
The size of the block must be presentable as power of 2.
Size of the block is the total number of IP Addresses contained in the block.
Size of any CIDR block will always be in the form 21, 22, 23, 24, 25 and so on.
Rule-03:
First IP Address of the block must be divisible by the size of the block.
CIDR Notation-
CIDR IP Addresses look like-
a.b.c.d / n
They end with a slash followed by a number called as IP network prefix.
IP network prefix tells the number of bits used for the identification of network.
Remaining bits are used for the identification of hosts in the network.
Problem-01:
Given the CIDR representation [Link] / 27. Find the range of IP Addresses in the
CIDR block.
Solution-
Given CIDR representation is [Link] / 27.
It suggests-
27 bits are used for the identification of network.
Remaining 5 bits are used for the identification of hosts in the network.
Given CIDR IP Address may be represented as-
00010100.00001010.00011110.00100011 / 27
So,
First IP Address = 00010100.00001010.00011110.00100000 = [Link]
Last IP Address = 00010100.00001010.00011110.00111111 = [Link]
Thus, Range of IP Addresses = [ [Link] , [Link]]
Problem-02:
Given the CIDR representation [Link] / 20. Find the range of IP Addresses in the
CIDR block.
Solution-
Given CIDR representation is [Link] / 20.
It suggests-
20 bits are used for the identification of network.
Remaining 12 bits are used for the identification of hosts in the network.
Given CIDR IP Address may be represented as-
01100100.00000001.00000010.00100011 / 20
So,
First IP Address = 01100100.00000001.00000000.00000000 = [Link]
Last IP Address = 01100100.00000001.00001111.11111111 = [Link]
Thus, Range of IP Addresses = [ [Link] , [Link]]
Problem-03:
Consider a block of IP Addresses ranging from [Link] to [Link].
1. Is it a CIDR block?
2. If yes, give the CIDR representation.
Solution-
For any given block to be a CIDR block, 3 rules must be satisfied-
Rule-01:
According to Rule-01, all the IP Addresses must be contiguous.
Clearly, all the given IP Addresses are contiguous.
So, Rule-01 is satisfied.
Rule-02:
According to Rule-02, size of the block must be presentable as 2n.
Number of IP Addresses in the given block = 47 – 32 + 1 = 16.
Size of the block = 16 which can be represented as 24.
So, Rule-02 is satisfied.
Rule-03:
According to Rule-03, first IP Address must be divisible by size of the block.
So, [Link] must be divisible by 24.
[Link] = 100.1.2.00100000 is divisible by 24 since its 4 least significant bits are
zero.
So, Rule-03 is satisfied.
Since all the rules are satisfied, therefore given block is a CIDR block.