07-02-2018 01:49 AM - edited 03-05-2019 10:42 AM
Hello,
I've got two uplinks to my "ISP"[1] and get two default routes advertised via eBGP. One route arrives with a metric of 2, the other one without any metric.
# show ip bgp 0.0.0.0 BGP routing table entry for 0.0.0.0/0, version 2 Paths: (2 available, best #2, table Default-IP-Routing-Table) Multipath: eBGP iBGP Advertised to update-groups: 2 65001, (received & used) 172.31.254.9 from 172.31.254.9 (172.31.2.2) Origin IGP, metric 2, localpref 100, valid, external 65001, (received & used) 172.31.254.1 from 172.31.254.1 (172.31.2.1) Origin IGP, localpref 100, valid, external, best
Now I'd like to do ECMP using both uplinks. Assume that the configuration on the side of the "ISP" cannot be changed. Therefore I'd like to get rid of the "metric 2". Unfortunately I couldn't find any "ignore MED" option and using a route-map to set the med/metric doesn't seem to work for incoming routes. I added the following config snippets:
ip prefix-list DEFAULT seq 5 permit 0.0.0.0/0 route-map METRIC-2 permit 10 match ip address prefix-list DEFAULT set metric 2
neighbor 172.31.254.1 route-map METRIC-2 in
maximum-paths 2
and did "clear ip bgp 172.31.254.1 soft in". Unfortunately the metric stayed the same.
Any ideas how to achieve ECMP?
[1] I put that in quotes, long story...
Solved! Go to Solution.
07-04-2018 02:10 AM
07-02-2018 11:46 AM
Hello,
You can still use the Weight attribute to manipulate the traffic.
ip prefix-list DEFAULT seq 5 permit 0.0.0.0/0 route-map Weight-10 permit 10 match ip address prefix-list DEFAULT set weight 10
neighbor 172.31.254.1 route-map Weight-10 in
neighbor 172.21.254.9 route-map Weight-10 in
Wight is the very first Attributes when comes to the BGP path selection in Cisco devices.
07-03-2018 11:50 PM
07-03-2018 12:27 PM
Strange. I tried your config and MED was set, but after ~30-60 seconds after soft reset.
Try again.
07-03-2018 11:53 PM
07-03-2018 11:59 PM
You made all right and this config don't have any mistakes - it must work if you don't have bug.
If you will have problem in next try - try remove "match" string from first route-map statement and check again(it will set MED on all routes from neighbor).
07-04-2018 02:10 AM
08-13-2018 01:33 AM
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