In order to bond two or more network interfaces you need to create the relevant config files
# cd /etc/sysconfig/network-scripts # vi ifcfg-bond0
and enter details as:
DEVICE=bond0 USERCTL=no ONBOOT=yes BROADCAST=<ip-address> NETWORK=<ip-network> NETMASK=<mask> GATEWAY=<ip-address> IPADDR=<ip-address>
On each of the actual network cards that are going to be bonded then you need to configure them as follows:
vi ifcfg-eth0
DEVICE=eth0 USERCTL=no ONBOOT=yes MASTER=bond0 SLAVE=yes BOOTPROTO=none
For a channel bonding interface to be valid, the kernel module must be loaded. To insure that the module is loaded when the channel bonding interface is brought up, add the following line to /etc/modprobe.conf:
alias bond<N> bonding
Replace N with the number of the interface, such as 0.
For each configured channel bonding interface, there must be a corresponding options entry in /etc/modprobe.conf
options bond0 miimon=100 mode=1
To do arp monitoring use:
(you can specify more than one target.)
options bond0 mode=1 arp_interval=60 arp_ip_target=192.168.254.129,192.168.254.130
so in /etc/modprobe.conf - you should have something similar to this:
alias bond0 bonding options bond0 miimon=100 mode=1 primary=eth0
To check that your settings have been inserted correctly, check /proc/net/bonding/bondX this will list the current settings. Also look at /var/log/messages for errors
See also: http://www.kernel.org/pub/linux/kernel/people/marcelo/linux-2.4/Documentation/networking/bonding.txt
Bonding Modes
mode=1 (active-backup)
Active-backup policy: Only one slave in the bond is active. A different slave becomes active if, and only if, the active slave fails. The bond's MAC address is externally visible on only one port (network adapter) to avoid confusing the switch. This mode provides fault tolerance. The primary option affects the behavior of this mode.
mode=2 (balance-xor)
XOR policy: Transmit based on [(source MAC address XOR'd with destination MAC address) modulo slave count]. This selects the same slave for each destination MAC address. This mode provides load balancing and fault tolerance.
mode=3 (broadcast)
Broadcast policy: transmits everything on all slave interfaces. This mode provides fault tolerance.
mode=4 (802.3ad)
IEEE 802.3ad Dynamic link aggregation. Creates aggregation groups that share the same speed and duplex settings. Utilizes all slaves in the active aggregator according to the 802.3ad specification.
Pre-requisites:
- Ethtool support in the base drivers for retrieving the speed and duplex of each slave.
- A switch that supports IEEE 802.3ad Dynamic link aggregation. Most switches will require some type of configuration to enable 802.3ad mode.
mode=5 (balance-tlb)
Adaptive transmit load balancing: channel bonding that does not require any special switch support. The outgoing traffic is distributed according to the current load (computed relative to the speed) on each slave. Incoming traffic is received by the current slave. If the receiving slave fails, another slave takes over the MAC address of the failed receiving slave.
Prerequisite: Ethtool support in the base drivers for retrieving the speed of each slave.
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.

