Linux Bonding Modes

When bonding Ethernet channels in Linux there are several modes that can be chosen that affect the way in which the bonding will occur. These modes are enumerated from zero to six. Let’s look briefly at each and see how they differ. Remember that when looking at these modes that bonding can include two or more Ethernet channels. It is not limited to just two.

The mode is set view the modprobe command or, more commonly, is simply inserted into the /etc/modprobe.conf (or /etc/modules.conf) configuration file so that it is configured every time that the Linux Bonding Driver is initialized.

Mode 0: Round Robin.  Transmissions are load balanced by sending from available interfaces sequentially packet by packet.  Transmissions only are load balanced.  Provides load balancing and fault tolerance.

Mode 1: Active-Backup. This is the simplest mode of operation for bonding. Only one Ethernet slave is active at any one time. When the active connection fails another slave is chosen to take over as the active slave and the MAC address is transferred to that connection. The switch will effectively view this the same as if the host was disconnected from one port and then connected to another port. This mode provides fault tolerance but does not provide any increase in performance.

Mode 2: Balanced XOR. This is a simple form of load balancing using the XOR of the MAC addresses of the host and the destination. It works in general fairly well but always sends the packets through the same channel when sending to the same destination. This means that it is relatively effective when communicating with a large number of different remote hosts but loses effectiveness as the number decreases becoming worthless as the value becomes one. This mode provides fault tolerance and some load balancing.

Mode 3: Broadcast. This mode simply uses all channels to mirror all transmissions. It does not provide any load balancing but is for fault tolerance only.

Mode 4: IEEE Dynamic Link Aggregation. This mode provides fault tolerance as well as load balancing. It is highly effective but requires configuration changes on the switch and the switch must support 802.3ad Link Aggregation.

Mode 5: Adaptive Transmit Load Balancing. This mode provides fault tolerance and transmit (out going) load balancing. It provides no receiving load balancing.  This mode does not require any configuration on the switch.  Ethtool support is required in the network adapter (NIC) driver.

Mode 6: Adaptive Load Balancing.  Like mode five but provides fault tolerance and bidirectional load balancing.  The transmit load balancing is identical but receipt load balancing is accomplished by ARP trickery.

3 thoughts on “Linux Bonding Modes”

Leave a Reply