LOGBOOK

HELP

Quiz Entry - updated: 2026.07.05

How does a router make packet forwarding decisions?

The router de-encapsulates the frame, reads the destination IP, looks up the best match in its routing table, then re-encapsulates the unchanged packet in a new frame toward the next hop or exit interface.

A router's job is to move a packet one hop closer to its destination, and it makes that decision independently at each hop. When a frame arrives, the router strips off the Layer 2 Ethernet header and trailer (de-encapsulation) to expose the IP packet, then reads only the destination IP address. It searches its routing table for the entry that best matches that address, which tells it the next hop or exit interface to use. The key insight is the split between layers: the Layer 3 packet — including its IP addresses — is left unchanged so it can guide every remaining hop, but the Layer 2 frame is rebuilt from scratch at each router with new source and destination MAC addresses for the next link. This is why a packet keeps the same IP addresses end to end while its frame changes on every segment.

Router de-encapsulates, looks up the route, then re-encapsulates

* The router strips the L2 frame, reads the destination IP, looks up the best route, then builds a fresh L2 frame — the L3 packet stays unchanged. *

Router Packet Forwarding Process:

  1. Packet arrives on an interface (e.g., G0/0/0)
  2. Router de-encapsulates the Layer 2 Ethernet header and trailer
  3. Router examines the destination IPv4 address in the packet
  4. Router searches the routing table for the best match
  5. Router finds the route entry indicating the next hop or exit interface
  6. Router re-encapsulates the packet in a new Ethernet frame
  7. Router forwards the packet to the next hop router

Example:

  • Packet destined for 10.1.1.10 arrives at R1
  • R1 routing table shows 10.1.1.0/24 is reachable via R2
  • R1 creates new frame with R2's MAC address and forwards

Key insight: The IP packet (Layer 3) remains unchanged during routing, but the frame (Layer 2) is rebuilt at each hop.

Go deeper:

From Quiz: NETW1 / Network Layer | Updated: Jul 05, 2026