Classless Inter Domain Routing (CIDR) (original) (raw)

Last Updated : 10 Jan, 2026

CIDR(Classless Inter Domain Routing) is a method of IP address allocation and routing that allows more efficient use of IP addresses. Unlike traditional class-based addressing, CIDR allocates IP addresses based on a network prefix rather than a fixed class (A, B, or C).

**CIDR Notation: a.b.c.d/n

Why CIDR?

Classful addressing wastes IP addresses:

Class IPs Available Hosts Example Wastage
A 2²⁴ 2²⁴ - 2 Too large for small orgs
B 2¹⁶ 2¹⁶ - 2 Wastes 49,150 hosts for 214 needed
C 2⁸ 2⁸ - 2 Small networks only

**Problem: Organizations often need a number of hosts that do not match class sizes, leading to wastage.
**Solution: CIDR allows **flexible block allocation matching exact requirements.

Rules for Forming CIDR Blocks

**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 three rules are followed by this Block. Hence, it is a valid IP address block.

Advantages of CIDR

Disadvantages of CIDR