After finding the best route, what three forwarding decisions can a router make?
The router can: (1) forward to the next-hop router if the destination is on a remote network, (2) forward directly to the destination if it's on a directly connected network, or (3) drop the packet if there's no matching route and no default route.
* The three forwarding decisions. *
* Layer-2 re-encapsulation at each router hop. — the Tango! project, CC BY-SA 3.0, via Wikimedia Commons. *
Decision 1 — Forward to next-hop router (remote network):
- The route points to a next-hop IP (Internet Protocol) on a different router
- Router must resolve the next-hop IP to a MAC (Media Access Control) address (via ARP (Address Resolution Protocol)) and build a new Ethernet frame
- The packet moves one hop closer to the destination
Decision 2 — Forward directly to destination (connected network):
- The route entry indicates the destination is on a directly connected network
- Router resolves the destination IP (not next-hop) to a MAC address via ARP
- Frame is sent directly to the destination device — this is the final hop
Decision 3 — Drop the packet (no match):
- No route matches the destination IP
- No default route (gateway of last resort) is configured
- Packet is dropped
- Router sends an ICMP (Internet Control Message Protocol) Destination Unreachable message back to the source
The re-encapsulation process at each hop:
PC1 → [Src MAC: PC1, Dst MAC: R1] → R1
R1 → [Src MAC: R1-exit, Dst MAC: R2] → R2 ← new L2 frame!
R2 → [Src MAC: R2-exit, Dst MAC: PC2] → PC2 ← new L2 frame!
The IP addresses stay the same throughout — only the MAC addresses change at each hop.
Go deeper:
Internet Control Message Protocol (Wikipedia) — the Destination Unreachable sent on the drop decision.
Proxy ARP (Wikipedia) — the ARP resolution underlying the next-hop and directly-connected cases.