Pcornel
Networking · IP Fundamentals › IPv4 › Addressing

Subnetting

Cheat sheet · https://pcornel.dk/topic.php?topic=929

Back to the Topic

Answer

Subnetting divides one network into smaller subnets by borrowing host bits for the network part; each borrowed bit doubles the number of subnets and halves the hosts per subnet.

Remember

Borrowing n bits gives 2^n subnets; remaining h host bits give 2^h − 2 hosts. Work from the requirement: hosts needed → host bits → prefix. Leave room for growth.

First checks

  • show ip interface brief — addresses on each interface.
  • show ip interface <if> | include Internet address — address with prefix length.
  • show ip route connected — the subnets the router derives from its addresses.
  • show ip route <prefix> longer-prefixes — overlapping or more specific routes.
  • Subnet calculator (e.g. ipcalc <ip>/<len> on Linux) — network, broadcast and host range.

Commands

ip subnet-zero
show ip route connected

Verify in this order

host requirement → prefix length → block size → subnet list → no overlap → assigned to VLANs and links

Where it usually breaks

physical/link dependency → local object state → peer/control state → policy → forwarding/adjacency → end-to-end result

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=929

Confirmation

Confirm action

Continue?