Blame README.bonding

Packit 1034e0
Packit 1034e0
		Linux Ethernet Bonding Driver HOWTO
Packit 1034e0
Packit 1034e0
		Latest update: 27 April 2011
Packit 1034e0
Packit 1034e0
Initial release : Thomas Davis <tadavis at lbl.gov>
Packit 1034e0
Corrections, HA extensions : 2000/10/03-15 :
Packit 1034e0
  - Willy Tarreau <willy at meta-x.org>
Packit 1034e0
  - Constantine Gavrilov <const-g at xpert.com>
Packit 1034e0
  - Chad N. Tindel <ctindel at ieee dot org>
Packit 1034e0
  - Janice Girouard <girouard at us dot ibm dot com>
Packit 1034e0
  - Jay Vosburgh <fubar at us dot ibm dot com>
Packit 1034e0
Packit 1034e0
Reorganized and updated Feb 2005 by Jay Vosburgh
Packit 1034e0
Added Sysfs information: 2006/04/24
Packit 1034e0
  - Mitch Williams <mitch.a.williams at intel.com>
Packit 1034e0
Packit 1034e0
Introduction
Packit 1034e0
============
Packit 1034e0
Packit 1034e0
	The Linux bonding driver provides a method for aggregating
Packit 1034e0
multiple network interfaces into a single logical "bonded" interface.
Packit 1034e0
The behavior of the bonded interfaces depends upon the mode; generally
Packit 1034e0
speaking, modes provide either hot standby or load balancing services.
Packit 1034e0
Additionally, link integrity monitoring may be performed.
Packit 1034e0
	
Packit 1034e0
	The bonding driver originally came from Donald Becker's
Packit 1034e0
beowulf patches for kernel 2.0. It has changed quite a bit since, and
Packit 1034e0
the original tools from extreme-linux and beowulf sites will not work
Packit 1034e0
with this version of the driver.
Packit 1034e0
Packit 1034e0
	For new versions of the driver, updated userspace tools, and
Packit 1034e0
who to ask for help, please follow the links at the end of this file.
Packit 1034e0
Packit 1034e0
Table of Contents
Packit 1034e0
=================
Packit 1034e0
Packit 1034e0
1. Bonding Driver Installation
Packit 1034e0
Packit 1034e0
2. Bonding Driver Options
Packit 1034e0
Packit 1034e0
3. Configuring Bonding Devices
Packit 1034e0
3.1	Configuration with Sysconfig Support
Packit 1034e0
3.1.1		Using DHCP with Sysconfig
Packit 1034e0
3.1.2		Configuring Multiple Bonds with Sysconfig
Packit 1034e0
3.2	Configuration with Initscripts Support
Packit 1034e0
3.2.1		Using DHCP with Initscripts
Packit 1034e0
3.2.2		Configuring Multiple Bonds with Initscripts
Packit 1034e0
3.3	Configuring Bonding Manually with Ifenslave
Packit 1034e0
3.3.1		Configuring Multiple Bonds Manually
Packit 1034e0
3.4	Configuring Bonding Manually via Sysfs
Packit 1034e0
3.5	Configuration with Interfaces Support
Packit 1034e0
3.6	Overriding Configuration for Special Cases
Packit 1034e0
Packit 1034e0
4. Querying Bonding Configuration
Packit 1034e0
4.1	Bonding Configuration
Packit 1034e0
4.2	Network Configuration
Packit 1034e0
Packit 1034e0
5. Switch Configuration
Packit 1034e0
Packit 1034e0
6. 802.1q VLAN Support
Packit 1034e0
Packit 1034e0
7. Link Monitoring
Packit 1034e0
7.1	ARP Monitor Operation
Packit 1034e0
7.2	Configuring Multiple ARP Targets
Packit 1034e0
7.3	MII Monitor Operation
Packit 1034e0
Packit 1034e0
8. Potential Trouble Sources
Packit 1034e0
8.1	Adventures in Routing
Packit 1034e0
8.2	Ethernet Device Renaming
Packit 1034e0
8.3	Painfully Slow Or No Failed Link Detection By Miimon
Packit 1034e0
Packit 1034e0
9. SNMP agents
Packit 1034e0
Packit 1034e0
10. Promiscuous mode
Packit 1034e0
Packit 1034e0
11. Configuring Bonding for High Availability
Packit 1034e0
11.1	High Availability in a Single Switch Topology
Packit 1034e0
11.2	High Availability in a Multiple Switch Topology
Packit 1034e0
11.2.1		HA Bonding Mode Selection for Multiple Switch Topology
Packit 1034e0
11.2.2		HA Link Monitoring for Multiple Switch Topology
Packit 1034e0
Packit 1034e0
12. Configuring Bonding for Maximum Throughput
Packit 1034e0
12.1	Maximum Throughput in a Single Switch Topology
Packit 1034e0
12.1.1		MT Bonding Mode Selection for Single Switch Topology
Packit 1034e0
12.1.2		MT Link Monitoring for Single Switch Topology
Packit 1034e0
12.2	Maximum Throughput in a Multiple Switch Topology
Packit 1034e0
12.2.1		MT Bonding Mode Selection for Multiple Switch Topology
Packit 1034e0
12.2.2		MT Link Monitoring for Multiple Switch Topology
Packit 1034e0
Packit 1034e0
13. Switch Behavior Issues
Packit 1034e0
13.1	Link Establishment and Failover Delays
Packit 1034e0
13.2	Duplicated Incoming Packets
Packit 1034e0
Packit 1034e0
14. Hardware Specific Considerations
Packit 1034e0
14.1	IBM BladeCenter
Packit 1034e0
Packit 1034e0
15. Frequently Asked Questions
Packit 1034e0
Packit 1034e0
16. Resources and Links
Packit 1034e0
Packit 1034e0
Packit 1034e0
1. Bonding Driver Installation
Packit 1034e0
==============================
Packit 1034e0
Packit 1034e0
	Most popular distro kernels ship with the bonding driver
Packit 1034e0
already available as a module and the ifenslave user level control
Packit 1034e0
program installed and ready for use. If your distro does not, or you
Packit 1034e0
have need to compile bonding from source (e.g., configuring and
Packit 1034e0
installing a mainline kernel from kernel.org), you'll need to perform
Packit 1034e0
the following steps:
Packit 1034e0
Packit 1034e0
1.1 Configure and build the kernel with bonding
Packit 1034e0
-----------------------------------------------
Packit 1034e0
Packit 1034e0
	The current version of the bonding driver is available in the
Packit 1034e0
drivers/net/bonding subdirectory of the most recent kernel source
Packit 1034e0
(which is available on http://kernel.org).  Most users "rolling their
Packit 1034e0
own" will want to use the most recent kernel from kernel.org.
Packit 1034e0
Packit 1034e0
	Configure kernel with "make menuconfig" (or "make xconfig" or
Packit 1034e0
"make config"), then select "Bonding driver support" in the "Network
Packit 1034e0
device support" section.  It is recommended that you configure the
Packit 1034e0
driver as module since it is currently the only way to pass parameters
Packit 1034e0
to the driver or configure more than one bonding device.
Packit 1034e0
Packit 1034e0
	Build and install the new kernel and modules, then continue
Packit 1034e0
below to install ifenslave.
Packit 1034e0
Packit 1034e0
1.2 Install ifenslave Control Utility
Packit 1034e0
-------------------------------------
Packit 1034e0
Packit 1034e0
	The ifenslave user level control program is included in the
Packit 1034e0
kernel source tree, in the file Documentation/networking/ifenslave.c.
Packit 1034e0
It is generally recommended that you use the ifenslave that
Packit 1034e0
corresponds to the kernel that you are using (either from the same
Packit 1034e0
source tree or supplied with the distro), however, ifenslave
Packit 1034e0
executables from older kernels should function (but features newer
Packit 1034e0
than the ifenslave release are not supported).  Running an ifenslave
Packit 1034e0
that is newer than the kernel is not supported, and may or may not
Packit 1034e0
work.
Packit 1034e0
Packit 1034e0
	To install ifenslave, do the following:
Packit 1034e0
Packit 1034e0
# gcc -Wall -O -I/usr/src/linux/include ifenslave.c -o ifenslave
Packit 1034e0
# cp ifenslave /sbin/ifenslave
Packit 1034e0
Packit 1034e0
	If your kernel source is not in "/usr/src/linux," then replace
Packit 1034e0
"/usr/src/linux/include" in the above with the location of your kernel
Packit 1034e0
source include directory.
Packit 1034e0
Packit 1034e0
	You may wish to back up any existing /sbin/ifenslave, or, for
Packit 1034e0
testing or informal use, tag the ifenslave to the kernel version
Packit 1034e0
(e.g., name the ifenslave executable /sbin/ifenslave-2.6.10).
Packit 1034e0
Packit 1034e0
IMPORTANT NOTE:
Packit 1034e0
Packit 1034e0
	If you omit the "-I" or specify an incorrect directory, you
Packit 1034e0
may end up with an ifenslave that is incompatible with the kernel
Packit 1034e0
you're trying to build it for.  Some distros (e.g., Red Hat from 7.1
Packit 1034e0
onwards) do not have /usr/include/linux symbolically linked to the
Packit 1034e0
default kernel source include directory.
Packit 1034e0
Packit 1034e0
SECOND IMPORTANT NOTE:
Packit 1034e0
	If you plan to configure bonding using sysfs or using the
Packit 1034e0
/etc/network/interfaces file, you do not need to use ifenslave.
Packit 1034e0
Packit 1034e0
2. Bonding Driver Options
Packit 1034e0
=========================
Packit 1034e0
Packit 1034e0
	Options for the bonding driver are supplied as parameters to the
Packit 1034e0
bonding module at load time, or are specified via sysfs.
Packit 1034e0
Packit 1034e0
	Module options may be given as command line arguments to the
