BGP Synchronization Issues

95yj95yj Registered Users Posts: 1 ■□□□□□□□□□
I have an issue with BGP sync and was wondering what the accepted solution is.

* Three routers in an AS; A connected to B and B connected to C with A and C connected to two different ISPs via eBGP.
* A and C are peered with iBGP and since B is not, sync must be left on.
* Both A and C are learning partial routes from the Internet (filtered with filter-lists) with some overlap.
* It is desired that for any eBGP route learned by both A and C, A should be the preferred path
* Local Preference on routes learned from outside the AS on C are set to 80 making router A the preferred path for routes learned from both A and C.
* EIGRP is the IGP using the default administrative distance of 90/170.
* BGP is using the default AD of 20/200


Here's the issue:
If router A learns an outside route before router C, A places the route in the BGP table pushes it into the IP route table and redistributes it into EIGRP. Router C learns the route via BGP from A and then learns it via EIGRP. C places the route in its IP route table as an external EIGRP route with an administrative distance of 170. The route is synced in the BGP table since the route was learned via EIGRP also.

Now, C learns the route via eBGP. It adds the route to the BGP table but the route through A has a better Local Preference and there is a route in the IP route table to A for that route so nothing changes other than to add the less desirable route through eBGP to the BGP table. Everything is good.


However, the scenario is different if router C learns an outside route before router A. C learns the route via eBGP and places the route in the BGP table. It pushes the route to the IP route table with an AD of 20. C redistributes the route into EIGRP and A has the route in it's IP route table with an administrative distance of 170. A learns the route via BGP. The BGP route is synced and everything is good.

Now, A learns the route via eBGP. Since the BGP route from C has a Local Preference of 80, A has the outside route flagged as best. A places the route in its routing table and redistiributes the route into EIGRP and advertises to C. (We'll ignore router B but obviously the IGP routes pass through it.) C receives the EIGRP route but does not use it since it already has a route with an AD of 20. The BGP table on C still shows the best route from outside even with a worse Local Preference because the route is unsynchronized due to the fact that there's no matching IGP route through A.


With sync turned off, this is not an issue and the route with the best Local Preference will always be chosen. In this scenario with sync turned on, the route with the best local preference doesn't always get chosen due to the lower AD. So C could have a different route depending on which router learns the route first. Changing the AD's of the routing protocols in use would fix this, but this doesn't seem very clean.

Does anyone know the accepted or best solution to make the BGP route with the best Local Preference be the preferred route regardless of which router learns the route first?
Sign In or Register to comment.