Question

Difficulty: MediumRouting Concepts and Dynamic Routing Protocols

An enterprise layer 3 switch receives an IP packet destined for 10.20.30.4510.20.30.45. The active routing table contains three matching entries for this destination:

- Static route to 10.20.30.0/2410.20.30.0/24 (Administrative Distance: 11)
- OSPF route to 10.20.30.32/2810.20.30.32/28 (Administrative Distance: 110110)
- BGP route to 10.0.0.0/810.0.0.0/8 (Administrative Distance: 2020)

Which route will the switch select to forward the packet?

  1. The OSPF route (10.20.30.32/2810.20.30.32/28), because it has the longest matching network prefix.Answer
  2. B
    The static route (10.20.30.0/2410.20.30.0/24), because static routes have a lower administrative distance than dynamic OSPF routes.
  3. C
    The BGP route (10.0.0.0/810.0.0.0/8), because exterior gateway protocol routes take precedence over interior routing protocols.
  4. D
    The switch will load-balance traffic equally between the static route (10.20.30.0/2410.20.30.0/24) and the OSPF route (10.20.30.32/2810.20.30.32/28).

Answer

The switch will forward the packet using the OSPF route (10.20.30.32/2810.20.30.32/28) because it represents the longest prefix match for the destination address 10.20.30.4510.20.30.45.
The router selects the OSPF route (10.20.30.32/2810.20.30.32/28) because Longest Prefix Match (LPM) is the top priority in IP routing decisions. The /28/28 prefix matches 2828 bits of the destination address 10.20.30.4510.20.30.45, making it more specific than the /24/24 or /8/8 routes.

Step-by-Step Solution

1
Analyze the destination IP address against the routing table subnet masks.
The destination address 10.20.30.4510.20.30.45 falls within 10.0.0.0/810.0.0.0/8 (88 matching bits), 10.20.30.0/2410.20.30.0/24 (2424 matching bits), and 10.20.30.32/2810.20.30.32/28 (2828 matching bits, range 10.20.30.3210.20.30.32 - 10.20.30.4710.20.30.47).
Before comparing administrative distance, the router must identify all routes that encompass the target address.
2
Apply the Longest Prefix Match (LPM) rule.
The 10.20.30.32/2810.20.30.32/28 route has the longest prefix length (/28/28), making it the most specific route.
LPM is the fundamental criteria for IP packet forwarding, overriding Administrative Distance when destination network masks differ.

Key Concept

Longest Prefix Match (LPM) Precedence
Estimated Time:1m 15s
Rate this question