CIDR (Classless Inter-Domain Routing) is a method of allocating IP addresses and routing IP packets that replaces the older class-based system and allows variable-length subnet masks.
What Is CIDR?
Classless Inter-Domain Routing (CIDR), introduced in 1993, was designed to slow the exhaustion of IPv4 addresses and improve route aggregation across the internet.
Before CIDR, IP networks were divided into rigid classes:
- Class A (/8)
- Class B (/16)
- Class C (/24)
This system often wasted large blocks of addresses.
CIDR removes class boundaries and allows networks to be defined using a prefix length:
IP address / prefix-length
192.168.1.0/24The /24 indicates that the first 24 bits, or the first 3 octets (192.168.1), represent the network portion.
How It Works
CIDR uses variable-length subnet masking (VLSM) to define networks of different sizes.
The prefix length determines how many bits are used for the network:
/8= 255.0.0.0/16= 255.255.0.0/24= 255.255.255.0/30= 255.255.255.252
The larger the prefix number:
- The smaller the network
- The fewer available host addresses
For example:
10.0.0.0/8Supports over 16 million addresses.
10.0.0.0/30Supports 2 usable host addresses.
CIDR also allows route summarization. Multiple smaller networks can be combined into one aggregated route to reduce routing table entries.
Real World Example
Instead of allocating an entire Class C network to a small business, which would be very expensive and wasteful:
172.32.16.0/24
An organization that only needs 10 Internet addresses could be assigned:
172.32.16.0/28
A /28 provides:
- Network address is: 172.32.16.0
- First address is: 172.32.16.1
- Last address is: 172.32.16.14
- Broadcast address is: 172.32.16.15
- Number of assignable: 14 IP addresses
This prevents waste and allows more efficient IP utilization.
Why It Matters
CIDR is essential because it:
- Slows IPv4 exhaustion
- Enables efficient IP allocation
- Reduces global routing table size
- Supports route aggregation
- Improves scalability of internet routing
Without CIDR, the global routing infrastructure would be significantly larger and less efficient.
Related Terms
- Subnet Mask
- Variable Length Subnet Masking (VLSM)
- IPv4
- Route Summarization
- Border Gateway Protocol (BGP)