Pcornel
Browse topics
Options
Recent
Favorites
Networking · Technical reference

Routing

Direct answer

Routing is how a router decides where to send each packet: it looks up the destination in its routing table, picks the most specific matching route, and forwards out of that route's interface towards its next hop.

At a glance

Routing reference map

Fast context before you go deeper.

PlatformProtocol reference · IPv4 · Command examples · Cisco IOS / IOS XE
Key commandshow ip route <destination>
VerificationDestination / VRF → route source → next-hop forwarding → original traffic and return path
Scope / prerequisiteKeep destination, address family and VRF fixed; confirm the owning protocol or forwarding device.
What next?3 suggested next steps
Child topics (this level)14
Documented command examples3
Evidence1
On this pageJump to a specific section
Choose the next check

Start with the routing symptom

Route missing or unexpected

Fix destination, address family and VRF. Read the installed route, then inspect the originating protocol, advertisement and policy. An OSPF neighbor alone does not prove the prefix was learned or selected.

Route present, traffic fails

Continue to RIB / FIB / CEF, recursive next-hop resolution and adjacency. Compare policy, the downstream path and the return route using the original source and destination.

Routing Table answers what is installed; Forwarding Decision explains which matching prefix a packet uses; RIB / FIB / CEF explains how selected routes become forwarding state. AD and metric compare candidates for the same prefix; a more-specific installed prefix wins the forwarding lookup.

Address-family scope: the command examples below inspect IPv4. IPv6 routes and forwarding must be checked in their own address family. Use IPv6 Routing and OSPFv3 for their syntax; show ip ospf describes OSPFv2, not OSPFv3.

Documented examples · Cisco IOS / IOS XE

Commands for this reference

3 unique read-only examples; catalog links are counted separately. Replace placeholders and confirm syntax, VRF and version on the actual device.

CommandRead this / proof limit
show ip route <destination>
Find the longest matching installed prefix, its source, next hop and interface. Use the matching VRF/address-family syntax on the device.
show ip cef <prefix> detail
Compare local forwarding with the selected route and resolved next hop. This does not prove hardware forwarding or delivery.
show ip protocols

Catalog reference
Inspect active IPv4 routing processes and their advertised networks, filters and routing sources.
Documentation basis

Technical sources

Documentation reviewed 12 October 2026 (a documentation check, not a device test). Confirm release and platform support on your own device.

Command lookup Jump straight to Cisco syntax
Drill down

Subtopics

Go one level deeper into this subject.

Subtopic Routing Table

Which prefix and next hop are installed for this destination? Inspect route source and VRF.

Subtopic Forwarding Decision

Longest prefix match chooses the forwarding entry; AD and metric select candidates for the same prefix.

Subtopic RIB / FIB / CEF

Route selection, recursive resolution and Cisco Express Forwarding data-plane programming.

Subtopic Static Routing

Static-routing reference for next-hop, exit-interface and fully specified routes, default/host routes and floating-static behavior.

Subtopic OSPF

OSPF is a link-state interior gateway protocol. Routers form neighbor relationships, synchronize link-state information, run SPF, and install the best OSPF paths in the routing table.

Subtopic EIGRP

Inspect successor, feasible successor and DUAL state; distinguish reported distance from total distance.

Subtopic EIGRP vs OSPF

Deep Cisco IOS/IOS-XE comparison of EIGRP and OSPF control-plane models, metrics, path selection, convergence, verification and redistribution boundaries.

Subtopic BGP

BGP reference for peer session state, NLRI/policy processing, path attributes, best-path selection and the separation between BGP RIB, global RIB and forwarding.

Subtopic Route Redistribution

Controlled import of routes from one routing source into another protocol or process.

Subtopic Route Summarization

Protocol-aware aggregation, advertisement boundaries, discard routes and evidence.

Subtopic Policy-Based Routing

An attached route-map can select a forwarding action for matched traffic. Verify match counters and next-hop usability.

Subtopic First Hop Redundancy

First Hop Redundancy Protocols (FHRPs) let hosts use a stable default-gateway identity while multiple routers or multilayer switches provide the actual Layer 3 forwarding.

Subtopic Multicast

Multicast delivers one source stream to multiple interested receivers by building forwarding state for multicast groups instead of sending a separate unicast copy to every receiver.

Subtopic MPLS Fundamentals

Label-switched forwarding concepts, control-plane bindings and provider-edge boundaries.

More reference material · notes and background

