FREE NETWORKING REFERENCE
IPv4 subnetting cheat sheet
Use the table for quick recall, then practice calculating network boundaries without it.
| CIDR | Mask | Total addresses | Traditional usable hosts* |
|---|---|---|---|
| /24 | 255.255.255.0 | 256 | 254 |
| /25 | 255.255.255.128 | 128 | 126 |
| /26 | 255.255.255.192 | 64 | 62 |
| /27 | 255.255.255.224 | 32 | 30 |
| /28 | 255.255.255.240 | 16 | 14 |
| /29 | 255.255.255.248 | 8 | 6 |
| /30 | 255.255.255.252 | 4 | 2 |
1 · Find host bits
IPv4 has 32 bits. Host bits = 32 − prefix length.
2 · Find block size
In the interesting octet, block size = 256 − mask value.
3 · Find boundary
Locate the multiple of the block size containing the target IP.
4 · Verify range
Identify network address, broadcast address and the host range expected by the question.
*The familiar “total minus 2” host rule is a study shortcut for conventional subnets. Special cases such as /31 point-to-point use have different behavior.