How to configure bonding active-backup without miimon

budy

Well-Known Member
Jan 31, 2020
210
14
58
58
Hi,

I need to configure a network bond with arp_interval and arp_ip_target instead of the usual miimon on my 6.4.x PVE. I have created this config in /etc/network/interfaces:


Code:
auto bond1
iface bond1 inet manual
        bond-slaves enp5s0f0 enp5s01f
        bond-mode active-backup
        arp_interval 1000
        arp_ip_target 10.11.14.1

However, restarting the network using systemctl restart networking, doesn't seem to apply this config. I can get this to work by running these two commands, though:


Code:
echo 1000 > /sys/class/net/bond1/bonding/arp_interval
echo +10.11.14.1 > /sys/class/net/bond1/bonding/arp_ip_targe

I know, that these options are not specifically mentioned in the admin manual, but I assumed, that they would work nonetheless.
 
Hi,
However, restarting the network using systemctl restart networking, doesn't seem to apply this config.
If you have ifupdown2 [1] installed (optional since PVE 6.1, default since PVE 7), you can reload your network interfaces with ifreload -a. Otherwise, ifdown bond1; ifup bond1 should do it.

[1] https://packages.debian.org/buster/ifupdown2
 
Last edited:
Hi, thanks - I haven't installed ifupdown2 as of yet, but I have done that now. However, this issue remains even with ifupdown2 installed. What really bugged me is the fact, that even a reboot won't configure this setting at all….

After I issued a ifdown bond1/ifup bond1 the required config is not applied, as you can see here:

Code:
root@hydra:~# cat /sys/class/net/bond1/bonding/arp_ip_target
root@hydra:~# cat /sys/class/net/bond1/bonding/arp_interval
0
 
I'm not too familiar with the arp_interval/arp_ip_target configuration, but if setting it manually works, you could add pre-up configurations for the bond. This would add the configuration just before bond1 is about to be brought up by ifupdown2.

Code:
auto bond1
iface bond1 inet manual
        bond-slaves enp5s0f0 enp5s01f
        bond-mode active-backup
        pre-up echo 1000 > /sys/class/net/bond1/bonding/arp_interval
        pre-up echo +10.11.14.1 > /sys/class/net/bond1/bonding/arp_ip_target
 
  • Like
Reactions: budy
Yay, thanks - that did exactly the job! I really appreciate your input on this one.
 
  • Like
Reactions: dylanw