What is CIDR and how it works?

Computer NetworkInternetMCA

Classless Inter-Domain Routing (CIDR) is a group of IP addresses that are allocated to the customer when they demand a fixed number of IP addresses.

In CIDR there is no wastage of IP addresses as compared to classful addressing because only the numbers of IP addresses that are demanded by the customer are allocated to the customer.

The group of IP addresses is called Block in Classless Inter - Domain (CIDR).

CIDR follows CIDR notation or Slash notation. The representation of CIDR notation is x.y.z.w /n the x.y.z.w is IP address and n is called mask or number of bits that are used in network id.

Properties of CIDR Block

The properties of CIDR block are as follows −

  • The IP addresses in a block are continuous.

  • The first address of a block should be exactly divisible by the number of addresses of a block.

  • The size of the Block should be power of 2.

Use of CIDR

Variable-length subnet masking is the foundation of CIDR (VLSM). It can now specify prefixes of any duration, making it much more powerful than the previous method.

Two collections of numbers make up CIDR IP addresses. The network address is written as a prefix, similar to how an IP address is written (e.g. 192.255.255.255).

The suffix, which means how many bits are in the whole address (e.g. /12), is the second component. A CIDR IP address will look anything like this when put together −

192.255.255.255/12

As part of the IP address, the network prefix is also defined. These changes are based on how many bits are needed. As an illustration, in the above example, the first 12 bits of the address are for the network, while the last 20 bits are for host addresses.

CIDR Notation

Using CIDR we can assign an IP address to host without using standard id address classes like Class A, B, and C.

In CIDR we simply tell how many bits are used for network id. The network id bits are provided after the '/' symbol. Like /10 means 10 bits are used for the network id part and remaining 32-10=22 bits are used for the host id part.

The advantage of using CIDR notation is that it reduces the number of entries in the routing table and also it manages the ip address space.

Disadvantages

The disadvantages of using CIDR Notation are as follows −

  • Using CIDR it is complex to determine the route. By using classful addresses, we are directly having separate tables for class A, Class B, Class C.

  • So we directly go to these tables by seeing the prefix of IP address. But by using CIDR, we don't have these tables separately. All entries are placed in a single table. So, it is difficult to find a route.

raja
Published on 16-Sep-2021 06:52:25
Advertisements