KnowledgebaseNetworking
CIDR Cheat Sheet
A reference for IPv4 subnet masks, host counts, and block sizes.
CIDR (Classless Inter‑Domain Routing) replaces the old classful system and defines networks using a slash notation (e.g., /24). The number after the slash represents the number of network bits.
CIDR Formulas
CIDR to Subnet Mask Table
| CIDR | Subnet Mask | Hosts | Block Size | Notes |
|---|---|---|---|---|
| /32 | 255.255.255.255 | 1 | 1 | Single host |
| /31 | 255.255.255.254 | 2 | 2 | Point‑to‑point links |
| /30 | 255.255.255.252 | 4 | 4 | WAN links |
| /29 | 255.255.255.248 | 8 | 8 | Small networks |
| /28 | 255.255.255.240 | 16 | 16 | Sub‑LANs |
| /27 | 255.255.255.224 | 32 | 32 | Small office |
| /26 | 255.255.255.192 | 64 | 64 | IoT, cameras |
| /25 | 255.255.255.128 | 128 | 128 | Half of a /24 |
| /24 | 255.255.255.0 | 256 | 256 | Standard LAN |
| /23 | 255.255.254.0 | 512 | 512 | Supernet |
| /22 | 255.255.252.0 | 1024 | 1024 | Large LAN |
| /21 | 255.255.248.0 | 2048 | 2048 | Aggregation |
| /20 | 255.255.240.0 | 4096 | 4096 | Cloud networks |
| /19 | 255.255.224.0 | 8192 | 8192 | ISPs |
| /18 | 255.255.192.0 | 16384 | 16384 | ISPs |
| /17 | 255.255.128.0 | 32768 | 32768 | ISPs |
| /16 | 255.255.0.0 | 65536 | 65536 | Large networks |
| /15 | 255.254.0.0 | 131072 | 131072 | Supernet |
| /14 | 255.252.0.0 | 262144 | 262144 | Supernet |
| /13 | 255.248.0.0 | 524288 | 524288 | Supernet |
| /12 | 255.240.0.0 | 1,048,576 | 1M | Private 172.16/12 |
| /11 | 255.224.0.0 | 2,097,152 | 2M | ISP blocks |
| /10 | 255.192.0.0 | 4,194,304 | 4M | CGNAT 100.64/10 |
| /9 | 255.128.0.0 | 8,388,608 | 8M | |
| /8 | 255.0.0.0 | 16,777,216 | 16M | Private 10/8 |

