Routing
Highlighted
Routing

Sending MED over eBGP Peer

‎09-19-2015 02:54 PM

I have a router that is getting routes from two iBGP peers, setting the MED on those routes, and then advertising that route to an eBGP peer.  The thing is, the MED isn't being preserved when the routes are advertised to the eBGP peer.  There is no MED value sent at all.  Is that standard BGP export policy to an eBGP peer, don't send any MED by default?  Is there a way to preserve the MED that is attached to a route when you advertise it to an eBGP peer?

6 REPLIES 6
Highlighted
Routing

Re: Sending MED over eBGP Peer

‎09-23-2015 04:23 AM

Hello,

 


@B2 wrote:

I have a router that is getting routes from two iBGP peers, setting the MED on those routes, 


Are You setting MED in iBGP import policy? I wonder what exactly are You trying to achieve? You should be using Local Preference inside Your own AS to influence path selection, that's what the LP is for.

 


@B2 wrote:

  Is there a way to preserve the MED that is attached to a route when you advertise it to an eBGP peer?


If You are setting MED in iBGP import policy chain, then You can re-use the same component policy in eBGP export policy to set same MED.

HTH

Thanks
Alex

 

_____________________________________________________________________

Please ask Your Juniper account team about Juniper Professional Services offerings.
Juniper PS can design, test & build the network/part of the network as per Your requirements

+++++++++++++++++++++++++++++++++++++++++++++

Accept as Solution = cool !
Accept as Solution+Kudo = You are a Star !
Highlighted
Routing

Re: Sending MED over eBGP Peer

‎09-23-2015 05:58 AM

MED is optional nontransitive - so router on the edge of the AS removes the attribute prior to sending the route(this is junos default and can be changed through export policy). When MED attribute is received from an EBGP peer it is advertised to all IBGP peers.

 

Regards,

Krasi

Highlighted
Routing

Re: Sending MED over eBGP Peer

‎10-17-2015 12:20 AM

The BGP multiple exit discriminator (MED, or MULTI_EXIT_DISC) is a non-transitive attribute, meaning that it is not propagated throughout the Internet, but only to adjacent autonomous systems (ASs). The MED attribute is optional, meaning that it is not always sent with the BGP updates. The purpose of MED is to influence how other ASs enter your AS to reach a certain prefix.

The MED attribute has a value that is referred to as a metric.

 

This article should help

http://www.juniper.net/documentation/en_US/junos14.1/topics/topic-map/bgp-med.html

[KUDOS PLEASE! If you think I earned it!
If this solution worked for you please flag my post as an "Accepted Solution" so others can benefit..]
Highlighted
Routing

Re: Sending MED over eBGP Peer

‎10-17-2015 09:49 AM

Thanks for the replies.  I essentially have two routers that have the same EBGP peer.  I'd like to use the LP, or the metric, these two routers have assigned to a certain route and use that as the MED that gets advertised to the EBGP peer.

Highlighted
Routing

Re: Sending MED over eBGP Peer

‎05-31-2020 01:49 PM

If the route already has MED attribute, you can send MED to the eBGP peer, with preserving the metric value, by configuring "... then metric add 0" on router's export policy configured for the eBGP peer. Here, "0" is the constant value to be added to the existing MED metric in the route.

Highlighted
Routing

Re: Sending MED over eBGP Peer

‎06-23-2020 12:27 PM

This works for me. It sets the MED on the receiving eBGP peer

 

aaa.png

Feedback