Question

Difficulty: HardRouter Forwarding Decision Logic

A Cisco router receives an IPv4 packet on an ingress interface destined for a remote destination host. In what exact sequence does the router execute its internal forwarding decision and frame processing logic from packet arrival to egress transmission?

  1. 1De-encapsulate the incoming Layer 2 frame, verify IP header integrity, and extract the destination IPv4 address.
  2. 2Search the IPv4 routing table for all prefix entries that match the packet destination IP address.
  3. 3Select the single best route entry from the candidate list strictly based on the Longest Prefix Match.
  4. 4Identify the egress exit interface and next-hop IPv4 address associated with the chosen longest prefix route.
  5. 5Resolve the next-hop Layer 2 MAC address, decrement TTL, rewrite the Layer 2 header, and transmit the frame out the exit interface.

Answer

The correct sequential order of the Cisco router forwarding decision logic is: First, de-encapsulate the frame, verify IP header integrity, and extract the destination IPv4 address. Second, search the IPv4 routing table for all matching prefix entries. Third, select the single best route entry strictly using Longest Prefix Match (LPM). Fourth, identify the egress exit interface and next-hop IPv4 address from the selected route. Fifth, resolve the next-hop Layer 2 MAC address, decrement TTL, rewrite the Layer 2 header, and transmit the frame.
The correct operational sequence begins when an IPv4 packet arrives at a router interface. The router first strips the ingress Layer 2 header, validates the IP checksum/TTL, and extracts the destination IP address. Next, it queries the IPv4 routing table for all matching subnets. It applies Longest Prefix Match (LPM) precedence to choose the candidate route with the longest subnet mask. After selecting the winning route, it extracts the next-hop IP address and outbound interface. Finally, it uses ARP to find the next-hop MAC address, decrements the TTL by 1, encapsulates the packet in a new Layer 2 header, and transmits it out the exit interface.

Step-by-Step Solution

1
Frame De-encapsulation and Header Validation
Layer 2 frame header is stripped, and the destination IPv4 address is extracted from the IPv4 header.
The router must inspect the Layer 3 destination header to determine where the packet needs to be routed.
2
Routing Table Candidate Search
A set of candidate subnet routes that cover the destination IPv4 address is identified.
All active routes in the Routing Information Base (RIB) or Forwarding Information Base (FIB) are scanned for binary subnet matching.
3
Longest Prefix Match (LPM) Evaluation
The route with the highest number of matching network bits (longest prefix mask) is selected.
Longest Prefix Match is the absolute primary criteria for route selection in IP routing, overriding Administrative Distance and routing metrics.
4
Forwarding Path Extraction
The destination next-hop IPv4 address and outgoing physical/logical exit interface are determined.
The router needs the exact forwarding instructions specified inside the winning routing table entry.
5
Layer 2 Encapsulation and Egress Transmission
The packet TTL is decremented, ARP cache provides the next-hop MAC address, a new Layer 2 frame is encapsulated, and the frame is transmitted.
The router must rewrite the Layer 2 header for the next-hop broadcast domain before transmitting the packet on the wire.

Key Concept

Router Forwarding Decision Logic and Longest Prefix Match
Rate this question