bonding Module Directives
Before finalizing the settings for the bonding
module, it is a good idea to test which settings work best. To do
this, open a shell prompt as root and type:
tail -f /var/log/messages |
Open another shell prompt and use the
/sbin/insmod command to load the
bonding module with different parameters while
observing the kernel messages for errors.
The /sbin/insmod command is issued in the
following format:
/sbin/insmod bond<N> <parameter=value> |
Replace <N> with the number for the
bonding interface. Replace
<parameter=value> with a space
separated list of desired parameters for the interface.
Once satisfied that there are no errors and after verifying the
performance of the bonding interface, add the appropriate
bonding module parameters to
/etc/modules.conf.
The following is a list of available parameters for the
bonding module:
mode= — Specifies one of four
policies allowed for the bonding
module. Acceptable values for this parameter are:
0 — Sets a round-robin policy
for fault tolerance and load balancing. Transmissions are
received and sent out sequentially on each bonded slave
interface beginning with the first one available.
1 — Sets an active-backup
policy for fault tolerance. Transmissions are received and
sent out via the first available bonded slave
interface. Another bonded slave interface is only used if
the active bonded slave interface fails.
2 — Sets an XOR (exclusive-or) policy
for fault tolerance and load balancing. Using this method
the interface matches up the incoming request's MAC address
with the MAC address for one of the slave NICs. Once this
link is established, transmissions are sent out sequentially
beginning with the first available interface.
3 — Sets a round-robin policy
for fault tolerance and load balancing. Transmissions are send
out sequentially on each bonded slave interface beginning
with the first one available.
miimon= — Specifies (in
milliseconds) how often MII link monitoring occurs. This is
useful if high availability is required because MII is used to
verify that the NIC is active. To verify that the driver for a
particular NIC supports the MII tool, type the following command as
root:
ethtool <interface-name> | grep "Link detected:" |
In this command, replace
<interface-name> with the name
of the device interface, such as eth0, not the a
bond interface. If MII is supported, the
command returns:
If using a bonded interface for high availability, the module
for each NIC must support MII.
Setting the value to 0 (the default), turns
this feature off. When configuring this setting, a good starting
point for this parameter is 100.
downdelay= — Specifies (in
milliseconds) how long to wait after link failure before
disabling the link. The value must be a multiple of the value
specified in the miimon parameter. The value
is set to 0 by default, which
disables it.
updelay= — Specifies (in
milliseconds) how long to wait before enabling a link. The
value must be a multiple of the value specified in the
miimon parameter. The value is set to
0 by default, which
disables it.
arp_interval= — Specifies (in
milliseconds) how often ARP monitoring occurs.
If using this setting while in
mode
0 or
2 (the two
load-balancing modes) the network switch must be configured to
distribute packets evenly across the NICs. For more information
on how to accomplish this, refer to
/usr/src/linux-2.4/Documentation/networking/bonding.txt[1].
The value is set to 0 by default, which
disables it.
arp_ip_target= — Specifies the
target IP address of ARP requests when the
arp_interval parameter is enabled. Up to 16
IP addresses can be specified in a comma separated list.
primary= — Specifies the interface
name, such as eth0, of the primary
device. The primary device is the first of
the bonding interfaces to be used and is not abandoned unless it
fails. This setting is particularly useful when one NIC in the
bonding interface is faster and, therefore, able to handle a
bigger load.
This setting is only valid when the bonding
interface is in active-backup mode. Refer to
/usr/src/linux-2.4/Documentation/networking/bonding.txt[1]
for more information.
multicast= — Specifies an integer
value for the type of multicast support desired.
Acceptable values for this parameter are:
0 — Disables multicast support.
1 — Enables multicast support,
but only on the active slave.
2 — Enables multicast support
on all slaves (the default).
 | Important |
|---|
| | It is essential that either the arp_interval
and arp_ip_target or miimon
parameters are specified. Failure to due so can cause degradation
of network performance in the event a link fails.
|
Refer to
/usr/src/linux-2.4/Documentation/networking/bonding.txt[1] for detailed instructions regarding bonding
interfaces.