Pcornel
Browse topics
Options
Recent
Favorites
Networking · Technical reference

Routing table · Router

Direct answer

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.

When to use this

Use it when checking which routes a router has and which source won.

First 30 seconds

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.

Operational verification

sources → best route per prefix → RIB

Context & applicabilityCommon mistakes · platform/version boundaries
Common mistakes
Reading mistakes
  • 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 route shows only the global table.
  • Missing that a static route to an interface on Ethernet relies on proxy ARP.
Platform / version applicability
Cisco IOS / IOS XE
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformCisco IOS / IOS XE · Cisco IOS XE
Scope / prerequisiteUse it when checking which routes a router has and which source won.
What next?2 suggested next steps
Evidence1
On this pageJump to a specific section
Evidence references

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.

observation · 1
Command lookup Jump straight to Cisco syntax
Key points
  • The routing table lists known networks, their source, metric and next hop.
  • The longest prefix match decides which route is used.
  • show ip route shows it on Cisco devices.
Key checks
  • show ip route — RIB
  • show 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
FieldMeaning
O IASource code: OSPF inter-area
10.20.0.0/16Destination prefix
[110/20]Administrative distance / metric
via 10.1.12.2Next hop
00:15:31Age of the route
GigabitEthernet0/0/1Outgoing 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
LineTells you
Known via / distance / metricSource protocol, AD, metric
from 10.255.0.2Router ID that originated the information (not the next hop)
Two descriptor blocksEqual-cost paths; * marks the one used for the next process-switched packet
AgeTime 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

CommandUse
show ip route summaryRoute count per source and memory — sudden changes reveal leaks
show ip route \| begin GatewaySkip the legend; shows gateway of last resort
show ip route connected / static / ospfFilter by source
show ip route vrf NAMEEach 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 route can still fail to forward if CEF has no complete adjacency; check show ip cef for data-plane truth.

Documented example, not captured output.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docCisco IOS / IOS XE Current documentation reviewed 2026-09-14

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%
Confirmation

Confirm action

Continue?