Open In App

Classless Inter Domain Routing (CIDR)

Classless Inter-Domain Routing (CIDR) is a method of IP address allocation and IP routing that allows for more efficient use of IP addresses. CIDR is based on the idea that IP addresses can be allocated and routed based on their network prefix rather than their class, which was the traditional way of IP address allocation.

CIDR addresses are represented using a slash notation, which specifies the number of bits in the network prefix. For example, an IP address of 192.168.1.0 with a prefix length of 24 would be represented as 192.168.1.0/24. This notation indicates that the first 24 bits of the IP address are the network prefix and the remaining 8 bits are the host identifier.



Several Advantages of the Traditional Class-Based Addressing System of CIDR

As with any technology or system, there are advantages and disadvantages of using CIDR:

Advantages of CIDR

Disadvantages of CIDR

As we have already learned about Classful Addressing, so in this article, we are going to learn about Classless Inter-Domain Routing. which is also known as Classless addressing. In Classful addressing the no of Hosts within a network always remains the same depending upon the class of the Network.



Class A network contains 224(IP addresses) or 224 - 2 Hosts,
Class B network contains 216(IP addresses) or 216 - 2 Hosts,
Class C network contains 28(IP addresses) or 28 - 2 Hosts

Now, let’s suppose an Organization requires 214 hosts, then it must have to purchase a Class B network. In this case, 49150 Hosts will be wasted. This is the major drawback of Classful Addressing. In order to reduce the wastage of IP addresses a new concept of Classless Inter-Domain Routing is introduced. Nowadays IANA is using this technique to provide IP addresses. Whenever any user asks for IP addresses, IANA is going to assign that many IP addresses to the User.  

Representation: It is as also a 32-bit address, which includes a special number that represents the number of bits that are present in the Block Id.

 a . b . c . d / n 

Where n is the number of bits that are present in Block Id / Network Id.

Example:

20.10.50.100/20 

Rules for forming CIDR Blocks:

All IP addresses must be contiguous.

Block size must be the power of 2 (2n). If the size of the block is the power of 2, then it will be easy to divide the Network. Finding out the Block Id is very easy if the block size is of the power of 2.

Example: If the Block size is 25 then, Host Id will contain 5 bits and Network will contain 32 – 5 = 27 bits. 

First IP address of the Block must be evenly divisible by the size of the block. in simple words, the least significant part should always start with zeroes in Host Id. Since all the least significant bits of Host Id is zero, then we can use it as Block Id part.

Example: Check whether 100.1.2.32 to 100.1.2.47 is a valid IP address block or not?

All three rules are followed by this Block. Hence, it is a valid IP address block.

FAQs On Classless Inter Domain Routing (CIDR)

Q.1: What is CIDR (Classless Inter-Domain Routing)?

Answer:

CIDR, or Classless Inter-Domain Routing, is a networking technique introduced to overcome the limitations of the traditional IP addressing system, which was based on classes. CIDR allows more flexible allocation of IP addresses by eliminating the strict class-based divisions.

Q.2: What problem does CIDR solve?

Answer:

CIDR solves the problem of IP address exhaustion and inefficient address allocation. With the growth of the internet, the original IP address classes (Class A, B, and C) led to wastage of IP addresses due to their fixed size. CIDR enables the allocation of variable-sized blocks of IP addresses, improving address space utilization.

Q.3: How does CIDR differ from traditional IP addressing?

Answer:

Traditional IP addressing used classes with fixed address ranges (e.g., Class A: 1.0.0.0 to 126.0.0.0). CIDR uses a format that combines an IP address and a prefix length to denote the network and subnet portion (e.g., 192.168.1.0/24).


Article Tags :