cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1323
Views
0
Helpful
2
Replies

bgp MED always compare vs deterministic MED

HI Guys,

 

i was referencing this explanation on a cisco website 

 

https://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/16046-bgp-med.html

newest entry1: AS(PATH) 500, med 150, external, rid 172.16.13.1
       entry2: AS(PATH) 100, med 200, external, rid 1.1.1.1
oldest entry3: AS(PATH) 500, med 100, internal, rid 172.16.8.4

Example 2: bgp deterministic-med Disabled, bgp always-compare-med Enabled

Entry1 is compared to entry2. These entries are from different neighbor autonomous systems, but since the bgp always-compare-med command is enabled, MED is used in the comparison. Of these two entries, entry1 is better because it has a lower MED. Next, entry1 is compared to entry3. The MED is checked again because the entries are now from the same autonomous system. Entry3 is chosen as the best path.

-----------------------------------------------------------------

is there an error in the explanation towards the end here where the author they state that MED is checked again in comparing entry 1 and 3. i dont agree with this based on the fact that always-compare-med only compares different AS and bgp deterministic med is disabled. is this correct?

1 Accepted Solution

Accepted Solutions

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello @ahmedsid432135621 ,

>> i dont agree with this based on the fact that always-compare-med only compares different AS and bgp deterministic med is disabled. is this correct?

 

No, it is not correct because bgp always-compare-med allows to compare two paths even if the peer AS  ( the leftmost AS in AS path attribute ) is different  but it does not prevent comparison when the peer AS is the same ( default behavior).

It is an extension that says compare MED if peer AS are different AND also when peer AS are the same.

 

The link provides an explanation of the other command bgp deterministic-med in the fact that enabling it  paths coming form the same peer AS are compared between each other first and this can lead to avoid the oldest eBGP path wins.

 

Hope to help

Giuseppe

 

View solution in original post

2 Replies 2

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello @ahmedsid432135621 ,

>> i dont agree with this based on the fact that always-compare-med only compares different AS and bgp deterministic med is disabled. is this correct?

 

No, it is not correct because bgp always-compare-med allows to compare two paths even if the peer AS  ( the leftmost AS in AS path attribute ) is different  but it does not prevent comparison when the peer AS is the same ( default behavior).

It is an extension that says compare MED if peer AS are different AND also when peer AS are the same.

 

The link provides an explanation of the other command bgp deterministic-med in the fact that enabling it  paths coming form the same peer AS are compared between each other first and this can lead to avoid the oldest eBGP path wins.

 

Hope to help

Giuseppe

 

thank you. i was wrong. but various text on google stating that the same thing without mentioning default behaviour of always-compare-med

Review Cisco Networking products for a $25 gift card