BGP + anycast

Notice: Page may contain affiliate links for which we may earn a small commission through services like Amazon Affiliates or Skimlinks.

beren43

New Member
Nov 25, 2019
13
0
1
Hi,

The task is to provide balancing and fault tolerance of the freeradius service by means of BGP anycast ip on the basis of two servers (not one, as at the moment). The plan is as follows: configure a different address on the lo interface (10.15.12.6 ) using bird to configure the announcement. Here's my version.

router id 10.10.2.28;

listen bgp address
filter anycastfr {

if net = 10.15.12.6/24 then accept;
}

protocol kernel {
persist;
scan time 20;
import all;
export all;
}

protocol bfd {
interface "ens192" {
interval 200 ms;
multiplier 3;
};
}

protocol static vroute {
route 10.15.12.6 via 10.10.2.28 ;

}

protocol bgp {
bfd;
export filter anycastfr
export where proto = "vroute";
}

Is that correct ?
 

necr

Active Member
Dec 27, 2017
151
47
28
124
You’re missing BGP neighbor configuration, also you should not have a static route. Your kernel route (special /24, which is supposedly some loopback interface - you’d be fine with /32 too there) should be in BGP export filter. Other thing is that this route must be withdrawn by disabling the loopback interface whenever your service is not working (i.e PID doesn’t exist anymore or systemd unit dead). For bird, there’s anycast-helper script available on Github, for ExaBGP as listed above there’s a tried and true Python built-in script available that does the same.