Prefix
Cheat sheet · https://pcornel.dk/topic.php?topic=1062
Answer
A prefix is a network written as address and length — 10.20.0.0/16. It is what the routing table stores and what the router matches destinations against.
Remember
The length says how many leading bits must match. A shorter prefix covers more addresses. Two routes with the same address but different lengths are different routes.
First checks
show ip route <dst>— the route actually chosen for that address.show ip route <prefix> <mask> longer-prefixes— every more specific route under a block.show ip cef <dst>— the forwarding entry used.show ipv6 route <dst>— the same for IPv6.
Verify in this order
destination address → all routes that contain it → the longest prefix selected → its next hop resolved → CEF entry matches
Where it usually breaks
underlay/interface reachability → protocol adjacency/session → received/originated state → policy → best path/RIB → FIB/adjacency → traffic path
Prefix operational reference
| Prefix/routing check | Known-good | Failure signature | Next boundary |
|---|---|---|---|
| Matching prefixes | Intended most-specific route exists | Unexpected more-specific/default only | Route source/policy |
| RIB winner | Correct source/next hop for prefix | Route absent or different next hop | Protocol/static/VRF logic |
| Recursion | Resolves to reachable next hop | Recursive/unresolved chain | Supporting prefix + ARP/ND |
| FIB/CEF | Expected adjacency/interface | Drop/punt/wrong member | Data-plane programming |
| Return prefix | Compatible reverse path exists | Missing/asymmetric stateful path | Remote routing/policy |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=1062