Question

Difficulty: Very hardRouting Concepts and Dynamic Routing Protocols

A core router receives an IPv4 packet destined for a remote network host. The router's routing table contains multiple paths learned via different dynamic routing protocols, static routes, and directly connected subnets. Place the decision-making steps in the exact sequential order that the router's control plane uses to evaluate the candidate paths and forward the packet to the next hop.

  1. 1Filter candidate routing table entries by applying the Longest Prefix Match (LPM) rule against the packet destination IP address.
  2. 2Compare Administrative Distance (AD) values among the remaining candidate routes that share the longest prefix mask length.
  3. 3Evaluate metric values (such as cost or hop count) among candidate routes with identical prefix length and Administrative Distance.
  4. 4Determine the next-hop gateway address and resolve its Layer 2 MAC address for frame encapsulation and transmission on the egress interface.

Answer

The correct sequence for packet forwarding decision logic is: 1) Apply Longest Prefix Match to filter candidates by subnet specificity, 2) Compare Administrative Distance to select the most reliable route source among matching prefix lengths, 3) Compare metric values among routes from the same routing source to identify the lowest-cost path, and 4) Resolve the next-hop Layer 2 destination address for frame encapsulation on the egress interface.
Route lookup logic follows a strict hierarchy. First, Longest Prefix Match (LPM) determines subnet specificity. Second, among candidate routes with equal prefix length, Administrative Distance (AD) selects the most reliable protocol source. Third, for ties within the same protocol source, metric values isolate the optimal cost path. Finally, Layer 2 ARP resolution encapsulates the packet onto the egress link.

Step-by-Step Solution

1
Evaluate subnet mask specificity (Longest Prefix Match)
The router identifies all routes matching the destination IP and isolates those with the longest prefix length (e.g., /28 over /24).
Prefix length takes ultimate precedence in IP route lookup; a more specific route is always chosen over a less specific one.
2
Compare Administrative Distance
If multiple routing sources (e.g., OSPF vs BGP) advertise the exact same prefix length, the router selects the source with the lowest AD.
Administrative Distance ranks the believability of different route sources when prefix lengths match.
3
Evaluate Protocol Metrics
If multiple paths exist from the same routing protocol with equal prefix length and AD, the router selects the path with the lowest metric (or uses ECMP).
Metrics measure path cost within a single routing protocol instance.
4
Perform Data Link Layer Encapsulation
The router looks up the next-hop IP in the ARP table to map the destination MAC address and forwards the frame out the designated physical/logical interface.
Forwarding decision is complete, allowing physical Layer 2 frame transmission.

Key Concept

Route Selection Precedence (Longest Prefix Match -> Administrative Distance -> Metric -> Egress Encapsulation)
Rate this question