Confusing bonded NIC behaviour

by Fat Monk   Last Updated May 09, 2018 18:02 PM

I have two 1G NICs bonded in lacp mode to create a 2G aggregated link but the bonded interface is not working and its behavior is strange.

The two physical NICs are eth0 and eth1 and the bonded interface is bond0.

They are configured with the following /etc/network/interfaces configuration:

auto eth0
auto eth1
iface eth0 inet manual
iface eth1 inet manual

auto bond0
iface bond0 inet static
address 10.153.64.31
netmask 255.255.255.0
gateway 10.153.64.1
up /sbin/ifenslave bond0 eth0 eth1
down /sbin/ifenslave bond0 -d eth0 eth1

Looking at /proc/net/bonding/bond0 it looks as though the bonded interface has been created correctly.

Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)

Bonding Mode: IEEE 802.3ad Dynamic link aggregation
Transmit Hash Policy: layer2 (0)
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 200
Down Delay (ms): 200

802.3ad info
LACP rate: slow
Min links: 0
Aggregator selection policy (ad_select): stable
Active Aggregator Info:
        Aggregator ID: 2
        Number of ports: 2
        Actor Key: 17
        Partner Key: 4
        Partner Mac Address: {redacted}

Slave Interface: eth0
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: {redacted}
Aggregator ID: 2
Slave queue ID: 0

Slave Interface: eth1
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: {redacted}
Aggregator ID: 2
Slave queue ID: 0

Looking at ifconfig -v all three of eth0, eth1 and bond0 have the same MAC address - this is the MAC address of eth0.

However, if I try to ping my gateway I get a 'Network unreachable' error.

If I down eth0 and then attempt to ping the gateway it works!

(downing eth01 had no effect)

So, my initial suspicion was that because the MAC address of eth0 had been used for the bond0 then downing that interface kind of made sense...

BUT...

I then tried a different config for the bonding as follows:

auto eth0
iface eth0 inet manual
    bond-master bond0

auto eth1
iface eth1 inet manual
    bond-master bond0

auto bond0
iface bond0 inet static
    address 10.153.64.31
    gateway 10.153.64.1
    netmask 255.255.255.0

    bond-mode 4
    bond-miimon 100
    bond-lacp-rate 1
    bond-slaves eth0 eth1

Again this doesn't work.

ipconfig -v looks the same except that with this config the bond0 interface took the MAC address of eth1.

/proc/net/bonding/bond0 also looks the same except that eth1 and eth0 are listed with eth1 first and eth0 second.

I expected this time that downing eth1 might allow me to ping, BUT in fact I still had to down eth0 as downing eth1 still had no effect.

So, my trying to diagnose the bonding not working has just confused me even more.

The network switch that the NICs are connected to correctly recognises the lacp bonding when the two ports (eth0 and eth1) are up and their configuration is copied from other switch ports that are working perfectly with lacp bonded NICs.

This strange behaviour whereby I can ping if one of the two physical NICs is downed leads me to believe that this is an error in my interfaces config rather than the switch (plus the fact that the network guy that configures the switch knows far more about configuring switches than I know about configuring bonded NICs on Ubuntu!)

Where am I going wrong?

(Ubuntu 14.04.1, by the way)



Related Questions





additional address ip

Updated July 23, 2015 15:01 PM

Will this work?

Updated April 22, 2015 21:00 PM