Cisco Support Community
Community Member

BGP's MED attribute


If a customer is having two uplinks & 2 downlinks, totally based on static routes, now the cust wants to peer with that ISP using BGP, now can he use MED to steer traffic-typeA through one downlink & Traffic-typeB through 2nd downlink & how to distribute traffic on uplinks. kindly discuss the case when peering with one ISP for all four links & peering with two ISPs also



Re: BGP's MED attribute

Your downlinks are different from uplinks?

BGP MED can be used to influence what traffic enters your AS/Network. Lower MED is better. This will work if the customer has at least two distict subnets advertised to the ISP. Any traffic for one subnet goes through one link and the other link carries traffic for the other subnet.

Hope this helps.

Re: BGP's MED attribute


MED can be used to influence return path selection, if you are connected to one ISP and you have two subnets to announce. The ISP has to agree not to use any "stronger" metric like local preference.

In case you are connected to two ISPs then MED will not help you, because it will not be compared for different AS paths. In principle it could be possible, but the two ISPs typically will not agree to reconfigure their whole AS for a specific customer.

In case you are connected to two ISPs then AS path prepending is probably the best option. By prepending your own AS number when sending an update to the backup ISP you will make this path worse, so that the backup ISP will also send the traffic for this specific subnet through the primary ISP.

Again this requires two subnets (each at least /24).

For outgoing path selection you can use local preference. the higher value will be prefered. All these "tricks" are based on the BGP path selection mechanism. So to fully understand all options I would recommend to read "BGP Best Path Selection Algorithm" at

Hope this helps! Please rate all posts.

Regards, Martin

CreatePlease to create content