Pcornel
Networking · IP Fundamentals › IPv4 › Addressing

CIDR

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

Back to the Topic

Answer

Classless Inter-Domain Routing (CIDR) writes the network part as a prefix length (/24 instead of 255.255.255.0) and allows any prefix size, which enables subnetting and route summarisation.

Remember

  • Prefix length and mask describe the same boundary
  • Network and directed-broadcast addresses are not ordinary host addresses
  • Hosts per traditional subnet are 2^(host bits)-2, with point-to-point exceptions
  • VLSM allocates largest requirements first and must avoid overlap.

First checks

  • show ip route — prefixes with lengths
  • show ip route <prefix> longer-prefixes — covered routes

Commands

show ip route 10.0.8.0 255.255.248.0 longer-prefixes
show ip bgp 10.0.8.0/21
show ip route 10.0.8.0 255.255.248.0

Verify in this order

address + prefix length → network → routing longest match

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=928

Confirmation

Confirm action

Continue?