cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1081
Views
15
Helpful
9
Replies

Values for BGP MED

mmoulson1
Level 4
Level 4

Hello,

 

I have some asymmetric routing happening with a partner organisation. We are running BGP into MPLS from 2 locations, I also have an internal network between my locations and I am running iBGP. I am advertising prefixes for both locations, a local and one learned from the other location using iBGP.

 

The problem is the partner is returning all traffic via only one of the locations. I have raised this with them and they advised I use the BGP MED attributed to set some metrics on what I am advertising to them.

 

My question is what values should I use for the local vs the learned routes?

 

Thanks in advance.

9 Replies 9

Hello,

 

post a schematic drawing of your topology, indicating what is connected to what, and how the desired traffic flow should be.

dc-top.png

Currently advertising both DC1 and DC2 networks out of both the links to the partner, the local network being connected and the remote being learned via iBGP.

DC1 is sending outbound via its connected link but any return traffic from the partner is being sent via DC2 and then over my iBGP link.

Hope that makes sense.

 

Lower MED value is preferred over higher value. 

 

So local routes should have lower value and learned routes higher. 

 

Jon

I was looking for advice on what values would be appropriate to assign?

 

E.g. would 100 for local and 200 remote be appropriate? Or is 1 for local and 2 for remote sufficient?

 

Honestly, it really doesn't matter as long as local is lower than learned. 

 

Most examples use increments of 100 so if you feel more comfortable doing that then do so but like I say just make local < learned and you'll be fine. 

 

Jon

Thanks for the reply.


I was wondering how the value would be interpreted by the partners network and if pushing the values further apart would result in a different metric on their side and therefore impact what route would be used.


I completed the change and went with 100 and 200 (this was the example from the Cisco doc I looked at) that did work as expected. My asymmetric routing has stopped which is the main thing!

Hello @mmoulson1 ,

the MED attribute cannot travel enf to end over multiple ASes it is seen and used only in the ISP AS to decide the better exit point for one of your prefixes.

So your changes should not be seen by partner networks if they have their own BGP AS connected to the same ISP or other ISP.

 

Just remember that by default in Cisco BGP implementation a missing MED is considered like zero and would be preferred over another route with a set BGP MED attribute non zero.

There is a command at BGP level to change this behaviuor to make missing MED considered like 4 billions and more (it is a 32 bit integer)

 

Hope to help

Giuseppe

 

Hi Giuseppe,

 

Thanks for the reply. So in my case there is no ISP, we are just running BGP between 2 private networks. My 2 DC's are within and AS and the partners 2 POP's are within the same AS. So am I correct that my configured MED value would be accepted by the partners routers in determining the best path to me prefixes?

Hello @mmoulson1 ,

yes it is, as you have already noted the asymmetric routing issue has disappeared thanks to the different MED values.

 

MED is accepted when present in eBGP update without additional configuration.

For BGP communities you would need to configure both peers to send and receive BGP communities

 

This is not the case for MED.

 

Hope to help

Giuseppe

 

Review Cisco Networking products for a $25 gift card