Use it when checking which routes a router has and which source won.
Routing table · Router
The routing table lists destination prefixes with their source (connected, static, OSPF …), administrative distance, metric, next hop and outgoing interface; the longest matching prefix wins.
1. The routing table holds best routes with AD/metric and next hops.
2. Codes show the source.
3. Longest match wins.
4. Gateway of last resort for defaults.
5. Monitor size and changes.
sources → best route per prefix → RIB
Context & applicabilityCommon mistakes · platform/version boundaries
- Assuming the longest-lived or lowest-metric route wins over a more specific one — longest prefix always wins.
- Comparing metrics between protocols — only AD decides between sources.
- Forgetting VRFs:
show ip routeshows only the global table. - Missing that a static route to an interface on Ethernet relies on proxy ARP.
Operational reference
Fast context before you go deeper.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- The routing table lists known networks, their source, metric and next hop.
- The longest prefix match decides which route is used.
show ip routeshows it on Cisco devices.
show ip route— RIBshow ip route summary— route counts
ReferenceWhat it is1 section · depth on demand
How it works
The routing table (RIB) holds the best route per prefix from all sources. Each entry shows the source code (C, L, S, O, D, B…), prefix, [AD/metric], next hop and interface. The router fills it from connected interfaces, static routes and routing protocols, choosing between sources by administrative distance.
ReferenceWhy it matters1 section · depth on demand
Reading show ip route
O IA 10.20.0.0/16 [110/20] via 10.1.12.2, 00:15:31, GigabitEthernet0/0/1
| Field | Meaning |
|---|---|
O IA | Source code: OSPF inter-area |
10.20.0.0/16 | Destination prefix |
[110/20] | Administrative distance / metric |
via 10.1.12.2 | Next hop |
00:15:31 | Age of the route |
GigabitEthernet0/0/1 | Outgoing interface |
Illustrative output, not captured Evidence. show ip route <address> shows which entry matches a destination.
ReferenceImportant terms & boundaries1 section · depth on demand
In depth
Three processes, one table
Cisco's route-selection guide separates the work into routing protocols (each picks its best path by metric), the routing table manager (picks between sources by administrative distance and installs routes) and the forwarding process (uses the longest prefix match among installed routes). The routing table is the output of the second step.
Detail view of one entry
R1# show ip route 10.20.0.0
Routing entry for 10.20.0.0/16
Known via "ospf 1", distance 110, metric 20, type inter area
Last update from 10.1.12.2 on GigabitEthernet0/0/1, 00:15:31 ago
Routing Descriptor Blocks:
* 10.1.12.2, from 10.255.0.2, 00:15:31 ago, via GigabitEthernet0/0/1
Route metric is 20, traffic share count is 1
10.1.13.3, from 10.255.0.3, 00:15:31 ago, via GigabitEthernet0/0/2
Route metric is 20, traffic share count is 1
| Line | Tells you |
|---|---|
| Known via / distance / metric | Source protocol, AD, metric |
| from 10.255.0.2 | Router ID that originated the information (not the next hop) |
| Two descriptor blocks | Equal-cost paths; * marks the one used for the next process-switched packet |
| Age | Time since the route last changed — a constantly small age means flapping |
Backup routes
When a protocol's route loses against a lower-AD source, the protocol keeps it as a backup and offers it again when the better route disappears. That is why a floating static route (higher AD) appears automatically when the dynamic route is withdrawn.
Table-wide views
| Command | Use |
|---|---|
show ip route summary | Route count per source and memory — sudden changes reveal leaks |
show ip route \| begin Gateway | Skip the legend; shows gateway of last resort |
show ip route connected / static / ospf | Filter by source |
show ip route vrf NAME | Each VRF has its own table |
show ip route longer-prefixes (with prefix) | Everything inside a block |
Common misreadings
S*= static candidate default;O*E2= OSPF external default — the*means candidate default, not "best".- A route in
show ip routecan still fail to forward if CEF has no complete adjacency; checkshow ip ceffor data-plane truth.
Documented example, not captured output.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Network Devices → Router → Routing table. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.cisco.com/c/en/us/support/ios-nx-os-software/ios-xe-17/series.html · confidence 94%