11-04-2021 02:49 AM
Hi All,
I just stumbled across an implementation where a customer seems to control outbound traffic using BGP MED. I want to confirm if that is entirely possible at all and if yes then how.
Thanks in advance.
11-04-2021 04:10 AM - edited 11-04-2021 04:45 AM
MED precisely use to manipulate inbound path on external AS connection in order to discriminate between multiple exit to the same AS.
Example:
ISP R4(AS 200) sends MED VALUE = 25 for 192.168.200.0/24 which is advertised towards ebgp neighbor R1.
ISP R4(AS 200) sends MED VALUE = 50 for 192.168.200.0/24 which is advertised towards ebgp neighbor R2.
After receiving MED value, R3 will prefer the lower metric (25) coming from R4(AS 200) and send the traffic to 192.168.200.0/24 through R1.
11-04-2021 05:10 AM
Hi @pman,
If I understood correctly, you are controlling incoming traffic on R4 using MED. My question is can we use MED to influence outgoing path on R4 going towards a network say behind R3? As far as I understand, MED can be used only to influence incoming traffic.
P.S: Thank you for your update.
11-04-2021 11:10 AM
Not as far as I know.
MED affects traffic inbound to your AS not outbound.
For outbound you use weight or local preference.
Jon
11-04-2021 12:12 PM
Hi @Jon Marshall, I agree with the point and this is exactly what a sane engineer would prefer to. We were talking about a side case and a singularity in this case. I have now evidence that it might be done, I just don't have the proof to cement my claim. I will return back once I have implemented this in a lab and we will take this discussion forward from there.
11-04-2021 06:46 AM - edited 11-05-2021 03:26 AM
You can do this:
- lets say R3 advertise 1.1.1.0/24
- R1(AS 100) Configure MED value=25 for 1.1.1.0/24 which is advertised towards ebgp neighbor R4.
- R2(AS 100) Configure MED value=50 for 1.1.1.0/24 which is advertised towards ebgp neighbor R4.
After receiving MED value, R4 will prefer the lower metric (25) coming from R1(AS 100) and send the traffic with destination of 1.1.1.0/24 via R1.
A little about MED
11-04-2021 07:36 AM
Hi @pman,
To further extend this discussion, we do not have control out of our edge router, in our case it would be R4. I can suggest that we have route-maps at R4 which accepts the network you have suggested and applies a metric(MED) the same as you have suggested in your topology. Doing this way, might yield you the desired outcome, although I am going to test this in my lab.
11-05-2021 01:49 AM
Hello
Med is way down the pecking order of path selection so even if you send MED the receiving ASN's could override it themselves.
Also, by default it only effective by default when originating from the same AS, if you using MED between to differing ASNs then it isnt applicable by default, unless you state to always compare the metric( bgp always-compare-med) but again unless you also tell the rtr to ignore as-path preference then MED would be ignored.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide