An enterprise layer 3 switch receives an IP packet destined for . The active routing table contains three matching entries for this destination:
- Static route to (Administrative Distance: )
- OSPF route to (Administrative Distance: )
- BGP route to (Administrative Distance: )
Which route will the switch select to forward the packet?
- The OSPF route (), because it has the longest matching network prefix.Answer
- BThe static route (), because static routes have a lower administrative distance than dynamic OSPF routes.
- CThe BGP route (), because exterior gateway protocol routes take precedence over interior routing protocols.
- DThe switch will load-balance traffic equally between the static route () and the OSPF route ().
Answer
The switch will forward the packet using the OSPF route () because it represents the longest prefix match for the destination address .
The router selects the OSPF route () because Longest Prefix Match (LPM) is the top priority in IP routing decisions. The prefix matches bits of the destination address , making it more specific than the or routes.
Step-by-Step Solution
Key Concept
Longest Prefix Match (LPM) Precedence
Estimated Time:1m 15s