Friday, August 22, 2014

anycast and bgp may not mix

Anycast is a common way of doing distributed services. The idea is to have duplicate IP addresses and thus have duplicate routes. What then happens is a user picks the nearest service instance based on the routing table. When you are using BGP, you have to be aware of ebgp behavior. If data center A and data center B want to use a common anycast address, remember that only 1 of the edge routers will have an ebgp route the other data center will not. What happens is data center A send ebgp router, data center B receives it. Data center B puts ebgp route in the routing table. Since there is not an IGP route in the routing table data center B will not inject its own ebgp route. A distance command can fix this you just set the distance for any received ebgp anycast prefix to less than that of ospf

router bgp ####
distance 0.0.0.0 255.255.255.255 120 <acl>

Point is that when you are using BGP you have to design around where the anycast addresses will be injected and ensure that you have IGP prefixes where they need to be

No comments:

Post a Comment