Networking · Network Devices › Router
Layer 3 forwarding
Cheat sheet · https://pcornel.dk/topic.php?topic=845
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.
Remember
- 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).
First checks
show ip cef <prefix>— forwarding entryshow ip route <prefix>— decision
Commands
show ip cef <dst>show ip cef exact-routeIP Input
Verify in this order
packet → longest match → next hop → L2 rewrite → forward
Where it usually breaks
physical/link dependency → local object state → peer/control state → policy → forwarding/adjacency → end-to-end result
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=845