Pcornel
Browse topics
Options
Recent
Favorites
Networking · Technical reference

Forwarding Decision

Direct answer

For each packet the router takes the destination address, finds the longest matching prefix, and sends the packet out of that route's interface towards the resolved next hop. In practice this lookup is done in CEF, built from the routing table.

When to use this

Use it to explain why a packet left by a particular interface, or why it was dropped.

First 30 seconds

1. show ip route <dst> — which prefix?

2. show ip cef <dst> — same next hop and interface?

3. Several next hops → show ip cef exact-route <src> <dst> for the flow in question.

4. show ip arp <next hop> — resolved?

5. Incomplete → the next hop is down or in another VLAN.

Operational verification

destination address → longest match in the routing table → CEF entry → next hop → adjacency with MAC address → packet rewritten and sent out of the interface

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.
At a glance

Operational reference

Fast context before you go deeper.

PlatformCisco IOS / IOS XE · IOS/IOS XE
Scope / prerequisiteUse it to explain why a packet left by a particular interface, or why it was dropped.
What next?3 suggested next steps
Child topics (this level)3
Evidence1
On this pageJump to a specific section
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 Verification and output interpretation Verify boundary

Start with the exact destination: inspect show ip route <destination>, then show ip cef <destination> to compare selected control-plane route with programmed forwarding state. If CEF resolves through a next hop, inspect the relevant adjacency/ARP state and outgoing interface. For ECMP, verify all expected next hops are present and operational. If a route exists in the RIB but CEF shows unresolved, drop or an unexpected egress, the useful boundary is between route selection and forwarding resolution rather than inside the routing protocol itself.

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
Drill down

Subtopics

Go one level deeper into this subject.

Key points

Order of decision: longest prefix, then administrative distance, then metric. The next hop must resolve to an interface and a MAC address (ARP). If no route matches and there is no default, the packet is dropped and an ICMP unreachable may be sent.

Key checks
  • show ip route <dst> — the prefix chosen.
  • show ip cef <dst> — the next hop and interface CEF uses.
  • show ip cef exact-route <src> <dst> — which of several equal paths a given flow takes.
  • show ip arp <next hop> — the next hop's MAC address.
  • show adjacency <interface> detail — the rewrite information for the next hop.
ReferenceImportant terms & boundaries4 sections · depth on demand

In depth

The forwarding decision

For each packet, a router picks one route and one next hop. RFC 1812's CIDR rule sets the basis: routers must use the most specific matching route, the longest matching prefix. Administrative distance and metrics decide earlier which routes are installed; the per-packet decision then uses longest match, and load-sharing chooses among equal paths.

Steps for each packet

StepDecision
1Is the destination one of the router's own addresses? → deliver locally
2Policy (PBR, VRF) overrides? → use the policy
3Longest prefix match in the FIB
4Several equal paths? → hash the flow to one
5Resolve the next hop's Layer 2 address (adjacency)
6Rewrite the frame, decrement TTL, forward

Example

Installed routeLengthMatch for 10.30.0.15?
0.0.0.0/00Yes
10.0.0.0/88Yes
10.30.0.0/1616Yes → chosen
10.30.1.0/2424No
R1# show ip cef 10.30.0.15
10.30.0.0/16
  nexthop 10.0.12.2 GigabitEthernet0/0/1
  nexthop 10.0.13.2 GigabitEthernet0/0/2
R1# show ip cef exact-route 10.110.0.64 10.30.0.15
10.110.0.64 -> 10.30.0.15 =>IP adj out of GigabitEthernet0/0/2, addr 10.0.13.2
R1# show ip route 10.30.0.15 | include Known|via
  Known via "ospf 1", distance 110, metric 12, type inter area
  * 10.0.12.2, from 10.255.0.2, 00:41:02 ago, via GigabitEthernet0/0/1
    10.0.13.2, from 10.255.0.3, 00:41:02 ago, via GigabitEthernet0/0/2

When a packet can't be forwarded

SituationResult
No matching route and no defaultDropped; ICMP destination unreachable
Route to Null0Dropped (summary discard route)
TTL reaches zeroDropped; ICMP time exceeded (used by traceroute)
Next hop unresolvedDropped until ARP completes

Troubleshooting order

Check the route (show ip route), the forwarding entry (show ip cef), the chosen path for the flow (exact-route), then the next hop's ARP entry.

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.

Quick reference

A router's forwarding decision for each packet uses the longest prefix match in the FIB. Which routes are in the routing table was decided earlier: administrative distance chooses between sources for the same prefix, and the metric chooses within one protocol.

StepDecides
1. Route installationAD (source trust), then metric
2. Packet lookupLongest matching prefix wins
3. Load sharingEqual-cost paths per flow (CEF)
show ip route 10.20.5.9
show ip cef 10.20.5.9

Documented example, not captured output.

A /24 static route and a /16 OSPF route can both be installed; packets to an address in the /24 always use the static route regardless of AD.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

Concept and state model

The forwarding path begins with the destination IP address, not with a routing-protocol preference. CEF performs a longest-prefix lookup in the FIB and obtains a resolved forwarding action: a next hop, an outgoing interface, a load-sharing set or a special disposition such as drop/punt/receive. Recursive routes are flattened through dependency resolution so packet forwarding does not have to repeat full control-plane logic for every packet. Adjacency state supplies the Layer 2 rewrite information needed for a directly reachable next hop. With ECMP, multiple equal-cost adjacencies can be installed and a hash distributes flows so packet order is preserved as much as possible.

Operational boundaries and common misconceptions

A valid FIB entry shows only local forwarding intent. It does not show the next device accepts the packet, the remote route exists, the reverse path works or an application responds. Likewise, successful ARP shows local neighbor resolution but not remote routing. Hardware forwarding counters can add confidence that packets traverse the local dataplane, but they must be scoped to the correct prefix/interface and interpreted alongside drops, ACL/QoS policy and MTU. Keep local control plane, local forwarding plane and downstream network behavior distinct.

ReferenceConfiguration & state1 section · depth on demand

Configuration model and design choices

Most FIB state is derived rather than configured directly. The important operator inputs are the RIB sources, interface/neighbor resolution, policy features such as PBR where deliberately used, and platform forwarding resources. A clean design avoids unnecessary recursion chains and ensures that next-hop reachability is stable inside the correct VRF. When policy-based forwarding is present, document it explicitly because it can make a packet follow a different path than a plain RIB lookup suggests. Do not “fix” a FIB symptom by repeatedly clearing CEF unless the upstream control/adjacency cause is understood.

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 → Forwarding Decision. 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%
Embedded reference data

Quick lookup tables

Forwarding Decision · reference boundaries

Compact technical reference for the most important state and interpretation boundaries.

StateCanonical questionEvidence
RIBWhich route won?show ip route <destination>
FIBWhat forwarding action is programmed?show ip cef <destination>
AdjacencyIs the directly resolved next hop usable?show adjacency / ARP
EgressIs the intended interface forwarding cleanly?interface counters/status
Confirmation

Confirm action

Continue?