4A0-102 · Question #91
A router in AS 65100 receives two BGP routes. The first route is for 138.1.1.0/24 with an AS Path of 65200 65000, local Preference of 100, MED of 100, and router ID 10.10.1.10. The second route is…
The correct answer is A. The first BGP route. Route 1 (138.1.1.0/24) wins because of longest prefix match - a fundamental IP forwarding rule that takes precedence over all BGP path selection attributes. The destination 138.1.1.7 matches both prefixes, but /24 is more specific than /16, so the router selects it immediately…
Question
Options
- AThe first BGP route.
- BThe second BGP route.
- CBoth routes are used.
- DIt is impossible to determine without the value of the origin code for both routes.
How the community answered
(50 responses)- A80% (40)
- B12% (6)
- C2% (1)
- D6% (3)
Explanation
Route 1 (138.1.1.0/24) wins because of longest prefix match - a fundamental IP forwarding rule that takes precedence over all BGP path selection attributes. The destination 138.1.1.7 matches both prefixes, but /24 is more specific than /16, so the router selects it immediately without ever comparing Local Preference, MED, or Router ID.
Why the distractors are wrong:
- B is tempting because Route 2 has higher Local Preference (150 vs 100), but Local Preference is only compared between routes to the same destination prefix - these are different prefixes, so BGP attributes are irrelevant here.
- C is wrong because a router forwards a packet out a single best-path interface, not both simultaneously.
- D is wrong because origin code is a BGP tiebreaker that would only matter if you were choosing between two routes for the same prefix; longest prefix match resolves this before any BGP attribute comparison begins.
Memory tip: Think "most specific address wins first" - the router finds the longest matching prefix before it ever opens the BGP attribute rulebook.
Topics
Community Discussion
No community discussion yet for this question.