Question

Difficulty: MediumRouter Forwarding Decision Logic

A Cisco router receives an IP packet and initiates a route lookup process to select the optimal path. Arrange the router forwarding decision logic steps in the correct sequential order from first to last.

  1. 1Identify all routing table entries whose network prefix and subnet mask match the packet's destination IP address.
  2. 2Select the candidate route with the longest prefix match (the most specific subnet mask / longest subnet mask length).
  3. 3If multiple candidate routes have identical prefix lengths from different routing sources, select the route with the lowest Administrative Distance.
  4. 4If candidate routes have identical prefix lengths and originate from the same routing protocol, select the route with the lowest Metric.
  5. 5Determine the next-hop IP address or exit interface and forward the packet.

Answer

The correct sequence for router forwarding decision logic is: 1) Identify matching routing table entries, 2) Select the route with the Longest Prefix Match, 3) Break ties using Administrative Distance for different sources, 4) Break ties using Metric for identical sources, and 5) Forward the packet using the selected next-hop/exit interface.
The router forwarding process strictly follows a hierarchical evaluation sequence: First, the router checks for matching network entries in the routing table. Second, if multiple matching routes exist, it selects the route with the Longest Prefix Match (LPM), which represents the most specific path. Third, if multiple routes have the exact same prefix length but come from different sources, the router uses Administrative Distance (AD) to select the most reliable source. Fourth, if the prefix length and routing source are the same, the router uses the protocol's Metric to choose the optimal path. Finally, the packet is forwarded out the resulting egress interface to the next-hop IP.

Step-by-Step Solution

1
Scan routing table for matching prefix entries
Candidate routes matching the destination IP address are identified
The router performs a bitwise AND operation on the destination IP with subnet masks in the table to find matches.
2
Apply Longest Prefix Match (LPM) rule
The candidate route with the longest mask length is prioritized above all others
LPM takes precedence over Administrative Distance and Metric regardless of the routing protocol source.
3
Compare Administrative Distance (AD)
Ties between identical prefix lengths from different routing protocols are broken
Lower AD indicates a more believable/trustworthy route source (e.g., Connected=0, Static=1, OSPF=110).
4
Compare Metric values
Ties between identical prefix lengths from the same routing protocol are broken
Protocol-specific metrics (cost, hop count, bandwidth) determine the best path within that specific protocol.
5
Execute packet forwarding
The packet is encapsulated and sent via the designated exit interface or next-hop IP
The decision path concludes with Layer 2 rewrite and transmission.

Key Concept

Cisco Router Forwarding Decision Hierarchy (LPM -> AD -> Metric)
Rate this question