09-27-2021 05:51 AM
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?
Solved! Go to Solution.
09-27-2021 07:47 AM
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
09-27-2021 07:47 AM
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
09-28-2021 04:44 AM
thank you. i was wrong. but various text on google stating that the same thing without mentioning default behaviour of always-compare-med
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide