Networking · IP Fundamentals › IPv4 › Addressing
Prefix
Cheat sheet · https://pcornel.dk/topic.php?topic=926
Answer
The prefix (prefix length) is the number of leading bits that identify the network, written /n; a /26 has 26 network bits and 64 addresses.
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 interface brief— interface addressesshow ip interface <interface>— Internet address with /len
Commands
ip address 10.1.4.1 255.255.252.0ip route 10.1.4.0 255.255.252.0 192.0.2.1ip prefix-list SITE permit 10.1.4.0/22ip prefix-list SITE permit 10.1.4.0/22 le 24show ip route 10.1.4.0 255.255.252.0 longer-prefixesshow ip prefix-list SITE
Verify in this order
address + prefix → network ID → connected route
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=926