Network bond aggregate ethernet

From Skytech
Revision as of 07:16, 26 October 2011 by Martin (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


Bonding modes

mode=0 (balance-rr) Round-robin policy: Transmit packets in sequential order from the first available slave through the last. This mode provides load balancing and fault tolerance.

mode=1 (active-backup) One slave interface is active at any time. If one interface fails, another interface takes over the MAC address and becomes the active interface. Provides fault tolerance only. Doesn’t require special switch support

mode=2 (balance-xor) Tranmissions are balanced across the slave interfaces based on ((source MAC) XOR (dest MAC)) modula slave count. The same slave is selected for each destination MAC. Provides load balancing and fault tolerance.

mode=3 (broadcast) Transmits everything on all slave interfaces. Provides fault tolerance.

mode=4 (802.3ad) This is classic IEEE 802.3ad Dynamic link aggregation. This requires 802.3ad support in the switch and driver support for retrieving the speed and duplex of each slave.

mode=5 (balance-tlb) Adaptive Transmit Load Balancing. Incoming traffic is received on the active slave only, outgoing traffic is distributed according to the current load on each slave. Doesn’t require special switch support

mode=6 (balance-alb) Adaptive Load Balancing - provides both transmit load balancing (TLB) and receive load balancing for IPv4 via ARP negotiation. Doesn’t require special switch support, but does require the ability to change the MAC address of a device while it is open.

Prerequisite software

You need the bonding software first, so go ahead and install it.

aptitude install ifenslave-2.6

Bonding ethernet on debian

On debian it is extremely easy to bond ethernets; you simply edit your /etc/network/interfaces and comment out all your ethx devices (with auto/hotplug as well!).

Then you stop the network and add the bonding interface like this:

 auto bond0
 iface bond0 inet static
        address 10.0.1.5
        netmask 255.255.255.0
        network 10.0.1.0
        gateway 10.0.1.254
        bond_mode balance-tlb
        bond_miimon 100
        bond_downdelay 200
        bond_updelay 200
        slaves eth0 eth1

Then reboot/restart your network and you should be golden. Just add devices as you see fit and choose the bonding-mode which suits you the best.

Bonding in details on linux

Read more here:

Linux kernel bonding description

Bonding on centos/redhat

Bonding redhat/centos