Subnetting Cheat Sheet
3rd octet: /16 → /23 (255.255.x.0)
| CIDR | x | Block | Hosts |
|---|---|---|---|
| /16 | 0 | 256 | 65,534 |
| /17 | 128 | 128 | 32,766 |
| /18 | 192 | 64 | 16,382 |
| /19 | 224 | 32 | 8,190 |
| /20 | 240 | 16 | 4,094 |
| /21 | 248 | 8 | 2,046 |
| /22 | 252 | 4 | 1,022 |
| /23 | 254 | 2 | 510 |
4th octet: /24 → /32 (255.255.255.x)
| CIDR | x | Block | Hosts |
|---|---|---|---|
| /24 | 0 | 256 | 254 |
| /25 | 128 | 128 | 126 |
| /26 | 192 | 64 | 62 |
| /27 | 224 | 32 | 30 |
| /28 | 240 | 16 | 14 |
| /29 | 248 | 8 | 6 |
| /30 | 252 | 4 | 2 |
| /31 | 254 | 2 | 2* |
| /32 | 255 | 1 | 1 |
* /31 = point-to-point, both usable (RFC 3021)
wildcard octet = block − 1 · /8–/15: same in the 2nd octet
VLSM in 4 steps
1sort biggest → smallest
2hosts + 2 → next power of 2
3place at next free multiple
4leave room to grow!
Powers of 2
/27 → 256 − 224 = 32
/20 → 256 − 240 = 16 (3rd octet!)
Subnet it in your head
192.168.10.77/26
1block = 256 − 192 = 64
20, 64, 128 … 77 lives in 64–127
3net .64 · bcast .127 · hosts .65–.126
10.1.77.200/20 ← 3rd octet!
1block = 256 − 240 = 16
277 ÷ 16 = 4 r13 → 64
3net 10.1.64.0 · bcast 10.1.79.255
Private & special
10/8 · 172.16/12 · 192.168/16 private
100.64/10 CGNAT · 169.254/16 no DHCP
127/8 loopback · 224/4 multicast
docs: 192.0.2/24 · 198.51.100/24 · 203.0.113/24