Question

Difficulty: HardRouting Concepts and Dynamic Routing Protocols

A Layer 3 core switch processes an incoming packet destined for host 10.50.4.15010.50.4.150. The switch's active routing table contains four candidate routes:

- Route 1: 10.50.4.0/2210.50.4.0/22 via OSPF (Administrative Distance: 110, Metric: 20)
- Route 2: 10.50.4.128/2510.50.4.128/25 via iBGP (Administrative Distance: 200, Metric: 100)
- Route 3: 10.50.0.0/1610.50.0.0/16 via Static Route (Administrative Distance: 1, Metric: 0)
- Route 4: 10.50.4.128/2610.50.4.128/26 via EIGRP External (Administrative Distance: 170, Metric: 15)

Which route will the switch select to forward the packet, and what is the primary decision rule applied?

  1. Route 4 (10.50.4.128/2610.50.4.128/26), because longest prefix match takes precedence over administrative distance and metric.Answer
  2. B
    Route 3 (10.50.0.0/1610.50.0.0/16), because static routes have the lowest administrative distance of all candidate routes.
  3. C
    Route 1 (10.50.4.0/2210.50.4.0/22), because OSPF is an interior gateway protocol with a lower administrative distance than EIGRP External or iBGP.
  4. D
    Route 2 (10.50.4.128/2510.50.4.128/25), because it matches the destination host address range while maintaining standard dynamic routing metrics.

Answer

The switch will select Route 4 (10.50.4.128/2610.50.4.128/26) because longest prefix match is the primary rule for Layer 3 forwarding decisions.
The router uses the Longest Prefix Match (LPM) rule as the absolute first criterion when making forwarding decisions. Subnet mask /26/26 (255.255.255.192255.255.255.192) has 26 network bits, making it more specific than /25/25, /22/22, or /16/16. Because Route 4 covers 10.50.4.15010.50.4.150 and has the longest prefix length, it is selected immediately regardless of its higher Administrative Distance.

Step-by-Step Solution

1
Determine which subnets contain the destination address 10.50.4.15010.50.4.150.
The destination address 10.50.4.15010.50.4.150 falls into all four subnet ranges: 10.50.0.0/1610.50.0.0/16 (10.50.0.010.50.255.25510.50.0.0 - 10.50.255.255), 10.50.4.0/2210.50.4.0/22 (10.50.4.010.50.7.25510.50.4.0 - 10.50.7.255), 10.50.4.128/2510.50.4.128/25 (10.50.4.12810.50.4.25510.50.4.128 - 10.50.4.255), and 10.50.4.128/2610.50.4.128/26 (10.50.4.12810.50.4.19110.50.4.128 - 10.50.4.191).
Before selecting a route, a router checks which routing table entries encompass the target IP address.
2
Compare the subnet mask lengths of the matching candidate routes.
Prefix lengths are /16, /22, /25, and /26. The longest prefix match is /26 (Route 4).
The Longest Prefix Match (LPM) rule dictates that the route with the most specific (longest) subnet mask is chosen first.
3
Evaluate whether Administrative Distance (AD) or Metric needs to be considered.
LPM resolves the routing decision immediately, so AD (1 vs 110 vs 170 vs 200) and metrics are ignored.
Administrative Distance and metrics are tie-breakers used only when candidate routes have identical prefix lengths.

Key Concept

Longest Prefix Match (LPM) Routing Table Logic
Rate this question