Use it when packets do not leave a router toward a known destination.
Layer 3 forwarding
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.
packet → longest match → next hop → L2 rewrite → forward
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Forwarding problems Narrow the fault
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.
show ip cef <prefix>— forwarding entryshow 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).
| Field | Before R1 (on Gi0/0/0) | After R1 (on Gi0/0/1) |
|---|---|---|
| Destination MAC | R1 Gi0/0/0 (default gateway) | Next hop's MAC (from ARP) |
| Source MAC | Host NIC | R1 Gi0/0/1 |
| Source / destination IP | 10.1.1.10 → 10.2.2.20 | unchanged |
| TTL | 64 | 63 |
| Header checksum | x | recalculated |
| DSCP | as sent | unchanged unless a policy remarks |
Only NAT, tunnels or policies change addresses; plain forwarding never does.
When the router generates ICMP instead (RFC 1812)
| Condition | ICMP sent back | Seen as |
|---|---|---|
| TTL reaches 0 | Time exceeded | Traceroute hop |
| No route | Destination unreachable (network) | U in IOS ping |
| ARP for host on connected subnet fails | Host unreachable | Timeouts, then U |
| Packet larger than MTU with DF set | Fragmentation needed (with next-hop MTU) | Path MTU discovery |
| ACL deny | Administratively 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.
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 → 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%