Networking-concept-CIDR

Networking-concept-CIDR

Hello Friends,

This is a continuation of my last blog about Subnet. In my last blog, I explain what is subnet and classful notations of Networking-concept-Subnet.

Today, we will discuss the CIDR ( Classless Inter-Domain Routing ). A system called Classless Inter-Domain Routing, or CIDR, was developed as an alternative to traditional subnetting. The idea is that you can add a specification in the IP address itself as to the number of significant bits that make up the routing or networking portion.

For example, we could express the idea that the IP address 192.168.0.15 is associated with the netmask 255.255.255.0 which is class- C by using the CIDR notation of 192.168.0.15/24. This means that the first 24 bits of the IP address given are considered significant for the network routing.

This allows us some interesting possibilities. We can use these to reference “supernets”.

Using CIDR notation, we can combine these blocks by referencing this chunk as 192.168.0.0/23. This specifies that there are 23 bits used for the network portion that we are referring to. We can divide it into more Subnets by using host bits.

So the first network (192.168.0.0/24) could be represented like this in binary:

1100 0000 – 1010 1000 – 0000 0000 – 0000 0000

While the second network (192.168.1.0/24) would be like this:

1100 0000 – 1010 1000 – 0000 0001 – 0000 0000

Where BROWN color bits are network bits that are fixed and GREEN color bits are host bits.

The CIDR address we specified indicates that the first 23 bits are used for the network block we are referencing. This is equivalent to a netmask of 255.255.254.0, or:

1111 1111 – 1111 1111 – 1111 1110 – 0000 0000

As you can see, with this block the 24th bit can be either 0 or 1 and it will still match, because the network block only cares about the first 23 digits. Basically, CIDR allows us more control over addressing continuous blocks of IP addresses. This is much more useful than the subnetting we talked about originally.

Please see the below table which provides you with details about CIDR notation with a number of hosts you get with particular CIDR notation.

IPv4 CIDR IP/CIDR Δ to last IP address Mask Hosts (*) Class

IP/NW Bits

a.b.c.d/32 +0.0.0.0 255.255.255.255 1 1/256 C
a.b.c.d/31 +0.0.0.1 255.255.255.254 2 1/128 C
a.b.c.d/30 +0.0.0.3 255.255.255.252 4 1/64 C
a.b.c.d/29 +0.0.0.7 255.255.255.248 8 1/32 C
a.b.c.d/28 +0.0.0.15 255.255.255.240 16 1/16 C
a.b.c.d/27 +0.0.0.31 255.255.255.224 32 1/8 C
a.b.c.d/26 +0.0.0.63 255.255.255.192 64 1/4 C
a.b.c.d/25 +0.0.0.127 255.255.255.128 128 1/2 C
a.b.c.0/24 +0.0.0.255 255.255.255.000 256 1 C
a.b.c.0/23 +0.0.1.255 255.255.254.000 512 2 C
a.b.c.0/22 +0.0.3.255 255.255.252.000 1,024 4 C
a.b.c.0/21 +0.0.7.255 255.255.248.001 2,048 8 C
a.b.c.0/20 +0.0.15.255 255.255.240.000 4,096 16 C
a.b.c.0/19 +0.0.31.255 255.255.224.000 8,192 32 C
a.b.c.0/18 +0.0.63.255 255.255.192.000 16,384 64 C
a.b.c.0/17 +0.0.127.255 255.255.128.000 32,768 128 C
a.b.0.0/16 +0.0.255.255 255.255.000.000 65,536 256 C = 1 B
a.b.0.0/15 +0.1.255.255 255.254.000.000 131,072 2 B
a.b.0.0/14 +0.3.255.255 255.252.000.000 262,144 4 B
a.b.0.0/13 +0.7.255.255 255.248.000.000 524,288 8 B
a.b.0.0/12 +0.15.255.255 255.240.000.000 1,048,576 16 B
a.b.0.0/11 +0.31.255.255 255.224.000.000 2,097,152 32 B
a.b.0.0/10 +0.63.255.255 255.192.000.000 4,194,304 64 B
a.b.0.0/9 +0.127.255.255 255.128.000.000 8,388,608 128 B
a.0.0.0/8 +0.255.255.255 255.000.000.000 16,777,216 256 B = 1 A
a.0.0.0/7 +1.255.255.255 254.000.000.000 33,554,432 2 A
a.0.0.0/6 +3.255.255.255 252.000.000.000 67,108,864 4 A
a.0.0.0/5 +7.255.255.255 248.000.000.000 134,217,728 8 A
a.0.0.0/4 +15.255.255.255 240.000.000.000 268,435,456 16 A
a.0.0.0/3 +31.255.255.255 224.000.000.000 536,870,912 32 A
a.0.0.0/2 +63.255.255.255 192.000.000.000 1,073,741,824 64 A
a.0.0.0/1 +127.255.255.255 128.000.000.000 2,147,483,648 128 A
0.0.0.0/0 +255.255.255.255 000.000.000.000 4,294,967,296 256 A

 

Thanks for reading 🙂

Keep reading, share your thoughts, experiences. Feel free to contact us to discuss more. If you have any suggestions/feedback/doubts, you are most welcome.

Stay tuned on the blog, will come up with more such articles.

Mayur KJ

Leave a Reply

Your email address will not be published. Required fields are marked *