Open In App
Related Articles

Classless Inter Domain Routing (CIDR)

Improve
Improve
Improve
Like Article
Like
Save Article
Save
Report issue
Report

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

  • Efficient use of IP addresses: CIDR allows for more efficient use of IP addresses by allowing the allocation of IP addresses based on their network prefix rather than their class.
  • Flexibility: CIDR allows for more flexible IP address allocation, as it allows for the allocation of arbitrary-sized blocks of IP addresses.
    Better routing: CIDR allows for better routing of IP traffic, as it allows routers to aggregate IP addresses based on their network prefix, reducing the size of routing tables.
  • Reduced administrative overhead: CIDR reduces administrative overhead by allowing for the allocation and routing of IP addresses in a more efficient and flexible way.
  • In summary, CIDR is a method of IP address allocation and routing that allows for more efficient use of IP addresses and better routing of IP traffic. It has several advantages over the traditional class-based addressing system, including greater flexibility, better routing, and reduced administrative overhead.

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

Advantages of CIDR

  • Efficient use of IP addresses: CIDR allows for more efficient use of IP addresses, which is important as the pool of available IPv4 addresses continues to shrink.
  • Flexibility: CIDR allows for more flexible allocation of IP addresses, which can be important for organizations with complex network requirements.
  • Better routing: CIDR allows for more efficient routing of IP traffic, which can lead to better network performance. Reduced administrative overhead: CIDR reduces administrative overhead by allowing for easier management of IP addresses and routing.

Disadvantages of CIDR

  • Complexity: CIDR can be more complex to implement and manage than traditional class-based addressing, which can require additional training and expertise.
  • Compatibility issues: Some older network devices may not be compatible with CIDR, which can make it difficult to transition to a CIDR-based network.
  • Security concerns: CIDR can make it more difficult to implement security measures such as firewall rules and access control lists, which can increase security risks.
  • Overall, CIDR is a useful and efficient method of IP address allocation and routing, but it may not be suitable for all organizations or networks. It is important to weigh the advantages and disadvantages of CIDR and consider the specific needs and requirements of your network before implementing 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. 32 Bit Address 

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. 
CIDR Block

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 the IP addresses are contiguous.
  • Total number of IP addresses in the Block = 16 = 24.
  • 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.

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).



Last Updated : 07 Nov, 2023
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads