Table of contents
Open Table of contents
What is CIDR?
CIDR = Classless Inter-Domain Routing
It answers one question: Which IP addresses belong to the same network?
The intuition (one-liner)
CIDR says how many bits are “fixed” for the network, and the rest are for hosts.
An IPv4 address has 32 bits:
192.168.1.5/24 = 11000000.10101000.00000001.00000101
If it’s /24:
- First 24 bits → network
- Last 8 bits → machines inside that network
Common CIDR examples
| CIDR | Subnet Mask | Number of IPs | Typical use |
|---|---|---|---|
/32 | 255.255.255.255 | 1 | Single IP |
/24 | 255.255.255.0 | 256 | Home / small network |
/16 | 255.255.0.0 | 65,536 | Big private network |
/8 | 255.0.0.0 | 16 million | Very large |
Example:
10.0.0.0/8
Means:
- Network: 10.x.x.x
- All IPs from
10.0.0.0to10.255.255.255