Cisco Support Community
Showing results for 
Search instead for 
Did you mean: 
New Member

BGP redistribution and local preference issue


I have a data centre with two layer 3 distribution switches using eigrp to connect to two edge layer 3 switches which are running eigrp and bgp. The two edge switches communicate with each other via ibgp using their loopback addresses which are routable across the LAN by eigrp. each edge layer 3 switch connects to a provider CE router using ebgp. The WAN behind the CE routers is our private mpls cloud. Not easy to visualise without a diagram I appreciate.


We learn the WAN routes via ebgp on both edge switches which is redistributed into eigrp correctly so the distribution switches can communicate over the WAN. The issue I have is that some WAN routes I want to route via edge switch 1 and other routes by edge switch 2. So for example on edge switch 1 I have a prefix list with a WAN route in it, a routemap increases the prefix list local preference to 200. Now if I do a sh ip bgp on edge sw2 I can see that the route to this prefix has a local pref of 200 learnt from edge sw1 but it doesn't put this route in the routing table, Instead it uses the eigrp learnt route which doesn't have the desired effected as all wan routes go via edge sw1 only, where I need a 50/50 split, the reason for splitting the wan routing is to maximise use of wan bandwidth but also I need symmetric routing and failover as we use some encryption devices on the wan which need route symmetry.

How can I get edge sw2 to use the best path learnt via edge sw1 for ip subnet x using the local preference. bear in mind I need to split about 100 /24 subnets between the two edge switches and the ability to failover

Everyone's tags (4)

BGP redistribution and local preference issue


difficult to understand without any diagram, but if I understand correctly, you problem might be following:

You are receiving the same prefix via eBGP, iBGP and EIGRP.

Due to the local preference = 200 the iBGP prefix is the best from the BGP process point of view.

But due to the iBGP administrative distance = 200 (by default), the EIGRP prefix is the best one from the RIB point of view.

So you need to change administrative distance to make the iBGP prefix to beat the EIGRP prefix.

Either decreasing the iBGP administrative distance of increasing EIGRP administrative distance  (for some prefixes at least).



New Member

BGP redistribution and local preference issue

Thanks for the reply. Although the ebgp routes were in the bgp routing table on both edge switches they were not being chosen because:

1. The gateway in the bgp table was the CE router which was not the next hop, doing a ping failed to the CE router 1 from edge sw2 as the CE router loopback was not being advertised. so I added the next-hop-self command to the neighbour statement for both edge sw1 and sw2 ibgp neighbours. This didn't resolve the problem completely even though in the bgp routing table the ebgp routes are now shown with the gateway of the edge switches the external eigrp routes were still being preferred.

2. On both edge switches I changed the distance on the eigrp process for externally learnt eigrp routes to 210 so the ibgp routes were preferred. Success! Both edge switches are learning the wan routing table by ebgp but their local preferences matching the routemap/prefix lists are being advertised correctly and failover and fail back correctly.

If you are having bgp/eigrp routing issues I have spent two days solid looking at this, these support forums are critical for questions and answers and also gns3 life saver

CreatePlease to create content