Routing Table
Cheat sheet · https://pcornel.dk/topic.php?topic=621
Answer
The routing table lists every network the router knows: the prefix, how it was learned (code letter), administrative distance and metric in brackets, the next hop and the outgoing interface.
Remember
Read each line: O 10.2.0.0/16 [110/20] via 10.0.0.2, 00:12:03, Gi0/1 — learned by OSPF, distance 110, metric 20, next hop, age, interface. C connected, L local (the router's own address), S static, S* default, O OSPF, D EIGRP, B BGP. Without a default route, unknown destinations are dropped.
First checks
show ip route— the full table.show ip route <dst>— the route chosen for one address, with details.show ip route summary— routes per source.show ip route | include ^S|^O— routes of one kind.show ipv6 route— the IPv6 table.
Commands
show ip route- IPv4 RIB routes and selected next hops.
show ip protocols- Display active routing protocol parameters.
show ipv6 route- Display the IPv6 routing table.
show ip route <prefix>- Display the route the router uses for a destination or prefix.
show ip route <address>show ip route summaryshow ip route supernets-onlyclear ip routeshow ip route <destination>show ip cef <destination>
Verify in this order
routes learned from connected, static and protocols → best per prefix installed with code, AD/metric, next hop and interface → default route as last resort
Where it usually breaks
underlay/interface reachability → protocol adjacency/session → received/originated state → policy → best path/RIB → FIB/adjacency → traffic path
Routing Table · reference boundaries
| Decision | Applied when | Key fact |
|---|---|---|
| Longest-prefix match | Forwarding toward a destination | Most specific installed prefix wins |
| Administrative distance | Same prefix from different route sources | Lower distance is preferred |
| Protocol metric | Multiple candidates inside a routing process | Protocol-specific best path |
| Recursion | Route points to a next-hop address | Next hop must resolve to usable adjacency |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=621