Reference
Subnetting cheat sheet
Block sizes, mask values and prefixes for every octet, plus the four-step method. Solve any IPv4 subnet without writing out binary. Press C on any page to open it as a popup.
| Bit | ||||||||
|---|---|---|---|---|---|---|---|---|
| Block size | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
| Mask value | 128 | 192 | 224 | 240 | 248 | 252 | 254 | 255 |
| Octet 4 prefix | /25 | /26 | /27 | /28 | /29 | /30 | /31 | /32 |
| Octet 3 prefix | /17 | /18 | /19 | /20 | /21 | /22 | /23 | /24 |
| Octet 2 prefix | /9 | /10 | /11 | /12 | /13 | /14 | /15 | /16 |
| Octet 1 prefix | /1 | /2 | /3 | /4 | /5 | /6 | /7 | /8 |
Tap a bit number to highlight its column.
The method
- 1Interesting octet
Where the prefix ends: /1–/8 octet 1, /9–/16 octet 2, /17–/24 octet 3, /25–/32 octet 4.
- 2Block size
Find the prefix in the table and read the block size above it. It also equals 256 − mask.
- 3Network address
Count in multiples of the block size in that octet. The largest multiple at or below the IP is the network.
- 4Range and broadcast
First usable = network + 1. Broadcast = next network − 1. Last usable = broadcast − 1.