Feature request: CARP awareness in BIRD?

Thomas Steen Rasmussen thomas at gibfest.dk
Mon Jun 6 16:09:54 CEST 2022


On 6/3/22 5:40 PM, Ondrej Zajicek wrote:
> 
> That is an interesting idea, and from your description it seems like not
> hard to support, esp. if that is just some kind of flag on iface/address.

That is what I was hoping for :)

> 
> But i do not have experience with this, so i have some questions:
> 
> 1) it is per-iface state or per-address state?

It is a per-address state (actually it is per VHID state, where each 
VHID is a group of 1-N IP addresses, and each interface can have 1-N VHID).

> 
> 2) Could you send me output of ifconfig for master/backup/non-carp iface
> for comparison?
> 

Absolutely. This is interface lagg0.2002 which has a single VHID, first 
node A which is MASTER:

-----------------------------
[tykling at dgncr2a ~]$ ifconfig lagg0.2002
lagg0.2002: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> 
metric 0 mtu 1500
         description: tyktech infrastructure servers vlan 2002 - 
85.209.118.0/28 and 2a09:94c4:55d1:7600::/64
         options=4600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6,NOMAP>
         ether 3c:ec:ef:46:e1:58
         inet6 fe80::3eec:efff:fe46:e158%lagg0.2002/64 scopeid 0x11
         inet6 2a09:94c4:55d1:7600::2a/64
         inet6 2a09:94c4:55d1:7600::1/64 vhid 5
         inet 85.209.118.1/28 broadcast 85.209.118.15 vhid 5
         groups: vlan carp
         carp: MASTER vhid 5 advbase 1 advskew 100
         vlan: 2002 vlanproto: 802.1q vlanpcp: 0 parent interface: lagg0
         media: Ethernet autoselect
         status: active
         nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
[tykling at dgncr2a ~]$
-----------------------------

and then node B which is BACKUP:

-----------------------------
[tykling at dgncr2b ~]$ ifconfig lagg0.2002
lagg0.2002: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> 
metric 0 mtu 1500
         description: tyktech infrastructure servers vlan 2002 - 
85.209.118.0/28 and 2a09:94c4:55d1:7600::/64
         options=4600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6,NOMAP>
         ether 3c:ec:ef:46:e0:b8
         inet6 fe80::3eec:efff:fe46:e0b8%lagg0.2002/64 scopeid 0xf
         inet6 2a09:94c4:55d1:7600::2b/64
         inet6 2a09:94c4:55d1:7600::1/64 vhid 5
         inet 85.209.118.1/28 broadcast 85.209.118.15 vhid 5
         groups: vlan carp
         carp: BACKUP vhid 5 advbase 1 advskew 100
         vlan: 2002 vlanproto: 802.1q vlanpcp: 0 parent interface: lagg0
         media: Ethernet autoselect
         status: active
         nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
[tykling at dgncr2b ~]$
-----------------------------

As you can see CARP is not really an interface, it is more like a 
property of an IP. Each node has both CARP IPs (marked with a vhid N at 
the end of the line) and non-CARP IPs (in this example the only non-CARP 
IP is for ipv6).

An interface can have multiple VHIDs which can be MASTER or BACKUP 
independent of eachother.

 From birdc the "show interfaces" for these look like this:

On the MASTER (A) node:
-----------------------------
lagg0.2002 up (index=17)
         MultiAccess Broadcast Multicast AdminUp LinkUp MTU=1500
         85.209.118.1/28 (Preferred, scope univ)
         fe80::3eec:efff:fe46:e158/64 (Preferred, scope link)
         2a09:94c4:55d1:7600::2a/64 (Preferred, scope univ)
         2a09:94c4:55d1:7600::1/64 (scope univ)
-----------------------------

On the BACKUP (B) node:
-----------------------------
lagg0.2002 up (index=15)
         MultiAccess Broadcast Multicast AdminUp LinkUp MTU=1500
         85.209.118.1/28 (Preferred, scope univ)
         2a09:94c4:55d1:7600::2b/64 (Preferred, scope univ)
         fe80::3eec:efff:fe46:e0b8/64 (Preferred, scope link)
         2a09:94c4:55d1:7600::1/64 (scope univ)
-----------------------------

As you can see they are considered equally valid which causes BIRD to 
think it has a usable IP for the prefix even though it does not.

> 
> 4) What is a general behavior of backup ifaces/ips? Are they usable, or
> it is more like iface that is AdminUp/OperDown (in SNMP terminology)?

The interfaces as such are fully usable, but the OS will not respond to 
ARP/NDP for virtual IPs in a BACKUP VHID. The OS still permits binding 
to them (so daemons can bind and be running and ready on BACKUP nodes).

Best regards,

Thomas Steen Rasmussen


More information about the Bird-users mailing list