Linux bond mode 802.3ad not activated

Solution 1:

Old question, but since it comes up pretty early in searches, and I had a similar setup, with the same problem. Here's how I got it working, (using ifenslave on Debian stretch)...

/etc/network/interfaces...

    # The loopback network interface
    auto lo
    iface lo inet loopback

    # bond0 is the bonded NIC and can be used like any other normal NIC.
    # bond0 is configured using static addressing.
    auto bond0
    iface bond0 inet static
    address <your static address>
    gateway <your gateway>
    # bond0 uses standard IEEE 802.3ad LACP bonding protocol
    bond-mode 4
    bond-miimon 100
    bond-lacp-rate 0 (This is on a small NAS, so no rush)
    bond-slaves none

    # eth0 is manually configured, and enslaved to the "bond0" pseudo NIC
    allow_hotplug eth0
    auto eth0
    iface eth0 inet manual
    bond-master bond0

    # eth1 ditto, thus creating a 2-link bond.
    allow_hotplug eth1
    auto eth1
    iface eth1 inet manual
    bond-master bond0

What was the cause?

Well, the NICs would come up, the bonding driver would grab them, then the NICs would go down to reconfigure to be slaves, and the bonding driver would panic 'cos it had no slaves, and ran around like a headless chicken (round robin).

Now, the bonding driver comes up, sees that it has no slaves, so it sits back and waits... The NICs see that they have a master, so they go and report in, get their addresses from bond0, and off to work they all go.

Solution 2:

tested on debian 10 (after reading this thread and the debian bonding documentation)

config is below (no other files edited - modules or something like that)

auto enp4s0f2
allow-hotplug enp4s0f2
iface enp4s0f2 inet manual
        bond-master bond1
        bond-mode 4

auto enp4s0f3
allow-hotplug enp4s0f3
iface enp4s0f3 inet manual
        bond-master bond1
        bond-mode 4

auto bond1
iface bond1 inet static
        address 1.2.3.4
        netmask 255.255.255.0
        bond-mode 4
        bond-slaves none
        bond-miimon 100
        bond-lacp-rate 1
        bond-updelay 800
        bond-downdelay 400
        bond_xmit_hash_policy layer2+3    # optional, sets the bonding algorithm

what's new:

  • interfaces are brought up BEFORE the bond
  • the bond mode is specified also @ interface level
  • the bond has no slaves defined