CIDR Notation
Classless Inter-Domain Routing replaced the class-based addressing of the 1980s with a single, flexible notation: address/prefix-length.
How to read it
The number after the slash is the count of leading bits that identify the network. The remaining bits identify hosts within that network. For an IPv4 /24, the first 24 bits are the network and the last 8 are the host — 256 addresses, of which 254 are usable.
192.168.1.0/24
└─────network─────┘└host┘
24 bits 8 bits
Mask: 255.255.255.0
Hosts: 254 (256 minus network and broadcast)
Common IPv4 prefixes
| Prefix | Mask | Wildcard | Addresses | Usable hosts |
|---|---|---|---|---|
| /30 | 255.255.255.252 | 0.0.0.3 | 4 | 2 |
| /29 | 255.255.255.248 | 0.0.0.7 | 8 | 6 |
| /28 | 255.255.255.240 | 0.0.0.15 | 16 | 14 |
| /27 | 255.255.255.224 | 0.0.0.31 | 32 | 30 |
| /26 | 255.255.255.192 | 0.0.0.63 | 64 | 62 |
| /25 | 255.255.255.128 | 0.0.0.127 | 128 | 126 |
| /24 | 255.255.255.0 | 0.0.0.255 | 256 | 254 |
| /23 | 255.255.254.0 | 0.0.1.255 | 512 | 510 |
| /16 | 255.255.0.0 | 0.0.255.255 | 65,536 | 65,534 |
| /8 | 255.0.0.0 | 0.255.255.255 | 16,777,216 | 16,777,214 |
Why CIDR matters
CIDR allows route aggregation: a router can advertise 10.0.0.0/8 instead of 256 separate /16 routes, dramatically reducing the size of the global routing table. Without CIDR, the BGP tables of the modern Internet would have collapsed under their own weight years ago.