11-20-2009 01:01 PM - edited 03-04-2019 06:46 AM
Hi all
I have an issue of BGP inheriting the Metric value from my IGP into its MED attribute .I have an EBGP peering with my client . I send only specific routers to my ebgp peer using the network commands in BGP.i recieve those prefixes through ospf in in my route table.i dont redistribute those routes to bgp, but use network command to advertise in BGP.
My issue is when these prefixes are send out to my EBGP peer it takes the IGP metric value and attach it as MED value .This is affecting the route selection of my client who is in an MPLS cloud. Is this a normal behaviour ... or how can i stop BGP to send this MED value out.
Kind regards
Ullas
Solved! Go to Solution.
11-22-2009 10:24 AM
Discovering that you are actually sending MEDs to an eBGP neighbor, although you never intended to, can come as a surprise, but it does happen. If the route injected into BGP (either using 'network' or 'redistribute' command) comes from an IGP, the MED is derived from the IGP metric, and the route is advertised to an eBGP neighbor with this MED. Guiseppe has already provided a solution for your problem. Another option is to inject routes into BGP using the 'aggregate-address' command, in which case the MED is not set. I personally prefer the 'network' command configuration combined with the solution that Guiseppe suggested.
11-20-2009 01:30 PM
Hello Ullas,
if you need to set a metric value for all your routes to be sent to neighbor you can do the following:
route-map set_metric permit 10
! matching criteria for route filtering here if needed
set metric
router bgp yourASN
neigh ebgp.neigh.ipaddress route-map set_metric out
see
http://www.cisco.com/en/US/docs/ios/iproute/command/reference/irp_pi2.html#wp1013228
Hope to help
Giuseppe
11-20-2009 01:52 PM
HI
I dont want to set any med value to those prefixes i am advertising. I want to stop BGP from inheriting the IGP metric value to its MED attribute.
Kind regards
Ullas
11-22-2009 10:24 AM
Discovering that you are actually sending MEDs to an eBGP neighbor, although you never intended to, can come as a surprise, but it does happen. If the route injected into BGP (either using 'network' or 'redistribute' command) comes from an IGP, the MED is derived from the IGP metric, and the route is advertised to an eBGP neighbor with this MED. Guiseppe has already provided a solution for your problem. Another option is to inject routes into BGP using the 'aggregate-address' command, in which case the MED is not set. I personally prefer the 'network' command configuration combined with the solution that Guiseppe suggested.
12-04-2009 08:55 AM
Maria,
Can you please point me to a Cisco document that says "the MED is derived from the IGP metric, and the route is advertised to an eBGP neighbor with this MED" ?
Thanks,
Mohamad
12-04-2009 09:09 AM
As I have said in thread : https://supportforums.cisco.com/message/1319951#1319951 , I have seen this issue in action. What I didn't say there is the reason I remember it. We had a very strong disagreement within our team about what was going on. I could see our IGP metrics being passed to the upstream provider MED values when using the upstream's looking glass, and there was no way they could have known our IGP metrics to set the MEDs accordingly. At the time I could not find any source documenting this behavior, and still don't know of a document in CCO that does. I have seen this behavior documented later only in the book "BGP Design and Implementation" by cisco press (page 19).
12-04-2009 09:20 AM
Thanks, Maria. I have seen the issue in action too, but I couldn't find any Cisco document
to verify that.
I am currently implementing a solution in which I want to use the OSPF metric to be used by a bgp peer to select the best path. My test bed does verify that the OSPF metric is being copied to BGP MED.
Please consult the following document:
http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a00800943c5.shtml
It does show that OSPF metric is distributed to BGP peer, but doesn't say it.
Thanks,
Mohamad
12-04-2009 09:26 AM
This document talks about redistribution of OSPF into BGP. The fun part occurs when you are not redistributing anything into BGP, but rather use network command to originate the routes on a border router, as was the case in this thread.
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