Your router is receiving four BGP route advertisements for the 192.168.100.0/24 network. By
default, which route becomes active?
Route A, which is learned through EBGP with an AS path of 8001 and a MED of 175.
Route B, which is learned through IBGP with an AS path of 9900, a MED of 150, and an IGP
cost of 15.
Route C, which is learned through IBGP with an AS path of 8001, a MED of 100, and an IGP
cost of 10
Route D, which is learned through EBGP with an AS path of 9900 and a MED of 200.
7 Comments on “which route becomes active?”
I think it should be A as EBGP is always preferred:
Some vendors have a preference (distance) of 20 for external BGP (EBGP) and a distance of 200 for internal BGP (IGBP). Junos OS uses the same value (170) for both EBGP and IBGP. However, this difference between vendors has no operational impact because Junos OS always prefers EBGP routes over IBGP routes.
Correct EBGP preferred over IBGP but MED comes before that rule. Link below highlights it :
6) For BGP, prefer the path with the lowest multiple exit discriminator (MED) metric.
8) Prefer strictly external BGP (EBGP) paths over external paths learned through internal BGP (IBGP) sessions.
BGP Route Selection in Junos:
1. Route Preference –
2. Local Preference –
3. AS Path – *
4. Origin –
5. MED – *
6. EBGP over IBGP – *
7. Lowest IGP cost – *
8. Shortest Route Reflection Cluster List –
9. Lowest Router ID –
10. Lowest peer address –
So MED is the tiebreaker even source is EBGP or IBGP, pls confirm???
Same AS path length.
IGP over EGP over Imcomplete << route learned via IGP with a cost of 10, which is lower than a cost of 15
If cost was the same for the IGP route, the MED would be the tie-breaker.
Prefer the route with the lower origin code.
Routes learned from an IGP have a lower origin code than those learned from an exterior gateway protocol (EGP), and both have lower origin codes than incomplete routes (routes whose origin is unknown).
ORIGIN is a well-known mandatory attribute that defines the origin of the path information.
0 IGP – Network Layer Reachability Information is interior to the originating AS
1 EGP – Network Layer Reachability Information learned via EGP
2 INCOMPLETE – Network Layer Reachability Information learned by some other means
9.4 Originating BGP routes
A BGP speaker may originate BGP routes by injecting routing information acquired by some other means (e.g. via an IGP) into BGP.
C is correct
AS path length is same
Origin IGP prefer over EGP (only B and C left here)
Med (can’t compare because different AS number)
Both come from IBGP (Still B and C)
IGP metric (C lower than B)
C is correct unless the option always-compare-med is not used
answer C , MED is used between different ASs when you use (ALWAYS COMPARE MED)