CIDR Notation Guide
Understand CIDR notation, how to read it, and how it replaced classful addressing.
What Is CIDR?
CIDR (Classless Inter-Domain Routing, pronounced "cider") is a method for allocating IP addresses and routing. It replaced the old classful addressing system (Class A, B, C) with a more flexible approach.
CIDR notation appends a prefix length to an IP address, separated by a slash:
192.168.1.0/24
The /24 means the first 24 bits are the network portion and the remaining 8 bits are the host portion.
Reading CIDR Notation
The prefix length tells you how many bits define the network:
| CIDR | Subnet Mask | Hosts | Description |
|---|---|---|---|
| /32 | 255.255.255.255 | 1 | Single host |
| /24 | 255.255.255.0 | 254 | Standard small network |
| /16 | 255.255.0.0 | 65,534 | Medium network |
| /8 | 255.0.0.0 | 16,777,214 | Large network |
Quick formula: Usable hosts = 2^(32 - prefix) - 2
The "minus 2" accounts for the network address (all host bits 0) and broadcast address (all host bits 1).
Why CIDR Replaced Classful Addressing
The old classful system was wasteful:
- Class A (/8) = 16 million addresses — too many for most organizations
- Class B (/16) = 65,534 addresses — often too many
- Class C (/24) = 254 addresses — often too few
CIDR allows any prefix length, so you can allocate exactly the right number of addresses. Need 500 addresses? Use a /23 (510 usable hosts) instead of wasting a Class B.
CIDR Aggregation (Supernetting)
CIDR enables route aggregation — combining multiple smaller networks into one larger announcement. This reduces the size of routing tables:
Before: 192.168.0.0/24, 192.168.1.0/24, 192.168.2.0/24, 192.168.3.0/24
After: 192.168.0.0/22 (one route covers all four)
Common CIDR Blocks
/32— Single IP (used in routing and firewall rules)/24— Standard office network (254 hosts)/22— Small ISP allocation (1,022 hosts)/16— Enterprise campus network/0— Default route (all addresses)