# bonding: 802.3ad + active-backup not working

## nukleus

Hi there,

I'm trying to create a 802.3ad bond to an HP ProCurve switch and want to combine that bond and the third NIC to an active-backup bond to another switch to have at least some connectivity in case the primary switch goes down for some reason. I'm having trouble creating this, including kernel panics that I could not capture and now I wonder if such a setup would even work the way I want. Schematics:

```
[eth0] 

      \

       > bond0 (802.3ad)

      /                 \

[eth1]                   \

                          > bond1 (active-backup) -> br0

                         /

[eth2]------------------´
```

I used the following setup:

```
cat /etc/modprobe.d/bond.conf 

alias bond0 bonding

options bond0 mode=802.3ad miimon=100 primary=eth0 max_bonds=2

alias bond1 bonding

options bond1 mode=active-backup miimon=100 primary=bond0 max_bonds=2
```

```
cat /etc/conf.d/net

modules="iproute2"

## eth0 && eth1 => failover bond0

config_eth0="null"

config_eth1="null"

config_bond0="null"

slaves_bond0="eth0 eth1"

rc_net_bond0_need="net.eth0 net.eth1"

## bond0 + eth2 => active backup bond1

config_eth2="null"

slaves_bond1="bond0 eth2"

rc_net_bond1_need="net.bond0 net.eth2"

# bridge br0 on top of bond1

brctl_br0="setfd 0

           stp off"

#                   sethello 1"

bridge_br0="bond1"

config_br0="172.20.12.12/19

            2001:7c0:409:8001::12:12/64

            2001:7c0:409:8001::c0:ffee"

routes_br0="routes etc"

rc_net_br0_need="net.bond1"

# http://www.twam.info/linux/ethernet-bonding-with-linux-and-8023ad

preup()

{

       if [[ ${IFACE} == "bond0" ]];

       then

               BOND_MODE="802.3ad"

               BOND_MIIMON="100"

               echo ${BOND_MODE} > /sys/class/net/bond0/bonding/mode

               echo ${BOND_MIIMON} > /sys/class/net/bond0/bonding/miimon

               einfo "Bonding mode is set to ${BOND_MODE} on ${IFACE}"

               einfo "MII monitor interval is set to ${BOND_MIIMON} ms on ${IFACE}"

       elif [[ ${IFACE} == "bond1" ]];

       then

               BOND_MODE="active-backup"

               BOND_MIIMON="100"

               echo ${BOND_MODE} > /sys/class/net/bond1/bonding/mode

               echo ${BOND_MIIMON} > /sys/class/net/bond1/bonding/miimon

               einfo "Bonding mode is set to ${BOND_MODE} on ${IFACE}"

               einfo "MII monitor interval is set to ${BOND_MIIMON} ms on ${IFACE}"

       else

               einfo "Doing nothing on ${IFACE}"

       fi

       return 0

}
```

This scenario led to several pages of panic traces that I could not capture in one instance, and to a total system halt w/o any output in another instance. Am I doing something entirely wrong is that simply not meant to work at all?

System is a hardened gentoo running hardened-kernel 3.6.6 on a Supermicro-board with two onboard nics using "igb", eth2 is an e1000e intel nic

----------

## AngelKnight

Just do:

bond0: eth0 + eth1

br0: bond0 + br2

You need to read up on 802.3ad if you think that hierarchical 802.3ad makes sense.

----------

## nukleus

I didn't want hierarchical 802.3ad, but rather one 802.3ad and one active-backup bond to prevent the system from falling off the network when the primary switch goes offline

Also, a bridge over 802.3ad + eth2 resultet in other devices on the network (presumably mostly apple hardware) to flood the network with mdns *cast packets which brought down the network with ~800 active hosts so I couldn't test if it worked as intended.

----------

