We have an eBGP peering with my client. I send only specific routers to the eBGP peer by using the network command in BGP. We receive those prefixes through OSPF in our route table. We don’t redistribute those routes to BGP, but use network command to advertise in BGP.
Whenever these prefixes are sent out to our eBGP peer, it take the IGP metric value and attaches it as MED value. This is affecting the route selection of our client who is in an MPLS cloud. How can this be rectified?
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.
Please set a metric value for all your routes to be sent to neighbor. This can be done by the following:
route-map set_metric permit 10
! matching criteria for route filtering here if needed
router bgp yourASN
neigh ebgp.neigh.ipaddress route-map set_metric out
Click here for more documentation on the process.
Another option is to inject routes into BGP using the 'aggregate-address' command, in which case the MED is not set.
Citation - This blog post does not reflect original content from the author. Rather it summarizes content that are relevant to the topic from different sources in the web. The sources might include any online discussion boards, forums, websites and others.