Bonded Ethernet

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


Cisco Switches
 prefer the following settings:

  • Linux bonding mode 802.3ad with xmit_hash_policy=layer3+4
  • Switch trunking mode etherchannel/lacp-slow with layer3+4
  • Link speed must be the same on all 'enslaved' interfaces
  • Each interface should have no ip address configured
  • Each interface should show very similar (TX+RX) values.
  • Cisco Config Details

The only commonly available mode which provides bidirectional support is mode 6 (balance-alb).

Do not use the modes other then 6 (balance-alb)  if you plan to enhance performance of the system without sacrificing reliability or requiring a specific switch configuration.

Bond devices and their 'slave(s)' usually can't be members of bridges that run stp.
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 in (mode=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 and overwrites the source hardware address with the unique hardware address of one of the "enslaved Ethernet devices" in the bond such that different peers use different hardware addresses for the server, the algorithm layer3+4 and based on "ip:port". This bonding can enable a single tcp connection to saturate multiple gigabit ethernet links with full fault tolerance without connection drops under single or sometimes multiple port/cable/switch and/or gateway failures.

Request Call

Leave us your information and we will reach out to you shortly!

Download

FREE 30-day trial of SEP sesam, including full support.

You must be logged in to download.

Media Library

Browse videos from SEP's YouTube channel.