Classless IP Addressing
- Classless IP addressing makes the allocation of IP Addresses more flexible which is also known as Classless Inter Domain Routing (CIDR).
- In Classless IP addressing, CIDR block contains the required number of IP Addresses as demanded by the user.
CIRD BLOCK Contains 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-cror host IP addresses in class A. But these are too much hosts IP addresses for a single organization. So, it is wastage of IP addresses.
- No Flexibility: If any user required almost 1000 IP address then there is no class of networking which will provide exact 1000 IP address even after subnetting. If Class A provides 1000 IP address after subnetiing to that organization then still a lot of chances of wastage of remaining IP addresses. So, it does not provide the flexibility.
Solution of Classful Problem
Subneting in Classless IP addressing is used for network flexibility. It provides the exact number of IP addresses as one organization or network required.
Notation of CIDR
CIDR IP Addresses look like the following
a.b.c.d / n
- Where “n” bits represents the identification of network.
- Remaining bits (if IPv4 then 32-n) are used for hosts in the network.
Example of Classless IP addressing
An example of CIDR IP Address is given below
18.104.22.168 / 26
- 26 bits represents the network.
- 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 Addressing must be contiguous
- Rule-02: 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: 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 22.214.171.124
So, if the size of 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.