Le 07/08/2025 à 00:54, Anthony Hoppe via Bird-users a écrit :
Hello,
We are currently using GoBGP with keepalived and are looking to switch
to BIRD. We currently have keepalived inject the VIPs into GoBGP via
the following quorum_up and quorum_down commands:
quorum_up "/usr/bin/gobgp global rib add -a ipv4 [VIP-ADDRESS]/32"
quorum_down "/usr/bin/gobgp global rib del -a ipv4 [VIP-ADDRESS]/32"
Is there a similar mechanism with BIRD? Right now what I've done is
instead I'm having keepalived add/remove the VIPs to/from a dummy
interface and have the dummy interface as one of the interested
interfaces under protocol direct.
quorum_up "/usr/bin/ip address add [VIP-ADDRESS]/32 dev VIPs"
quorum_down "/usr/bin/ip address delete [VIP-ADDRESS]/32 dev VIPs"
This works as expected, when keepalived adds the VIPs BIRD exports
them and when keepalived removes the VIPs BIRD stops exporting them.
However, I am still curious if there is a mechanism where I can tell
keepalived to tell BIRD directly to advertise them?
Thanks!
Hi,
Multiple solution for that.
At least 2 that I use:
Depending on your keepalived setup, ie if it mounts the VIP on a given
interface.
You can configure bird to listen on that interface
```
protocol direct direct_ipv4 {
ipv4;
interface "lo"; # Restrict network interfaces it works with
}
```
Then basically when the VIP is configured on the interface, it gets in
the BGP RIB and advertised to your peers (depending on route
policy/filter you have eventually)
If it's not configured on the interface, it's not in BGP RIB -> not
advertised.
Another solution could be to not link BIRD RIB with the LINUX RIB, you
you need to originate the route in bird to create the RIB entry,
then trigger the advertisement by enabling/disabling the proto.
Another solution instead of disabling the proto to be more reboot proof,
if to still originate the route from bird, but use a function you write
on the fly then reload the config.
similar to what https://github.com/skoef/birdwatcher is doing.
++
Nico