I am currently studying about the BGP path selection process and I came across MED and AS Path Prepending which can both be used to affect how traffic enters our network.

Are there any scenarios where we might want to use MED over AS PP? Since AS PP seems much better in my opinion, because it’s propagated across the other autonomous systems while the MED attribute is only valid for the neighboring ASes.

Plus if we had a multi-homed connection using 2 ISPs enter image description here And we wanted all traffic to go through the top path/link, for example, then applying MED would be of no use since ISP-B will use the 4th tiebreaker (AS Path) and will always use the bottom path. Plus MED is not even further propagated to other autonomous systems.

So are there any situations where using MED would be more preferrable than AS Path Prepending?

Thank you in advance

  • Not all links to other ASes are single links, and multiple links to another AS may benefit from MED. It is just an option.
    – Ron Maupin
    Jul 6, 2023 at 13:05

1 Answer 1


MEDs and prepending have different purposes. You use MEDs if you have multiple links with BGP sessions with one peer ASN and want to indicate a preference via which of those links you want to receive traffic.

And as you figured out, AS prepending can propagate, which has a more widespread effect, which you don't always want, because for example it could become the case that one of your upstreams decides their path to you has so many prepends that a path via your other upstream is preferred.

But as with all strategies of trying to control inbound traffic: any network can happily ignore your prepends or MEDs and decide what their preferred route to your network is.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.