cancel
Showing results for 
Search instead for 
Did you mean: 

BGP MED attributes don't work

BGP MED attributes don't work

Karfax
New Contributor
Hello!

x480, EXOS 12.6.5.2 patch1-3
I received some prefix via BGP and over router-policy IN add MED 30 and MED 50 for them:
code:
# sh bgp routes network 5.45.121.0/24

Feasible Routes
---------------
Destination Peer Next-Hop LPref Weight MED AS-Path
*>i 5.45.121.0/24 193.25.180.255 193.25.180.244 500 1000 50 3326 21219 3327 198068
i 5.45.121.0/24 193.25.181.0 193.25.180.244 500 1000 50 3326 21219 3327 198068
i 5.45.121.0/24 10.17.21.3 10.17.21.3 500 1000 30 ( 65003 ) 21219 3327 198068


Unfeasible Routes
-----------------
Destination Peer Next-Hop LPref Weight MED AS-Path


Flags: (*) Preferred BGP route, (>) Active, (d) Suppressed, (h) History
(s) Stale, (m) Multipath

Origin: (?) Incomplete, (e) EGP, (i) IGP


Why first route active? First and third routes have same weight, LPref, AS-PATH (4), origin code.
But third route have lower MED - it should be active route.
1 ACCEPTED SOLUTION

BrandonC
Extreme Employee
By default, EXOS doesn't consider the MED for routes with differing AS-paths. Try the following command and see if it changes it:
code:
enable bgp always-compare-med


If not, can you get the output of:
code:
sh bgp routes detail network 5.45.121.0/24

View solution in original post

3 REPLIES 3

Stephane_Grosj1
Extreme Employee
To add to Brandon's comment, by default EXOS compares MED only for paths in the same AS. In my experience, the use of MED is quite rare. It can be used to try to influence traffic entering your AS, but with little luck to succeed. If you want to influence how traffic can exit your AS, prefer Local Preference.

BrandonC
Extreme Employee
Also, why not set the LPref instead of MED via policy in this case?

BrandonC
Extreme Employee
By default, EXOS doesn't consider the MED for routes with differing AS-paths. Try the following command and see if it changes it:
code:
enable bgp always-compare-med


If not, can you get the output of:
code:
sh bgp routes detail network 5.45.121.0/24
GTM-P2G8KFN