Preserved source content, including previous workflows and technical details. The focused reference above is documentation; opening this section does not establish verification.

When to use this

Start here when traffic does not reach another network, goes the wrong way, or only one direction works.

First 30 seconds

1. show ip route <dst> — is there a route? Which prefix and next hop?

2. No route → which protocol or static route should provide it?

3. Route present → ping the next hop; show ip cef <dst> — is it resolved?

4. traceroute from the source side — where does it stop?

5. Check the return route on the far side.

Operational verification

destination address → longest matching prefix → best source by administrative distance → lowest metric → next hop reachable → CEF entry → packet forwarded → return route on the far side

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
Cisco IOS / IOS XE
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

1 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Commands Verify boundary
show ip route 10.20.5.9
show ip route summary
show ip cef 10.20.5.9 detail

show ip route <addr> shows the longest-match entry, its source, AD/metric and next hop.

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
Key points

The router needs a route to the destination and the destination's router needs a route back — check both directions. Most specific prefix first, then administrative distance, then metric. A route is useful only if its next hop is reachable.

Key checks
  • show ip route <dst> — the route used for a destination.
  • show ip route — the whole table, with the source code of each route.
  • show ip cef <dst> — the forwarding entry actually used.
  • show ip protocols — routing protocols running and what they advertise.
  • traceroute <dst> source <interface> — the hops traffic takes.
ReferenceWhy it matters1 section · depth on demand

Overview

Routing is how packets find their way between networks. Routers learn about destinations from directly connected networks, static configuration and routing protocols, then choose the best path for each destination. Understanding how they choose — and why they sometimes choose differently than expected — is the core of routing work.

Routing overview: route sources (connected, static, OSPF, EIGRP, BGP), administrative distance to choose between sources, metrics within a protocol, longest prefix match for forwarding, RIB vs FIB (CEF), and features like redistribution, summarisation, PBR and VRFs.

show ip route summary
show ip cef 10.20.30.40 detail
show ip protocols
ReferenceHow it works1 section · depth on demand

How a router decides

1. Every source (connected, static, OSPF, EIGRP, BGP) offers routes.

2. For the same prefix, the lowest administrative distance wins: connected 0, static 1, eBGP 20, EIGRP 90, OSPF 110, IS-IS 115, RIP 120, iBGP 200.

3. Within one protocol, the lowest metric wins; equal metrics give ECMP.

4. For each packet, the longest prefix match in the table is used, regardless of AD.

show ip route <destination> shows which entry a destination matches and why; show ip cef <destination> shows how it is really forwarded.

ReferenceImportant terms & boundaries2 sections · depth on demand

In depth

Routing: getting packets between networks

Routing decides where each packet goes next. Cisco's IOS XE routing guide covers the core pieces this area builds on: static and default routes, the dynamic protocols (EIGRP, IS-IS, OSPF, RIP, BGP), administrative distance to choose between sources, parallel paths, and redistribution between protocols, which it warns must be filtered because metrics don't translate.

The routing topics

TopicQuestion it answers
Routing tableWhich routes does the router know, from which sources?
Forwarding decisionWhich route and next hop does a packet use?
RIB / FIB / CEFHow is the decision turned into fast forwarding?
RedistributionHow do routes move between protocols?
SummarisationHow are many routes advertised as one?
Policy-based routingHow can policy override destination-based routing?
MulticastHow does one-to-many traffic get delivered?
MPLSHow is traffic forwarded by labels?

Route sources and their distances (routing guide)

SourceDistance
Connected0
Static1
eBGP20
EIGRP (internal)90
OSPF110
IS-IS115
RIP120
iBGP200
R1# show ip protocols | include Routing Protocol
Routing Protocol is "application"
Routing Protocol is "ospf 1"
Routing Protocol is "bgp 65010"
R1# show ip route summary | include Source|connected|static|ospf|bgp
Route Source    Networks    Subnets     Replicates  Overhead    Memory (bytes)
connected       0           6           0           576         1824
static          1           3           0           384         1216
ospf 1          0           14          0           1344        4256
bgp 65010       2           5           0           672         2128

Choosing protocols

NeedTypical choice
Inside a campus or enterpriseOSPF or EIGRP (or IS-IS)
Between organisations, Internet edgeBGP
Small stub sitesStatic and default routes
Large enterprise WANBGP over the WAN, IGP inside sites

Whatever the protocol, the forwarding rules are the same: longest prefix match, with administrative distance and metrics deciding what's installed.

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 Routing. 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?