Packit 1034e0
insmod or modprobe command, but are usually specified in either the
Packit 1034e0
/etc/modrobe.d/*.conf configuration files, or in a distro-specific
Packit 1034e0
configuration file (some of which are detailed in the next section).
Packit 1034e0
Packit 1034e0
	Details on bonding support for sysfs is provided in the
Packit 1034e0
"Configuring Bonding Manually via Sysfs" section, below.
Packit 1034e0
Packit 1034e0
	The available bonding driver parameters are listed below. If a
Packit 1034e0
parameter is not specified the default value is used.  When initially
Packit 1034e0
configuring a bond, it is recommended "tail -f /var/log/messages" be
Packit 1034e0
run in a separate window to watch for bonding driver error messages.
Packit 1034e0
Packit 1034e0
	It is critical that either the miimon or arp_interval and
Packit 1034e0
arp_ip_target parameters be specified, otherwise serious network
Packit 1034e0
degradation will occur during link failures.  Very few devices do not
Packit 1034e0
support at least miimon, so there is really no reason not to use it.
Packit 1034e0
Packit 1034e0
	Options with textual values will accept either the text name
Packit 1034e0
or, for backwards compatibility, the option value.  E.g.,
Packit 1034e0
"mode=802.3ad" and "mode=4" set the same mode.
Packit 1034e0
Packit 1034e0
	The parameters are as follows:
Packit 1034e0
Packit 1034e0
active_slave
Packit 1034e0
Packit 1034e0
	Specifies the new active slave for modes that support it
Packit 1034e0
	(active-backup, balance-alb and balance-tlb).  Possible values
Packit 1034e0
	are the name of any currently enslaved interface, or an empty
Packit 1034e0
	string.  If a name is given, the slave and its link must be up in order
Packit 1034e0
	to be selected as the new active slave.  If an empty string is
Packit 1034e0
	specified, the current active slave is cleared, and a new active
Packit 1034e0
	slave is selected automatically.
Packit 1034e0
Packit 1034e0
	Note that this is only available through the sysfs interface. No module
Packit 1034e0
	parameter by this name exists.
Packit 1034e0
Packit 1034e0
	The normal value of this option is the name of the currently
Packit 1034e0
	active slave, or the empty string if there is no active slave or
Packit 1034e0
	the current mode does not use an active slave.
Packit 1034e0
Packit 1034e0
ad_select
Packit 1034e0
Packit 1034e0
	Specifies the 802.3ad aggregation selection logic to use.  The
Packit 1034e0
	possible values and their effects are:
Packit 1034e0
Packit 1034e0
	stable or 0
Packit 1034e0
Packit 1034e0
		The active aggregator is chosen by largest aggregate
Packit 1034e0
		bandwidth.
Packit 1034e0
Packit 1034e0
		Reselection of the active aggregator occurs only when all
Packit 1034e0
		slaves of the active aggregator are down or the active
Packit 1034e0
		aggregator has no slaves.
Packit 1034e0
Packit 1034e0
		This is the default value.
Packit 1034e0
Packit 1034e0
	bandwidth or 1
Packit 1034e0
Packit 1034e0
		The active aggregator is chosen by largest aggregate
Packit 1034e0
		bandwidth.  Reselection occurs if:
Packit 1034e0
Packit 1034e0
		- A slave is added to or removed from the bond
Packit 1034e0
Packit 1034e0
		- Any slave's link state changes
Packit 1034e0
Packit 1034e0
		- Any slave's 802.3ad association state changes
Packit 1034e0
Packit 1034e0
		- The bond's administrative state changes to up
Packit 1034e0
Packit 1034e0
	count or 2
Packit 1034e0
Packit 1034e0
		The active aggregator is chosen by the largest number of
Packit 1034e0
		ports (slaves).  Reselection occurs as described under the
Packit 1034e0
		"bandwidth" setting, above.
Packit 1034e0
Packit 1034e0
	The bandwidth and count selection policies permit failover of
Packit 1034e0
	802.3ad aggregations when partial failure of the active aggregator
Packit 1034e0
	occurs.  This keeps the aggregator with the highest availability
Packit 1034e0
	(either in bandwidth or in number of ports) active at all times.
Packit 1034e0
Packit 1034e0
	This option was added in bonding version 3.4.0.
Packit 1034e0
Packit 1034e0
all_slaves_active
Packit 1034e0
Packit 1034e0
	Specifies that duplicate frames (received on inactive ports) should be
Packit 1034e0
	dropped (0) or delivered (1).
Packit 1034e0
Packit 1034e0
	Normally, bonding will drop duplicate frames (received on inactive
Packit 1034e0
	ports), which is desirable for most users. But there are some times
Packit 1034e0
	it is nice to allow duplicate frames to be delivered.
Packit 1034e0
Packit 1034e0
	The default value is 0 (drop duplicate frames received on inactive
Packit 1034e0
	ports).
Packit 1034e0
Packit 1034e0
arp_interval
Packit 1034e0
Packit 1034e0
	Specifies the ARP link monitoring frequency in milliseconds.
Packit 1034e0
Packit 1034e0
	The ARP monitor works by periodically checking the slave
Packit 1034e0
	devices to determine whether they have sent or received
Packit 1034e0
	traffic recently (the precise criteria depends upon the
Packit 1034e0
	bonding mode, and the state of the slave).  Regular traffic is
Packit 1034e0
	generated via ARP probes issued for the addresses specified by
Packit 1034e0
	the arp_ip_target option.
Packit 1034e0
Packit 1034e0
	This behavior can be modified by the arp_validate option,
Packit 1034e0
	below.
Packit 1034e0
Packit 1034e0
	If ARP monitoring is used in an etherchannel compatible mode
Packit 1034e0
	(modes 0 and 2), the switch should be configured in a mode
Packit 1034e0
	that evenly distributes packets across all links. If the
Packit 1034e0
	switch is configured to distribute the packets in an XOR
Packit 1034e0
	fashion, all replies from the ARP targets will be received on
Packit 1034e0
	the same link which could cause the other team members to
Packit 1034e0
	fail.  ARP monitoring should not be used in conjunction with
Packit 1034e0
	miimon.  A value of 0 disables ARP monitoring.  The default
Packit 1034e0
	value is 0.
Packit 1034e0
Packit 1034e0
arp_ip_target
Packit 1034e0
Packit 1034e0
	Specifies the IP addresses to use as ARP monitoring peers when
Packit 1034e0
	arp_interval is > 0.  These are the targets of the ARP request
Packit 1034e0
	sent to determine the health of the link to the targets.
Packit 1034e0
	Specify these values in ddd.ddd.ddd.ddd format.  Multiple IP
Packit 1034e0
	addresses must be separated by a comma.  At least one IP
Packit 1034e0
	address must be given for ARP monitoring to function.  The
Packit 1034e0
	maximum number of targets that can be specified is 16.  The
Packit 1034e0
	default value is no IP addresses.
Packit 1034e0
Packit 1034e0
arp_validate
Packit 1034e0
Packit 1034e0
	Specifies whether or not ARP probes and replies should be
Packit 1034e0
	validated in the active-backup mode.  This causes the ARP
Packit 1034e0
	monitor to examine the incoming ARP requests and replies, and
Packit 1034e0
	only consider a slave to be up if it is receiving the
Packit 1034e0
	appropriate ARP traffic.
Packit 1034e0
Packit 1034e0
	Possible values are:
Packit 1034e0
Packit 1034e0
	none or 0
Packit 1034e0
Packit 1034e0
		No validation is performed.  This is the default.
Packit 1034e0
Packit 1034e0
	active or 1
Packit 1034e0
Packit 1034e0
		Validation is performed only for the active slave.
Packit 1034e0
Packit 1034e0
	backup or 2
Packit 1034e0
Packit 1034e0
		Validation is performed only for backup slaves.
Packit 1034e0
Packit 1034e0
	all or 3
Packit 1034e0
Packit 1034e0
		Validation is performed for all slaves.
Packit 1034e0
Packit 1034e0
	For the active slave, the validation checks ARP replies to
Packit 1034e0
	confirm that they were generated by an arp_ip_target.  Since
Packit 1034e0
	backup slaves do not typically receive these replies, the
Packit 1034e0
	validation performed for backup slaves is on the ARP request
Packit 1034e0
	sent out via the active slave.  It is possible that some
Packit 1034e0
	switch or network configurations may result in situations
Packit 1034e0
	wherein the backup slaves do not receive the ARP requests; in
Packit 1034e0
	such a situation, validation of backup slaves must be
Packit 1034e0
	disabled.
Packit 1034e0
Packit 1034e0
	This option is useful in network configurations in which
Packit 1034e0
	multiple bonding hosts are concurrently issuing ARPs to one or
Packit 1034e0
	more targets beyond a common switch.  Should the link between
Packit 1034e0
	the switch and target fail (but not the switch itself), the
Packit 1034e0
	probe traffic generated by the multiple bonding instances will
Packit 1034e0
	fool the standard ARP monitor into considering the links as
Packit 1034e0
	still up.  Use of the arp_validate option can resolve this, as
Packit 1034e0
	the ARP monitor will only consider ARP requests and replies
Packit 1034e0
	associated with its own instance of bonding.
Packit 1034e0
Packit 1034e0
	This option was added in bonding version 3.1.0.
Packit 1034e0
Packit 1034e0
downdelay
Packit 1034e0
Packit 1034e0
	Specifies the time, in milliseconds, to wait before disabling
Packit 1034e0
	a slave after a link failure has been detected.  This option
Packit 1034e0
	is only valid for the miimon link monitor.  The downdelay
Packit 1034e0
	value should be a multiple of the miimon value; if not, it
Packit 1034e0
	will be rounded down to the nearest multiple.  The default
Packit 1034e0
	value is 0.
Packit 1034e0
Packit 1034e0
fail_over_mac
Packit 1034e0
Packit 1034e0
	Specifies whether active-backup mode should set all slaves to
Packit 1034e0
	the same MAC address at enslavement (the traditional
Packit 1034e0
	behavior), or, when enabled, perform special handling of the
Packit 1034e0
	bond's MAC address in accordance with the selected policy.
Packit 1034e0
Packit 1034e0
	Possible values are:
Packit 1034e0
Packit 1034e0
	none or 0
Packit 1034e0
Packit 1034e0
		This setting disables fail_over_mac, and causes
Packit 1034e0
		bonding to set all slaves of an active-backup bond to
Packit 1034e0
		the same MAC address at enslavement time.  This is the
Packit 1034e0
		default.
Packit 1034e0
Packit 1034e0
	active or 1
Packit 1034e0
Packit 1034e0
		The "active" fail_over_mac policy indicates that the
Packit 1034e0
		MAC address of the bond should always be the MAC
Packit 1034e0
		address of the currently active slave.  The MAC
Packit 1034e0
		address of the slaves is not changed; instead, the MAC
Packit 1034e0
		address of the bond changes during a failover.
Packit 1034e0
Packit 1034e0
		This policy is useful for devices that cannot ever
Packit 1034e0
		alter their MAC address, or for devices that refuse
Packit 1034e0
		incoming broadcasts with their own source MAC (which
Packit 1034e0
		interferes with the ARP monitor).
Packit 1034e0
Packit 1034e0
		The down side of this policy is that every device on
Packit 1034e0
		the network must be updated via gratuitous ARP,
Packit 1034e0
		vs. just updating a switch or set of switches (which
Packit 1034e0
		often takes place for any traffic, not just ARP
Packit 1034e0
		traffic, if the switch snoops incoming traffic to
Packit 1034e0
		update its tables) for the traditional method.  If the
Packit 1034e0
		gratuitous ARP is lost, communication may be
Packit 1034e0
		disrupted.
Packit 1034e0
Packit 1034e0
		When this policy is used in conjunction with the mii
Packit 1034e0
		monitor, devices which assert link up prior to being
Packit 1034e0
		able to actually transmit and receive are particularly
Packit 1034e0
		susceptible to loss of the gratuitous ARP, and an
Packit 1034e0
		appropriate updelay setting may be required.
Packit 1034e0
Packit 1034e0
	follow or 2
Packit 1034e0
Packit 1034e0
		The "follow" fail_over_mac policy causes the MAC
Packit 1034e0
		address of the bond to be selected normally (normally
Packit 1034e0
		the MAC address of the first slave added to the bond).
Packit 1034e0
		However, the second and subsequent slaves are not set
Packit 1034e0
		to this MAC address while they are in a backup role; a
Packit 1034e0
		slave is programmed with the bond's MAC address at
Packit 1034e0
		failover time (and the formerly active slave receives
Packit 1034e0
		the newly active slave's MAC address).
Packit 1034e0
Packit 1034e0
		This policy is useful for multiport devices that
Packit 1034e0
		either become confused or incur a performance penalty
Packit 1034e0
		when multiple ports are programmed with the same MAC
Packit 1034e0
		address.
Packit 1034e0
Packit 1034e0
Packit 1034e0
	The default policy is none, unless the first slave cannot
Packit 1034e0
	change its MAC address, in which case the active policy is
Packit 1034e0
	selected by default.
Packit 1034e0
Packit 1034e0
	This option may be modified via sysfs only when no slaves are
Packit 1034e0
	present in the bond.
Packit 1034e0
Packit 1034e0
	This option was added in bonding version 3.2.0.  The "follow"
Packit 1034e0
	policy was added in bonding version 3.3.0.
Packit 1034e0
Packit 1034e0
lacp_rate
Packit 1034e0
Packit 1034e0
	Option specifying the rate in which we'll ask our link partner
Packit 1034e0
	to transmit LACPDU packets in 802.3ad mode.  Possible values
Packit 1034e0
	are:
Packit 1034e0
Packit 1034e0
	slow or 0
Packit 1034e0
		Request partner to transmit LACPDUs every 30 seconds
Packit 1034e0
Packit 1034e0
	fast or 1
Packit 1034e0
		Request partner to transmit LACPDUs every 1 second
Packit 1034e0
Packit 1034e0
	The default is slow.
Packit 1034e0
Packit 1034e0
max_bonds
Packit 1034e0
Packit 1034e0
	Specifies the number of bonding devices to create for this
Packit 1034e0
	instance of the bonding driver.  E.g., if max_bonds is 3, and
Packit 1034e0
	the bonding driver is not already loaded, then bond0, bond1
Packit 1034e0
	and bond2 will be created.  The default value is 1.  Specifying
Packit 1034e0
	a value of 0 will load bonding, but will not create any devices.
Packit 1034e0
Packit 1034e0
miimon
Packit 1034e0
Packit 1034e0
	Specifies the MII link monitoring frequency in milliseconds.
Packit 1034e0
	This determines how often the link state of each slave is
Packit 1034e0
	inspected for link failures.  A value of zero disables MII
Packit 1034e0
	link monitoring.  A value of 100 is a good starting point.
Packit 1034e0
	The use_carrier option, below, affects how the link state is
Packit 1034e0
	determined.  See the High Availability section for additional
Packit 1034e0
	information.  The default value is 0.
Packit 1034e0
Packit 1034e0
min_links
Packit 1034e0
Packit 1034e0
	Specifies the minimum number of links that must be active before
Packit 1034e0
	asserting carrier. It is similar to the Cisco EtherChannel min-links
Packit 1034e0
	feature. This allows setting the minimum number of member ports that
Packit 1034e0
	must be up (link-up state) before marking the bond device as up
Packit 1034e0
	(carrier on). This is useful for situations where higher level services
Packit 1034e0
	such as clustering want to ensure a minimum number of low bandwidth
Packit 1034e0
	links are active before switchover. This option only affect 802.3ad
Packit 1034e0
	mode.
Packit 1034e0
Packit 1034e0
	The default value is 0. This will cause carrier to be asserted (for
Packit 1034e0
	802.3ad mode) whenever there is an active aggregator, regardless of the
Packit 1034e0
	number of available links in that aggregator. Note that, because an
Packit 1034e0
	aggregator cannot be active without at least one available link,
Packit 1034e0
	setting this option to 0 or to 1 has the exact same effect.
Packit 1034e0
Packit 1034e0
mode
Packit 1034e0
Packit 1034e0
	Specifies one of the bonding policies. The default is
Packit 1034e0
	balance-rr (round robin).  Possible values are:
Packit 1034e0
Packit 1034e0
	balance-rr or 0
Packit 1034e0
Packit 1034e0
		Round-robin policy: Transmit packets in sequential
Packit 1034e0
		order from the first available slave through the
Packit 1034e0
		last.  This mode provides load balancing and fault
Packit 1034e0
		tolerance.
Packit 1034e0
Packit 1034e0
	active-backup or 1
Packit 1034e0
Packit 1034e0
		Active-backup policy: Only one slave in the bond is
Packit 1034e0
		active.  A different slave becomes active if, and only
Packit 1034e0
		if, the active slave fails.  The bond's MAC address is
Packit 1034e0
		externally visible on only one port (network adapter)
Packit 1034e0
		to avoid confusing the switch.
Packit 1034e0
Packit 1034e0
		In bonding version 2.6.2 or later, when a failover
Packit 1034e0
		occurs in active-backup mode, bonding will issue one
Packit 1034e0
		or more gratuitous ARPs on the newly active slave.
Packit 1034e0
		One gratuitous ARP is issued for the bonding master
Packit 1034e0
		interface and each VLAN interfaces configured above
Packit 1034e0
		it, provided that the interface has at least one IP
Packit 1034e0
		address configured.  Gratuitous ARPs issued for VLAN
Packit 1034e0
		interfaces are tagged with the appropriate VLAN id.
Packit 1034e0
Packit 1034e0
		This mode provides fault tolerance.  The primary
Packit 1034e0
		option, documented below, affects the behavior of this
Packit 1034e0
		mode.
Packit 1034e0
Packit 1034e0
	balance-xor or 2
Packit 1034e0
Packit 1034e0
		XOR policy: Transmit based on the selected transmit
Packit 1034e0
		hash policy.  The default policy is a simple [(source
Packit 1034e0
		MAC address XOR'd with destination MAC address) modulo
Packit 1034e0
		slave count].  Alternate transmit policies may be
Packit 1034e0
		selected via the xmit_hash_policy option, described
Packit 1034e0
		below.
Packit 1034e0
Packit 1034e0
		This mode provides load balancing and fault tolerance.
Packit 1034e0
Packit 1034e0
	broadcast or 3
Packit 1034e0
Packit 1034e0
		Broadcast policy: transmits everything on all slave
Packit 1034e0
		interfaces.  This mode provides fault tolerance.
Packit 1034e0
Packit 1034e0
	802.3ad or 4
Packit 1034e0
Packit 1034e0
		IEEE 802.3ad Dynamic link aggregation.  Creates
Packit 1034e0
		aggregation groups that share the same speed and
Packit 1034e0
		duplex settings.  Utilizes all slaves in the active
Packit 1034e0
		aggregator according to the 802.3ad specification.
Packit 1034e0
Packit 1034e0
		Slave selection for outgoing traffic is done according
Packit 1034e0
		to the transmit hash policy, which may be changed from
Packit 1034e0
		the default simple XOR policy via the xmit_hash_policy
Packit 1034e0
		option, documented below.  Note that not all transmit
Packit 1034e0
		policies may be 802.3ad compliant, particularly in
Packit 1034e0
		regards to the packet mis-ordering requirements of
Packit 1034e0
		section 43.2.4 of the 802.3ad standard.  Differing
Packit 1034e0
		peer implementations will have varying tolerances for
Packit 1034e0
		noncompliance.
Packit 1034e0
Packit 1034e0
		Prerequisites:
Packit 1034e0
Packit 1034e0
		1. Ethtool support in the base drivers for retrieving
Packit 1034e0
		the speed and duplex of each slave.
Packit 1034e0
Packit 1034e0
		2. A switch that supports IEEE 802.3ad Dynamic link
Packit 1034e0
		aggregation.
Packit 1034e0
Packit 1034e0
		Most switches will require some type of configuration
Packit 1034e0
		to enable 802.3ad mode.
Packit 1034e0
Packit 1034e0
	balance-tlb or 5
Packit 1034e0
Packit 1034e0
		Adaptive transmit load balancing: channel bonding that
Packit 1034e0
		does not require any special switch support.  The
Packit 1034e0
		outgoing traffic is distributed according to the
Packit 1034e0
		current load (computed relative to the speed) on each
Packit 1034e0
		slave.  Incoming traffic is received by the current
Packit 1034e0
		slave.  If the receiving slave fails, another slave
Packit 1034e0
		takes over the MAC address of the failed receiving
Packit 1034e0
		slave.
Packit 1034e0
Packit 1034e0
		Prerequisite:
Packit 1034e0
Packit 1034e0
		Ethtool support in the base drivers for retrieving the
Packit 1034e0
		speed of each slave.
Packit 1034e0
Packit 1034e0
	balance-alb or 6
Packit 1034e0
Packit 1034e0
		Adaptive load balancing: includes balance-tlb plus
Packit 1034e0
		receive load balancing (rlb) for IPV4 traffic, and
Packit 1034e0
		does not require any special switch support.  The
Packit 1034e0
		receive load balancing is achieved by ARP negotiation.
Packit 1034e0
		The bonding driver intercepts the ARP Replies sent by
Packit 1034e0
		the local system on their way out and overwrites the
Packit 1034e0
		source hardware address with the unique hardware
Packit 1034e0
		address of one of the slaves in the bond such that
Packit 1034e0
		different peers use different hardware addresses for
Packit 1034e0
		the server.
Packit 1034e0
Packit 1034e0
		Receive traffic from connections created by the server
Packit 1034e0
		is also balanced.  When the local system sends an ARP
Packit 1034e0
		Request the bonding driver copies and saves the peer's
Packit 1034e0
		IP information from the ARP packet.  When the ARP
Packit 1034e0
		Reply arrives from the peer, its hardware address is
Packit 1034e0
		retrieved and the bonding driver initiates an ARP
Packit 1034e0
		reply to this peer assigning it to one of the slaves
Packit 1034e0
		in the bond.  A problematic outcome of using ARP
Packit 1034e0
		negotiation for balancing is that each time that an
Packit 1034e0
		ARP request is broadcast it uses the hardware address
Packit 1034e0
		of the bond.  Hence, peers learn the hardware address
Packit 1034e0
		of the bond and the balancing of receive traffic
Packit 1034e0
		collapses to the current slave.  This is handled by
Packit 1034e0
		sending updates (ARP Replies) to all the peers with
Packit 1034e0
		their individually assigned hardware address such that
Packit 1034e0
		the traffic is redistributed.  Receive traffic is also
Packit 1034e0
		redistributed when a new slave is added to the bond
Packit 1034e0
		and when an inactive slave is re-activated.  The
Packit 1034e0
		receive load is distributed sequentially (round robin)
Packit 1034e0
		among the group of highest speed slaves in the bond.
Packit 1034e0
Packit 1034e0
		When a link is reconnected or a new slave joins the
Packit 1034e0
		bond the receive traffic is redistributed among all
Packit 1034e0
		active slaves in the bond by initiating ARP Replies
Packit 1034e0
		with the selected MAC address to each of the
Packit 1034e0
		clients. The updelay parameter (detailed below) must
Packit 1034e0
		be set to a value equal or greater than the switch's
Packit 1034e0
		forwarding delay so that the ARP Replies sent to the
Packit 1034e0
		peers will not be blocked by the switch.
Packit 1034e0
Packit 1034e0
		Prerequisites:
Packit 1034e0
Packit 1034e0
		1. Ethtool support in the base drivers for retrieving
Packit 1034e0
		the speed of each slave.
Packit 1034e0
Packit 1034e0
		2. Base driver support for setting the hardware
Packit 1034e0
		address of a device while it is open.  This is
Packit 1034e0
		required so that there will always be one slave in the
Packit 1034e0
		team using the bond hardware address (the
Packit 1034e0
		curr_active_slave) while having a unique hardware
Packit 1034e0
		address for each slave in the bond.  If the
Packit 1034e0
		curr_active_slave fails its hardware address is
Packit 1034e0
		swapped with the new curr_active_slave that was
Packit 1034e0
		chosen.
Packit 1034e0
Packit 1034e0
num_grat_arp
Packit 1034e0
num_unsol_na
Packit 1034e0
Packit 1034e0
	Specify the number of peer notifications (gratuitous ARPs and
Packit 1034e0
	unsolicited IPv6 Neighbor Advertisements) to be issued after a
Packit 1034e0
	failover event.  As soon as the link is up on the new slave
Packit 1034e0
	(possibly immediately) a peer notification is sent on the
Packit 1034e0
	bonding device and each VLAN sub-device.  This is repeated at
Packit 1034e0
	each link monitor interval (arp_interval or miimon, whichever
Packit 1034e0
	is active) if the number is greater than 1.
Packit 1034e0
Packit 1034e0
	The valid range is 0 - 255; the default value is 1.  These options
Packit 1034e0
	affect only the active-backup mode.  These options were added for
Packit 1034e0
	bonding versions 3.3.0 and 3.4.0 respectively.
Packit 1034e0
Packit 1034e0
	From Linux 3.0 and bonding version 3.7.1, these notifications
Packit 1034e0
	are generated by the ipv4 and ipv6 code and the numbers of
Packit 1034e0
	repetitions cannot be set independently.
Packit 1034e0
Packit 1034e0
primary
Packit 1034e0
Packit 1034e0
	A string (eth0, eth2, etc) specifying which slave is the
Packit 1034e0
	primary device.  The specified device will always be the
Packit 1034e0
	active slave while it is available.  Only when the primary is
Packit 1034e0
	off-line will alternate devices be used.  This is useful when
Packit 1034e0
	one slave is preferred over another, e.g., when one slave has
Packit 1034e0
	higher throughput than another.
Packit 1034e0
Packit 1034e0
	The primary option is only valid for active-backup mode.
Packit 1034e0
Packit 1034e0
primary_reselect
Packit 1034e0
Packit 1034e0
	Specifies the reselection policy for the primary slave.  This
Packit 1034e0
	affects how the primary slave is chosen to become the active slave
Packit 1034e0
	when failure of the active slave or recovery of the primary slave
Packit 1034e0
	occurs.  This option is designed to prevent flip-flopping between
Packit 1034e0
	the primary slave and other slaves.  Possible values are:
Packit 1034e0
Packit 1034e0
	always or 0 (default)
Packit 1034e0
Packit 1034e0
		The primary slave becomes the active slave whenever it
Packit 1034e0
		comes back up.
Packit 1034e0
Packit 1034e0
	better or 1
Packit 1034e0
Packit 1034e0
		The primary slave becomes the active slave when it comes
Packit 1034e0
		back up, if the speed and duplex of the primary slave is
Packit 1034e0
		better than the speed and duplex of the current active
Packit 1034e0
		slave.
Packit 1034e0
Packit 1034e0
	failure or 2
Packit 1034e0
Packit 1034e0
		The primary slave becomes the active slave only if the
Packit 1034e0
		current active slave fails and the primary slave is up.
Packit 1034e0
Packit 1034e0
	The primary_reselect setting is ignored in two cases:
Packit 1034e0
Packit 1034e0
		If no slaves are active, the first slave to recover is
Packit 1034e0
		made the active slave.
Packit 1034e0
Packit 1034e0
		When initially enslaved, the primary slave is always made
Packit 1034e0
		the active slave.
Packit 1034e0
Packit 1034e0
	Changing the primary_reselect policy via sysfs will cause an
Packit 1034e0
	immediate selection of the best active slave according to the new
Packit 1034e0
	policy.  This may or may not result in a change of the active
Packit 1034e0
	slave, depending upon the circumstances.
Packit 1034e0
Packit 1034e0
	This option was added for bonding version 3.6.0.
Packit 1034e0
Packit 1034e0
updelay
Packit 1034e0
Packit 1034e0
	Specifies the time, in milliseconds, to wait before enabling a
Packit 1034e0
	slave after a link recovery has been detected.  This option is
Packit 1034e0
	only valid for the miimon link monitor.  The updelay value
Packit 1034e0
	should be a multiple of the miimon value; if not, it will be
Packit 1034e0
	rounded down to the nearest multiple.  The default value is 0.
Packit 1034e0
Packit 1034e0
use_carrier
Packit 1034e0
Packit 1034e0
	Specifies whether or not miimon should use MII or ETHTOOL
Packit 1034e0
	ioctls vs. netif_carrier_ok() to determine the link
Packit 1034e0
	status. The MII or ETHTOOL ioctls are less efficient and
Packit 1034e0
	utilize a deprecated calling sequence within the kernel.  The
Packit 1034e0
	netif_carrier_ok() relies on the device driver to maintain its
Packit 1034e0
	state with netif_carrier_on/off; at this writing, most, but
Packit 1034e0
	not all, device drivers support this facility.
Packit 1034e0
Packit 1034e0
	If bonding insists that the link is up when it should not be,
Packit 1034e0
	it may be that your network device driver does not support
Packit 1034e0
	netif_carrier_on/off.  The default state for netif_carrier is
Packit 1034e0
	"carrier on," so if a driver does not support netif_carrier,
Packit 1034e0
	it will appear as if the link is always up.  In this case,
Packit 1034e0
	setting use_carrier to 0 will cause bonding to revert to the
Packit 1034e0
	MII / ETHTOOL ioctl method to determine the link state.
Packit 1034e0
Packit 1034e0
	A value of 1 enables the use of netif_carrier_ok(), a value of
Packit 1034e0
	0 will use the deprecated MII / ETHTOOL ioctls.  The default
Packit 1034e0
	value is 1.
Packit 1034e0
Packit 1034e0
xmit_hash_policy
Packit 1034e0
Packit 1034e0
	Selects the transmit hash policy to use for slave selection in
Packit 1034e0
	balance-xor and 802.3ad modes.  Possible values are:
Packit 1034e0
Packit 1034e0
	layer2
Packit 1034e0
Packit 1034e0
		Uses XOR of hardware MAC addresses to generate the
Packit 1034e0
		hash.  The formula is
Packit 1034e0
Packit 1034e0
		(source MAC XOR destination MAC) modulo slave count
Packit 1034e0
Packit 1034e0
		This algorithm will place all traffic to a particular
Packit 1034e0
		network peer on the same slave.
Packit 1034e0
Packit 1034e0
		This algorithm is 802.3ad compliant.
Packit 1034e0
Packit 1034e0
	layer2+3
Packit 1034e0
Packit 1034e0
		This policy uses a combination of layer2 and layer3
Packit 1034e0
		protocol information to generate the hash.
Packit 1034e0
Packit 1034e0
		Uses XOR of hardware MAC addresses and IP addresses to
Packit 1034e0
		generate the hash.  The formula is
Packit 1034e0
Packit 1034e0
		(((source IP XOR dest IP) AND 0xffff) XOR
Packit 1034e0
			( source MAC XOR destination MAC ))
Packit 1034e0
				modulo slave count
Packit 1034e0
Packit 1034e0
		This algorithm will place all traffic to a particular
Packit 1034e0
		network peer on the same slave.  For non-IP traffic,
Packit 1034e0
		the formula is the same as for the layer2 transmit
Packit 1034e0
		hash policy.
Packit 1034e0
Packit 1034e0
		This policy is intended to provide a more balanced
Packit 1034e0
		distribution of traffic than layer2 alone, especially
Packit 1034e0
		in environments where a layer3 gateway device is
Packit 1034e0
		required to reach most destinations.
Packit 1034e0
Packit 1034e0
		This algorithm is 802.3ad compliant.
Packit 1034e0
Packit 1034e0
	layer3+4
Packit 1034e0
Packit 1034e0
		This policy uses upper layer protocol information,
Packit 1034e0
		when available, to generate the hash.  This allows for
Packit 1034e0
		traffic to a particular network peer to span multiple
Packit 1034e0
		slaves, although a single connection will not span
Packit 1034e0
		multiple slaves.
Packit 1034e0
Packit 1034e0
		The formula for unfragmented TCP and UDP packets is
Packit 1034e0
Packit 1034e0
		((source port XOR dest port) XOR
Packit 1034e0
			 ((source IP XOR dest IP) AND 0xffff)
Packit 1034e0
				modulo slave count
Packit 1034e0
Packit 1034e0
		For fragmented TCP or UDP packets and all other IP
Packit 1034e0
		protocol traffic, the source and destination port
Packit 1034e0
		information is omitted.  For non-IP traffic, the
Packit 1034e0
		formula is the same as for the layer2 transmit hash
Packit 1034e0
		policy.
Packit 1034e0
Packit 1034e0
		This policy is intended to mimic the behavior of
Packit 1034e0
		certain switches, notably Cisco switches with PFC2 as
Packit 1034e0
		well as some Foundry and IBM products.
Packit 1034e0
Packit 1034e0
		This algorithm is not fully 802.3ad compliant.  A
Packit 1034e0
		single TCP or UDP conversation containing both
Packit 1034e0
		fragmented and unfragmented packets will see packets
Packit 1034e0
		striped across two interfaces.  This may result in out
Packit 1034e0
		of order delivery.  Most traffic types will not meet
Packit 1034e0
		this criteria, as TCP rarely fragments traffic, and
Packit 1034e0
		most UDP traffic is not involved in extended
Packit 1034e0
		conversations.  Other implementations of 802.3ad may
Packit 1034e0
		or may not tolerate this noncompliance.
Packit 1034e0
Packit 1034e0
	The default value is layer2.  This option was added in bonding
Packit 1034e0
	version 2.6.3.  In earlier versions of bonding, this parameter
Packit 1034e0
	does not exist, and the layer2 policy is the only policy.  The
Packit 1034e0
	layer2+3 value was added for bonding version 3.2.2.
Packit 1034e0
Packit 1034e0
resend_igmp
Packit 1034e0
Packit 1034e0
	Specifies the number of IGMP membership reports to be issued after
Packit 1034e0
	a failover event. One membership report is issued immediately after
Packit 1034e0
	the failover, subsequent packets are sent in each 200ms interval.
Packit 1034e0
Packit 1034e0
	The valid range is 0 - 255; the default value is 1. A value of 0
Packit 1034e0
	prevents the IGMP membership report from being issued in response
Packit 1034e0
	to the failover event.
Packit 1034e0
Packit 1034e0
	This option is useful for bonding modes balance-rr (0), active-backup
Packit 1034e0
	(1), balance-tlb (5) and balance-alb (6), in which a failover can
Packit 1034e0
	switch the IGMP traffic from one slave to another.  Therefore a fresh
Packit 1034e0
	IGMP report must be issued to cause the switch to forward the incoming
Packit 1034e0
	IGMP traffic over the newly selected slave.
Packit 1034e0
Packit 1034e0
	This option was added for bonding version 3.7.0.
Packit 1034e0
Packit 1034e0
3. Configuring Bonding Devices
Packit 1034e0
==============================
Packit 1034e0
Packit 1034e0
	You can configure bonding using either your distro's network
Packit 1034e0
initialization scripts, or manually using either ifenslave or the
Packit 1034e0
sysfs interface.  Distros generally use one of three packages for the
Packit 1034e0
network initialization scripts: initscripts, sysconfig or interfaces.
Packit 1034e0
Recent versions of these packages have support for bonding, while older
Packit 1034e0
versions do not.
Packit 1034e0
Packit 1034e0
	We will first describe the options for configuring bonding for
Packit 1034e0
distros using versions of initscripts, sysconfig and interfaces with full
Packit 1034e0
or partial support for bonding, then provide information on enabling
Packit 1034e0
bonding without support from the network initialization scripts (i.e.,
Packit 1034e0
older versions of initscripts or sysconfig).
Packit 1034e0
Packit 1034e0
	If you're unsure whether your distro uses sysconfig,
Packit 1034e0
initscripts or interfaces, or don't know if it's new enough, have no fear.
Packit 1034e0
Determining this is fairly straightforward.
Packit 1034e0
Packit 1034e0
	First, look for a file called interfaces in /etc/network directory.
Packit 1034e0
If this file is present in your system, then your system use interfaces. See
Packit 1034e0
Configuration with Interfaces Support.
Packit 1034e0
Packit 1034e0
	Else, issue the command:
Packit 1034e0
Packit 1034e0
$ rpm -qf /sbin/ifup
Packit 1034e0
Packit 1034e0
	It will respond with a line of text starting with either
Packit 1034e0
"initscripts" or "sysconfig," followed by some numbers.  This is the
Packit 1034e0
package that provides your network initialization scripts.
Packit 1034e0
Packit 1034e0
	Next, to determine if your installation supports bonding,
Packit 1034e0
issue the command:
Packit 1034e0
Packit 1034e0
$ grep ifenslave /sbin/ifup
Packit 1034e0
Packit 1034e0
	If this returns any matches, then your initscripts or
Packit 1034e0
sysconfig has support for bonding.
Packit 1034e0
Packit 1034e0
3.1 Configuration with Sysconfig Support
Packit 1034e0
----------------------------------------
Packit 1034e0
Packit 1034e0
	This section applies to distros using a version of sysconfig
Packit 1034e0
with bonding support, for example, SuSE Linux Enterprise Server 9.
Packit 1034e0
Packit 1034e0
	SuSE SLES 9's networking configuration system does support
Packit 1034e0
bonding, however, at this writing, the YaST system configuration
Packit 1034e0
front end does not provide any means to work with bonding devices.
Packit 1034e0
Bonding devices can be managed by hand, however, as follows.
Packit 1034e0
Packit 1034e0
	First, if they have not already been configured, configure the
Packit 1034e0
slave devices.  On SLES 9, this is most easily done by running the
Packit 1034e0
yast2 sysconfig configuration utility.  The goal is for to create an
Packit 1034e0
ifcfg-id file for each slave device.  The simplest way to accomplish
Packit 1034e0
this is to configure the devices for DHCP (this is only to get the
Packit 1034e0
file ifcfg-id file created; see below for some issues with DHCP).  The
Packit 1034e0
name of the configuration file for each device will be of the form:
Packit 1034e0
Packit 1034e0
ifcfg-id-xx:xx:xx:xx:xx:xx
Packit 1034e0
Packit 1034e0
	Where the "xx" portion will be replaced with the digits from
Packit 1034e0
the device's permanent MAC address.
Packit 1034e0
Packit 1034e0
	Once the set of ifcfg-id-xx:xx:xx:xx:xx:xx files has been
Packit 1034e0
created, it is necessary to edit the configuration files for the slave
Packit 1034e0
devices (the MAC addresses correspond to those of the slave devices).
Packit 1034e0
Before editing, the file will contain multiple lines, and will look
Packit 1034e0
something like this:
Packit 1034e0
Packit 1034e0
BOOTPROTO='dhcp'
Packit 1034e0
STARTMODE='on'
Packit 1034e0
USERCTL='no'
Packit 1034e0
UNIQUE='XNzu.WeZGOGF+4wE'
Packit 1034e0
_nm_name='bus-pci-0001:61:01.0'
Packit 1034e0
Packit 1034e0
	Change the BOOTPROTO and STARTMODE lines to the following:
Packit 1034e0
Packit 1034e0
BOOTPROTO='none'
Packit 1034e0
STARTMODE='off'
Packit 1034e0
Packit 1034e0
	Do not alter the UNIQUE or _nm_name lines.  Remove any other
Packit 1034e0
lines (USERCTL, etc).
Packit 1034e0
Packit 1034e0
	Once the ifcfg-id-xx:xx:xx:xx:xx:xx files have been modified,
Packit 1034e0
it's time to create the configuration file for the bonding device
Packit 1034e0
itself.  This file is named ifcfg-bondX, where X is the number of the
Packit 1034e0
bonding device to create, starting at 0.  The first such file is
Packit 1034e0
ifcfg-bond0, the second is ifcfg-bond1, and so on.  The sysconfig
Packit 1034e0
network configuration system will correctly start multiple instances
Packit 1034e0
of bonding.
Packit 1034e0
Packit 1034e0
	The contents of the ifcfg-bondX file is as follows:
Packit 1034e0
Packit 1034e0
BOOTPROTO="static"
Packit 1034e0
BROADCAST="10.0.2.255"
Packit 1034e0
IPADDR="10.0.2.10"
Packit 1034e0
NETMASK="255.255.0.0"
Packit 1034e0
NETWORK="10.0.2.0"
Packit 1034e0
REMOTE_IPADDR=""
Packit 1034e0
STARTMODE="onboot"
Packit 1034e0
BONDING_MASTER="yes"
Packit 1034e0
BONDING_MODULE_OPTS="mode=active-backup miimon=100"
Packit 1034e0
BONDING_SLAVE0="eth0"
Packit 1034e0
BONDING_SLAVE1="bus-pci-0000:06:08.1"
Packit 1034e0
Packit 1034e0
	Replace the sample BROADCAST, IPADDR, NETMASK and NETWORK
Packit 1034e0
values with the appropriate values for your network.
Packit 1034e0
Packit 1034e0
	The STARTMODE specifies when the device is brought online.
Packit 1034e0
The possible values are:
Packit 1034e0
Packit 1034e0
	onboot:	 The device is started at boot time.  If you're not
Packit 1034e0
		 sure, this is probably what you want.
Packit 1034e0
Packit 1034e0
	manual:	 The device is started only when ifup is called
Packit 1034e0
		 manually.  Bonding devices may be configured this
Packit 1034e0
		 way if you do not wish them to start automatically
Packit 1034e0
		 at boot for some reason.
Packit 1034e0
Packit 1034e0
	hotplug: The device is started by a hotplug event.  This is not
Packit 1034e0
		 a valid choice for a bonding device.
Packit 1034e0
Packit 1034e0
	off or ignore: The device configuration is ignored.
Packit 1034e0
Packit 1034e0
	The line BONDING_MASTER='yes' indicates that the device is a
Packit 1034e0
bonding master device.  The only useful value is "yes."
Packit 1034e0
Packit 1034e0
	The contents of BONDING_MODULE_OPTS are supplied to the
Packit 1034e0
instance of the bonding module for this device.  Specify the options
Packit 1034e0
for the bonding mode, link monitoring, and so on here.  Do not include
Packit 1034e0
the max_bonds bonding parameter; this will confuse the configuration
Packit 1034e0
system if you have multiple bonding devices.
Packit 1034e0
Packit 1034e0
	Finally, supply one BONDING_SLAVEn="slave device" for each
Packit 1034e0
slave.  where "n" is an increasing value, one for each slave.  The
Packit 1034e0
"slave device" is either an interface name, e.g., "eth0", or a device
Packit 1034e0
specifier for the network device.  The interface name is easier to
Packit 1034e0
find, but the ethN names are subject to change at boot time if, e.g.,
Packit 1034e0
a device early in the sequence has failed.  The device specifiers
Packit 1034e0
(bus-pci-0000:06:08.1 in the example above) specify the physical
Packit 1034e0
network device, and will not change unless the device's bus location
Packit 1034e0
changes (for example, it is moved from one PCI slot to another).  The
Packit 1034e0
example above uses one of each type for demonstration purposes; most
Packit 1034e0
configurations will choose one or the other for all slave devices.
Packit 1034e0
Packit 1034e0
	When all configuration files have been modified or created,
Packit 1034e0
networking must be restarted for the configuration changes to take
Packit 1034e0
effect.  This can be accomplished via the following:
Packit 1034e0
Packit 1034e0
# /etc/init.d/network restart
Packit 1034e0
Packit 1034e0
	Note that the network control script (/sbin/ifdown) will
Packit 1034e0
remove the bonding module as part of the network shutdown processing,
Packit 1034e0
so it is not necessary to remove the module by hand if, e.g., the
Packit 1034e0
module parameters have changed.
Packit 1034e0
Packit 1034e0
	Also, at this writing, YaST/YaST2 will not manage bonding
Packit 1034e0
devices (they do not show bonding interfaces on its list of network
Packit 1034e0
devices).  It is necessary to edit the configuration file by hand to
Packit 1034e0
change the bonding configuration.
Packit 1034e0
Packit 1034e0
	Additional general options and details of the ifcfg file
Packit 1034e0
format can be found in an example ifcfg template file:
Packit 1034e0
Packit 1034e0
/etc/sysconfig/network/ifcfg.template
Packit 1034e0
Packit 1034e0
	Note that the template does not document the various BONDING_
Packit 1034e0
settings described above, but does describe many of the other options.
Packit 1034e0
Packit 1034e0
3.1.1 Using DHCP with Sysconfig
Packit 1034e0
-------------------------------
Packit 1034e0
Packit 1034e0
	Under sysconfig, configuring a device with BOOTPROTO='dhcp'
Packit 1034e0
will cause it to query DHCP for its IP address information.  At this
Packit 1034e0
writing, this does not function for bonding devices; the scripts
Packit 1034e0
attempt to obtain the device address from DHCP prior to adding any of
Packit 1034e0
the slave devices.  Without active slaves, the DHCP requests are not
Packit 1034e0
sent to the network.
Packit 1034e0
Packit 1034e0
3.1.2 Configuring Multiple Bonds with Sysconfig
Packit 1034e0
-----------------------------------------------
Packit 1034e0
Packit 1034e0
	The sysconfig network initialization system is capable of
Packit 1034e0
handling multiple bonding devices.  All that is necessary is for each
Packit 1034e0
bonding instance to have an appropriately configured ifcfg-bondX file
Packit 1034e0
(as described above).  Do not specify the "max_bonds" parameter to any
Packit 1034e0
instance of bonding, as this will confuse sysconfig.  If you require
Packit 1034e0
multiple bonding devices with identical parameters, create multiple
Packit 1034e0
ifcfg-bondX files.
Packit 1034e0
Packit 1034e0
	Because the sysconfig scripts supply the bonding module
Packit 1034e0
options in the ifcfg-bondX file, it is not necessary to add them to
Packit 1034e0
the system /etc/modules.d/*.conf configuration files.
Packit 1034e0
Packit 1034e0
3.2 Configuration with Initscripts Support
Packit 1034e0
------------------------------------------
Packit 1034e0
Packit 1034e0
	This section applies to distros using a recent version of
Packit 1034e0
initscripts with bonding support, for example, Red Hat Enterprise Linux
Packit 1034e0
version 3 or later, Fedora, etc.  On these systems, the network
Packit 1034e0
initialization scripts have knowledge of bonding, and can be configured to
Packit 1034e0
control bonding devices.  Note that older versions of the initscripts
Packit 1034e0
package have lower levels of support for bonding; this will be noted where
Packit 1034e0
applicable.
Packit 1034e0
Packit 1034e0
	These distros will not automatically load the network adapter
Packit 1034e0
driver unless the ethX device is configured with an IP address.
Packit 1034e0
Because of this constraint, users must manually configure a
Packit 1034e0
network-script file for all physical adapters that will be members of
Packit 1034e0
a bondX link.  Network script files are located in the directory:
Packit 1034e0
Packit 1034e0
/etc/sysconfig/network-scripts
Packit 1034e0
Packit 1034e0
	The file name must be prefixed with "ifcfg-eth" and suffixed
Packit 1034e0
with the adapter's physical adapter number.  For example, the script
Packit 1034e0
for eth0 would be named /etc/sysconfig/network-scripts/ifcfg-eth0.
Packit 1034e0
Place the following text in the file:
Packit 1034e0
Packit 1034e0
DEVICE=eth0
Packit 1034e0
USERCTL=no
Packit 1034e0
ONBOOT=yes
Packit 1034e0
MASTER=bond0
Packit 1034e0
SLAVE=yes
Packit 1034e0
BOOTPROTO=none
Packit 1034e0
Packit 1034e0
	The DEVICE= line will be different for every ethX device and
Packit 1034e0
must correspond with the name of the file, i.e., ifcfg-eth1 must have
Packit 1034e0
a device line of DEVICE=eth1.  The setting of the MASTER= line will
Packit 1034e0
also depend on the final bonding interface name chosen for your bond.
Packit 1034e0
As with other network devices, these typically start at 0, and go up
Packit 1034e0
one for each device, i.e., the first bonding instance is bond0, the
Packit 1034e0
second is bond1, and so on.
Packit 1034e0
Packit 1034e0
	Next, create a bond network script.  The file name for this
Packit 1034e0
script will be /etc/sysconfig/network-scripts/ifcfg-bondX where X is
Packit 1034e0
the number of the bond.  For bond0 the file is named "ifcfg-bond0",
Packit 1034e0
for bond1 it is named "ifcfg-bond1", and so on.  Within that file,
Packit 1034e0
place the following text:
Packit 1034e0
Packit 1034e0
DEVICE=bond0
Packit 1034e0
IPADDR=192.168.1.1
Packit 1034e0
NETMASK=255.255.255.0
Packit 1034e0
NETWORK=192.168.1.0
Packit 1034e0
BROADCAST=192.168.1.255
Packit 1034e0
ONBOOT=yes
Packit 1034e0
BOOTPROTO=none
Packit 1034e0
USERCTL=no
Packit 1034e0
Packit 1034e0
	Be sure to change the networking specific lines (IPADDR,
Packit 1034e0
NETMASK, NETWORK and BROADCAST) to match your network configuration.
Packit 1034e0
Packit 1034e0
	For later versions of initscripts, such as that found with Fedora
Packit 1034e0
7 (or later) and Red Hat Enterprise Linux version 5 (or later), it is possible,
Packit 1034e0
and, indeed, preferable, to specify the bonding options in the ifcfg-bond0
Packit 1034e0
file, e.g. a line of the format:
Packit 1034e0
Packit 1034e0
BONDING_OPTS="mode=active-backup arp_interval=60 arp_ip_target=192.168.1.254"
Packit 1034e0
Packit 1034e0
	will configure the bond with the specified options.  The options
Packit 1034e0
specified in BONDING_OPTS are identical to the bonding module parameters
Packit 1034e0
except for the arp_ip_target field when using versions of initscripts older
Packit 1034e0
than and 8.57 (Fedora 8) and 8.45.19 (Red Hat Enterprise Linux 5.2).  When
Packit 1034e0
using older versions each target should be included as a separate option and
Packit 1034e0
should be preceded by a '+' to indicate it should be added to the list of
Packit 1034e0
queried targets, e.g.,
Packit 1034e0
Packit 1034e0
	arp_ip_target=+192.168.1.1 arp_ip_target=+192.168.1.2
Packit 1034e0
Packit 1034e0
	is the proper syntax to specify multiple targets.  When specifying
Packit 1034e0
options via BONDING_OPTS, it is not necessary to edit /etc/modprobe.d/*.conf.
Packit 1034e0
Packit 1034e0
	For even older versions of initscripts that do not support
Packit 1034e0
BONDING_OPTS, it is necessary to edit /etc/modprobe.d/*.conf, depending upon
Packit 1034e0
your distro) to load the bonding module with your desired options when the
Packit 1034e0
bond0 interface is brought up.  The following lines in /etc/modprobe.d/*.conf
Packit 1034e0
will load the bonding module, and select its options:
Packit 1034e0
Packit 1034e0
alias bond0 bonding
Packit 1034e0
options bond0 mode=balance-alb miimon=100
Packit 1034e0
Packit 1034e0
	Replace the sample parameters with the appropriate set of
Packit 1034e0
options for your configuration.
Packit 1034e0
Packit 1034e0
	Finally run "/etc/rc.d/init.d/network restart" as root.  This
Packit 1034e0
will restart the networking subsystem and your bond link should be now
Packit 1034e0
up and running.
Packit 1034e0
Packit 1034e0
3.2.1 Using DHCP with Initscripts
Packit 1034e0
---------------------------------
Packit 1034e0
Packit 1034e0
	Recent versions of initscripts (the versions supplied with Fedora
Packit 1034e0
Core 3 and Red Hat Enterprise Linux 4, or later versions, are reported to
Packit 1034e0
work) have support for assigning IP information to bonding devices via
Packit 1034e0
DHCP.
Packit 1034e0
Packit 1034e0
	To configure bonding for DHCP, configure it as described
Packit 1034e0
above, except replace the line "BOOTPROTO=none" with "BOOTPROTO=dhcp"
Packit 1034e0
and add a line consisting of "TYPE=Bonding".  Note that the TYPE value
Packit 1034e0
is case sensitive.
Packit 1034e0
Packit 1034e0
3.2.2 Configuring Multiple Bonds with Initscripts
Packit 1034e0
-------------------------------------------------
Packit 1034e0
Packit 1034e0
	Initscripts packages that are included with Fedora 7 and Red Hat
Packit 1034e0
Enterprise Linux 5 support multiple bonding interfaces by simply
Packit 1034e0
specifying the appropriate BONDING_OPTS= in ifcfg-bondX where X is the
Packit 1034e0
number of the bond.  This support requires sysfs support in the kernel,
Packit 1034e0
and a bonding driver of version 3.0.0 or later.  Other configurations may
Packit 1034e0
not support this method for specifying multiple bonding interfaces; for
Packit 1034e0
those instances, see the "Configuring Multiple Bonds Manually" section,
Packit 1034e0
below.
Packit 1034e0
Packit 1034e0
3.3 Configuring Bonding Manually with Ifenslave
Packit 1034e0
-----------------------------------------------
Packit 1034e0
Packit 1034e0
	This section applies to distros whose network initialization
Packit 1034e0
scripts (the sysconfig or initscripts package) do not have specific
Packit 1034e0
knowledge of bonding.  One such distro is SuSE Linux Enterprise Server
Packit 1034e0
version 8.
Packit 1034e0
Packit 1034e0
	The general method for these systems is to place the bonding
Packit 1034e0
module parameters into a config file in /etc/modprobe.d/ (as
Packit 1034e0
appropriate for the installed distro), then add modprobe and/or
Packit 1034e0
ifenslave commands to the system's global init script.  The name of
Packit 1034e0
the global init script differs; for sysconfig, it is
Packit 1034e0
/etc/init.d/boot.local and for initscripts it is /etc/rc.d/rc.local.
Packit 1034e0
Packit 1034e0
	For example, if you wanted to make a simple bond of two e100
Packit 1034e0
devices (presumed to be eth0 and eth1), and have it persist across
Packit 1034e0
reboots, edit the appropriate file (/etc/init.d/boot.local or
Packit 1034e0
/etc/rc.d/rc.local), and add the following:
Packit 1034e0
Packit 1034e0
modprobe bonding mode=balance-alb miimon=100
Packit 1034e0
modprobe e100
Packit 1034e0
ifconfig bond0 192.168.1.1 netmask 255.255.255.0 up
Packit 1034e0
ifenslave bond0 eth0
Packit 1034e0
ifenslave bond0 eth1
Packit 1034e0
Packit 1034e0
	Replace the example bonding module parameters and bond0
Packit 1034e0
network configuration (IP address, netmask, etc) with the appropriate
Packit 1034e0
values for your configuration.
Packit 1034e0
Packit 1034e0
	Unfortunately, this method will not provide support for the
Packit 1034e0
ifup and ifdown scripts on the bond devices.  To reload the bonding
Packit 1034e0
configuration, it is necessary to run the initialization script, e.g.,
Packit 1034e0
Packit 1034e0
# /etc/init.d/boot.local
Packit 1034e0
Packit 1034e0
	or
Packit 1034e0
Packit 1034e0
# /etc/rc.d/rc.local
Packit 1034e0
Packit 1034e0
	It may be desirable in such a case to create a separate script
Packit 1034e0
which only initializes the bonding configuration, then call that
Packit 1034e0
separate script from within boot.local.  This allows for bonding to be
Packit 1034e0
enabled without re-running the entire global init script.
Packit 1034e0
Packit 1034e0
	To shut down the bonding devices, it is necessary to first
Packit 1034e0
mark the bonding device itself as being down, then remove the
Packit 1034e0
appropriate device driver modules.  For our example above, you can do
Packit 1034e0
the following:
Packit 1034e0
Packit 1034e0
# ifconfig bond0 down
Packit 1034e0
# rmmod bonding
Packit 1034e0
# rmmod e100
Packit 1034e0
Packit 1034e0
	Again, for convenience, it may be desirable to create a script
Packit 1034e0
with these commands.
Packit 1034e0
Packit 1034e0
Packit 1034e0
3.3.1 Configuring Multiple Bonds Manually
Packit 1034e0
-----------------------------------------
Packit 1034e0
Packit 1034e0
	This section contains information on configuring multiple
Packit 1034e0
bonding devices with differing options for those systems whose network
Packit 1034e0
initialization scripts lack support for configuring multiple bonds.
Packit 1034e0
Packit 1034e0
	If you require multiple bonding devices, but all with the same
Packit 1034e0
options, you may wish to use the "max_bonds" module parameter,
Packit 1034e0
documented above.
Packit 1034e0
Packit 1034e0
	To create multiple bonding devices with differing options, it is
Packit 1034e0
preferable to use bonding parameters exported by sysfs, documented in the
Packit 1034e0
section below.
Packit 1034e0
Packit 1034e0
	For versions of bonding without sysfs support, the only means to
Packit 1034e0
provide multiple instances of bonding with differing options is to load
Packit 1034e0
the bonding driver multiple times.  Note that current versions of the
Packit 1034e0
sysconfig network initialization scripts handle this automatically; if
Packit 1034e0
your distro uses these scripts, no special action is needed.  See the
Packit 1034e0
section Configuring Bonding Devices, above, if you're not sure about your
Packit 1034e0
network initialization scripts.
Packit 1034e0
Packit 1034e0
	To load multiple instances of the module, it is necessary to
Packit 1034e0
specify a different name for each instance (the module loading system
Packit 1034e0
requires that every loaded module, even multiple instances of the same
Packit 1034e0
module, have a unique name).  This is accomplished by supplying multiple
Packit 1034e0
sets of bonding options in /etc/modprobe.d/*.conf, for example:
Packit 1034e0
Packit 1034e0
alias bond0 bonding
Packit 1034e0
options bond0 -o bond0 mode=balance-rr miimon=100
Packit 1034e0
Packit 1034e0
alias bond1 bonding
Packit 1034e0
options bond1 -o bond1 mode=balance-alb miimon=50
Packit 1034e0
Packit 1034e0
	will load the bonding module two times.  The first instance is
Packit 1034e0
named "bond0" and creates the bond0 device in balance-rr mode with an
Packit 1034e0
miimon of 100.  The second instance is named "bond1" and creates the
Packit 1034e0
bond1 device in balance-alb mode with an miimon of 50.
Packit 1034e0
Packit 1034e0
	In some circumstances (typically with older distributions),
Packit 1034e0
the above does not work, and the second bonding instance never sees
Packit 1034e0
its options.  In that case, the second options line can be substituted
Packit 1034e0
as follows:
Packit 1034e0
Packit 1034e0
install bond1 /sbin/modprobe --ignore-install bonding -o bond1 \
Packit 1034e0
	mode=balance-alb miimon=50
Packit 1034e0
Packit 1034e0
	This may be repeated any number of times, specifying a new and
Packit 1034e0
unique name in place of bond1 for each subsequent instance.
Packit 1034e0
Packit 1034e0
	It has been observed that some Red Hat supplied kernels are unable
Packit 1034e0
to rename modules at load time (the "-o bond1" part).  Attempts to pass
Packit 1034e0
that option to modprobe will produce an "Operation not permitted" error.
Packit 1034e0
This has been reported on some Fedora Core kernels, and has been seen on
Packit 1034e0
RHEL 4 as well.  On kernels exhibiting this problem, it will be impossible
Packit 1034e0
to configure multiple bonds with differing parameters (as they are older
Packit 1034e0
kernels, and also lack sysfs support).
Packit 1034e0
Packit 1034e0
3.4 Configuring Bonding Manually via Sysfs
Packit 1034e0
------------------------------------------
Packit 1034e0
Packit 1034e0
	Starting with version 3.0.0, Channel Bonding may be configured
Packit 1034e0
via the sysfs interface.  This interface allows dynamic configuration
Packit 1034e0
of all bonds in the system without unloading the module.  It also
Packit 1034e0
allows for adding and removing bonds at runtime.  Ifenslave is no
Packit 1034e0
longer required, though it is still supported.
Packit 1034e0
Packit 1034e0
	Use of the sysfs interface allows you to use multiple bonds
Packit 1034e0
with different configurations without having to reload the module.
Packit 1034e0
It also allows you to use multiple, differently configured bonds when
Packit 1034e0
bonding is compiled into the kernel.
Packit 1034e0
Packit 1034e0
	You must have the sysfs filesystem mounted to configure
Packit 1034e0
bonding this way.  The examples in this document assume that you
Packit 1034e0
are using the standard mount point for sysfs, e.g. /sys.  If your
Packit 1034e0
sysfs filesystem is mounted elsewhere, you will need to adjust the
Packit 1034e0
example paths accordingly.
Packit 1034e0
Packit 1034e0
Creating and Destroying Bonds
Packit 1034e0
-----------------------------
Packit 1034e0
To add a new bond foo:
Packit 1034e0
# echo +foo > /sys/class/net/bonding_masters
Packit 1034e0
Packit 1034e0
To remove an existing bond bar:
Packit 1034e0
# echo -bar > /sys/class/net/bonding_masters
Packit 1034e0
Packit 1034e0
To show all existing bonds:
Packit 1034e0
# cat /sys/class/net/bonding_masters
Packit 1034e0
Packit 1034e0
NOTE: due to 4K size limitation of sysfs files, this list may be
Packit 1034e0
truncated if you have more than a few hundred bonds.  This is unlikely
Packit 1034e0
to occur under normal operating conditions.
Packit 1034e0
Packit 1034e0
Adding and Removing Slaves
Packit 1034e0
--------------------------
Packit 1034e0
	Interfaces may be enslaved to a bond using the file
Packit 1034e0
/sys/class/net/<bond>/bonding/slaves.  The semantics for this file
Packit 1034e0
are the same as for the bonding_masters file.
Packit 1034e0
Packit 1034e0
To enslave interface eth0 to bond bond0:
Packit 1034e0
# ifconfig bond0 up
Packit 1034e0
# echo +eth0 > /sys/class/net/bond0/bonding/slaves
Packit 1034e0
Packit 1034e0
To free slave eth0 from bond bond0:
Packit 1034e0
# echo -eth0 > /sys/class/net/bond0/bonding/slaves
Packit 1034e0
Packit 1034e0
	When an interface is enslaved to a bond, symlinks between the
Packit 1034e0
two are created in the sysfs filesystem.  In this case, you would get
Packit 1034e0
/sys/class/net/bond0/slave_eth0 pointing to /sys/class/net/eth0, and
Packit 1034e0
/sys/class/net/eth0/master pointing to /sys/class/net/bond0.
Packit 1034e0
Packit 1034e0
	This means that you can tell quickly whether or not an
Packit 1034e0
interface is enslaved by looking for the master symlink.  Thus:
Packit 1034e0
# echo -eth0 > /sys/class/net/eth0/master/bonding/slaves
Packit 1034e0
will free eth0 from whatever bond it is enslaved to, regardless of
Packit 1034e0
the name of the bond interface.
Packit 1034e0
Packit 1034e0
Changing a Bond's Configuration
Packit 1034e0
-------------------------------
Packit 1034e0
	Each bond may be configured individually by manipulating the
Packit 1034e0
files located in /sys/class/net/<bond name>/bonding
Packit 1034e0
Packit 1034e0
	The names of these files correspond directly with the command-
Packit 1034e0
line parameters described elsewhere in this file, and, with the
Packit 1034e0
exception of arp_ip_target, they accept the same values.  To see the
Packit 1034e0
current setting, simply cat the appropriate file.
Packit 1034e0
Packit 1034e0
	A few examples will be given here; for specific usage
Packit 1034e0
guidelines for each parameter, see the appropriate section in this
Packit 1034e0
document.
Packit 1034e0
Packit 1034e0
To configure bond0 for balance-alb mode:
Packit 1034e0
# ifconfig bond0 down
Packit 1034e0
# echo 6 > /sys/class/net/bond0/bonding/mode
Packit 1034e0
 - or -
Packit 1034e0
# echo balance-alb > /sys/class/net/bond0/bonding/mode
Packit 1034e0
	NOTE: The bond interface must be down before the mode can be
Packit 1034e0
changed.
Packit 1034e0
Packit 1034e0
To enable MII monitoring on bond0 with a 1 second interval:
Packit 1034e0
# echo 1000 > /sys/class/net/bond0/bonding/miimon
Packit 1034e0
	NOTE: If ARP monitoring is enabled, it will disabled when MII
Packit 1034e0
monitoring is enabled, and vice-versa.
Packit 1034e0
Packit 1034e0
To add ARP targets:
Packit 1034e0
# echo +192.168.0.100 > /sys/class/net/bond0/bonding/arp_ip_target
Packit 1034e0
# echo +192.168.0.101 > /sys/class/net/bond0/bonding/arp_ip_target
Packit 1034e0
	NOTE:  up to 16 target addresses may be specified.
Packit 1034e0
Packit 1034e0
To remove an ARP target:
Packit 1034e0
# echo -192.168.0.100 > /sys/class/net/bond0/bonding/arp_ip_target
Packit 1034e0
Packit 1034e0
Example Configuration
Packit 1034e0
---------------------
Packit 1034e0
	We begin with the same example that is shown in section 3.3,
Packit 1034e0
executed with sysfs, and without using ifenslave.
Packit 1034e0
Packit 1034e0
	To make a simple bond of two e100 devices (presumed to be eth0
Packit 1034e0
and eth1), and have it persist across reboots, edit the appropriate
Packit 1034e0
file (/etc/init.d/boot.local or /etc/rc.d/rc.local), and add the
Packit 1034e0
following:
Packit 1034e0
Packit 1034e0
modprobe bonding
Packit 1034e0
modprobe e100
Packit 1034e0
echo balance-alb > /sys/class/net/bond0/bonding/mode
Packit 1034e0
ifconfig bond0 192.168.1.1 netmask 255.255.255.0 up
Packit 1034e0
echo 100 > /sys/class/net/bond0/bonding/miimon
Packit 1034e0
echo +eth0 > /sys/class/net/bond0/bonding/slaves
Packit 1034e0
echo +eth1 > /sys/class/net/bond0/bonding/slaves
Packit 1034e0
Packit 1034e0
	To add a second bond, with two e1000 interfaces in
Packit 1034e0
active-backup mode, using ARP monitoring, add the following lines to
Packit 1034e0
your init script:
Packit 1034e0
Packit 1034e0
modprobe e1000
Packit 1034e0
echo +bond1 > /sys/class/net/bonding_masters
Packit 1034e0
echo active-backup > /sys/class/net/bond1/bonding/mode
Packit 1034e0
ifconfig bond1 192.168.2.1 netmask 255.255.255.0 up
Packit 1034e0
echo +192.168.2.100 /sys/class/net/bond1/bonding/arp_ip_target
Packit 1034e0
echo 2000 > /sys/class/net/bond1/bonding/arp_interval
Packit 1034e0
echo +eth2 > /sys/class/net/bond1/bonding/slaves
Packit 1034e0
echo +eth3 > /sys/class/net/bond1/bonding/slaves
Packit 1034e0
Packit 1034e0
3.5 Configuration with Interfaces Support
Packit 1034e0
-----------------------------------------
Packit 1034e0
Packit 1034e0
        This section applies to distros which use /etc/network/interfaces file
Packit 1034e0
to describe network interface configuration, most notably Debian and it's
Packit 1034e0
derivatives.
Packit 1034e0
Packit 1034e0
	The ifup and ifdown commands on Debian don't support bonding out of
Packit 1034e0
the box. The ifenslave-2.6 package should be installed to provide bonding
Packit 1034e0
support.  Once installed, this package will provide bond-* options to be used
Packit 1034e0
into /etc/network/interfaces.
Packit 1034e0
Packit 1034e0
	Note that ifenslave-2.6 package will load the bonding module and use
Packit 1034e0
the ifenslave command when appropriate.
Packit 1034e0
Packit 1034e0
Example Configurations
Packit 1034e0
----------------------
Packit 1034e0
Packit 1034e0
In /etc/network/interfaces, the following stanza will configure bond0, in
Packit 1034e0
active-backup mode, with eth0 and eth1 as slaves.
Packit 1034e0
Packit 1034e0
auto bond0
Packit 1034e0
iface bond0 inet dhcp
Packit 1034e0
	bond-slaves eth0 eth1
Packit 1034e0
	bond-mode active-backup
Packit 1034e0
	bond-miimon 100
Packit 1034e0
	bond-primary eth0 eth1
Packit 1034e0
Packit 1034e0
If the above configuration doesn't work, you might have a system using
Packit 1034e0
upstart for system startup. This is most notably true for recent
Packit 1034e0
Ubuntu versions. The following stanza in /etc/network/interfaces will
Packit 1034e0
produce the same result on those systems.
Packit 1034e0
Packit 1034e0
auto bond0
Packit 1034e0
iface bond0 inet dhcp
Packit 1034e0
	bond-slaves none
Packit 1034e0
	bond-mode active-backup
Packit 1034e0
	bond-miimon 100
Packit 1034e0
Packit 1034e0
auto eth0
Packit 1034e0
iface eth0 inet manual
Packit 1034e0
	bond-master bond0
Packit 1034e0
	bond-primary eth0 eth1
Packit 1034e0
Packit 1034e0
auto eth1
Packit 1034e0
iface eth1 inet manual
Packit 1034e0
	bond-master bond0
Packit 1034e0
	bond-primary eth0 eth1
Packit 1034e0
Packit 1034e0
For a full list of bond-* supported options in /etc/network/interfaces and some
Packit 1034e0
more advanced examples tailored to you particular distros, see the files in
Packit 1034e0
/usr/share/doc/ifenslave-2.6.
Packit 1034e0
Packit 1034e0
3.6 Overriding Configuration for Special Cases
Packit 1034e0
----------------------------------------------
Packit 1034e0
Packit 1034e0
When using the bonding driver, the physical port which transmits a frame is
Packit 1034e0
typically selected by the bonding driver, and is not relevant to the user or
Packit 1034e0
system administrator.  The output port is simply selected using the policies of
Packit 1034e0
the selected bonding mode.  On occasion however, it is helpful to direct certain
Packit 1034e0
classes of traffic to certain physical interfaces on output to implement
Packit 1034e0
slightly more complex policies.  For example, to reach a web server over a
Packit 1034e0
bonded interface in which eth0 connects to a private network, while eth1
Packit 1034e0
connects via a public network, it may be desirous to bias the bond to send said
Packit 1034e0
traffic over eth0 first, using eth1 only as a fall back, while all other traffic
Packit 1034e0
can safely be sent over either interface.  Such configurations may be achieved
Packit 1034e0
using the traffic control utilities inherent in linux.
Packit 1034e0
Packit 1034e0
By default the bonding driver is multiqueue aware and 16 queues are created
Packit 1034e0
when the driver initializes (see Documentation/networking/multiqueue.txt
Packit 1034e0
for details).  If more or less queues are desired the module parameter
Packit 1034e0
tx_queues can be used to change this value.  There is no sysfs parameter
Packit 1034e0
available as the allocation is done at module init time.
Packit 1034e0
Packit 1034e0
The output of the file /proc/net/bonding/bondX has changed so the output Queue
Packit 1034e0
ID is now printed for each slave:
Packit 1034e0
Packit 1034e0
Bonding Mode: fault-tolerance (active-backup)
Packit 1034e0
Primary Slave: None
Packit 1034e0
Currently Active Slave: eth0
Packit 1034e0
MII Status: up
Packit 1034e0
MII Polling Interval (ms): 0
Packit 1034e0
Up Delay (ms): 0
Packit 1034e0
Down Delay (ms): 0
Packit 1034e0
Packit 1034e0
Slave Interface: eth0
Packit 1034e0
MII Status: up
Packit 1034e0
Link Failure Count: 0
Packit 1034e0
Permanent HW addr: 00:1a:a0:12:8f:cb
Packit 1034e0
Slave queue ID: 0
Packit 1034e0
Packit 1034e0
Slave Interface: eth1
Packit 1034e0
MII Status: up
Packit 1034e0
Link Failure Count: 0
Packit 1034e0
Permanent HW addr: 00:1a:a0:12:8f:cc
Packit 1034e0
Slave queue ID: 2
Packit 1034e0
Packit 1034e0
The queue_id for a slave can be set using the command:
Packit 1034e0
Packit 1034e0
# echo "eth1:2" > /sys/class/net/bond0/bonding/queue_id
Packit 1034e0
Packit 1034e0
Any interface that needs a queue_id set should set it with multiple calls
Packit 1034e0
like the one above until proper priorities are set for all interfaces.  On
Packit 1034e0
distributions that allow configuration via initscripts, multiple 'queue_id'
Packit 1034e0
arguments can be added to BONDING_OPTS to set all needed slave queues.
Packit 1034e0
Packit 1034e0
These queue id's can be used in conjunction with the tc utility to configure
Packit 1034e0
a multiqueue qdisc and filters to bias certain traffic to transmit on certain
Packit 1034e0
slave devices.  For instance, say we wanted, in the above configuration to
Packit 1034e0
force all traffic bound to 192.168.1.100 to use eth1 in the bond as its output
Packit 1034e0
device. The following commands would accomplish this:
Packit 1034e0
Packit 1034e0
# tc qdisc add dev bond0 handle 1 root multiq
Packit 1034e0
Packit 1034e0
# tc filter add dev bond0 protocol ip parent 1: prio 1 u32 match ip dst \
Packit 1034e0
	192.168.1.100 action skbedit queue_mapping 2
Packit 1034e0
Packit 1034e0
These commands tell the kernel to attach a multiqueue queue discipline to the
Packit 1034e0
bond0 interface and filter traffic enqueued to it, such that packets with a dst
Packit 1034e0
ip of 192.168.1.100 have their output queue mapping value overwritten to 2.
Packit 1034e0
This value is then passed into the driver, causing the normal output path
Packit 1034e0
selection policy to be overridden, selecting instead qid 2, which maps to eth1.
Packit 1034e0
Packit 1034e0
Note that qid values begin at 1.  Qid 0 is reserved to initiate to the driver
Packit 1034e0
that normal output policy selection should take place.  One benefit to simply
Packit 1034e0
leaving the qid for a slave to 0 is the multiqueue awareness in the bonding
Packit 1034e0
driver that is now present.  This awareness allows tc filters to be placed on
Packit 1034e0
slave devices as well as bond devices and the bonding driver will simply act as
Packit 1034e0
a pass-through for selecting output queues on the slave device rather than 
Packit 1034e0
output port selection.
Packit 1034e0
Packit 1034e0
This feature first appeared in bonding driver version 3.7.0 and support for
Packit 1034e0
output slave selection was limited to round-robin and active-backup modes.
Packit 1034e0
Packit 1034e0
4 Querying Bonding Configuration
Packit 1034e0
=================================
Packit 1034e0
Packit 1034e0
4.1 Bonding Configuration
Packit 1034e0
-------------------------
Packit 1034e0
Packit 1034e0
	Each bonding device has a read-only file residing in the
Packit 1034e0
/proc/net/bonding directory.  The file contents include information
Packit 1034e0
about the bonding configuration, options and state of each slave.
Packit 1034e0
Packit 1034e0
	For example, the contents of /proc/net/bonding/bond0 after the
Packit 1034e0
driver is loaded with parameters of mode=0 and miimon=1000 is
Packit 1034e0
generally as follows:
Packit 1034e0
Packit 1034e0
	Ethernet Channel Bonding Driver: 2.6.1 (October 29, 2004)
Packit 1034e0
        Bonding Mode: load balancing (round-robin)
Packit 1034e0
        Currently Active Slave: eth0
Packit 1034e0
        MII Status: up
Packit 1034e0
        MII Polling Interval (ms): 1000
Packit 1034e0
        Up Delay (ms): 0
Packit 1034e0
        Down Delay (ms): 0
Packit 1034e0
Packit 1034e0
        Slave Interface: eth1
Packit 1034e0
        MII Status: up
Packit 1034e0
        Link Failure Count: 1
Packit 1034e0
Packit 1034e0
        Slave Interface: eth0
Packit 1034e0
        MII Status: up
Packit 1034e0
        Link Failure Count: 1
Packit 1034e0
Packit 1034e0
	The precise format and contents will change depending upon the
Packit 1034e0
bonding configuration, state, and version of the bonding driver.
Packit 1034e0
Packit 1034e0
4.2 Network configuration
Packit 1034e0
-------------------------
Packit 1034e0
Packit 1034e0
	The network configuration can be inspected using the ifconfig
Packit 1034e0
command.  Bonding devices will have the MASTER flag set; Bonding slave
Packit 1034e0
devices will have the SLAVE flag set.  The ifconfig output does not
Packit 1034e0
contain information on which slaves are associated with which masters.
Packit 1034e0
Packit 1034e0
	In the example below, the bond0 interface is the master
Packit 1034e0
(MASTER) while eth0 and eth1 are slaves (SLAVE). Notice all slaves of
Packit 1034e0
bond0 have the same MAC address (HWaddr) as bond0 for all modes except
Packit 1034e0
TLB and ALB that require a unique MAC address for each slave.
Packit 1034e0
Packit 1034e0
# /sbin/ifconfig
Packit 1034e0
bond0     Link encap:Ethernet  HWaddr 00:C0:F0:1F:37:B4
Packit 1034e0
          inet addr:XXX.XXX.XXX.YYY  Bcast:XXX.XXX.XXX.255  Mask:255.255.252.0
Packit 1034e0
          UP BROADCAST RUNNING MASTER MULTICAST  MTU:1500  Metric:1
Packit 1034e0
          RX packets:7224794 errors:0 dropped:0 overruns:0 frame:0
Packit 1034e0
          TX packets:3286647 errors:1 dropped:0 overruns:1 carrier:0
Packit 1034e0
          collisions:0 txqueuelen:0
Packit 1034e0
Packit 1034e0
eth0      Link encap:Ethernet  HWaddr 00:C0:F0:1F:37:B4
Packit 1034e0
          UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1
Packit 1034e0
          RX packets:3573025 errors:0 dropped:0 overruns:0 frame:0
Packit 1034e0
          TX packets:1643167 errors:1 dropped:0 overruns:1 carrier:0
Packit 1034e0
          collisions:0 txqueuelen:100
Packit 1034e0
          Interrupt:10 Base address:0x1080
Packit 1034e0
Packit 1034e0
eth1      Link encap:Ethernet  HWaddr 00:C0:F0:1F:37:B4
Packit 1034e0
          UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1
Packit 1034e0
          RX packets:3651769 errors:0 dropped:0 overruns:0 frame:0
Packit 1034e0
          TX packets:1643480 errors:0 dropped:0 overruns:0 carrier:0
Packit 1034e0
          collisions:0 txqueuelen:100
Packit 1034e0
          Interrupt:9 Base address:0x1400
Packit 1034e0
Packit 1034e0
5. Switch Configuration
Packit 1034e0
=======================
Packit 1034e0
Packit 1034e0
	For this section, "switch" refers to whatever system the
Packit 1034e0
bonded devices are directly connected to (i.e., where the other end of
Packit 1034e0
the cable plugs into).  This may be an actual dedicated switch device,
Packit 1034e0
or it may be another regular system (e.g., another computer running
Packit 1034e0
Linux),
Packit 1034e0
Packit 1034e0
	The active-backup, balance-tlb and balance-alb modes do not
Packit 1034e0
require any specific configuration of the switch.
Packit 1034e0
Packit 1034e0
	The 802.3ad mode requires that the switch have the appropriate
Packit 1034e0
ports configured as an 802.3ad aggregation.  The precise method used
Packit 1034e0
to configure this varies from switch to switch, but, for example, a
Packit 1034e0
Cisco 3550 series switch requires that the appropriate ports first be
Packit 1034e0
grouped together in a single etherchannel instance, then that
Packit 1034e0
etherchannel is set to mode "lacp" to enable 802.3ad (instead of
Packit 1034e0
standard EtherChannel).
Packit 1034e0
Packit 1034e0
	The balance-rr, balance-xor and broadcast modes generally
Packit 1034e0
require that the switch have the appropriate ports grouped together.
Packit 1034e0
The nomenclature for such a group differs between switches, it may be
Packit 1034e0
called an "etherchannel" (as in the Cisco example, above), a "trunk
Packit 1034e0
group" or some other similar variation.  For these modes, each switch
Packit 1034e0
will also have its own configuration options for the switch's transmit
Packit 1034e0
policy to the bond.  Typical choices include XOR of either the MAC or
Packit 1034e0
IP addresses.  The transmit policy of the two peers does not need to
Packit 1034e0
match.  For these three modes, the bonding mode really selects a
Packit 1034e0
transmit policy for an EtherChannel group; all three will interoperate
Packit 1034e0
with another EtherChannel group.
Packit 1034e0
Packit 1034e0
Packit 1034e0
6. 802.1q VLAN Support
Packit 1034e0
======================
Packit 1034e0
Packit 1034e0
	It is possible to configure VLAN devices over a bond interface
Packit 1034e0
using the 8021q driver.  However, only packets coming from the 8021q
Packit 1034e0
driver and passing through bonding will be tagged by default.  Self
Packit 1034e0
generated packets, for example, bonding's learning packets or ARP
Packit 1034e0
packets generated by either ALB mode or the ARP monitor mechanism, are
Packit 1034e0
tagged internally by bonding itself.  As a result, bonding must
Packit 1034e0
"learn" the VLAN IDs configured above it, and use those IDs to tag
Packit 1034e0
self generated packets.
Packit 1034e0
Packit 1034e0
	For reasons of simplicity, and to support the use of adapters
Packit 1034e0
that can do VLAN hardware acceleration offloading, the bonding
Packit 1034e0
interface declares itself as fully hardware offloading capable, it gets
Packit 1034e0
the add_vid/kill_vid notifications to gather the necessary
Packit 1034e0
information, and it propagates those actions to the slaves.  In case
Packit 1034e0
of mixed adapter types, hardware accelerated tagged packets that
Packit 1034e0
should go through an adapter that is not offloading capable are
Packit 1034e0
"un-accelerated" by the bonding driver so the VLAN tag sits in the
Packit 1034e0
regular location.
Packit 1034e0
Packit 1034e0
	VLAN interfaces *must* be added on top of a bonding interface
Packit 1034e0
only after enslaving at least one slave.  The bonding interface has a
Packit 1034e0
hardware address of 00:00:00:00:00:00 until the first slave is added.
Packit 1034e0
If the VLAN interface is created prior to the first enslavement, it
Packit 1034e0
would pick up the all-zeroes hardware address.  Once the first slave
Packit 1034e0
is attached to the bond, the bond device itself will pick up the
Packit 1034e0
slave's hardware address, which is then available for the VLAN device.
Packit 1034e0
Packit 1034e0
	Also, be aware that a similar problem can occur if all slaves
Packit 1034e0
are released from a bond that still has one or more VLAN interfaces on
Packit 1034e0
top of it.  When a new slave is added, the bonding interface will
Packit 1034e0
obtain its hardware address from the first slave, which might not
Packit 1034e0
match the hardware address of the VLAN interfaces (which was
Packit 1034e0
ultimately copied from an earlier slave).
Packit 1034e0
Packit 1034e0
	There are two methods to insure that the VLAN device operates
Packit 1034e0
with the correct hardware address if all slaves are removed from a
Packit 1034e0
bond interface:
Packit 1034e0
Packit 1034e0
	1. Remove all VLAN interfaces then recreate them
Packit 1034e0
Packit 1034e0
	2. Set the bonding interface's hardware address so that it
Packit 1034e0
matches the hardware address of the VLAN interfaces.
Packit 1034e0
Packit 1034e0
	Note that changing a VLAN interface's HW address would set the
Packit 1034e0
underlying device -- i.e. the bonding interface -- to promiscuous
Packit 1034e0
mode, which might not be what you want.
Packit 1034e0
Packit 1034e0
Packit 1034e0
7. Link Monitoring
Packit 1034e0
==================
Packit 1034e0
Packit 1034e0
	The bonding driver at present supports two schemes for
Packit 1034e0
monitoring a slave device's link state: the ARP monitor and the MII
Packit 1034e0
monitor.
Packit 1034e0
Packit 1034e0
	At the present time, due to implementation restrictions in the
Packit 1034e0
bonding driver itself, it is not possible to enable both ARP and MII
Packit 1034e0
monitoring simultaneously.
Packit 1034e0
Packit 1034e0
7.1 ARP Monitor Operation
Packit 1034e0
-------------------------
Packit 1034e0
Packit 1034e0
	The ARP monitor operates as its name suggests: it sends ARP
Packit 1034e0
queries to one or more designated peer systems on the network, and
Packit 1034e0
uses the response as an indication that the link is operating.  This
Packit 1034e0
gives some assurance that traffic is actually flowing to and from one
Packit 1034e0
or more peers on the local network.
Packit 1034e0
Packit 1034e0
	The ARP monitor relies on the device driver itself to verify
Packit 1034e0
that traffic is flowing.  In particular, the driver must keep up to
Packit 1034e0
date the last receive time, dev->last_rx, and transmit start time,
Packit 1034e0
dev->trans_start.  If these are not updated by the driver, then the
Packit 1034e0
ARP monitor will immediately fail any slaves using that driver, and
Packit 1034e0
those slaves will stay down.  If networking monitoring (tcpdump, etc)
Packit 1034e0
shows the ARP requests and replies on the network, then it may be that
Packit 1034e0
your device driver is not updating last_rx and trans_start.
Packit 1034e0
Packit 1034e0
7.2 Configuring Multiple ARP Targets
Packit 1034e0
------------------------------------
Packit 1034e0
Packit 1034e0
	While ARP monitoring can be done with just one target, it can
Packit 1034e0
be useful in a High Availability setup to have several targets to
Packit 1034e0
monitor.  In the case of just one target, the target itself may go
Packit 1034e0
down or have a problem making it unresponsive to ARP requests.  Having
Packit 1034e0
an additional target (or several) increases the reliability of the ARP
Packit 1034e0
monitoring.
Packit 1034e0
Packit 1034e0
	Multiple ARP targets must be separated by commas as follows:
Packit 1034e0
Packit 1034e0
# example options for ARP monitoring with three targets
Packit 1034e0
alias bond0 bonding
Packit 1034e0
options bond0 arp_interval=60 arp_ip_target=192.168.0.1,192.168.0.3,192.168.0.9
Packit 1034e0
Packit 1034e0
	For just a single target the options would resemble:
Packit 1034e0
Packit 1034e0
# example options for ARP monitoring with one target
Packit 1034e0
alias bond0 bonding
Packit 1034e0
options bond0 arp_interval=60 arp_ip_target=192.168.0.100
Packit 1034e0
Packit 1034e0
Packit 1034e0
7.3 MII Monitor Operation
Packit 1034e0
-------------------------
Packit 1034e0
Packit 1034e0
	The MII monitor monitors only the carrier state of the local
Packit 1034e0
network interface.  It accomplishes this in one of three ways: by
Packit 1034e0
depending upon the device driver to maintain its carrier state, by
Packit 1034e0
querying the device's MII registers, or by making an ethtool query to
Packit 1034e0
the device.
Packit 1034e0
Packit 1034e0
	If the use_carrier module parameter is 1 (the default value),
Packit 1034e0
then the MII monitor will rely on the driver for carrier state
Packit 1034e0
information (via the netif_carrier subsystem).  As explained in the
Packit 1034e0
use_carrier parameter information, above, if the MII monitor fails to
Packit 1034e0
detect carrier loss on the device (e.g., when the cable is physically
Packit 1034e0
disconnected), it may be that the driver does not support
Packit 1034e0
netif_carrier.
Packit 1034e0
Packit 1034e0
	If use_carrier is 0, then the MII monitor will first query the
Packit 1034e0
device's (via ioctl) MII registers and check the link state.  If that
Packit 1034e0
request fails (not just that it returns carrier down), then the MII
Packit 1034e0
monitor will make an ethtool ETHOOL_GLINK request to attempt to obtain
Packit 1034e0
the same information.  If both methods fail (i.e., the driver either
Packit 1034e0
does not support or had some error in processing both the MII register
Packit 1034e0
and ethtool requests), then the MII monitor will assume the link is
Packit 1034e0
up.
Packit 1034e0
Packit 1034e0
8. Potential Sources of Trouble
Packit 1034e0
===============================
Packit 1034e0
Packit 1034e0
8.1 Adventures in Routing
Packit 1034e0
-------------------------
Packit 1034e0
Packit 1034e0
	When bonding is configured, it is important that the slave
Packit 1034e0
devices not have routes that supersede routes of the master (or,
Packit 1034e0
generally, not have routes at all).  For example, suppose the bonding
Packit 1034e0
device bond0 has two slaves, eth0 and eth1, and the routing table is
Packit 1034e0
as follows:
Packit 1034e0
Packit 1034e0
Kernel IP routing table
Packit 1034e0
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
Packit 1034e0
10.0.0.0        0.0.0.0         255.255.0.0     U        40 0          0 eth0
Packit 1034e0
10.0.0.0        0.0.0.0         255.255.0.0     U        40 0          0 eth1
Packit 1034e0
10.0.0.0        0.0.0.0         255.255.0.0     U        40 0          0 bond0
Packit 1034e0
127.0.0.0       0.0.0.0         255.0.0.0       U        40 0          0 lo
Packit 1034e0
Packit 1034e0
	This routing configuration will likely still update the
Packit 1034e0
receive/transmit times in the driver (needed by the ARP monitor), but
Packit 1034e0
may bypass the bonding driver (because outgoing traffic to, in this
Packit 1034e0
case, another host on network 10 would use eth0 or eth1 before bond0).
Packit 1034e0
Packit 1034e0
	The ARP monitor (and ARP itself) may become confused by this
Packit 1034e0
configuration, because ARP requests (generated by the ARP monitor)
Packit 1034e0
will be sent on one interface (bond0), but the corresponding reply
Packit 1034e0
will arrive on a different interface (eth0).  This reply looks to ARP
Packit 1034e0
as an unsolicited ARP reply (because ARP matches replies on an
Packit 1034e0
interface basis), and is discarded.  The MII monitor is not affected
Packit 1034e0
by the state of the routing table.
Packit 1034e0
Packit 1034e0
	The solution here is simply to insure that slaves do not have
Packit 1034e0
routes of their own, and if for some reason they must, those routes do
Packit 1034e0
not supersede routes of their master.  This should generally be the
Packit 1034e0
case, but unusual configurations or errant manual or automatic static
Packit 1034e0
route additions may cause trouble.
Packit 1034e0
Packit 1034e0
8.2 Ethernet Device Renaming
Packit 1034e0
----------------------------
Packit 1034e0
Packit 1034e0
	On systems with network configuration scripts that do not
Packit 1034e0
associate physical devices directly with network interface names (so
Packit 1034e0
that the same physical device always has the same "ethX" name), it may
Packit 1034e0
be necessary to add some special logic to config files in
Packit 1034e0
/etc/modprobe.d/.
Packit 1034e0
Packit 1034e0
	For example, given a modules.conf containing the following:
Packit 1034e0
Packit 1034e0
alias bond0 bonding
Packit 1034e0
options bond0 mode=some-mode miimon=50
Packit 1034e0
alias eth0 tg3
Packit 1034e0
alias eth1 tg3
Packit 1034e0
alias eth2 e1000
Packit 1034e0
alias eth3 e1000
Packit 1034e0
Packit 1034e0
	If neither eth0 and eth1 are slaves to bond0, then when the
Packit 1034e0
bond0 interface comes up, the devices may end up reordered.  This
Packit 1034e0
happens because bonding is loaded first, then its slave device's
Packit 1034e0
drivers are loaded next.  Since no other drivers have been loaded,
Packit 1034e0
when the e1000 driver loads, it will receive eth0 and eth1 for its
Packit 1034e0
devices, but the bonding configuration tries to enslave eth2 and eth3
Packit 1034e0
(which may later be assigned to the tg3 devices).
Packit 1034e0
Packit 1034e0
	Adding the following:
Packit 1034e0
Packit 1034e0
add above bonding e1000 tg3
Packit 1034e0
Packit 1034e0
	causes modprobe to load e1000 then tg3, in that order, when
Packit 1034e0
bonding is loaded.  This command is fully documented in the
Packit 1034e0
modules.conf manual page.
Packit 1034e0
Packit 1034e0
	On systems utilizing modprobe an equivalent problem can occur.
Packit 1034e0
In this case, the following can be added to config files in
Packit 1034e0
/etc/modprobe.d/ as:
Packit 1034e0
Packit 1034e0
softdep bonding pre: tg3 e1000
Packit 1034e0
Packit 1034e0
	This will load tg3 and e1000 modules before loading the bonding one.
Packit 1034e0
Full documentation on this can be found in the modprobe.d and modprobe
Packit 1034e0
manual pages.
Packit 1034e0
Packit 1034e0
8.3. Painfully Slow Or No Failed Link Detection By Miimon
Packit 1034e0
---------------------------------------------------------
Packit 1034e0
Packit 1034e0
	By default, bonding enables the use_carrier option, which
Packit 1034e0
instructs bonding to trust the driver to maintain carrier state.
Packit 1034e0
Packit 1034e0
	As discussed in the options section, above, some drivers do
Packit 1034e0
not support the netif_carrier_on/_off link state tracking system.
Packit 1034e0
With use_carrier enabled, bonding will always see these links as up,
Packit 1034e0
regardless of their actual state.
Packit 1034e0
Packit 1034e0
	Additionally, other drivers do support netif_carrier, but do
Packit 1034e0
not maintain it in real time, e.g., only polling the link state at
Packit 1034e0
some fixed interval.  In this case, miimon will detect failures, but
Packit 1034e0
only after some long period of time has expired.  If it appears that
Packit 1034e0
miimon is very slow in detecting link failures, try specifying
Packit 1034e0
use_carrier=0 to see if that improves the failure detection time.  If
Packit 1034e0
it does, then it may be that the driver checks the carrier state at a
Packit 1034e0
fixed interval, but does not cache the MII register values (so the
Packit 1034e0
use_carrier=0 method of querying the registers directly works).  If
Packit 1034e0
use_carrier=0 does not improve the failover, then the driver may cache
Packit 1034e0
the registers, or the problem may be elsewhere.
Packit 1034e0
Packit 1034e0
	Also, remember that miimon only checks for the device's
Packit 1034e0
carrier state.  It has no way to determine the state of devices on or
Packit 1034e0
beyond other ports of a switch, or if a switch is refusing to pass
Packit 1034e0
traffic while still maintaining carrier on.
Packit 1034e0
Packit 1034e0
9. SNMP agents
Packit 1034e0
===============
Packit 1034e0
Packit 1034e0
	If running SNMP agents, the bonding driver should be loaded
Packit 1034e0
before any network drivers participating in a bond.  This requirement
Packit 1034e0
is due to the interface index (ipAdEntIfIndex) being associated to
Packit 1034e0
the first interface found with a given IP address.  That is, there is
Packit 1034e0
only one ipAdEntIfIndex for each IP address.  For example, if eth0 and
Packit 1034e0
eth1 are slaves of bond0 and the driver for eth0 is loaded before the
Packit 1034e0
bonding driver, the interface for the IP address will be associated
Packit 1034e0
with the eth0 interface.  This configuration is shown below, the IP
Packit 1034e0
address 192.168.1.1 has an interface index of 2 which indexes to eth0
Packit 1034e0
in the ifDescr table (ifDescr.2).
Packit 1034e0
Packit 1034e0
     interfaces.ifTable.ifEntry.ifDescr.1 = lo
Packit 1034e0
     interfaces.ifTable.ifEntry.ifDescr.2 = eth0
Packit 1034e0
     interfaces.ifTable.ifEntry.ifDescr.3 = eth1
Packit 1034e0
     interfaces.ifTable.ifEntry.ifDescr.4 = eth2
Packit 1034e0
     interfaces.ifTable.ifEntry.ifDescr.5 = eth3
Packit 1034e0
     interfaces.ifTable.ifEntry.ifDescr.6 = bond0
Packit 1034e0
     ip.ipAddrTable.ipAddrEntry.ipAdEntIfIndex.10.10.10.10 = 5
Packit 1034e0
     ip.ipAddrTable.ipAddrEntry.ipAdEntIfIndex.192.168.1.1 = 2
Packit 1034e0
     ip.ipAddrTable.ipAddrEntry.ipAdEntIfIndex.10.74.20.94 = 4
Packit 1034e0
     ip.ipAddrTable.ipAddrEntry.ipAdEntIfIndex.127.0.0.1 = 1
Packit 1034e0
Packit 1034e0
	This problem is avoided by loading the bonding driver before
Packit 1034e0
any network drivers participating in a bond.  Below is an example of
Packit 1034e0
loading the bonding driver first, the IP address 192.168.1.1 is
Packit 1034e0
correctly associated with ifDescr.2.
Packit 1034e0
Packit 1034e0
     interfaces.ifTable.ifEntry.ifDescr.1 = lo
Packit 1034e0
     interfaces.ifTable.ifEntry.ifDescr.2 = bond0
Packit 1034e0
     interfaces.ifTable.ifEntry.ifDescr.3 = eth0
Packit 1034e0
     interfaces.ifTable.ifEntry.ifDescr.4 = eth1
Packit 1034e0
     interfaces.ifTable.ifEntry.ifDescr.5 = eth2
Packit 1034e0
     interfaces.ifTable.ifEntry.ifDescr.6 = eth3
Packit 1034e0
     ip.ipAddrTable.ipAddrEntry.ipAdEntIfIndex.10.10.10.10 = 6
Packit 1034e0
     ip.ipAddrTable.ipAddrEntry.ipAdEntIfIndex.192.168.1.1 = 2
Packit 1034e0
     ip.ipAddrTable.ipAddrEntry.ipAdEntIfIndex.10.74.20.94 = 5
Packit 1034e0
     ip.ipAddrTable.ipAddrEntry.ipAdEntIfIndex.127.0.0.1 = 1
Packit 1034e0
Packit 1034e0
	While some distributions may not report the interface name in
Packit 1034e0
ifDescr, the association between the IP address and IfIndex remains
Packit 1034e0
and SNMP functions such as Interface_Scan_Next will report that
Packit 1034e0
association.
Packit 1034e0
Packit 1034e0
10. Promiscuous mode
Packit 1034e0
====================
Packit 1034e0
Packit 1034e0
	When running network monitoring tools, e.g., tcpdump, it is
Packit 1034e0
common to enable promiscuous mode on the device, so that all traffic
Packit 1034e0
is seen (instead of seeing only traffic destined for the local host).
Packit 1034e0
The bonding driver handles promiscuous mode changes to the bonding
Packit 1034e0
master device (e.g., bond0), and propagates the setting to the slave
Packit 1034e0
devices.
Packit 1034e0
Packit 1034e0
	For the balance-rr, balance-xor, broadcast, and 802.3ad modes,
Packit 1034e0
the promiscuous mode setting is propagated to all slaves.
Packit 1034e0
Packit 1034e0
	For the active-backup, balance-tlb and balance-alb modes, the
Packit 1034e0
promiscuous mode setting is propagated only to the active slave.
Packit 1034e0
Packit 1034e0
	For balance-tlb mode, the active slave is the slave currently
Packit 1034e0
receiving inbound traffic.
Packit 1034e0
Packit 1034e0
	For balance-alb mode, the active slave is the slave used as a
Packit 1034e0
"primary."  This slave is used for mode-specific control traffic, for
Packit 1034e0
sending to peers that are unassigned or if the load is unbalanced.
Packit 1034e0
Packit 1034e0
	For the active-backup, balance-tlb and balance-alb modes, when
Packit 1034e0
the active slave changes (e.g., due to a link failure), the
Packit 1034e0
promiscuous setting will be propagated to the new active slave.
Packit 1034e0
Packit 1034e0
11. Configuring Bonding for High Availability
Packit 1034e0
=============================================
Packit 1034e0
Packit 1034e0
	High Availability refers to configurations that provide
Packit 1034e0
maximum network availability by having redundant or backup devices,
Packit 1034e0
links or switches between the host and the rest of the world.  The
Packit 1034e0
goal is to provide the maximum availability of network connectivity
Packit 1034e0
(i.e., the network always works), even though other configurations
Packit 1034e0
could provide higher throughput.
Packit 1034e0
Packit 1034e0
11.1 High Availability in a Single Switch Topology
Packit 1034e0
--------------------------------------------------
Packit 1034e0
Packit 1034e0
	If two hosts (or a host and a single switch) are directly
Packit 1034e0
connected via multiple physical links, then there is no availability
Packit 1034e0
penalty to optimizing for maximum bandwidth.  In this case, there is
Packit 1034e0
only one switch (or peer), so if it fails, there is no alternative
Packit 1034e0
access to fail over to.  Additionally, the bonding load balance modes
Packit 1034e0
support link monitoring of their members, so if individual links fail,
Packit 1034e0
the load will be rebalanced across the remaining devices.
Packit 1034e0
Packit 1034e0
	See Section 12, "Configuring Bonding for Maximum Throughput"
Packit 1034e0
for information on configuring bonding with one peer device.
Packit 1034e0
Packit 1034e0
11.2 High Availability in a Multiple Switch Topology
Packit 1034e0
----------------------------------------------------
Packit 1034e0
Packit 1034e0
	With multiple switches, the configuration of bonding and the
Packit 1034e0
network changes dramatically.  In multiple switch topologies, there is
Packit 1034e0
a trade off between network availability and usable bandwidth.
Packit 1034e0
Packit 1034e0
	Below is a sample network, configured to maximize the
Packit 1034e0
availability of the network:
Packit 1034e0
Packit 1034e0
                |                                     |
Packit 1034e0
                |port3                           port3|
Packit 1034e0
          +-----+----+                          +-----+----+
Packit 1034e0
          |          |port2       ISL      port2|          |
Packit 1034e0
          | switch A +--------------------------+ switch B |
Packit 1034e0
          |          |                          |          |
Packit 1034e0
          +-----+----+                          +-----++---+
Packit 1034e0
                |port1                           port1|
Packit 1034e0
                |             +-------+               |
Packit 1034e0
                +-------------+ host1 +---------------+
Packit 1034e0
                         eth0 +-------+ eth1
Packit 1034e0
Packit 1034e0
	In this configuration, there is a link between the two
Packit 1034e0
switches (ISL, or inter switch link), and multiple ports connecting to
Packit 1034e0
the outside world ("port3" on each switch).  There is no technical
Packit 1034e0
reason that this could not be extended to a third switch.
Packit 1034e0
Packit 1034e0
11.2.1 HA Bonding Mode Selection for Multiple Switch Topology
Packit 1034e0
-------------------------------------------------------------
Packit 1034e0
Packit 1034e0
	In a topology such as the example above, the active-backup and
Packit 1034e0
broadcast modes are the only useful bonding modes when optimizing for
Packit 1034e0
availability; the other modes require all links to terminate on the
Packit 1034e0
same peer for them to behave rationally.
Packit 1034e0
Packit 1034e0
active-backup: This is generally the preferred mode, particularly if
Packit 1034e0
	the switches have an ISL and play together well.  If the
Packit 1034e0
	network configuration is such that one switch is specifically
Packit 1034e0
	a backup switch (e.g., has lower capacity, higher cost, etc),
Packit 1034e0
	then the primary option can be used to insure that the
Packit 1034e0
	preferred link is always used when it is available.
Packit 1034e0
Packit 1034e0
broadcast: This mode is really a special purpose mode, and is suitable
Packit 1034e0
	only for very specific needs.  For example, if the two
Packit 1034e0
	switches are not connected (no ISL), and the networks beyond
Packit 1034e0
	them are totally independent.  In this case, if it is
Packit 1034e0
	necessary for some specific one-way traffic to reach both
Packit 1034e0
	independent networks, then the broadcast mode may be suitable.
Packit 1034e0
Packit 1034e0
11.2.2 HA Link Monitoring Selection for Multiple Switch Topology
Packit 1034e0
----------------------------------------------------------------
Packit 1034e0
Packit 1034e0
	The choice of link monitoring ultimately depends upon your
Packit 1034e0
switch.  If the switch can reliably fail ports in response to other
Packit 1034e0
failures, then either the MII or ARP monitors should work.  For
Packit 1034e0
example, in the above example, if the "port3" link fails at the remote
Packit 1034e0
end, the MII monitor has no direct means to detect this.  The ARP
Packit 1034e0
monitor could be configured with a target at the remote end of port3,
Packit 1034e0
thus detecting that failure without switch support.
Packit 1034e0
Packit 1034e0
	In general, however, in a multiple switch topology, the ARP
Packit 1034e0
monitor can provide a higher level of reliability in detecting end to
Packit 1034e0
end connectivity failures (which may be caused by the failure of any
Packit 1034e0
individual component to pass traffic for any reason).  Additionally,
Packit 1034e0
the ARP monitor should be configured with multiple targets (at least
Packit 1034e0
one for each switch in the network).  This will insure that,
Packit 1034e0
regardless of which switch is active, the ARP monitor has a suitable
Packit 1034e0
target to query.
Packit 1034e0
Packit 1034e0
	Note, also, that of late many switches now support a functionality
Packit 1034e0
generally referred to as "trunk failover."  This is a feature of the
Packit 1034e0
switch that causes the link state of a particular switch port to be set
Packit 1034e0
down (or up) when the state of another switch port goes down (or up).
Packit 1034e0
Its purpose is to propagate link failures from logically "exterior" ports
Packit 1034e0
to the logically "interior" ports that bonding is able to monitor via
Packit 1034e0
miimon.  Availability and configuration for trunk failover varies by
Packit 1034e0
switch, but this can be a viable alternative to the ARP monitor when using
Packit 1034e0
suitable switches.
Packit 1034e0
Packit 1034e0
12. Configuring Bonding for Maximum Throughput
Packit 1034e0
==============================================
Packit 1034e0
Packit 1034e0
12.1 Maximizing Throughput in a Single Switch Topology
Packit 1034e0
------------------------------------------------------
Packit 1034e0
Packit 1034e0
	In a single switch configuration, the best method to maximize
Packit 1034e0
throughput depends upon the application and network environment.  The
Packit 1034e0
various load balancing modes each have strengths and weaknesses in
Packit 1034e0
different environments, as detailed below.
Packit 1034e0
Packit 1034e0
	For this discussion, we will break down the topologies into
Packit 1034e0
two categories.  Depending upon the destination of most traffic, we
Packit 1034e0
categorize them into either "gatewayed" or "local" configurations.
Packit 1034e0
Packit 1034e0
	In a gatewayed configuration, the "switch" is acting primarily
Packit 1034e0
as a router, and the majority of traffic passes through this router to
Packit 1034e0
other networks.  An example would be the following:
Packit 1034e0
Packit 1034e0
Packit 1034e0
     +----------+                     +----------+
Packit 1034e0
     |          |eth0            port1|          | to other networks
Packit 1034e0
     | Host A   +---------------------+ router   +------------------->
Packit 1034e0
     |          +---------------------+          | Hosts B and C are out
Packit 1034e0
     |          |eth1            port2|          | here somewhere
Packit 1034e0
     +----------+                     +----------+
Packit 1034e0
Packit 1034e0
	The router may be a dedicated router device, or another host
Packit 1034e0
acting as a gateway.  For our discussion, the important point is that
Packit 1034e0
the majority of traffic from Host A will pass through the router to
Packit 1034e0
some other network before reaching its final destination.
Packit 1034e0
Packit 1034e0
	In a gatewayed network configuration, although Host A may
Packit 1034e0
communicate with many other systems, all of its traffic will be sent
Packit 1034e0
and received via one other peer on the local network, the router.
Packit 1034e0
Packit 1034e0
	Note that the case of two systems connected directly via
Packit 1034e0
multiple physical links is, for purposes of configuring bonding, the
Packit 1034e0
same as a gatewayed configuration.  In that case, it happens that all
Packit 1034e0
traffic is destined for the "gateway" itself, not some other network
Packit 1034e0
beyond the gateway.
Packit 1034e0
Packit 1034e0
	In a local configuration, the "switch" is acting primarily as
Packit 1034e0
a switch, and the majority of traffic passes through this switch to
Packit 1034e0
reach other stations on the same network.  An example would be the
Packit 1034e0
following:
Packit 1034e0
Packit 1034e0
    +----------+            +----------+       +--------+
Packit 1034e0
    |          |eth0   port1|          +-------+ Host B |
Packit 1034e0
    |  Host A  +------------+  switch  |port3  +--------+
Packit 1034e0
    |          +------------+          |                  +--------+
Packit 1034e0
    |          |eth1   port2|          +------------------+ Host C |
Packit 1034e0
    +----------+            +----------+port4             +--------+
Packit 1034e0
Packit 1034e0
Packit 1034e0
	Again, the switch may be a dedicated switch device, or another
Packit 1034e0
host acting as a gateway.  For our discussion, the important point is
Packit 1034e0
that the majority of traffic from Host A is destined for other hosts
Packit 1034e0
on the same local network (Hosts B and C in the above example).
Packit 1034e0
Packit 1034e0
	In summary, in a gatewayed configuration, traffic to and from
Packit 1034e0
the bonded device will be to the same MAC level peer on the network
Packit 1034e0
(the gateway itself, i.e., the router), regardless of its final
Packit 1034e0
destination.  In a local configuration, traffic flows directly to and
Packit 1034e0
from the final destinations, thus, each destination (Host B, Host C)
Packit 1034e0
will be addressed directly by their individual MAC addresses.
Packit 1034e0
Packit 1034e0
	This distinction between a gatewayed and a local network
Packit 1034e0
configuration is important because many of the load balancing modes
Packit 1034e0
available use the MAC addresses of the local network source and
Packit 1034e0
destination to make load balancing decisions.  The behavior of each
Packit 1034e0
mode is described below.
Packit 1034e0
Packit 1034e0
Packit 1034e0
12.1.1 MT Bonding Mode Selection for Single Switch Topology
Packit 1034e0
-----------------------------------------------------------
Packit 1034e0
Packit 1034e0
	This configuration is the easiest to set up and to understand,
Packit 1034e0
although you will have to decide which bonding mode best suits your
Packit 1034e0
needs.  The trade offs for each mode are detailed below:
Packit 1034e0
Packit 1034e0
balance-rr: This mode is the only mode that will permit a single
Packit 1034e0
	TCP/IP connection to stripe traffic across multiple
Packit 1034e0
	interfaces. It is therefore the only mode that will allow a
Packit 1034e0
	single TCP/IP stream to utilize more than one interface's
Packit 1034e0
	worth of throughput.  This comes at a cost, however: the
Packit 1034e0
	striping generally results in peer systems receiving packets out
Packit 1034e0
	of order, causing TCP/IP's congestion control system to kick
Packit 1034e0
	in, often by retransmitting segments.
Packit 1034e0
Packit 1034e0
	It is possible to adjust TCP/IP's congestion limits by
Packit 1034e0
	altering the net.ipv4.tcp_reordering sysctl parameter.  The
Packit 1034e0
	usual default value is 3, and the maximum useful value is 127.
Packit 1034e0
	For a four interface balance-rr bond, expect that a single
Packit 1034e0
	TCP/IP stream will utilize no more than approximately 2.3
Packit 1034e0
	interface's worth of throughput, even after adjusting
Packit 1034e0
	tcp_reordering.
Packit 1034e0
Packit 1034e0
	Note that the fraction of packets that will be delivered out of
Packit 1034e0
	order is highly variable, and is unlikely to be zero.  The level
Packit 1034e0
	of reordering depends upon a variety of factors, including the
Packit 1034e0
	networking interfaces, the switch, and the topology of the
Packit 1034e0
	configuration.  Speaking in general terms, higher speed network
Packit 1034e0
	cards produce more reordering (due to factors such as packet
Packit 1034e0
	coalescing), and a "many to many" topology will reorder at a
Packit 1034e0
	higher rate than a "many slow to one fast" configuration.
Packit 1034e0
Packit 1034e0
	Many switches do not support any modes that stripe traffic
Packit 1034e0
	(instead choosing a port based upon IP or MAC level addresses);
Packit 1034e0
	for those devices, traffic for a particular connection flowing
Packit 1034e0
	through the switch to a balance-rr bond will not utilize greater
Packit 1034e0
	than one interface's worth of bandwidth.
Packit 1034e0
Packit 1034e0
	If you are utilizing protocols other than TCP/IP, UDP for
Packit 1034e0
	example, and your application can tolerate out of order
Packit 1034e0
	delivery, then this mode can allow for single stream datagram
Packit 1034e0
	performance that scales near linearly as interfaces are added
Packit 1034e0
	to the bond.
Packit 1034e0
Packit 1034e0
	This mode requires the switch to have the appropriate ports
Packit 1034e0
	configured for "etherchannel" or "trunking."
Packit 1034e0
Packit 1034e0
active-backup: There is not much advantage in this network topology to
Packit 1034e0
	the active-backup mode, as the inactive backup devices are all
Packit 1034e0
	connected to the same peer as the primary.  In this case, a
Packit 1034e0
	load balancing mode (with link monitoring) will provide the
Packit 1034e0
	same level of network availability, but with increased
Packit 1034e0
	available bandwidth.  On the plus side, active-backup mode
Packit 1034e0
	does not require any configuration of the switch, so it may
Packit 1034e0
	have value if the hardware available does not support any of
Packit 1034e0
	the load balance modes.
Packit 1034e0
Packit 1034e0
balance-xor: This mode will limit traffic such that packets destined
Packit 1034e0
	for specific peers will always be sent over the same
Packit 1034e0
	interface.  Since the destination is determined by the MAC
Packit 1034e0
	addresses involved, this mode works best in a "local" network
Packit 1034e0
	configuration (as described above), with destinations all on
Packit 1034e0
	the same local network.  This mode is likely to be suboptimal
Packit 1034e0
	if all your traffic is passed through a single router (i.e., a
Packit 1034e0
	"gatewayed" network configuration, as described above).
Packit 1034e0
Packit 1034e0
	As with balance-rr, the switch ports need to be configured for
Packit 1034e0
	"etherchannel" or "trunking."
Packit 1034e0
Packit 1034e0
broadcast: Like active-backup, there is not much advantage to this
Packit 1034e0
	mode in this type of network topology.
Packit 1034e0
Packit 1034e0
802.3ad: This mode can be a good choice for this type of network
Packit 1034e0
	topology.  The 802.3ad mode is an IEEE standard, so all peers
Packit 1034e0
	that implement 802.3ad should interoperate well.  The 802.3ad
Packit 1034e0
	protocol includes automatic configuration of the aggregates,
Packit 1034e0
	so minimal manual configuration of the switch is needed
Packit 1034e0
	(typically only to designate that some set of devices is
Packit 1034e0
	available for 802.3ad).  The 802.3ad standard also mandates
Packit 1034e0
	that frames be delivered in order (within certain limits), so
Packit 1034e0
	in general single connections will not see misordering of
Packit 1034e0
	packets.  The 802.3ad mode does have some drawbacks: the
Packit 1034e0
	standard mandates that all devices in the aggregate operate at
Packit 1034e0
	the same speed and duplex.  Also, as with all bonding load
Packit 1034e0
	balance modes other than balance-rr, no single connection will
Packit 1034e0
	be able to utilize more than a single interface's worth of
Packit 1034e0
	bandwidth.  
Packit 1034e0
Packit 1034e0
	Additionally, the linux bonding 802.3ad implementation
Packit 1034e0
	distributes traffic by peer (using an XOR of MAC addresses),
Packit 1034e0
	so in a "gatewayed" configuration, all outgoing traffic will
Packit 1034e0
	generally use the same device.  Incoming traffic may also end
Packit 1034e0
	up on a single device, but that is dependent upon the
Packit 1034e0
	balancing policy of the peer's 8023.ad implementation.  In a
Packit 1034e0
	"local" configuration, traffic will be distributed across the
Packit 1034e0
	devices in the bond.
Packit 1034e0
Packit 1034e0
	Finally, the 802.3ad mode mandates the use of the MII monitor,
Packit 1034e0
	therefore, the ARP monitor is not available in this mode.
Packit 1034e0
Packit 1034e0
balance-tlb: The balance-tlb mode balances outgoing traffic by peer.
Packit 1034e0
	Since the balancing is done according to MAC address, in a
Packit 1034e0
	"gatewayed" configuration (as described above), this mode will
Packit 1034e0
	send all traffic across a single device.  However, in a
Packit 1034e0
	"local" network configuration, this mode balances multiple
Packit 1034e0
	local network peers across devices in a vaguely intelligent
Packit 1034e0
	manner (not a simple XOR as in balance-xor or 802.3ad mode),
Packit 1034e0
	so that mathematically unlucky MAC addresses (i.e., ones that
Packit 1034e0
	XOR to the same value) will not all "bunch up" on a single
Packit 1034e0
	interface.
Packit 1034e0
Packit 1034e0
	Unlike 802.3ad, interfaces may be of differing speeds, and no
Packit 1034e0
	special switch configuration is required.  On the down side,
Packit 1034e0
	in this mode all incoming traffic arrives over a single
Packit 1034e0
	interface, this mode requires certain ethtool support in the
Packit 1034e0
	network device driver of the slave interfaces, and the ARP
Packit 1034e0
	monitor is not available.
Packit 1034e0
Packit 1034e0
balance-alb: This mode is everything that balance-tlb is, and more.
Packit 1034e0
	It has all of the features (and restrictions) of balance-tlb,
Packit 1034e0
	and will also balance incoming traffic from local network
Packit 1034e0
	peers (as described in the Bonding Module Options section,
Packit 1034e0
	above).
Packit 1034e0
Packit 1034e0
	The only additional down side to this mode is that the network
Packit 1034e0
	device driver must support changing the hardware address while
Packit 1034e0
	the device is open.
Packit 1034e0
Packit 1034e0
12.1.2 MT Link Monitoring for Single Switch Topology
Packit 1034e0
----------------------------------------------------
Packit 1034e0
Packit 1034e0
	The choice of link monitoring may largely depend upon which
Packit 1034e0
mode you choose to use.  The more advanced load balancing modes do not
Packit 1034e0
support the use of the ARP monitor, and are thus restricted to using
Packit 1034e0
the MII monitor (which does not provide as high a level of end to end
Packit 1034e0
assurance as the ARP monitor).
Packit 1034e0
Packit 1034e0
12.2 Maximum Throughput in a Multiple Switch Topology
Packit 1034e0
-----------------------------------------------------
Packit 1034e0
Packit 1034e0
	Multiple switches may be utilized to optimize for throughput
Packit 1034e0
when they are configured in parallel as part of an isolated network
Packit 1034e0
between two or more systems, for example:
Packit 1034e0
Packit 1034e0
                       +-----------+
Packit 1034e0
                       |  Host A   | 
Packit 1034e0
                       +-+---+---+-+
Packit 1034e0
                         |   |   |
Packit 1034e0
                +--------+   |   +---------+
Packit 1034e0
                |            |             |
Packit 1034e0
         +------+---+  +-----+----+  +-----+----+
Packit 1034e0
         | Switch A |  | Switch B |  | Switch C |
Packit 1034e0
         +------+---+  +-----+----+  +-----+----+
Packit 1034e0
                |            |             |
Packit 1034e0
                +--------+   |   +---------+
Packit 1034e0
                         |   |   |
Packit 1034e0
                       +-+---+---+-+
Packit 1034e0
                       |  Host B   | 
Packit 1034e0
                       +-----------+
Packit 1034e0
Packit 1034e0
	In this configuration, the switches are isolated from one
Packit 1034e0
another.  One reason to employ a topology such as this is for an
Packit 1034e0
isolated network with many hosts (a cluster configured for high
Packit 1034e0
performance, for example), using multiple smaller switches can be more
Packit 1034e0
cost effective than a single larger switch, e.g., on a network with 24
Packit 1034e0
hosts, three 24 port switches can be significantly less expensive than
Packit 1034e0
a single 72 port switch.
Packit 1034e0
Packit 1034e0
	If access beyond the network is required, an individual host
Packit 1034e0
can be equipped with an additional network device connected to an
Packit 1034e0
external network; this host then additionally acts as a gateway.
Packit 1034e0
Packit 1034e0
12.2.1 MT Bonding Mode Selection for Multiple Switch Topology
Packit 1034e0
-------------------------------------------------------------
Packit 1034e0
Packit 1034e0
	In actual practice, the bonding mode typically employed in
Packit 1034e0
configurations of this type is balance-rr.  Historically, in this
Packit 1034e0
network configuration, the usual caveats about out of order packet
Packit 1034e0
delivery are mitigated by the use of network adapters that do not do
Packit 1034e0
any kind of packet coalescing (via the use of NAPI, or because the
Packit 1034e0
device itself does not generate interrupts until some number of
Packit 1034e0
packets has arrived).  When employed in this fashion, the balance-rr
Packit 1034e0
mode allows individual connections between two hosts to effectively
Packit 1034e0
utilize greater than one interface's bandwidth.
Packit 1034e0
Packit 1034e0
12.2.2 MT Link Monitoring for Multiple Switch Topology
Packit 1034e0
------------------------------------------------------
Packit 1034e0
Packit 1034e0
	Again, in actual practice, the MII monitor is most often used
Packit 1034e0
in this configuration, as performance is given preference over
Packit 1034e0
availability.  The ARP monitor will function in this topology, but its
Packit 1034e0
advantages over the MII monitor are mitigated by the volume of probes
Packit 1034e0
needed as the number of systems involved grows (remember that each
Packit 1034e0
host in the network is configured with bonding).
Packit 1034e0
Packit 1034e0
13. Switch Behavior Issues
Packit 1034e0
==========================
Packit 1034e0
Packit 1034e0
13.1 Link Establishment and Failover Delays
Packit 1034e0
-------------------------------------------
Packit 1034e0
Packit 1034e0
	Some switches exhibit undesirable behavior with regard to the
Packit 1034e0
timing of link up and down reporting by the switch.
Packit 1034e0
Packit 1034e0
	First, when a link comes up, some switches may indicate that
Packit 1034e0
the link is up (carrier available), but not pass traffic over the
Packit 1034e0
interface for some period of time.  This delay is typically due to
Packit 1034e0
some type of autonegotiation or routing protocol, but may also occur
Packit 1034e0
during switch initialization (e.g., during recovery after a switch
Packit 1034e0
failure).  If you find this to be a problem, specify an appropriate
Packit 1034e0
value to the updelay bonding module option to delay the use of the
Packit 1034e0
relevant interface(s).
Packit 1034e0
Packit 1034e0
	Second, some switches may "bounce" the link state one or more
Packit 1034e0
times while a link is changing state.  This occurs most commonly while
Packit 1034e0
the switch is initializing.  Again, an appropriate updelay value may
Packit 1034e0
help.
Packit 1034e0
Packit 1034e0
	Note that when a bonding interface has no active links, the
Packit 1034e0
driver will immediately reuse the first link that goes up, even if the
Packit 1034e0
updelay parameter has been specified (the updelay is ignored in this
Packit 1034e0
case).  If there are slave interfaces waiting for the updelay timeout
Packit 1034e0
to expire, the interface that first went into that state will be
Packit 1034e0
immediately reused.  This reduces down time of the network if the
Packit 1034e0
value of updelay has been overestimated, and since this occurs only in
Packit 1034e0
cases with no connectivity, there is no additional penalty for
Packit 1034e0
ignoring the updelay.
Packit 1034e0
Packit 1034e0
	In addition to the concerns about switch timings, if your
Packit 1034e0
switches take a long time to go into backup mode, it may be desirable
Packit 1034e0
to not activate a backup interface immediately after a link goes down.
Packit 1034e0
Failover may be delayed via the downdelay bonding module option.
Packit 1034e0
Packit 1034e0
13.2 Duplicated Incoming Packets
Packit 1034e0
--------------------------------
Packit 1034e0
Packit 1034e0
	NOTE: Starting with version 3.0.2, the bonding driver has logic to
Packit 1034e0
suppress duplicate packets, which should largely eliminate this problem.
Packit 1034e0
The following description is kept for reference.
Packit 1034e0
Packit 1034e0
	It is not uncommon to observe a short burst of duplicated
Packit 1034e0
traffic when the bonding device is first used, or after it has been
Packit 1034e0
idle for some period of time.  This is most easily observed by issuing
Packit 1034e0
a "ping" to some other host on the network, and noticing that the
Packit 1034e0
output from ping flags duplicates (typically one per slave).
Packit 1034e0
Packit 1034e0
	For example, on a bond in active-backup mode with five slaves
Packit 1034e0
all connected to one switch, the output may appear as follows:
Packit 1034e0
Packit 1034e0
# ping -n 10.0.4.2
Packit 1034e0
PING 10.0.4.2 (10.0.4.2) from 10.0.3.10 : 56(84) bytes of data.
Packit 1034e0
64 bytes from 10.0.4.2: icmp_seq=1 ttl=64 time=13.7 ms
Packit 1034e0
64 bytes from 10.0.4.2: icmp_seq=1 ttl=64 time=13.8 ms (DUP!)
Packit 1034e0
64 bytes from 10.0.4.2: icmp_seq=1 ttl=64 time=13.8 ms (DUP!)
Packit 1034e0
64 bytes from 10.0.4.2: icmp_seq=1 ttl=64 time=13.8 ms (DUP!)
Packit 1034e0
64 bytes from 10.0.4.2: icmp_seq=1 ttl=64 time=13.8 ms (DUP!)
Packit 1034e0
64 bytes from 10.0.4.2: icmp_seq=2 ttl=64 time=0.216 ms
Packit 1034e0
64 bytes from 10.0.4.2: icmp_seq=3 ttl=64 time=0.267 ms
Packit 1034e0
64 bytes from 10.0.4.2: icmp_seq=4 ttl=64 time=0.222 ms
Packit 1034e0
Packit 1034e0
	This is not due to an error in the bonding driver, rather, it
Packit 1034e0
is a side effect of how many switches update their MAC forwarding
Packit 1034e0
tables.  Initially, the switch does not associate the MAC address in
Packit 1034e0
the packet with a particular switch port, and so it may send the
Packit 1034e0
traffic to all ports until its MAC forwarding table is updated.  Since
Packit 1034e0
the interfaces attached to the bond may occupy multiple ports on a
Packit 1034e0
single switch, when the switch (temporarily) floods the traffic to all
Packit 1034e0
ports, the bond device receives multiple copies of the same packet
Packit 1034e0
(one per slave device).
Packit 1034e0
Packit 1034e0
	The duplicated packet behavior is switch dependent, some
Packit 1034e0
switches exhibit this, and some do not.  On switches that display this
Packit 1034e0
behavior, it can be induced by clearing the MAC forwarding table (on
Packit 1034e0
most Cisco switches, the privileged command "clear mac address-table
Packit 1034e0
dynamic" will accomplish this).
Packit 1034e0
Packit 1034e0
14. Hardware Specific Considerations
Packit 1034e0
====================================
Packit 1034e0
Packit 1034e0
	This section contains additional information for configuring
Packit 1034e0
bonding on specific hardware platforms, or for interfacing bonding
Packit 1034e0
with particular switches or other devices.
Packit 1034e0
Packit 1034e0
14.1 IBM BladeCenter
Packit 1034e0
--------------------
Packit 1034e0
Packit 1034e0
	This applies to the JS20 and similar systems.
Packit 1034e0
Packit 1034e0
	On the JS20 blades, the bonding driver supports only
Packit 1034e0
balance-rr, active-backup, balance-tlb and balance-alb modes.  This is
Packit 1034e0
largely due to the network topology inside the BladeCenter, detailed
Packit 1034e0
below.
Packit 1034e0
Packit 1034e0
JS20 network adapter information
Packit 1034e0
--------------------------------
Packit 1034e0
Packit 1034e0
	All JS20s come with two Broadcom Gigabit Ethernet ports
Packit 1034e0
integrated on the planar (that's "motherboard" in IBM-speak).  In the
Packit 1034e0
BladeCenter chassis, the eth0 port of all JS20 blades is hard wired to
Packit 1034e0
I/O Module #1; similarly, all eth1 ports are wired to I/O Module #2.
Packit 1034e0
An add-on Broadcom daughter card can be installed on a JS20 to provide
Packit 1034e0
two more Gigabit Ethernet ports.  These ports, eth2 and eth3, are
Packit 1034e0
wired to I/O Modules 3 and 4, respectively.
Packit 1034e0
Packit 1034e0
	Each I/O Module may contain either a switch or a passthrough
Packit 1034e0
module (which allows ports to be directly connected to an external
Packit 1034e0
switch).  Some bonding modes require a specific BladeCenter internal
Packit 1034e0
network topology in order to function; these are detailed below.
Packit 1034e0
Packit 1034e0
	Additional BladeCenter-specific networking information can be
Packit 1034e0
found in two IBM Redbooks (www.ibm.com/redbooks):
Packit 1034e0
Packit 1034e0
"IBM eServer BladeCenter Networking Options"
Packit 1034e0
"IBM eServer BladeCenter Layer 2-7 Network Switching"
Packit 1034e0
Packit 1034e0
BladeCenter networking configuration
Packit 1034e0
------------------------------------
Packit 1034e0
Packit 1034e0
	Because a BladeCenter can be configured in a very large number
Packit 1034e0
of ways, this discussion will be confined to describing basic
Packit 1034e0
configurations.
Packit 1034e0
Packit 1034e0
	Normally, Ethernet Switch Modules (ESMs) are used in I/O
Packit 1034e0
modules 1 and 2.  In this configuration, the eth0 and eth1 ports of a
Packit 1034e0
JS20 will be connected to different internal switches (in the
Packit 1034e0
respective I/O modules).
Packit 1034e0
Packit 1034e0
	A passthrough module (OPM or CPM, optical or copper,
Packit 1034e0
passthrough module) connects the I/O module directly to an external
Packit 1034e0
switch.  By using PMs in I/O module #1 and #2, the eth0 and eth1
Packit 1034e0
interfaces of a JS20 can be redirected to the outside world and
Packit 1034e0
connected to a common external switch.
Packit 1034e0
Packit 1034e0
	Depending upon the mix of ESMs and PMs, the network will
Packit 1034e0
appear to bonding as either a single switch topology (all PMs) or as a
Packit 1034e0
multiple switch topology (one or more ESMs, zero or more PMs).  It is
Packit 1034e0
also possible to connect ESMs together, resulting in a configuration
Packit 1034e0
much like the example in "High Availability in a Multiple Switch
Packit 1034e0
Topology," above.
Packit 1034e0
Packit 1034e0
Requirements for specific modes
Packit 1034e0
-------------------------------
Packit 1034e0
Packit 1034e0
	The balance-rr mode requires the use of passthrough modules
Packit 1034e0
for devices in the bond, all connected to an common external switch.
Packit 1034e0
That switch must be configured for "etherchannel" or "trunking" on the
Packit 1034e0
appropriate ports, as is usual for balance-rr.
Packit 1034e0
Packit 1034e0
	The balance-alb and balance-tlb modes will function with
Packit 1034e0
either switch modules or passthrough modules (or a mix).  The only
Packit 1034e0
specific requirement for these modes is that all network interfaces
Packit 1034e0
must be able to reach all destinations for traffic sent over the
Packit 1034e0
bonding device (i.e., the network must converge at some point outside
Packit 1034e0
the BladeCenter).
Packit 1034e0
Packit 1034e0
	The active-backup mode has no additional requirements.
Packit 1034e0
Packit 1034e0
Link monitoring issues
Packit 1034e0
----------------------
Packit 1034e0
Packit 1034e0
	When an Ethernet Switch Module is in place, only the ARP
Packit 1034e0
monitor will reliably detect link loss to an external switch.  This is
Packit 1034e0
nothing unusual, but examination of the BladeCenter cabinet would
Packit 1034e0
suggest that the "external" network ports are the ethernet ports for
Packit 1034e0
the system, when it fact there is a switch between these "external"
Packit 1034e0
ports and the devices on the JS20 system itself.  The MII monitor is
Packit 1034e0
only able to detect link failures between the ESM and the JS20 system.
Packit 1034e0
Packit 1034e0
	When a passthrough module is in place, the MII monitor does
Packit 1034e0
detect failures to the "external" port, which is then directly
Packit 1034e0
connected to the JS20 system.
Packit 1034e0
Packit 1034e0
Other concerns
Packit 1034e0
--------------
Packit 1034e0
Packit 1034e0
	The Serial Over LAN (SoL) link is established over the primary
Packit 1034e0
ethernet (eth0) only, therefore, any loss of link to eth0 will result
Packit 1034e0
in losing your SoL connection.  It will not fail over with other
Packit 1034e0
network traffic, as the SoL system is beyond the control of the
Packit 1034e0
bonding driver.
Packit 1034e0
Packit 1034e0
	It may be desirable to disable spanning tree on the switch
Packit 1034e0
(either the internal Ethernet Switch Module, or an external switch) to
Packit 1034e0
avoid fail-over delay issues when using bonding.
Packit 1034e0
Packit 1034e0
	
Packit 1034e0
15. Frequently Asked Questions
Packit 1034e0
==============================
Packit 1034e0
Packit 1034e0
1.  Is it SMP safe?
Packit 1034e0
Packit 1034e0
	Yes. The old 2.0.xx channel bonding patch was not SMP safe.
Packit 1034e0
The new driver was designed to be SMP safe from the start.
Packit 1034e0
Packit 1034e0
2.  What type of cards will work with it?
Packit 1034e0
Packit 1034e0
	Any Ethernet type cards (you can even mix cards - a Intel
Packit 1034e0
EtherExpress PRO/100 and a 3com 3c905b, for example).  For most modes,
Packit 1034e0
devices need not be of the same speed.
Packit 1034e0
Packit 1034e0
	Starting with version 3.2.1, bonding also supports Infiniband
Packit 1034e0
slaves in active-backup mode.
Packit 1034e0
Packit 1034e0
3.  How many bonding devices can I have?
Packit 1034e0
Packit 1034e0
	There is no limit.
Packit 1034e0
Packit 1034e0
4.  How many slaves can a bonding device have?
Packit 1034e0
Packit 1034e0
	This is limited only by the number of network interfaces Linux
Packit 1034e0
supports and/or the number of network cards you can place in your
Packit 1034e0
system.
Packit 1034e0
Packit 1034e0
5.  What happens when a slave link dies?
Packit 1034e0
Packit 1034e0
	If link monitoring is enabled, then the failing device will be
Packit 1034e0
disabled.  The active-backup mode will fail over to a backup link, and
Packit 1034e0
other modes will ignore the failed link.  The link will continue to be
Packit 1034e0
monitored, and should it recover, it will rejoin the bond (in whatever
Packit 1034e0
manner is appropriate for the mode). See the sections on High
Packit 1034e0
Availability and the documentation for each mode for additional
Packit 1034e0
information.
Packit 1034e0
	
Packit 1034e0
	Link monitoring can be enabled via either the miimon or
Packit 1034e0
arp_interval parameters (described in the module parameters section,
Packit 1034e0
above).  In general, miimon monitors the carrier state as sensed by
Packit 1034e0
the underlying network device, and the arp monitor (arp_interval)
Packit 1034e0
monitors connectivity to another host on the local network.
Packit 1034e0
Packit 1034e0
	If no link monitoring is configured, the bonding driver will
Packit 1034e0
be unable to detect link failures, and will assume that all links are
Packit 1034e0
always available.  This will likely result in lost packets, and a
Packit 1034e0
resulting degradation of performance.  The precise performance loss
Packit 1034e0
depends upon the bonding mode and network configuration.
Packit 1034e0
Packit 1034e0
6.  Can bonding be used for High Availability?
Packit 1034e0
Packit 1034e0
	Yes.  See the section on High Availability for details.
Packit 1034e0
Packit 1034e0
7.  Which switches/systems does it work with?
Packit 1034e0
Packit 1034e0
	The full answer to this depends upon the desired mode.
Packit 1034e0
Packit 1034e0
	In the basic balance modes (balance-rr and balance-xor), it
Packit 1034e0
works with any system that supports etherchannel (also called
Packit 1034e0
trunking).  Most managed switches currently available have such
Packit 1034e0
support, and many unmanaged switches as well.
Packit 1034e0
Packit 1034e0
	The advanced balance modes (balance-tlb and balance-alb) do
Packit 1034e0
not have special switch requirements, but do need device drivers that
Packit 1034e0
support specific features (described in the appropriate section under
Packit 1034e0
module parameters, above).
Packit 1034e0
Packit 1034e0
	In 802.3ad mode, it works with systems that support IEEE
Packit 1034e0
802.3ad Dynamic Link Aggregation.  Most managed and many unmanaged
Packit 1034e0
switches currently available support 802.3ad.
Packit 1034e0
Packit 1034e0
        The active-backup mode should work with any Layer-II switch.
Packit 1034e0
Packit 1034e0
8.  Where does a bonding device get its MAC address from?
Packit 1034e0
Packit 1034e0
	When using slave devices that have fixed MAC addresses, or when
Packit 1034e0
the fail_over_mac option is enabled, the bonding device's MAC address is
Packit 1034e0
the MAC address of the active slave.
Packit 1034e0
Packit 1034e0
	For other configurations, if not explicitly configured (with
Packit 1034e0
ifconfig or ip link), the MAC address of the bonding device is taken from
Packit 1034e0
its first slave device.  This MAC address is then passed to all following
Packit 1034e0
slaves and remains persistent (even if the first slave is removed) until
Packit 1034e0
the bonding device is brought down or reconfigured.
Packit 1034e0
Packit 1034e0
	If you wish to change the MAC address, you can set it with
Packit 1034e0
ifconfig or ip link:
Packit 1034e0
Packit 1034e0
# ifconfig bond0 hw ether 00:11:22:33:44:55
Packit 1034e0
Packit 1034e0
# ip link set bond0 address 66:77:88:99:aa:bb
Packit 1034e0
Packit 1034e0
	The MAC address can be also changed by bringing down/up the
Packit 1034e0
device and then changing its slaves (or their order):
Packit 1034e0
Packit 1034e0
# ifconfig bond0 down ; modprobe -r bonding
Packit 1034e0
# ifconfig bond0 .... up
Packit 1034e0
# ifenslave bond0 eth...
Packit 1034e0
Packit 1034e0
	This method will automatically take the address from the next
Packit 1034e0
slave that is added.
Packit 1034e0
Packit 1034e0
	To restore your slaves' MAC addresses, you need to detach them
Packit 1034e0
from the bond (`ifenslave -d bond0 eth0'). The bonding driver will
Packit 1034e0
then restore the MAC addresses that the slaves had before they were
Packit 1034e0
enslaved.
Packit 1034e0
Packit 1034e0
16. Resources and Links
Packit 1034e0
=======================
Packit 1034e0
Packit 1034e0
	The latest version of the bonding driver can be found in the latest
Packit 1034e0
version of the linux kernel, found on http://kernel.org
Packit 1034e0
Packit 1034e0
	The latest version of this document can be found in the latest kernel
Packit 1034e0
source (named Documentation/networking/bonding.txt).
Packit 1034e0
Packit 1034e0
	Discussions regarding the usage of the bonding driver take place on the
Packit 1034e0
bonding-devel mailing list, hosted at sourceforge.net. If you have questions or
Packit 1034e0
problems, post them to the list.  The list address is:
Packit 1034e0
Packit 1034e0
bonding-devel@lists.sourceforge.net
Packit 1034e0
Packit 1034e0
	The administrative interface (to subscribe or unsubscribe) can
Packit 1034e0
be found at:
Packit 1034e0
Packit 1034e0
https://lists.sourceforge.net/lists/listinfo/bonding-devel
Packit 1034e0
Packit 1034e0
	Discussions regarding the development of the bonding driver take place
Packit 1034e0
on the main Linux network mailing list, hosted at vger.kernel.org. The list
Packit 1034e0
address is:
Packit 1034e0
Packit 1034e0
netdev@vger.kernel.org
Packit 1034e0
Packit 1034e0
	The administrative interface (to subscribe or unsubscribe) can
Packit 1034e0
be found at:
Packit 1034e0
Packit 1034e0
http://vger.kernel.org/vger-lists.html#netdev
Packit 1034e0
Packit 1034e0
Donald Becker's Ethernet Drivers and diag programs may be found at :
Packit 1034e0
 - http://web.archive.org/web/*/http://www.scyld.com/network/ 
Packit 1034e0
Packit 1034e0
You will also find a lot of information regarding Ethernet, NWay, MII,
Packit 1034e0
etc. at www.scyld.com.
Packit 1034e0
Packit 1034e0
-- END --