Your Junos device receives two similar route advertisements from different BGP peers.
What would cause a route to be selected in this scenario?
Click on the arrows to vote for the correct answer
A. B. C. D.A
When a Junos device receives two similar route advertisements from different BGP peers, it will select the route will the lowest MED value. BGP route selection proceeds in this manner:
-> Prefer the highest local-preference value
-> Prefer the shortest AS-path length
-> Prefer the lowest origin value
-> Prefer the lowest MED value
-> Prefer routes learned from an EBGP peer over an IBGP peer
-> Prefer best exit from AS
-> For EBGP-receive routes, prefer the current active route:
-> otherwise, prefer routes from the peer with the lowest RID
-> Prefer paths with the shortest cluster length
-> Prefer routes from the peer with the lowest peer ID
In this scenario, the Junos device receives two similar route advertisements from different BGP peers. When multiple routes exist for the same destination, BGP uses a best path selection algorithm to determine the best route to use. The best path selection algorithm considers several factors to select the best route among the available routes.
Here are the factors that BGP uses to select the best route:
Highest local preference: The route with the highest local preference value is preferred. Local preference is an attribute that can be set on a router to indicate the preference of a particular route.
Shortest AS path: The route with the shortest AS path length is preferred. AS path length is the number of AS hops that a route has traversed to reach the destination.
Lowest origin type: The route with the lowest origin type is preferred. Origin type indicates how the route was originated: IGP (Interior Gateway Protocol), EGP (Exterior Gateway Protocol), or Incomplete.
Lowest MED value: The route with the lowest MED (Multi-Exit Discriminator) value is preferred. MED is an attribute that is used to influence the route selection process between different autonomous systems.
eBGP over iBGP: eBGP (External BGP) learned routes are preferred over iBGP (Internal BGP) learned routes.
Lowest IGP metric: If the BGP next hop is reachable through multiple IGP (Interior Gateway Protocol) paths, the route with the lowest IGP metric to the next hop is preferred.
Prefer the path with the lowest neighbor IP address: If all else is equal, prefer the path learned from the peer with the lowest IP address.
Based on the above factors, the best path will be selected. In the given scenario, if the two similar routes have the same local preference, AS path length, origin type, and BGP next hop, then the route with the lowest MED value will be selected. So, option A (having a lower MED value) is the correct answer. Option B (having a lower local preference) is incorrect because local preference is used only when the two routes have different values for this attribute. Option C (learning a route from a peer with a higher peer ID) and option D (learning a route from a peer with a higher IGP metric) are also incorrect because these factors are not used in the BGP best path selection algorithm.