cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1483
Views
0
Helpful
7
Replies

Using MED for outbound traffic

network_geek
Level 1
Level 1

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.

7 Replies 7

pman
Spotlight
Spotlight

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.

 

MED.JPG

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.

 

Not as far as I know. 

 

MED affects traffic inbound to your AS not outbound. 

 

For outbound you use weight or local preference. 

 

Jon

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.

pman
Spotlight
Spotlight

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

  • It is applied on the BGP outbound routes.
  • It influences the incoming traffic from neighboring autonomous systems.
  • It can be passed from EBGP to IBGP.
  • It can be passed from IBGP to IBGP.
  • It can be passed from IBGP to EBGP.
  • MED received from one EBGP neighbor cannot be passed to another EBGP neighbor.

 

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.

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.

 

 

 


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul
Review Cisco Networking for a $25 gift card