Comment 29 for bug 996369

Revision history for this message
Daniel Lynes (dblynes) wrote :

Problem solved.

It appears the way in which ifenslave is invoked has changed, and most of the documentation on the net on how to configure it doesn't work anymore.

Step by step instructions for getting it working are at the URL, http://www.ubuntugeek.com/how-to-setup-bond-or-team-network-cards-in-ubuntu-10-1010-04.html

My network interfaces are called c10gb0 and c10gb1 respectively. My bonding interface is bond0.

My new /etc/network/interfaces file is as follows:
auto lo
iface lo inet loopback

auto bond0 bond0:0 bond0:1
auto gb0

# Set up BONDed ports (link aggregation)
iface bond0 inet static
  address 10.0.0.49
  gateway 10.0.0.5
  netmask 255.255.0.0
  bond_mode 802.3ad
  bond_miimon 100
  bond_lacp_rate 1
  up /usr/local/bin/enslave bond0 c10gb0 c10gb1
  down /usr/local/bin/enslave -d bond0 c10gb0 c10gb1

iface bond0:0 inet static
  address 10.0.0.100
  netmask 255.255.0.0

iface bond0:1 inet static
  address 10.0.0.128
  netmask 255.255.0.0

My /etc/modprobe.d/aliases.conf is the same as the example at ubuntugeek.com:
alias bond0 bonding
options mode=0 miimon=100 downdelay=200 updelay=200

And my /usr/local/bin/enslave script is as follows:
#!/bin/bash
if [[ ! -z "$1" && "$1" = "-d" ]];
then
  /sbin/ifconfig bond0:1 down
  /sbin/ifconfig bond0:0 down
else
  /sbin/ifconfig bond0:0 10.0.0.100 netmask 255.255.0.0
  /sbin/ifconfig bond0:1 10.0.0.128 netmask 255.255.0.0
fi
/sbin/ifenslave $@

After everything is up, I have bond0 (10.0.0.49), bond0:0 (10.0.0.100) and bond0:1 (10.0.0.128)