Quick reference
| Prefix | Mask | Addresses | Ordinary 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 |
| /31 | 255.255.255.254 | 2 | 2 on P2P |
| /32 | 255.255.255.255 | 1 | Single address |
What to understand first
Address count is 2^(32 - prefix length). For ordinary broadcast subnets, subtract the network and broadcast addresses. /31 point-to-point links and /32 host routes have different semantics.
Find the boundary by applying the mask to the address. In the changing octet, block size is 256 minus the mask value. Round down to a multiple of that size; carry across octets when required.
Use variable-length subnetting by allocating the largest requirements first. Include growth, infrastructure and reserved addresses; track every allocation to prevent overlap.
A summary must cover the intended component networks and be aligned to its prefix boundary. A larger summary can accidentally attract traffic for space you do not own.
Commands and interpretation
Inspection commands are read-only unless explicitly labeled otherwise. Capture commands start collection; configuration-mode commits change device state.
Cisco IOS XE
Read-only EXEC
show ip interface brief
show ip route 192.0.2.77
show ip arpInspect: Compare the actual mask, selected route and next-hop resolution. A default route can hide a missing more-specific route.
Junos
Read-only operational
show interfaces terse
show route 192.0.2.77 detail
show arp no-resolveInspect: Confirm the correct routing-instance table and interface address. A neighbor entry does not prove an application is reachable.
Worked example · Illustrative, not a device capture
Worked boundary calculation
Address: 192.0.2.77/27
Mask: 255.255.255.224
Block: 32 addresses
Network: 192.0.2.64
Hosts: 192.0.2.65 - 192.0.2.94
Bcast: 192.0.2.9577 falls between the aligned boundaries 64 and 96. The last address before 96 is the broadcast address.
A gateway chosen as .65 leaves 29 other ordinary host addresses; reservations reduce the usable pool further.
Troubleshooting sequence
- Write the client address, mask and gateway exactly as configured; compare them with IPAM rather than trusting a diagram.
- Calculate the client and gateway subnet boundaries independently. Check duplicate addresses and DHCP scope options.
- If the destination is on-link, inspect ARP and VLAN carriage. If off-link, inspect gateway reachability and routing.
- Check the return route from the destination context. Overlapping private networks can make VPN routing ambiguous.
- Validate the real application from the affected client after correcting the address plan.
Common mistakes
- Applying the 2^n - 2 rule to a /31 point-to-point link.
- Choosing a broadcast address as a host or assuming the first address is always the gateway.
- Treating a successful gateway ping as proof of correct DHCP, DNS or return routing.
Acceptance checks
- No overlapping allocations; gateway and client masks agree.
- DHCP exclusions, static reservations and documentation match.
- Forward and reverse application paths pass from each affected subnet.
Primary references
Vendor documentation and protocol specifications support this guide. The diagrams, scenarios and troubleshooting sequences are Wolex-authored.
