Bonded Ethernet Interfaces

Linux has free support for automatic independent bidirectional load balancing using Ethernet devices of any link speed without switch support.

Common pitfalls:

The only commonly available mode which provides bidirectional support is mode 6.
Do not use the modes other then 6 if you plan to enhance performance of the system without sacrificing reliability.
Bond devices and their 'slave(s)' usually can't be members of bridges.
Bond devices can sometimes use significant (Multi-MB) amounts of memory.
Special considerations need to be made when using devices of different link speeds (10/100Mbt+1000Mbt)

Your specific Linux distribution most likely provides a tool to configure bonding so you won't need and shouldn't use the command line example and background information below.

Example driver setup for one bond interface.

Configure the /etc/modules(.conf) or /etc/modprobe.conf(.local) as follows:

  • alias bond0 bonding
  • options bond0 -o bond0 mode=6 miimon=100

Start Script for 2 ethernet interfaces (startbond0.sh)

  • #!/bin/sh
  • ##modprobe bond0
  • ifconfig bond0 192.168.0.10 netmask 255.255.255.0 up
  • route add default gw 192.168.0.1
  • ifconfig eth0 0.0.0.0 up
  • ifconfig eth1 0.0.0.0 up
  • ifenslave bond0 eth0 eth1

Bonding, mode=6 (balance-alb) Adaptive load balancing includes balance-tlb plus receive load balancing (rlb) for IPV4 traffic, and does not require any special switch support. The receive load balancing is achieved by ARP negotiation. The bonding driver intercepts the ARP Replies sent by the local system on their way out and overwrites the source hardware address with the unique hardware address of one of the slaves in the bond such that different peers use different hardware addresses for the server.