1

I try to set up bonding on my debian 10 computer. I have 2 NIC card, I try to use enp1s0fX port. Sample of my interfaces file

auto bond0
iface bond0 inet static
   address 192.168.211.124
   gateway 192.168.211.1
   netmask 255.255.255.0
   network 192.168.211.0
   bond-slaves enp1s0f0 enp1s0f1 enp1s0f2
   bond-mode active-backup
   bond-miimon 100

When I reboot I got this message in dmesg :
bond0: option mode: unable to set because the bond device has slaves

I don't understand why

3
  • Did you have a look here bugs.launchpad.net/ubuntu/+source/ifenslave/+bug/1280366 Jan 28, 2020 at 15:01
  • The order of interface declarations (perhaps related to the bugs link in above comment?) does matter. From some tests done before, declaring enp1s0f0 enp1s0f1 enp1s0f2 after bond0 rather than before helps prevent problems.
    – A.B
    Jan 28, 2020 at 15:15
  • I tired to declare bond0 in the begining of interfaces files, but nothing change I've already same problem
    – simon
    Jan 28, 2020 at 15:48

1 Answer 1

0

This message comes from the kernel, not from ifup:

bond0: option mode: unable to set because the bond device has slaves

You can't change bonding mode after you have interfaces associated to the bond.

Since active-backup is the default mode (and I assume that is the mode of your choice), you can simply remove bond-mode from the interface configuration.

If you really need to set the bonding mode, use a similar pattern:

auto enp1s0f0
iface enp1s0f0 inet manual
    bond-master bond0
    bond-primary eth0
    bond-mode active-backup

auto enp1s0f1
iface enp1s0f1 inet manual
    bond-master bond0
    bond-primary enp1s0f0
    bond-mode active-backup

auto enp1s0f2
iface enp1s0f2 inet manual
    bond-master bond0
    bond-primary enp1s0f0
    bond-mode active-backup

auto bond0
iface bond0 inet dhcp
    bond-slaves none
    bond-primary enp1s0f0
    bond-mode active-backup
    bond-miimon 100

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .