/Documentation/networking/bonding.txt
Plain Text | 2440 lines | 1890 code | 550 blank | 0 comment | 0 complexity | ffdf001caaddba204fc0f794117cd8c4 MD5 | raw file
Possible License(s): GPL-2.0, LGPL-2.0, AGPL-1.0
Large files files are truncated, but you can click here to view the full file
- Linux Ethernet Bonding Driver HOWTO
- Latest update: 23 September 2009
- Initial release : Thomas Davis <tadavis at lbl.gov>
- Corrections, HA extensions : 2000/10/03-15 :
- - Willy Tarreau <willy at meta-x.org>
- - Constantine Gavrilov <const-g at xpert.com>
- - Chad N. Tindel <ctindel at ieee dot org>
- - Janice Girouard <girouard at us dot ibm dot com>
- - Jay Vosburgh <fubar at us dot ibm dot com>
- Reorganized and updated Feb 2005 by Jay Vosburgh
- Added Sysfs information: 2006/04/24
- - Mitch Williams <mitch.a.williams at intel.com>
- Introduction
- ============
- The Linux bonding driver provides a method for aggregating
- multiple network interfaces into a single logical "bonded" interface.
- The behavior of the bonded interfaces depends upon the mode; generally
- speaking, modes provide either hot standby or load balancing services.
- Additionally, link integrity monitoring may be performed.
-
- The bonding driver originally came from Donald Becker's
- beowulf patches for kernel 2.0. It has changed quite a bit since, and
- the original tools from extreme-linux and beowulf sites will not work
- with this version of the driver.
- For new versions of the driver, updated userspace tools, and
- who to ask for help, please follow the links at the end of this file.
- Table of Contents
- =================
- 1. Bonding Driver Installation
- 2. Bonding Driver Options
- 3. Configuring Bonding Devices
- 3.1 Configuration with Sysconfig Support
- 3.1.1 Using DHCP with Sysconfig
- 3.1.2 Configuring Multiple Bonds with Sysconfig
- 3.2 Configuration with Initscripts Support
- 3.2.1 Using DHCP with Initscripts
- 3.2.2 Configuring Multiple Bonds with Initscripts
- 3.3 Configuring Bonding Manually with Ifenslave
- 3.3.1 Configuring Multiple Bonds Manually
- 3.4 Configuring Bonding Manually via Sysfs
- 4. Querying Bonding Configuration
- 4.1 Bonding Configuration
- 4.2 Network Configuration
- 5. Switch Configuration
- 6. 802.1q VLAN Support
- 7. Link Monitoring
- 7.1 ARP Monitor Operation
- 7.2 Configuring Multiple ARP Targets
- 7.3 MII Monitor Operation
- 8. Potential Trouble Sources
- 8.1 Adventures in Routing
- 8.2 Ethernet Device Renaming
- 8.3 Painfully Slow Or No Failed Link Detection By Miimon
- 9. SNMP agents
- 10. Promiscuous mode
- 11. Configuring Bonding for High Availability
- 11.1 High Availability in a Single Switch Topology
- 11.2 High Availability in a Multiple Switch Topology
- 11.2.1 HA Bonding Mode Selection for Multiple Switch Topology
- 11.2.2 HA Link Monitoring for Multiple Switch Topology
- 12. Configuring Bonding for Maximum Throughput
- 12.1 Maximum Throughput in a Single Switch Topology
- 12.1.1 MT Bonding Mode Selection for Single Switch Topology
- 12.1.2 MT Link Monitoring for Single Switch Topology
- 12.2 Maximum Throughput in a Multiple Switch Topology
- 12.2.1 MT Bonding Mode Selection for Multiple Switch Topology
- 12.2.2 MT Link Monitoring for Multiple Switch Topology
- 13. Switch Behavior Issues
- 13.1 Link Establishment and Failover Delays
- 13.2 Duplicated Incoming Packets
- 14. Hardware Specific Considerations
- 14.1 IBM BladeCenter
- 15. Frequently Asked Questions
- 16. Resources and Links
- 1. Bonding Driver Installation
- ==============================
- Most popular distro kernels ship with the bonding driver
- already available as a module and the ifenslave user level control
- program installed and ready for use. If your distro does not, or you
- have need to compile bonding from source (e.g., configuring and
- installing a mainline kernel from kernel.org), you'll need to perform
- the following steps:
- 1.1 Configure and build the kernel with bonding
- -----------------------------------------------
- The current version of the bonding driver is available in the
- drivers/net/bonding subdirectory of the most recent kernel source
- (which is available on http://kernel.org). Most users "rolling their
- own" will want to use the most recent kernel from kernel.org.
- Configure kernel with "make menuconfig" (or "make xconfig" or
- "make config"), then select "Bonding driver support" in the "Network
- device support" section. It is recommended that you configure the
- driver as module since it is currently the only way to pass parameters
- to the driver or configure more than one bonding device.
- Build and install the new kernel and modules, then continue
- below to install ifenslave.
- 1.2 Install ifenslave Control Utility
- -------------------------------------
- The ifenslave user level control program is included in the
- kernel source tree, in the file Documentation/networking/ifenslave.c.
- It is generally recommended that you use the ifenslave that
- corresponds to the kernel that you are using (either from the same
- source tree or supplied with the distro), however, ifenslave
- executables from older kernels should function (but features newer
- than the ifenslave release are not supported). Running an ifenslave
- that is newer than the kernel is not supported, and may or may not
- work.
- To install ifenslave, do the following:
- # gcc -Wall -O -I/usr/src/linux/include ifenslave.c -o ifenslave
- # cp ifenslave /sbin/ifenslave
- If your kernel source is not in "/usr/src/linux," then replace
- "/usr/src/linux/include" in the above with the location of your kernel
- source include directory.
- You may wish to back up any existing /sbin/ifenslave, or, for
- testing or informal use, tag the ifenslave to the kernel version
- (e.g., name the ifenslave executable /sbin/ifenslave-2.6.10).
- IMPORTANT NOTE:
- If you omit the "-I" or specify an incorrect directory, you
- may end up with an ifenslave that is incompatible with the kernel
- you're trying to build it for. Some distros (e.g., Red Hat from 7.1
- onwards) do not have /usr/include/linux symbolically linked to the
- default kernel source include directory.
- SECOND IMPORTANT NOTE:
- If you plan to configure bonding using sysfs, you do not need
- to use ifenslave.
- 2. Bonding Driver Options
- =========================
- Options for the bonding driver are supplied as parameters to the
- bonding module at load time, or are specified via sysfs.
- Module options may be given as command line arguments to the
- insmod or modprobe command, but are usually specified in either the
- /etc/modules.conf or /etc/modprobe.conf configuration file, or in a
- distro-specific configuration file (some of which are detailed in the next
- section).
- Details on bonding support for sysfs is provided in the
- "Configuring Bonding Manually via Sysfs" section, below.
- The available bonding driver parameters are listed below. If a
- parameter is not specified the default value is used. When initially
- configuring a bond, it is recommended "tail -f /var/log/messages" be
- run in a separate window to watch for bonding driver error messages.
- It is critical that either the miimon or arp_interval and
- arp_ip_target parameters be specified, otherwise serious network
- degradation will occur during link failures. Very few devices do not
- support at least miimon, so there is really no reason not to use it.
- Options with textual values will accept either the text name
- or, for backwards compatibility, the option value. E.g.,
- "mode=802.3ad" and "mode=4" set the same mode.
- The parameters are as follows:
- ad_select
- Specifies the 802.3ad aggregation selection logic to use. The
- possible values and their effects are:
- stable or 0
- The active aggregator is chosen by largest aggregate
- bandwidth.
- Reselection of the active aggregator occurs only when all
- slaves of the active aggregator are down or the active
- aggregator has no slaves.
- This is the default value.
- bandwidth or 1
- The active aggregator is chosen by largest aggregate
- bandwidth. Reselection occurs if:
- - A slave is added to or removed from the bond
- - Any slave's link state changes
- - Any slave's 802.3ad association state changes
- - The bond's administrative state changes to up
- count or 2
- The active aggregator is chosen by the largest number of
- ports (slaves). Reselection occurs as described under the
- "bandwidth" setting, above.
- The bandwidth and count selection policies permit failover of
- 802.3ad aggregations when partial failure of the active aggregator
- occurs. This keeps the aggregator with the highest availability
- (either in bandwidth or in number of ports) active at all times.
- This option was added in bonding version 3.4.0.
- arp_interval
- Specifies the ARP link monitoring frequency in milliseconds.
- The ARP monitor works by periodically checking the slave
- devices to determine whether they have sent or received
- traffic recently (the precise criteria depends upon the
- bonding mode, and the state of the slave). Regular traffic is
- generated via ARP probes issued for the addresses specified by
-