IPv4 subnetting
Convert prefix lengths and masks, find network, broadcast and usable ranges, and handle /31 and /32 boundary cases correctly.
The interesting octet's step size, e.g. mask .192 → block of 64.
Subtract network and broadcast — except /31 links and /32 hosts.
First address of the block; not assignable on normal subnets.
Last address of the block; not assignable.
Prefix lengths, masks, wildcards and block sizes
| Prefix | Dotted mask | Wildcard | Addresses per block | Theoretical host slots* |
|---|---|---|---|---|
| /0 | 0.0.0.0 | 255.255.255.255 | 4294967296 | 4294967294 |
| /1 | 128.0.0.0 | 127.255.255.255 | 2147483648 | 2147483646 |
| /2 | 192.0.0.0 | 63.255.255.255 | 1073741824 | 1073741822 |
| /3 | 224.0.0.0 | 31.255.255.255 | 536870912 | 536870910 |
| /4 | 240.0.0.0 | 15.255.255.255 | 268435456 | 268435454 |
| /5 | 248.0.0.0 | 7.255.255.255 | 134217728 | 134217726 |
| /6 | 252.0.0.0 | 3.255.255.255 | 67108864 | 67108862 |
| /7 | 254.0.0.0 | 1.255.255.255 | 33554432 | 33554430 |
| /8 | 255.0.0.0 | 0.255.255.255 | 16777216 | 16777214 |
| /9 | 255.128.0.0 | 0.127.255.255 | 8388608 | 8388606 |
| /10 | 255.192.0.0 | 0.63.255.255 | 4194304 | 4194302 |
| /11 | 255.224.0.0 | 0.31.255.255 | 2097152 | 2097150 |
| /12 | 255.240.0.0 | 0.15.255.255 | 1048576 | 1048574 |
| /13 | 255.248.0.0 | 0.7.255.255 | 524288 | 524286 |
| /14 | 255.252.0.0 | 0.3.255.255 | 262144 | 262142 |
| /15 | 255.254.0.0 | 0.1.255.255 | 131072 | 131070 |
| /16 | 255.255.0.0 | 0.0.255.255 | 65536 | 65534 |
| /17 | 255.255.128.0 | 0.0.127.255 | 32768 | 32766 |
| /18 | 255.255.192.0 | 0.0.63.255 | 16384 | 16382 |
| /19 | 255.255.224.0 | 0.0.31.255 | 8192 | 8190 |
| /20 | 255.255.240.0 | 0.0.15.255 | 4096 | 4094 |
| /21 | 255.255.248.0 | 0.0.7.255 | 2048 | 2046 |
| /22 | 255.255.252.0 | 0.0.3.255 | 1024 | 1022 |
| /23 | 255.255.254.0 | 0.0.1.255 | 512 | 510 |
| /24 | 255.255.255.0 | 0.0.0.255 | 256 | 254 |
| /25 | 255.255.255.128 | 0.0.0.127 | 128 | 126 |
| /26 | 255.255.255.192 | 0.0.0.63 | 64 | 62 |
| /27 | 255.255.255.224 | 0.0.0.31 | 32 | 30 |
| /28 | 255.255.255.240 | 0.0.0.15 | 16 | 14 |
| /29 | 255.255.255.248 | 0.0.0.7 | 8 | 6 |
| /30 | 255.255.255.252 | 0.0.0.3 | 4 | 2 |
| /31 | 255.255.255.254 | 0.0.0.1 | 2 | 2 (point-to-point only) |
| /32 | 255.255.255.255 | 0.0.0.0 | 1 | 1 (host route) |
Binary arithmetic, not globally allocatable host counts — reserved ranges and addressing policy still apply. /0 is normally the default route, /31 is point-to-point only (RFC 3021), /32 is a single host route.
Wildcard masks are the bitwise inverse of a subnet mask: subtract each mask octet from 255. A /26 network uses mask 255.255.255.192 and wildcard 0.0.0.63; /24 uses wildcard 0.0.0.255; a single host is wildcard 0.0.0.0. Zero wildcard bits must match exactly; one bits are ignored — the same logic ACLs and OSPF network statements use.
- Address
- 192.168.1.77
- Prefix
- /26
- Mask: /26 → 255.255.255.192. Interesting octet is the 4th.
- Block size: 256 − 192 = 64 → subnet boundaries at .0, .64, .128, .192.
- 77 falls in the .64–.127 block → network 192.168.1.64, broadcast 192.168.1.127.
- Usable range: 192.168.1.65 – 192.168.1.126 → 62 usable hosts.
192.168.1.77/26 lives in 192.168.1.64/26, usable .65–.126, broadcast .127.
Related resources
Sources
- Cisco CCNA 200-301 v1.1 Exam Topics (official PDF) — reviewed 2026-11-02
- RFC 3021 — Using 31-Bit Prefixes on IPv4 Point-to-Point Links — reviewed 2026-11-02
- RFC 4632 — Classless Inter-domain Routing (CIDR) — reviewed 2026-11-02
- Cisco — IP Addressing Services Command Reference — reviewed 2026-11-02
Targets CCNA 200-301 v1.1 objectives. Supplemental blocks are labeled beyond exam scope.