Network bonding (etherchannel) on Debian

reference · networking

Round-robin bonding of two 100 Mbit NICs on Debian.

  • Package: ifenslave-2.6 (Debian Wheezy repos).
  • Config: /etc/network/interfaces.

Sometimes the module options have to be declared in a file under /etc/modprobe.d/ (for example bonding.conf); /etc/modules only lists the modules to load:

alias bond0 bonding
options bonding miimon=100 downdelay=200 updelay=200
possibly outdated More than two years have passed since publication. The content may no longer hold.

/etc/network/interfaces

auto bond0
iface bond0 inet6 auto        # optional, if you have IPv6
iface bond0 inet static
  address XXX.XXX.XXX.XXX
  netmask 255.255.255.0
  network XXX.XXX.XXX.0
  gateway XXX.XXX.XXX.XXX
  slaves eth0 eth1
  bond_mode balance-rr        # round-robin
  bond_miimon 100
  bond_downdelay 200
  bond_updelay 200

With a bridge (for XEN)

auto bond0
iface bond0 inet6 auto        # optional, if you have IPv6
iface bond0 inet manual
  slaves eth0 eth1
  bond_mode balance-rr
  bond_miimon 100
  bond_downdelay 200
  bond_updelay 200

auto xenbr0
iface xenbr0 inet static
  bridge_ports bond0
  bridge_maxwait 2
  address XXX.XXX.XXX.XXX
  netmask 255.255.255.0
  network XXX.XXX.XXX.0
  gateway XXX.XXX.XXX.XXX

_Originally published in May 2013._

← back to explore