Last Updated: May 1, 2025
CIDR Quick Reference
| Prefix | Subnet Mask | Total IPs | Usable Hosts | Class |
|---|---|---|---|---|
| /32 | 255.255.255.255 | 1 | 1 (host route) | — |
| /30 | 255.255.255.252 | 4 | 2 | Point-to-point |
| /29 | 255.255.255.248 | 8 | 6 | Small subnet |
| /28 | 255.255.255.240 | 16 | 14 | Small office |
| /27 | 255.255.255.224 | 32 | 30 | Department |
| /26 | 255.255.255.192 | 64 | 62 | Medium subnet |
| /25 | 255.255.255.128 | 128 | 126 | Large subnet |
| /24 | 255.255.255.0 | 256 | 254 | Class C |
| /16 | 255.255.0.0 | 65,536 | 65,534 | Class B |
| /8 | 255.0.0.0 | 16,777,216 | 16,777,214 | Class A |
Calculating Subnets
Network AddressIP & subnet mask = first address in the subnet
Broadcast AddressNetwork address + (total hosts - 1)
Host rangeNetwork+1 through Broadcast-1 (usable IPs)
Example: 192.168.1.50/27Network=192.168.1.32, Broadcast=192.168.1.63, 30 usable
Wildcard mask255.255.255.255 - subnet mask (used in ACL/Cisco)
/27 wildcard255.255.255.255 - 255.255.255.224 = 0.0.0.31
VLSM (Variable Length Subnet Masking)
| Item | Description |
|---|---|
Concept | Subnet a subnet — use different mask lengths across network |
Step 1 | Sort required subnets by size (largest first) — prevents gaps |
Step 2 | Allocate largest subnet first at the start of address space |
Step 3 | Continue allocating from the next available address after each subnet |
Benefit | Efficient IP usage — no wasted addresses from fixed-size subnets |
Example: 192.168.1.0/24 | 60 hosts(/26), 25 hosts(/27), 10 hosts(/28), 2 hosts(/30) |
Subnetting Shortcuts
| Item | Description |
|---|---|
Block size | 256 - (last non-255 octet) = # of IPs per subnet in that octet |
/26 block size | 256 - 192 = 64 IPs per subnet |
Magic number trick | Subtract prefix from max: /27 = 32 - 27 = 5; 2^5 = 32 IPs |
Subnet zero | Address space where subnet bits are all zero (usable in modern) |
All-ones subnet | Address space where subnet bits are all ones (usable in modern) |
Pro Tip: Quick reference: /24 = 256 IPs, /16 = 65,536 IPs, /8 = 16.7M IPs. For usable hosts, subtract 2 (network + broadcast). To double a subnet, subtract 1 from prefix (/24→/23).