Feature request: CARP awareness in BIRD?

Jan Bramkamp crest at rlwinm.de
Fri Jun 3 12:00:48 CEST 2022


On 02.06.22 16:16, Thomas Steen Rasmussen wrote:
> Hello :)
>
> I am using BIRD on FreeBSD and it is working okay, apart from missing 
> CARP awareness. I am wondering if anyone knows if work has been done 
> in this area already?
>
> As you may know, CARP is a patent-free VRRP alternative originally 
> from OpenBSD. A network interface can have one or more VHIDs, each 
> VHID can be either MASTER or BACKUP. The IPs tied to a VHID are only 
> usable when the VHID is MASTER.
>
> Currently "birdc show interfaces" shows no difference between two 
> nodes where one is CARP MASTER and the other is CARP BACKUP. The 
> consequence of this is that BIRD thinks it has a working local direct 
> route which it then tries to use, but the OS refuses, since it 
> understands that VHID is CARP BACKUP.
>
> Ideally BIRD would understand CARP semantics so when it has a DIRECT 
> protocol it would only consume the routes from CARP MASTER VHIDs, and 
> consider the CARP BACKUP VHID IPs as unusable.
>
> Please consider this a feature request. I am interested getting some 
> BIRD experts opinion on 1) is this a feature you would be willing to 
> include in BIRD and 2) how big a job is it?
>
> I would be willing to pay to have it developed, although I am just 
> myself so I don't have unlimited funds.
>
> Thanks in advance, and thank you for BIRD; even without CARP support 
> it is already awesome.
Part of the problem is that FreeBSD changed their CARP implementation to 
make CARP addresses part of the parent interface instead of keeping the 
CARP pseudointerface OpenBSD uses (which would probably work because 
it's link state goes up/down depending on the CARP state). You can 
workaround missing integration of the FreeBSD CARP implementation into 
bird by using FreeBSD's devd hotplug event daemon because CARP state 
transitions are made available to userspace as messages on /dev/devctl 
and consumed by the devd daemon (enabled by default). You can drop a 
config snipped into /etc/devd/carp.conf to match the events and execute 
a shell script as root to take the appropriate action e.g. run ifconfig 
to get the CARP address or send a command to bird. Of course it's not as 
clean as proper CARP supports, but it's flexible and responds quickly 
without aggressive polling.


More information about the Bird-users mailing list