Pcornel
Browse topics
Options
Recent
Favorites
Networking · Technical reference

Layer 3 forwarding

Direct answer

Layer 3 forwarding means a router looks up the destination IP in its forwarding table, decrements TTL, rewrites the Layer 2 header for the next hop and sends the packet out the chosen interface.

When to use this

Use it when packets do not leave a router toward a known destination.

First 30 seconds

1. L3 forwarding: lookup destination (longest match), decrement TTL, rewrite L2, forward.

2. CEF does it in hardware/fast path.

3. Drops if no route.

4. Check ARP for next hop.

5. Use exact-route for ECMP.

Operational verification

packet → longest match → next hop → L2 rewrite → forward

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 · Cisco IOS XE · IOS/IOS XE
Scope / prerequisiteUse it when packets do not leave a router toward a known destination.
What next?3 suggested next steps
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 Forwarding problems Narrow the fault
  • Route present but ARP/adjacency missing → packets dropped (show ip cef <dst> shows glean).
  • TTL loops from routing loops (traceroute repeats hops).
  • ACL or uRPF dropping packets on ingress.
  • Packets punted to the CPU (options, TTL expiry, logging ACLs) causing high CPU.
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
  • Layer 3 forwarding means looking up the destination IP and sending the packet to the next hop.
  • The TTL is decremented and the Layer 2 header is rewritten at each hop.
  • Routing is done in hardware via the FIB (CEF).
Key checks
  • show ip cef <prefix> — forwarding entry
  • show ip route <prefix> — decision
ReferenceWhat it is1 section · depth on demand

How it works

For each packet the router removes the Layer 2 header, looks up the destination IP in its FIB (longest match), decrements TTL, recalculates the header checksum, and rewrites a new Layer 2 header for the outgoing interface. TTL reaching 0 causes a drop and an ICMP time-exceeded message.

ReferenceWhy it matters1 section · depth on demand

Per-packet steps

1. Check the IP header (checksum, TTL > 1).

2. Longest-prefix lookup in the FIB (CEF).

3. Decrement TTL and recompute the checksum.

4. Rewrite the Layer 2 header from the adjacency table (new source and destination MAC).

5. Apply output features (ACL, NAT, QoS) and queue the packet.

TTL expiry returns ICMP Time Exceeded (used by traceroute); no route returns ICMP Unreachable. show ip cef <dst> and show ip cef exact-route show the forwarding decision.

ReferenceImportant terms & boundaries1 section · depth on demand

In depth

What changes at one routed hop

Host 10.1.1.10 sends to 10.2.2.20 through R1 (Gi0/0/0 towards the host, Gi0/0/1 towards the next router).

FieldBefore R1 (on Gi0/0/0)After R1 (on Gi0/0/1)
Destination MACR1 Gi0/0/0 (default gateway)Next hop's MAC (from ARP)
Source MACHost NICR1 Gi0/0/1
Source / destination IP10.1.1.10 → 10.2.2.20unchanged
TTL6463
Header checksumxrecalculated
DSCPas sentunchanged unless a policy remarks

Only NAT, tunnels or policies change addresses; plain forwarding never does.

When the router generates ICMP instead (RFC 1812)

ConditionICMP sent backSeen as
TTL reaches 0Time exceededTraceroute hop
No routeDestination unreachable (network)U in IOS ping
ARP for host on connected subnet failsHost unreachableTimeouts, then U
Packet larger than MTU with DF setFragmentation needed (with next-hop MTU)Path MTU discovery
ACL denyAdministratively prohibited (if enabled)U / A

no ip unreachables stops some of these messages; on links where PMTUD depends on "fragmentation needed", disabling unreachables silently breaks large transfers. IOS rate-limits ICMP generation, so traceroutes through busy routers can show * without real loss.

Verify the per-hop decision

show ip cef 10.2.2.20                       ! chosen next hop and interface
show ip cef exact-route 10.1.1.10 10.2.2.20 ! which ECMP path this flow uses
show adjacency GigabitEthernet0/0/1 detail  ! L2 rewrite that will be applied
show ip traffic | include TTL|unreachable   ! ICMP generated by the router

Fast path vs slow path

Packets that need the CPU — TTL expiry, IP options, ICMP generation, unresolved ARP — are punted from the hardware or CEF fast path. A flood of such packets raises CPU (IP Input process) even though forwarding of normal traffic is in hardware; control-plane policing limits the impact.

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 → Layer 3 forwarding. 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?