Hi,

I would like to second that priority grave, bonding is right now not working at all.

I found several issues with the script:

1.

add_master()
{
        # Return if $IFACE is already a bonding interface.
        [ -f "/sys/class/net/$IFACE/bonding/slaves" ] && return

        ip link add dev "$IFACE" type bond
        BOND_MASTER="$IFACE"

------------------------------------------

Bond master can't be set in the config and isn't set in the script. Do I miss something here?

}

2.
enslave_slaves()
{
....
        [ "$VERBOSITY" = 1 ] && v=-v
#       echo BOND_SLAVES=$BOND_SLAVES
        for slave in $BOND_SLAVES ; do
#               if ifquery --state $slave 2>/dev/null || [ -n "IFUPDOWN_$IFACE" ]; then                         # Skipping interface that's already up or being configured
#                       continue
#               else
#                       if ifquery -l $slave 2>/dev/null; then
#                               ifup $slave
#                       else
                                ip link set "$slave" down 2>/dev/null
                                if ! sysfs_add slaves "$slave" 2>/dev/null ; then                                         echo "Failed to enslave $slave to $IFACE." >&2
                                fi
#                       fi
#               fi
        done
}

The script never reaches the actual add slaves, it always bails out. There must be a better way than my fix, which is not good.

3.

setup_master() {
        add_master
        early_setup_master
        setup_master1
        BOND_SLAVES="all"
        enslave_slaves
        setup_primary
}

Again BOND_SLAVES isn't anywhere set.

My config looks like this:

source /etc/network/interfaces.d/*

auto lo eth0 eth1 eth2

iface lo inet loopback

iface eth0 inet manual
        hwaddress ether 70:85:c2:63:a2:56

iface eth1 inet manual
        hwaddress ether 70:85:c2:63:a2:58

iface eth2 inet manual
        hwaddress ether 70:85:c2:63:a2:60

auto bond0
iface bond0 inet static
        bond-miimon 100
        bond_downdelay 200
        bond_updelay 200
        bond_mode 2
        bond_slaves eth0 eth1 eth2
        address 192.168.2.254
        netmask 255.255.255.0
        network 192.168.2.0
        broadcast 192.168.2.255
        dns-nameservers 192.168.2.254
        dns-search althea.home althea.wlan
        gateway 192.168.2.100


Any chance for a decent fix?

Cheers,

Dirk.

Reply via email to