-----------------------
|switch or other hosts|
-----------------------
^
|
<bonding device>
/ | \ ...
<eth0> <eth1> <eth2>
More Detailed information can be found in the kernel source file Documentation/networking/bonding.txt
module by setting mode=. Possible values are 0(round robin policy, default) and 1 (active back policy), 2 (balance-xor), 3 (broadcast), 4(802.3ad), 5(balance-tlb), and 6(balance-alb). For our purposes, select 1 for the mode. You may be interested in other modes if you want to do load-balance.
MII link monitoring miimon= Use an integer value for the frequency (in ms) of MII link monitoring. Zero value is default and means the link monitoring will be disabled. This is probably not what you want.
Bonding driver works nicely for IP failover in a single node. In active-back mode there will be a master device (the bonding device), and several slave devices(eth0, eth1, ...). One and only one slave device is active at any given moment, while other slave devices are also monitored. The monitor interval (miimon) can be set in loading the module. If the active slave is sick, it will be detected and disabled, one of the other slaves will be selected and become active.
Starting in kernel 2.6 and late 2.4 kernels(at least from 2.4.26), failback to a primary link is supported. If an interface is configured as primary and the device is on-line, it will be used first as the output media. Only when this device is off-line, will alternate slave devices be used. This is useful when one slave device is preferred over others.
Status information, including how many slaves there are, which one is active, and each slave device's status can be found in proc directory. For example, in redhat 9 you can it in /proc/net/bonding device/info Here is an example info file
Bonding Mode: active-backup
Currently Active Slave: eth0
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0
Slave Interface: eth1
MII Status: up
Link Failure Count: 0
Slave Interface: eth0
MII Status: up
Link Failure Count: 0
| |
|port3 port3|
+-----+----+ +-----+----+
| |port7 ISL port7| |
| switch A +--------------------------+ switch B |
| +--------------------------+ |
| |port8 port8| |
+----++----+ +-----++---+
port2||port1 port1||port2
|| +-------+ ||
|+-------------+ host1 +---------------+|
| eth0 +-------+ eth1 |
| |
| +-------+ |
+--------------+ host2 +----------------+
eth0 +-------+ eth1
In this configuration, there is an ISL - Inter Switch Link (could be a trunk), several servers (host1, host2 ...) attached to both switches each, and one or more ports to the outside world (port3...). One and only one slave on each host is active at a time, while all links are still monitored (the system can detect a failure of active and backup links).