Routing & Forwarding
Cheat sheet · https://pcornel.dk/topic.php?topic=429
Answer
Routing is how a router learns which networks exist and picks the best way to each; forwarding is what it does with every packet — look up the destination and send it out of the right interface.
Remember
Each router decides alone, and each direction is routed separately: a conversation needs a route out on every hop and a route back on every hop. Longest prefix match is applied first; administrative distance only chooses between sources of the same prefix.
First checks
show ip route <address>— the one route that matches the destination.show ip cef <address>— the resolved next hop and interface actually used.show ip arp <next hop>— next hop reachable at Layer 2?ping <address> source <own address>— tests the return path to that source.traceroute <address>— the last router with a route.
Commands
show ip route <address>show ip cefshow ip routeshow ip ospf databaseshow bgpshow adjacencyshow platform hardware ...show ip cef exact-routeshow ip cef <prefix> detail
Verify in this order
route to the destination on every hop → longest match is the intended route → next hop resolves at Layer 2 → CEF agrees → route back to the source on every hop
Where it usually breaks
underlay/interface reachability → protocol adjacency/session → received/originated state → policy → best path/RIB → FIB/adjacency → traffic path
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=429