···1122- Linux Ethernet Bonding Driver HOWTO22+ Linux Ethernet Bonding Driver HOWTO33+44+ Latest update: 21 June 20053546Initial release : Thomas Davis <tadavis at lbl.gov>57Corrections, HA extensions : 2000/10/03-15 :···13111412Reorganized and updated Feb 2005 by Jay Vosburgh15131616-Note :1717-------1818-1919-The bonding driver originally came from Donald Becker's beowulf patches for2020-kernel 2.0. It has changed quite a bit since, and the original tools from2121-extreme-linux and beowulf sites will not work with this version of the driver.1414+Introduction1515+============22162323-For new versions of the driver, patches for older kernels and the updated2424-userspace tools, please follow the links at the end of this file.1717+ The Linux bonding driver provides a method for aggregating1818+multiple network interfaces into a single logical "bonded" interface.1919+The behavior of the bonded interfaces depends upon the mode; generally2020+speaking, modes provide either hot standby or load balancing services.2121+Additionally, link integrity monitoring may be performed.2222+2323+ The bonding driver originally came from Donald Becker's2424+beowulf patches for kernel 2.0. It has changed quite a bit since, and2525+the original tools from extreme-linux and beowulf sites will not work2626+with this version of the driver.2727+2828+ For new versions of the driver, updated userspace tools, and2929+who to ask for help, please follow the links at the end of this file.25302631Table of Contents2732=================···393040313. Configuring Bonding Devices41323.1 Configuration with sysconfig support3333+3.1.1 Using DHCP with sysconfig3434+3.1.2 Configuring Multiple Bonds with sysconfig42353.2 Configuration with initscripts support3636+3.2.1 Using DHCP with initscripts3737+3.2.2 Configuring Multiple Bonds with initscripts43383.3 Configuring Bonding Manually4444-3.4 Configuring Multiple Bonds3939+3.3.1 Configuring Multiple Bonds Manually454046415. Querying Bonding Configuration47425.1 Bonding Configuration···6956705711. Promiscuous mode71587272-12. High Availability Information5959+12. Configuring Bonding for High Availability736012.1 High Availability in a Single Switch Topology7474-12.1.1 Bonding Mode Selection for Single Switch Topology7575-12.1.2 Link Monitoring for Single Switch Topology766112.2 High Availability in a Multiple Switch Topology7777-12.2.1 Bonding Mode Selection for Multiple Switch Topology7878-12.2.2 Link Monitoring for Multiple Switch Topology7979-12.3 Switch Behavior Issues for High Availability6262+12.2.1 HA Bonding Mode Selection for Multiple Switch Topology6363+12.2.2 HA Link Monitoring for Multiple Switch Topology80648181-13. Hardware Specific Considerations8282-13.1 IBM BladeCenter6565+13. Configuring Bonding for Maximum Throughput6666+13.1 Maximum Throughput in a Single Switch Topology6767+13.1.1 MT Bonding Mode Selection for Single Switch Topology6868+13.1.2 MT Link Monitoring for Single Switch Topology6969+13.2 Maximum Throughput in a Multiple Switch Topology7070+13.2.1 MT Bonding Mode Selection for Multiple Switch Topology7171+13.2.2 MT Link Monitoring for Multiple Switch Topology83728484-14. Frequently Asked Questions7373+14. Switch Behavior Issues7474+14.1 Link Establishment and Failover Delays7575+14.2 Duplicated Incoming Packets85768686-15. Resources and Links7777+15. Hardware Specific Considerations7878+15.1 IBM BladeCenter7979+8080+16. Frequently Asked Questions8181+8282+17. Resources and Links8783888489851. Bonding Driver Installation···108861.1 Configure and build the kernel with bonding10987-----------------------------------------------11088111111- The latest version of the bonding driver is available in the8989+ The current version of the bonding driver is available in the11290drivers/net/bonding subdirectory of the most recent kernel source113113-(which is available on http://kernel.org).114114-115115- Prior to the 2.4.11 kernel, the bonding driver was maintained116116-largely outside the kernel tree; patches for some earlier kernels are117117-available on the bonding sourceforge site, although those patches are118118-still several years out of date. Most users will want to use either119119-the most recent kernel from kernel.org or whatever kernel came with120120-their distro.9191+(which is available on http://kernel.org). Most users "rolling their9292+own" will want to use the most recent kernel from kernel.org.1219312294 Configure kernel with "make menuconfig" (or "make xconfig" or12395"make config"), then select "Bonding driver support" in the "Network···119103driver as module since it is currently the only way to pass parameters120104to the driver or configure more than one bonding device.121105122122- Build and install the new kernel and modules, then proceed to123123-step 2.106106+ Build and install the new kernel and modules, then continue107107+below to install ifenslave.1241081251091.2 Install ifenslave Control Utility126110-------------------------------------···163147 Options for the bonding driver are supplied as parameters to164148the bonding module at load time. They may be given as command line165149arguments to the insmod or modprobe command, but are usually specified166166-in either the /etc/modprobe.conf configuration file, or in a167167-distro-specific configuration file (some of which are detailed in the168168-next section).150150+in either the /etc/modules.conf or /etc/modprobe.conf configuration151151+file, or in a distro-specific configuration file (some of which are152152+detailed in the next section).169153170154 The available bonding driver parameters are listed below. If a171155parameter is not specified the default value is used. When initially···178162support at least miimon, so there is really no reason not to use it.179163180164 Options with textual values will accept either the text name181181- or, for backwards compatibility, the option value. E.g.,182182- "mode=802.3ad" and "mode=4" set the same mode.165165+or, for backwards compatibility, the option value. E.g.,166166+"mode=802.3ad" and "mode=4" set the same mode.183167184168 The parameters are as follows:185169186170arp_interval187171188188- Specifies the ARP monitoring frequency in milli-seconds. If189189- ARP monitoring is used in a load-balancing mode (mode 0 or 2),190190- the switch should be configured in a mode that evenly191191- distributes packets across all links - such as round-robin. If192192- the switch is configured to distribute the packets in an XOR172172+ Specifies the ARP link monitoring frequency in milliseconds.173173+ If ARP monitoring is used in an etherchannel compatible mode174174+ (modes 0 and 2), the switch should be configured in a mode175175+ that evenly distributes packets across all links. If the176176+ switch is configured to distribute the packets in an XOR193177 fashion, all replies from the ARP targets will be received on194178 the same link which could cause the other team members to195195- fail. ARP monitoring should not be used in conjunction with196196- miimon. A value of 0 disables ARP monitoring. The default179179+ fail. ARP monitoring should not be used in conjunction with180180+ miimon. A value of 0 disables ARP monitoring. The default197181 value is 0.198182199183arp_ip_target200184201201- Specifies the ip addresses to use when arp_interval is > 0.202202- These are the targets of the ARP request sent to determine the203203- health of the link to the targets. Specify these values in204204- ddd.ddd.ddd.ddd format. Multiple ip adresses must be205205- seperated by a comma. At least one IP address must be given206206- for ARP monitoring to function. The maximum number of targets207207- that can be specified is 16. The default value is no IP208208- addresses.185185+ Specifies the IP addresses to use as ARP monitoring peers when186186+ arp_interval is > 0. These are the targets of the ARP request187187+ sent to determine the health of the link to the targets.188188+ Specify these values in ddd.ddd.ddd.ddd format. Multiple IP189189+ addresses must be separated by a comma. At least one IP190190+ address must be given for ARP monitoring to function. The191191+ maximum number of targets that can be specified is 16. The192192+ default value is no IP addresses.209193210194downdelay211195···223207 are:224208225209 slow or 0226226- Request partner to transmit LACPDUs every 30 seconds (default)210210+ Request partner to transmit LACPDUs every 30 seconds227211228212 fast or 1229213 Request partner to transmit LACPDUs every 1 second214214+215215+ The default is slow.230216231217max_bonds232218···239221240222miimon241223242242- Specifies the frequency in milli-seconds that MII link243243- monitoring will occur. A value of zero disables MII link244244- monitoring. A value of 100 is a good starting point. The245245- use_carrier option, below, affects how the link state is224224+ Specifies the MII link monitoring frequency in milliseconds.225225+ This determines how often the link state of each slave is226226+ inspected for link failures. A value of zero disables MII227227+ link monitoring. A value of 100 is a good starting point.228228+ The use_carrier option, below, affects how the link state is246229 determined. See the High Availability section for additional247230 information. The default value is 0.248231···265246 active. A different slave becomes active if, and only266247 if, the active slave fails. The bond's MAC address is267248 externally visible on only one port (network adapter)268268- to avoid confusing the switch. This mode provides269269- fault tolerance. The primary option affects the270270- behavior of this mode.249249+ to avoid confusing the switch.250250+251251+ In bonding version 2.6.2 or later, when a failover252252+ occurs in active-backup mode, bonding will issue one253253+ or more gratuitous ARPs on the newly active slave.254254+ One gratutious ARP is issued for the bonding master255255+ interface and each VLAN interfaces configured above256256+ it, provided that the interface has at least one IP257257+ address configured. Gratuitous ARPs issued for VLAN258258+ interfaces are tagged with the appropriate VLAN id.259259+260260+ This mode provides fault tolerance. The primary261261+ option, documented below, affects the behavior of this262262+ mode.271263272264 balance-xor or 2273265274274- XOR policy: Transmit based on [(source MAC address275275- XOR'd with destination MAC address) modulo slave276276- count]. This selects the same slave for each277277- destination MAC address. This mode provides load278278- balancing and fault tolerance.266266+ XOR policy: Transmit based on the selected transmit267267+ hash policy. The default policy is a simple [(source268268+ MAC address XOR'd with destination MAC address) modulo269269+ slave count]. Alternate transmit policies may be270270+ selected via the xmit_hash_policy option, described271271+ below.272272+273273+ This mode provides load balancing and fault tolerance.279274280275 broadcast or 3281276···303270 duplex settings. Utilizes all slaves in the active304271 aggregator according to the 802.3ad specification.305272306306- Pre-requisites:273273+ Slave selection for outgoing traffic is done according274274+ to the transmit hash policy, which may be changed from275275+ the default simple XOR policy via the xmit_hash_policy276276+ option, documented below. Note that not all transmit277277+ policies may be 802.3ad compliant, particularly in278278+ regards to the packet mis-ordering requirements of279279+ section 43.2.4 of the 802.3ad standard. Differing280280+ peer implementations will have varying tolerances for281281+ noncompliance.282282+283283+ Prerequisites:307284308285 1. Ethtool support in the base drivers for retrieving309286 the speed and duplex of each slave.···376333377334 When a link is reconnected or a new slave joins the378335 bond the receive traffic is redistributed among all379379- active slaves in the bond by intiating ARP Replies336336+ active slaves in the bond by initiating ARP Replies380337 with the selected mac address to each of the381338 clients. The updelay parameter (detailed below) must382339 be set to a value equal or greater than the switch's···439396 0 will use the deprecated MII / ETHTOOL ioctls. The default440397 value is 1.441398399399+xmit_hash_policy400400+401401+ Selects the transmit hash policy to use for slave selection in402402+ balance-xor and 802.3ad modes. Possible values are:403403+404404+ layer2405405+406406+ Uses XOR of hardware MAC addresses to generate the407407+ hash. The formula is408408+409409+ (source MAC XOR destination MAC) modulo slave count410410+411411+ This algorithm will place all traffic to a particular412412+ network peer on the same slave.413413+414414+ This algorithm is 802.3ad compliant.415415+416416+ layer3+4417417+418418+ This policy uses upper layer protocol information,419419+ when available, to generate the hash. This allows for420420+ traffic to a particular network peer to span multiple421421+ slaves, although a single connection will not span422422+ multiple slaves.423423+424424+ The formula for unfragmented TCP and UDP packets is425425+426426+ ((source port XOR dest port) XOR427427+ ((source IP XOR dest IP) AND 0xffff)428428+ modulo slave count429429+430430+ For fragmented TCP or UDP packets and all other IP431431+ protocol traffic, the source and destination port432432+ information is omitted. For non-IP traffic, the433433+ formula is the same as for the layer2 transmit hash434434+ policy.435435+436436+ This policy is intended to mimic the behavior of437437+ certain switches, notably Cisco switches with PFC2 as438438+ well as some Foundry and IBM products.439439+440440+ This algorithm is not fully 802.3ad compliant. A441441+ single TCP or UDP conversation containing both442442+ fragmented and unfragmented packets will see packets443443+ striped across two interfaces. This may result in out444444+ of order delivery. Most traffic types will not meet445445+ this criteria, as TCP rarely fragments traffic, and446446+ most UDP traffic is not involved in extended447447+ conversations. Other implementations of 802.3ad may448448+ or may not tolerate this noncompliance.449449+450450+ The default value is layer2. This option was added in bonding451451+version 2.6.3. In earlier versions of bonding, this parameter does452452+not exist, and the layer2 policy is the only policy.4424534434544444553. Configuring Bonding Devices···545448slave devices. On SLES 9, this is most easily done by running the546449yast2 sysconfig configuration utility. The goal is for to create an547450ifcfg-id file for each slave device. The simplest way to accomplish548548-this is to configure the devices for DHCP. The name of the549549-configuration file for each device will be of the form:451451+this is to configure the devices for DHCP (this is only to get the452452+file ifcfg-id file created; see below for some issues with DHCP). The453453+name of the configuration file for each device will be of the form:550454551455ifcfg-id-xx:xx:xx:xx:xx:xx552456···557459 Once the set of ifcfg-id-xx:xx:xx:xx:xx:xx files has been558460created, it is necessary to edit the configuration files for the slave559461devices (the MAC addresses correspond to those of the slave devices).560560-Before editing, the file will contain muliple lines, and will look462462+Before editing, the file will contain multiple lines, and will look561463something like this:562464563465BOOTPROTO='dhcp'···594496BONDING_MASTER="yes"595497BONDING_MODULE_OPTS="mode=active-backup miimon=100"596498BONDING_SLAVE0="eth0"597597-BONDING_SLAVE1="eth1"499499+BONDING_SLAVE1="bus-pci-0000:06:08.1"598500599501 Replace the sample BROADCAST, IPADDR, NETMASK and NETWORK600502values with the appropriate values for your network.601601-602602- Note that configuring the bonding device with BOOTPROTO='dhcp'603603-does not work; the scripts attempt to obtain the device address from604604-DHCP prior to adding any of the slave devices. Without active slaves,605605-the DHCP requests are not sent to the network.606503607504 The STARTMODE specifies when the device is brought online.608505The possible values are:···624531the max_bonds bonding parameter; this will confuse the configuration625532system if you have multiple bonding devices.626533627627- Finally, supply one BONDING_SLAVEn="ethX" for each slave,628628-where "n" is an increasing value, one for each slave, and "ethX" is629629-the name of the slave device (eth0, eth1, etc).534534+ Finally, supply one BONDING_SLAVEn="slave device" for each535535+slave. where "n" is an increasing value, one for each slave. The536536+"slave device" is either an interface name, e.g., "eth0", or a device537537+specifier for the network device. The interface name is easier to538538+find, but the ethN names are subject to change at boot time if, e.g.,539539+a device early in the sequence has failed. The device specifiers540540+(bus-pci-0000:06:08.1 in the example above) specify the physical541541+network device, and will not change unless the device's bus location542542+changes (for example, it is moved from one PCI slot to another). The543543+example above uses one of each type for demonstration purposes; most544544+configurations will choose one or the other for all slave devices.630545631546 When all configuration files have been modified or created,632547networking must be restarted for the configuration changes to take···645544 Note that the network control script (/sbin/ifdown) will646545remove the bonding module as part of the network shutdown processing,647546so it is not necessary to remove the module by hand if, e.g., the648648-module paramters have changed.547547+module parameters have changed.649548650549 Also, at this writing, YaST/YaST2 will not manage bonding651550devices (they do not show bonding interfaces on its list of network···660559 Note that the template does not document the various BONDING_661560settings described above, but does describe many of the other options.662561562562+3.1.1 Using DHCP with sysconfig563563+-------------------------------564564+565565+ Under sysconfig, configuring a device with BOOTPROTO='dhcp'566566+will cause it to query DHCP for its IP address information. At this567567+writing, this does not function for bonding devices; the scripts568568+attempt to obtain the device address from DHCP prior to adding any of569569+the slave devices. Without active slaves, the DHCP requests are not570570+sent to the network.571571+572572+3.1.2 Configuring Multiple Bonds with sysconfig573573+-----------------------------------------------574574+575575+ The sysconfig network initialization system is capable of576576+handling multiple bonding devices. All that is necessary is for each577577+bonding instance to have an appropriately configured ifcfg-bondX file578578+(as described above). Do not specify the "max_bonds" parameter to any579579+instance of bonding, as this will confuse sysconfig. If you require580580+multiple bonding devices with identical parameters, create multiple581581+ifcfg-bondX files.582582+583583+ Because the sysconfig scripts supply the bonding module584584+options in the ifcfg-bondX file, it is not necessary to add them to585585+the system /etc/modules.conf or /etc/modprobe.conf configuration file.586586+6635873.2 Configuration with initscripts support664588------------------------------------------665589666590 This section applies to distros using a version of initscripts667591with bonding support, for example, Red Hat Linux 9 or Red Hat668668-Enterprise Linux version 3. On these systems, the network592592+Enterprise Linux version 3 or 4. On these systems, the network669593initialization scripts have some knowledge of bonding, and can be670594configured to control bonding devices.671595···740614 Be sure to change the networking specific lines (IPADDR,741615NETMASK, NETWORK and BROADCAST) to match your network configuration.742616743743- Finally, it is necessary to edit /etc/modules.conf to load the744744-bonding module when the bond0 interface is brought up. The following745745-sample lines in /etc/modules.conf will load the bonding module, and746746-select its options:617617+ Finally, it is necessary to edit /etc/modules.conf (or618618+/etc/modprobe.conf, depending upon your distro) to load the bonding619619+module with your desired options when the bond0 interface is brought620620+up. The following lines in /etc/modules.conf (or modprobe.conf) will621621+load the bonding module, and select its options:747622748623alias bond0 bonding749624options bond0 mode=balance-alb miimon=100···756629will restart the networking subsystem and your bond link should be now757630up and running.758631632632+3.2.1 Using DHCP with initscripts633633+---------------------------------634634+635635+ Recent versions of initscripts (the version supplied with636636+Fedora Core 3 and Red Hat Enterprise Linux 4 is reported to work) do637637+have support for assigning IP information to bonding devices via DHCP.638638+639639+ To configure bonding for DHCP, configure it as described640640+above, except replace the line "BOOTPROTO=none" with "BOOTPROTO=dhcp"641641+and add a line consisting of "TYPE=Bonding". Note that the TYPE value642642+is case sensitive.643643+644644+3.2.2 Configuring Multiple Bonds with initscripts645645+-------------------------------------------------646646+647647+ At this writing, the initscripts package does not directly648648+support loading the bonding driver multiple times, so the process for649649+doing so is the same as described in the "Configuring Multiple Bonds650650+Manually" section, below.651651+652652+ NOTE: It has been observed that some Red Hat supplied kernels653653+are apparently unable to rename modules at load time (the "-obonding1"654654+part). Attempts to pass that option to modprobe will produce an655655+"Operation not permitted" error. This has been reported on some656656+Fedora Core kernels, and has been seen on RHEL 4 as well. On kernels657657+exhibiting this problem, it will be impossible to configure multiple658658+bonds with differing parameters.7596597606603.3 Configuring Bonding Manually761661--------------------------------···792638knowledge of bonding. One such distro is SuSE Linux Enterprise Server793639version 8.794640795795- The general methodology for these systems is to place the796796-bonding module parameters into /etc/modprobe.conf, then add modprobe797797-and/or ifenslave commands to the system's global init script. The798798-name of the global init script differs; for sysconfig, it is641641+ The general method for these systems is to place the bonding642642+module parameters into /etc/modules.conf or /etc/modprobe.conf (as643643+appropriate for the installed distro), then add modprobe and/or644644+ifenslave commands to the system's global init script. The name of645645+the global init script differs; for sysconfig, it is799646/etc/init.d/boot.local and for initscripts it is /etc/rc.d/rc.local.800647801648 For example, if you wanted to make a simple bond of two e100···804649reboots, edit the appropriate file (/etc/init.d/boot.local or805650/etc/rc.d/rc.local), and add the following:806651807807-modprobe bonding -obond0 mode=balance-alb miimon=100652652+modprobe bonding mode=balance-alb miimon=100808653modprobe e100809654ifconfig bond0 192.168.1.1 netmask 255.255.255.0 up810655ifenslave bond0 eth0···812657813658 Replace the example bonding module parameters and bond0814659network configuration (IP address, netmask, etc) with the appropriate815815-values for your configuration. The above example loads the bonding816816-module with the name "bond0," this simplifies the naming if multiple817817-bonding modules are loaded (each successive instance of the module is818818-given a different name, and the module instance names match the819819-bonding interface names).660660+values for your configuration.820661821662 Unfortunately, this method will not provide support for the822663ifup and ifdown scripts on the bond devices. To reload the bonding···835684the following:836685837686# ifconfig bond0 down838838-# rmmod bond0687687+# rmmod bonding839688# rmmod e100840689841690 Again, for convenience, it may be desirable to create a script842691with these commands.843692844693845845-3.4 Configuring Multiple Bonds846846-------------------------------694694+3.3.1 Configuring Multiple Bonds Manually695695+-----------------------------------------847696848697 This section contains information on configuring multiple849849-bonding devices with differing options. If you require multiple850850-bonding devices, but all with the same options, see the "max_bonds"851851-module paramter, documented above.698698+bonding devices with differing options for those systems whose network699699+initialization scripts lack support for configuring multiple bonds.700700+701701+ If you require multiple bonding devices, but all with the same702702+options, you may wish to use the "max_bonds" module parameter,703703+documented above.852704853705 To create multiple bonding devices with differing options, it854706is necessary to load the bonding driver multiple times. Note that···878724miimon of 100. The second instance is named "bond1" and creates the879725bond1 device in balance-alb mode with an miimon of 50.880726881881- This may be repeated any number of times, specifying a new and882882-unique name in place of bond0 or bond1 for each instance.727727+ In some circumstances (typically with older distributions),728728+the above does not work, and the second bonding instance never sees729729+its options. In that case, the second options line can be substituted730730+as follows:883731884884- When the appropriate module paramters are in place, then885885-configure bonding according to the instructions for your distro.732732+install bonding1 /sbin/modprobe bonding -obond1 mode=balance-alb miimon=50733733+734734+ This may be repeated any number of times, specifying a new and735735+unique name in place of bond1 for each subsequent instance.736736+8867378877385. Querying Bonding Configuration 888739=================================···1005846self generated packets.10068471007848 For reasons of simplicity, and to support the use of adapters10081008-that can do VLAN hardware acceleration offloding, the bonding10091009-interface declares itself as fully hardware offloaing capable, it gets849849+that can do VLAN hardware acceleration offloading, the bonding850850+interface declares itself as fully hardware offloading capable, it gets1010851the add_vid/kill_vid notifications to gather the necessary1011852information, and it propagates those actions to the slaves. In case1012853of mixed adapter types, hardware accelerated tagged packets that···1039880matches the hardware address of the VLAN interfaces.10408811041882 Note that changing a VLAN interface's HW address would set the10421042-underlying device -- i.e. the bonding interface -- to promiscouos883883+underlying device -- i.e. the bonding interface -- to promiscuous1043884mode, which might not be what you want.10448851045886···1082923an additional target (or several) increases the reliability of the ARP1083924monitoring.108492510851085- Multiple ARP targets must be seperated by commas as follows:926926+ Multiple ARP targets must be separated by commas as follows:10869271087928# example options for ARP monitoring with three targets1088929alias bond0 bonding···12041045 This will, when loading the bonding module, rather than12051046performing the normal action, instead execute the provided command.12061047This command loads the device drivers in the order needed, then calls12071207-modprobe with --ingore-install to cause the normal action to then take10481048+modprobe with --ignore-install to cause the normal action to then take12081049place. Full documentation on this can be found in the modprobe.conf12091050and modprobe manual pages.12101051···12891130common to enable promiscuous mode on the device, so that all traffic12901131is seen (instead of seeing only traffic destined for the local host).12911132The bonding driver handles promiscuous mode changes to the bonding12921292-master device (e.g., bond0), and propogates the setting to the slave11331133+master device (e.g., bond0), and propagates the setting to the slave12931134devices.1294113512951136 For the balance-rr, balance-xor, broadcast, and 802.3ad modes,12961296-the promiscuous mode setting is propogated to all slaves.11371137+the promiscuous mode setting is propagated to all slaves.1297113812981139 For the active-backup, balance-tlb and balance-alb modes, the12991299-promiscuous mode setting is propogated only to the active slave.11401140+promiscuous mode setting is propagated only to the active slave.1300114113011142 For balance-tlb mode, the active slave is the slave currently13021143receiving inbound traffic.···1307114813081149 For the active-backup, balance-tlb and balance-alb modes, when13091150the active slave changes (e.g., due to a link failure), the13101310-promiscuous setting will be propogated to the new active slave.11511151+promiscuous setting will be propagated to the new active slave.1311115213121312-12. High Availability Information13131313-=================================11531153+12. Configuring Bonding for High Availability11541154+=============================================1314115513151156 High Availability refers to configurations that provide13161157maximum network availability by having redundant or backup devices,13171317-links and switches between the host and the rest of the world.13181318-13191319- There are currently two basic methods for configuring to13201320-maximize availability. They are dependent on the network topology and13211321-the primary goal of the configuration, but in general, a configuration13221322-can be optimized for maximum available bandwidth, or for maximum13231323-network availability.11581158+links or switches between the host and the rest of the world. The11591159+goal is to provide the maximum availability of network connectivity11601160+(i.e., the network always works), even though other configurations11611161+could provide higher throughput.132411621325116312.1 High Availability in a Single Switch Topology13261164--------------------------------------------------1327116513281328- If two hosts (or a host and a switch) are directly connected13291329-via multiple physical links, then there is no network availability13301330-penalty for optimizing for maximum bandwidth: there is only one switch13311331-(or peer), so if it fails, you have no alternative access to fail over13321332-to.11661166+ If two hosts (or a host and a single switch) are directly11671167+connected via multiple physical links, then there is no availability11681168+penalty to optimizing for maximum bandwidth. In this case, there is11691169+only one switch (or peer), so if it fails, there is no alternative11701170+access to fail over to. Additionally, the bonding load balance modes11711171+support link monitoring of their members, so if individual links fail,11721172+the load will be rebalanced across the remaining devices.1333117313341334-Example 1 : host to switch (or other host)13351335-13361336- +----------+ +----------+13371337- | |eth0 eth0| switch |13381338- | Host A +--------------------------+ or |13391339- | +--------------------------+ other |13401340- | |eth1 eth1| host |13411341- +----------+ +----------+13421342-13431343-13441344-12.1.1 Bonding Mode Selection for single switch topology13451345---------------------------------------------------------13461346-13471347- This configuration is the easiest to set up and to understand,13481348-although you will have to decide which bonding mode best suits your13491349-needs. The tradeoffs for each mode are detailed below:13501350-13511351-balance-rr: This mode is the only mode that will permit a single13521352- TCP/IP connection to stripe traffic across multiple13531353- interfaces. It is therefore the only mode that will allow a13541354- single TCP/IP stream to utilize more than one interface's13551355- worth of throughput. This comes at a cost, however: the13561356- striping often results in peer systems receiving packets out13571357- of order, causing TCP/IP's congestion control system to kick13581358- in, often by retransmitting segments.13591359-13601360- It is possible to adjust TCP/IP's congestion limits by13611361- altering the net.ipv4.tcp_reordering sysctl parameter. The13621362- usual default value is 3, and the maximum useful value is 127.13631363- For a four interface balance-rr bond, expect that a single13641364- TCP/IP stream will utilize no more than approximately 2.313651365- interface's worth of throughput, even after adjusting13661366- tcp_reordering.13671367-13681368- If you are utilizing protocols other than TCP/IP, UDP for13691369- example, and your application can tolerate out of order13701370- delivery, then this mode can allow for single stream datagram13711371- performance that scales near linearly as interfaces are added13721372- to the bond.13731373-13741374- This mode requires the switch to have the appropriate ports13751375- configured for "etherchannel" or "trunking."13761376-13771377-active-backup: There is not much advantage in this network topology to13781378- the active-backup mode, as the inactive backup devices are all13791379- connected to the same peer as the primary. In this case, a13801380- load balancing mode (with link monitoring) will provide the13811381- same level of network availability, but with increased13821382- available bandwidth. On the plus side, it does not require13831383- any configuration of the switch.13841384-13851385-balance-xor: This mode will limit traffic such that packets destined13861386- for specific peers will always be sent over the same13871387- interface. Since the destination is determined by the MAC13881388- addresses involved, this may be desirable if you have a large13891389- network with many hosts. It is likely to be suboptimal if all13901390- your traffic is passed through a single router, however. As13911391- with balance-rr, the switch ports need to be configured for13921392- "etherchannel" or "trunking."13931393-13941394-broadcast: Like active-backup, there is not much advantage to this13951395- mode in this type of network topology.13961396-13971397-802.3ad: This mode can be a good choice for this type of network13981398- topology. The 802.3ad mode is an IEEE standard, so all peers13991399- that implement 802.3ad should interoperate well. The 802.3ad14001400- protocol includes automatic configuration of the aggregates,14011401- so minimal manual configuration of the switch is needed14021402- (typically only to designate that some set of devices is14031403- usable for 802.3ad). The 802.3ad standard also mandates that14041404- frames be delivered in order (within certain limits), so in14051405- general single connections will not see misordering of14061406- packets. The 802.3ad mode does have some drawbacks: the14071407- standard mandates that all devices in the aggregate operate at14081408- the same speed and duplex. Also, as with all bonding load14091409- balance modes other than balance-rr, no single connection will14101410- be able to utilize more than a single interface's worth of14111411- bandwidth. Additionally, the linux bonding 802.3ad14121412- implementation distributes traffic by peer (using an XOR of14131413- MAC addresses), so in general all traffic to a particular14141414- destination will use the same interface. Finally, the 802.3ad14151415- mode mandates the use of the MII monitor, therefore, the ARP14161416- monitor is not available in this mode.14171417-14181418-balance-tlb: This mode is also a good choice for this type of14191419- topology. It has no special switch configuration14201420- requirements, and balances outgoing traffic by peer, in a14211421- vaguely intelligent manner (not a simple XOR as in balance-xor14221422- or 802.3ad mode), so that unlucky MAC addresses will not all14231423- "bunch up" on a single interface. Interfaces may be of14241424- differing speeds. On the down side, in this mode all incoming14251425- traffic arrives over a single interface, this mode requires14261426- certain ethtool support in the network device driver of the14271427- slave interfaces, and the ARP monitor is not available.14281428-14291429-balance-alb: This mode is everything that balance-tlb is, and more. It14301430- has all of the features (and restrictions) of balance-tlb, and14311431- will also balance incoming traffic from peers (as described in14321432- the Bonding Module Options section, above). The only extra14331433- down side to this mode is that the network device driver must14341434- support changing the hardware address while the device is14351435- open.14361436-14371437-12.1.2 Link Monitoring for Single Switch Topology14381438--------------------------------------------------14391439-14401440- The choice of link monitoring may largely depend upon which14411441-mode you choose to use. The more advanced load balancing modes do not14421442-support the use of the ARP monitor, and are thus restricted to using14431443-the MII monitor (which does not provide as high a level of assurance14441444-as the ARP monitor).14451445-11741174+ See Section 13, "Configuring Bonding for Maximum Throughput"11751175+for information on configuring bonding with one peer device.144611761447117712.2 High Availability in a Multiple Switch Topology14481178----------------------------------------------------1449117914501180 With multiple switches, the configuration of bonding and the14511181network changes dramatically. In multiple switch topologies, there is14521452-a tradeoff between network availability and usable bandwidth.11821182+a trade off between network availability and usable bandwidth.1453118314541184 Below is a sample network, configured to maximize the14551185availability of the network:···13601312the outside world ("port3" on each switch). There is no technical13611313reason that this could not be extended to a third switch.1362131413631363-12.2.1 Bonding Mode Selection for Multiple Switch Topology13641364-----------------------------------------------------------13151315+12.2.1 HA Bonding Mode Selection for Multiple Switch Topology13161316+-------------------------------------------------------------1365131713661366- In a topology such as this, the active-backup and broadcast13671367-modes are the only useful bonding modes; the other modes require all13681368-links to terminate on the same peer for them to behave rationally.13181318+ In a topology such as the example above, the active-backup and13191319+broadcast modes are the only useful bonding modes when optimizing for13201320+availability; the other modes require all links to terminate on the13211321+same peer for them to behave rationally.1369132213701323active-backup: This is generally the preferred mode, particularly if13711324 the switches have an ISL and play together well. If the···13781329broadcast: This mode is really a special purpose mode, and is suitable13791330 only for very specific needs. For example, if the two13801331 switches are not connected (no ISL), and the networks beyond13811381- them are totally independant. In this case, if it is13321332+ them are totally independent. In this case, if it is13821333 necessary for some specific one-way traffic to reach both13831334 independent networks, then the broadcast mode may be suitable.1384133513851385-12.2.2 Link Monitoring Selection for Multiple Switch Topology13861386--------------------------------------------------------------13361336+12.2.2 HA Link Monitoring Selection for Multiple Switch Topology13371337+----------------------------------------------------------------1387133813881339 The choice of link monitoring ultimately depends upon your13891340switch. If the switch can reliably fail ports in response to other···13941345thus detecting that failure without switch support.1395134613961347 In general, however, in a multiple switch topology, the ARP13971397-monitor can provide a higher level of reliability in detecting link13981398-failures. Additionally, it should be configured with multiple targets13991399-(at least one for each switch in the network). This will insure that,13481348+monitor can provide a higher level of reliability in detecting end to13491349+end connectivity failures (which may be caused by the failure of any13501350+individual component to pass traffic for any reason). Additionally,13511351+the ARP monitor should be configured with multiple targets (at least13521352+one for each switch in the network). This will insure that,14001353regardless of which switch is active, the ARP monitor has a suitable14011354target to query.140213551403135614041404-12.3 Switch Behavior Issues for High Availability14051405--------------------------------------------------13571357+13. Configuring Bonding for Maximum Throughput13581358+==============================================1406135914071407- You may encounter issues with the timing of link up and down14081408-reporting by the switch.13601360+13.1 Maximizing Throughput in a Single Switch Topology13611361+------------------------------------------------------13621362+13631363+ In a single switch configuration, the best method to maximize13641364+throughput depends upon the application and network environment. The13651365+various load balancing modes each have strengths and weaknesses in13661366+different environments, as detailed below.13671367+13681368+ For this discussion, we will break down the topologies into13691369+two categories. Depending upon the destination of most traffic, we13701370+categorize them into either "gatewayed" or "local" configurations.13711371+13721372+ In a gatewayed configuration, the "switch" is acting primarily13731373+as a router, and the majority of traffic passes through this router to13741374+other networks. An example would be the following:13751375+13761376+13771377+ +----------+ +----------+13781378+ | |eth0 port1| | to other networks13791379+ | Host A +---------------------+ router +------------------->13801380+ | +---------------------+ | Hosts B and C are out13811381+ | |eth1 port2| | here somewhere13821382+ +----------+ +----------+13831383+13841384+ The router may be a dedicated router device, or another host13851385+acting as a gateway. For our discussion, the important point is that13861386+the majority of traffic from Host A will pass through the router to13871387+some other network before reaching its final destination.13881388+13891389+ In a gatewayed network configuration, although Host A may13901390+communicate with many other systems, all of its traffic will be sent13911391+and received via one other peer on the local network, the router.13921392+13931393+ Note that the case of two systems connected directly via13941394+multiple physical links is, for purposes of configuring bonding, the13951395+same as a gatewayed configuration. In that case, it happens that all13961396+traffic is destined for the "gateway" itself, not some other network13971397+beyond the gateway.13981398+13991399+ In a local configuration, the "switch" is acting primarily as14001400+a switch, and the majority of traffic passes through this switch to14011401+reach other stations on the same network. An example would be the14021402+following:14031403+14041404+ +----------+ +----------+ +--------+14051405+ | |eth0 port1| +-------+ Host B |14061406+ | Host A +------------+ switch |port3 +--------+14071407+ | +------------+ | +--------+14081408+ | |eth1 port2| +------------------+ Host C |14091409+ +----------+ +----------+port4 +--------+14101410+14111411+14121412+ Again, the switch may be a dedicated switch device, or another14131413+host acting as a gateway. For our discussion, the important point is14141414+that the majority of traffic from Host A is destined for other hosts14151415+on the same local network (Hosts B and C in the above example).14161416+14171417+ In summary, in a gatewayed configuration, traffic to and from14181418+the bonded device will be to the same MAC level peer on the network14191419+(the gateway itself, i.e., the router), regardless of its final14201420+destination. In a local configuration, traffic flows directly to and14211421+from the final destinations, thus, each destination (Host B, Host C)14221422+will be addressed directly by their individual MAC addresses.14231423+14241424+ This distinction between a gatewayed and a local network14251425+configuration is important because many of the load balancing modes14261426+available use the MAC addresses of the local network source and14271427+destination to make load balancing decisions. The behavior of each14281428+mode is described below.14291429+14301430+14311431+13.1.1 MT Bonding Mode Selection for Single Switch Topology14321432+-----------------------------------------------------------14331433+14341434+ This configuration is the easiest to set up and to understand,14351435+although you will have to decide which bonding mode best suits your14361436+needs. The trade offs for each mode are detailed below:14371437+14381438+balance-rr: This mode is the only mode that will permit a single14391439+ TCP/IP connection to stripe traffic across multiple14401440+ interfaces. It is therefore the only mode that will allow a14411441+ single TCP/IP stream to utilize more than one interface's14421442+ worth of throughput. This comes at a cost, however: the14431443+ striping often results in peer systems receiving packets out14441444+ of order, causing TCP/IP's congestion control system to kick14451445+ in, often by retransmitting segments.14461446+14471447+ It is possible to adjust TCP/IP's congestion limits by14481448+ altering the net.ipv4.tcp_reordering sysctl parameter. The14491449+ usual default value is 3, and the maximum useful value is 127.14501450+ For a four interface balance-rr bond, expect that a single14511451+ TCP/IP stream will utilize no more than approximately 2.314521452+ interface's worth of throughput, even after adjusting14531453+ tcp_reordering.14541454+14551455+ Note that this out of order delivery occurs when both the14561456+ sending and receiving systems are utilizing a multiple14571457+ interface bond. Consider a configuration in which a14581458+ balance-rr bond feeds into a single higher capacity network14591459+ channel (e.g., multiple 100Mb/sec ethernets feeding a single14601460+ gigabit ethernet via an etherchannel capable switch). In this14611461+ configuration, traffic sent from the multiple 100Mb devices to14621462+ a destination connected to the gigabit device will not see14631463+ packets out of order. However, traffic sent from the gigabit14641464+ device to the multiple 100Mb devices may or may not see14651465+ traffic out of order, depending upon the balance policy of the14661466+ switch. Many switches do not support any modes that stripe14671467+ traffic (instead choosing a port based upon IP or MAC level14681468+ addresses); for those devices, traffic flowing from the14691469+ gigabit device to the many 100Mb devices will only utilize one14701470+ interface.14711471+14721472+ If you are utilizing protocols other than TCP/IP, UDP for14731473+ example, and your application can tolerate out of order14741474+ delivery, then this mode can allow for single stream datagram14751475+ performance that scales near linearly as interfaces are added14761476+ to the bond.14771477+14781478+ This mode requires the switch to have the appropriate ports14791479+ configured for "etherchannel" or "trunking."14801480+14811481+active-backup: There is not much advantage in this network topology to14821482+ the active-backup mode, as the inactive backup devices are all14831483+ connected to the same peer as the primary. In this case, a14841484+ load balancing mode (with link monitoring) will provide the14851485+ same level of network availability, but with increased14861486+ available bandwidth. On the plus side, active-backup mode14871487+ does not require any configuration of the switch, so it may14881488+ have value if the hardware available does not support any of14891489+ the load balance modes.14901490+14911491+balance-xor: This mode will limit traffic such that packets destined14921492+ for specific peers will always be sent over the same14931493+ interface. Since the destination is determined by the MAC14941494+ addresses involved, this mode works best in a "local" network14951495+ configuration (as described above), with destinations all on14961496+ the same local network. This mode is likely to be suboptimal14971497+ if all your traffic is passed through a single router (i.e., a14981498+ "gatewayed" network configuration, as described above).14991499+15001500+ As with balance-rr, the switch ports need to be configured for15011501+ "etherchannel" or "trunking."15021502+15031503+broadcast: Like active-backup, there is not much advantage to this15041504+ mode in this type of network topology.15051505+15061506+802.3ad: This mode can be a good choice for this type of network15071507+ topology. The 802.3ad mode is an IEEE standard, so all peers15081508+ that implement 802.3ad should interoperate well. The 802.3ad15091509+ protocol includes automatic configuration of the aggregates,15101510+ so minimal manual configuration of the switch is needed15111511+ (typically only to designate that some set of devices is15121512+ available for 802.3ad). The 802.3ad standard also mandates15131513+ that frames be delivered in order (within certain limits), so15141514+ in general single connections will not see misordering of15151515+ packets. The 802.3ad mode does have some drawbacks: the15161516+ standard mandates that all devices in the aggregate operate at15171517+ the same speed and duplex. Also, as with all bonding load15181518+ balance modes other than balance-rr, no single connection will15191519+ be able to utilize more than a single interface's worth of15201520+ bandwidth. 15211521+15221522+ Additionally, the linux bonding 802.3ad implementation15231523+ distributes traffic by peer (using an XOR of MAC addresses),15241524+ so in a "gatewayed" configuration, all outgoing traffic will15251525+ generally use the same device. Incoming traffic may also end15261526+ up on a single device, but that is dependent upon the15271527+ balancing policy of the peer's 8023.ad implementation. In a15281528+ "local" configuration, traffic will be distributed across the15291529+ devices in the bond.15301530+15311531+ Finally, the 802.3ad mode mandates the use of the MII monitor,15321532+ therefore, the ARP monitor is not available in this mode.15331533+15341534+balance-tlb: The balance-tlb mode balances outgoing traffic by peer.15351535+ Since the balancing is done according to MAC address, in a15361536+ "gatewayed" configuration (as described above), this mode will15371537+ send all traffic across a single device. However, in a15381538+ "local" network configuration, this mode balances multiple15391539+ local network peers across devices in a vaguely intelligent15401540+ manner (not a simple XOR as in balance-xor or 802.3ad mode),15411541+ so that mathematically unlucky MAC addresses (i.e., ones that15421542+ XOR to the same value) will not all "bunch up" on a single15431543+ interface.15441544+15451545+ Unlike 802.3ad, interfaces may be of differing speeds, and no15461546+ special switch configuration is required. On the down side,15471547+ in this mode all incoming traffic arrives over a single15481548+ interface, this mode requires certain ethtool support in the15491549+ network device driver of the slave interfaces, and the ARP15501550+ monitor is not available.15511551+15521552+balance-alb: This mode is everything that balance-tlb is, and more.15531553+ It has all of the features (and restrictions) of balance-tlb,15541554+ and will also balance incoming traffic from local network15551555+ peers (as described in the Bonding Module Options section,15561556+ above).15571557+15581558+ The only additional down side to this mode is that the network15591559+ device driver must support changing the hardware address while15601560+ the device is open.15611561+15621562+13.1.2 MT Link Monitoring for Single Switch Topology15631563+----------------------------------------------------15641564+15651565+ The choice of link monitoring may largely depend upon which15661566+mode you choose to use. The more advanced load balancing modes do not15671567+support the use of the ARP monitor, and are thus restricted to using15681568+the MII monitor (which does not provide as high a level of end to end15691569+assurance as the ARP monitor).15701570+15711571+13.2 Maximum Throughput in a Multiple Switch Topology15721572+-----------------------------------------------------15731573+15741574+ Multiple switches may be utilized to optimize for throughput15751575+when they are configured in parallel as part of an isolated network15761576+between two or more systems, for example:15771577+15781578+ +-----------+15791579+ | Host A | 15801580+ +-+---+---+-+15811581+ | | |15821582+ +--------+ | +---------+15831583+ | | |15841584+ +------+---+ +-----+----+ +-----+----+15851585+ | Switch A | | Switch B | | Switch C |15861586+ +------+---+ +-----+----+ +-----+----+15871587+ | | |15881588+ +--------+ | +---------+15891589+ | | |15901590+ +-+---+---+-+15911591+ | Host B | 15921592+ +-----------+15931593+15941594+ In this configuration, the switches are isolated from one15951595+another. One reason to employ a topology such as this is for an15961596+isolated network with many hosts (a cluster configured for high15971597+performance, for example), using multiple smaller switches can be more15981598+cost effective than a single larger switch, e.g., on a network with 2415991599+hosts, three 24 port switches can be significantly less expensive than16001600+a single 72 port switch.16011601+16021602+ If access beyond the network is required, an individual host16031603+can be equipped with an additional network device connected to an16041604+external network; this host then additionally acts as a gateway.16051605+16061606+13.2.1 MT Bonding Mode Selection for Multiple Switch Topology16071607+-------------------------------------------------------------16081608+16091609+ In actual practice, the bonding mode typically employed in16101610+configurations of this type is balance-rr. Historically, in this16111611+network configuration, the usual caveats about out of order packet16121612+delivery are mitigated by the use of network adapters that do not do16131613+any kind of packet coalescing (via the use of NAPI, or because the16141614+device itself does not generate interrupts until some number of16151615+packets has arrived). When employed in this fashion, the balance-rr16161616+mode allows individual connections between two hosts to effectively16171617+utilize greater than one interface's bandwidth.16181618+16191619+13.2.2 MT Link Monitoring for Multiple Switch Topology16201620+------------------------------------------------------16211621+16221622+ Again, in actual practice, the MII monitor is most often used16231623+in this configuration, as performance is given preference over16241624+availability. The ARP monitor will function in this topology, but its16251625+advantages over the MII monitor are mitigated by the volume of probes16261626+needed as the number of systems involved grows (remember that each16271627+host in the network is configured with bonding).16281628+16291629+14. Switch Behavior Issues16301630+==========================16311631+16321632+14.1 Link Establishment and Failover Delays16331633+-------------------------------------------16341634+16351635+ Some switches exhibit undesirable behavior with regard to the16361636+timing of link up and down reporting by the switch.1409163714101638 First, when a link comes up, some switches may indicate that14111639the link is up (carrier available), but not pass traffic over the···16961370 Second, some switches may "bounce" the link state one or more16971371times while a link is changing state. This occurs most commonly while16981372the switch is initializing. Again, an appropriate updelay value may16991699-help, but note that if all links are down, then updelay is ignored17001700-when any link becomes active (the slave closest to completing its17011701-updelay is chosen).13731373+help.1702137417031375 Note that when a bonding interface has no active links, the17041704-driver will immediately reuse the first link that goes up, even if17051705-updelay parameter was specified. If there are slave interfaces17061706-waiting for the updelay timeout to expire, the interface that first17071707-went into that state will be immediately reused. This reduces down17081708-time of the network if the value of updelay has been overestimated.13761376+driver will immediately reuse the first link that goes up, even if the13771377+updelay parameter has been specified (the updelay is ignored in this13781378+case). If there are slave interfaces waiting for the updelay timeout13791379+to expire, the interface that first went into that state will be13801380+immediately reused. This reduces down time of the network if the13811381+value of updelay has been overestimated, and since this occurs only in13821382+cases with no connectivity, there is no additional penalty for13831383+ignoring the updelay.1709138417101385 In addition to the concerns about switch timings, if your17111386switches take a long time to go into backup mode, it may be desirable17121387to not activate a backup interface immediately after a link goes down.17131388Failover may be delayed via the downdelay bonding module option.1714138917151715-13. Hardware Specific Considerations13901390+14.2 Duplicated Incoming Packets13911391+--------------------------------13921392+13931393+ It is not uncommon to observe a short burst of duplicated13941394+traffic when the bonding device is first used, or after it has been13951395+idle for some period of time. This is most easily observed by issuing13961396+a "ping" to some other host on the network, and noticing that the13971397+output from ping flags duplicates (typically one per slave).13981398+13991399+ For example, on a bond in active-backup mode with five slaves14001400+all connected to one switch, the output may appear as follows:14011401+14021402+# ping -n 10.0.4.214031403+PING 10.0.4.2 (10.0.4.2) from 10.0.3.10 : 56(84) bytes of data.14041404+64 bytes from 10.0.4.2: icmp_seq=1 ttl=64 time=13.7 ms14051405+64 bytes from 10.0.4.2: icmp_seq=1 ttl=64 time=13.8 ms (DUP!)14061406+64 bytes from 10.0.4.2: icmp_seq=1 ttl=64 time=13.8 ms (DUP!)14071407+64 bytes from 10.0.4.2: icmp_seq=1 ttl=64 time=13.8 ms (DUP!)14081408+64 bytes from 10.0.4.2: icmp_seq=1 ttl=64 time=13.8 ms (DUP!)14091409+64 bytes from 10.0.4.2: icmp_seq=2 ttl=64 time=0.216 ms14101410+64 bytes from 10.0.4.2: icmp_seq=3 ttl=64 time=0.267 ms14111411+64 bytes from 10.0.4.2: icmp_seq=4 ttl=64 time=0.222 ms14121412+14131413+ This is not due to an error in the bonding driver, rather, it14141414+is a side effect of how many switches update their MAC forwarding14151415+tables. Initially, the switch does not associate the MAC address in14161416+the packet with a particular switch port, and so it may send the14171417+traffic to all ports until its MAC forwarding table is updated. Since14181418+the interfaces attached to the bond may occupy multiple ports on a14191419+single switch, when the switch (temporarily) floods the traffic to all14201420+ports, the bond device receives multiple copies of the same packet14211421+(one per slave device).14221422+14231423+ The duplicated packet behavior is switch dependent, some14241424+switches exhibit this, and some do not. On switches that display this14251425+behavior, it can be induced by clearing the MAC forwarding table (on14261426+most Cisco switches, the privileged command "clear mac address-table14271427+dynamic" will accomplish this).14281428+14291429+15. Hardware Specific Considerations17161430====================================1717143117181432 This section contains additional information for configuring17191433bonding on specific hardware platforms, or for interfacing bonding17201434with particular switches or other devices.1721143517221722-13.1 IBM BladeCenter14361436+15.1 IBM BladeCenter17231437--------------------1724143817251439 This applies to the JS20 and similar systems.···17731407--------------------------------1774140817751409 All JS20s come with two Broadcom Gigabit Ethernet ports17761776-integrated on the planar. In the BladeCenter chassis, the eth0 port17771777-of all JS20 blades is hard wired to I/O Module #1; similarly, all eth117781778-ports are wired to I/O Module #2. An add-on Broadcom daughter card17791779-can be installed on a JS20 to provide two more Gigabit Ethernet ports.17801780-These ports, eth2 and eth3, are wired to I/O Modules 3 and 4,17811781-respectively.14101410+integrated on the planar (that's "motherboard" in IBM-speak). In the14111411+BladeCenter chassis, the eth0 port of all JS20 blades is hard wired to14121412+I/O Module #1; similarly, all eth1 ports are wired to I/O Module #2.14131413+An add-on Broadcom daughter card can be installed on a JS20 to provide14141414+two more Gigabit Ethernet ports. These ports, eth2 and eth3, are14151415+wired to I/O Modules 3 and 4, respectively.1782141617831417 Each I/O Module may contain either a switch or a passthrough17841418module (which allows ports to be directly connected to an external···17981432of ways, this discussion will be confined to describing basic17991433configurations.1800143418011801- Normally, Ethernet Switch Modules (ESM) are used in I/O14351435+ Normally, Ethernet Switch Modules (ESMs) are used in I/O18021436modules 1 and 2. In this configuration, the eth0 and eth1 ports of a18031437JS20 will be connected to different internal switches (in the18041438respective I/O modules).1805143918061806- An optical passthru module (OPM) connects the I/O module18071807-directly to an external switch. By using OPMs in I/O module #1 and18081808-#2, the eth0 and eth1 interfaces of a JS20 can be redirected to the18091809-outside world and connected to a common external switch.14401440+ A passthrough module (OPM or CPM, optical or copper,14411441+passthrough module) connects the I/O module directly to an external14421442+switch. By using PMs in I/O module #1 and #2, the eth0 and eth114431443+interfaces of a JS20 can be redirected to the outside world and14441444+connected to a common external switch.1810144518111811- Depending upon the mix of ESM and OPM modules, the network18121812-will appear to bonding as either a single switch topology (all OPM18131813-modules) or as a multiple switch topology (one or more ESM modules,18141814-zero or more OPM modules). It is also possible to connect ESM modules18151815-together, resulting in a configuration much like the example in "High18161816-Availability in a multiple switch topology."14461446+ Depending upon the mix of ESMs and PMs, the network will14471447+appear to bonding as either a single switch topology (all PMs) or as a14481448+multiple switch topology (one or more ESMs, zero or more PMs). It is14491449+also possible to connect ESMs together, resulting in a configuration14501450+much like the example in "High Availability in a Multiple Switch14511451+Topology," above.1817145218181818-Requirements for specifc modes18191819-------------------------------14531453+Requirements for specific modes14541454+-------------------------------1820145518211821- The balance-rr mode requires the use of OPM modules for18221822-devices in the bond, all connected to an common external switch. That18231823-switch must be configured for "etherchannel" or "trunking" on the14561456+ The balance-rr mode requires the use of passthrough modules14571457+for devices in the bond, all connected to an common external switch.14581458+That switch must be configured for "etherchannel" or "trunking" on the18241459appropriate ports, as is usual for balance-rr.1825146018261461 The balance-alb and balance-tlb modes will function with···18511484Other concerns18521485--------------1853148618541854- The Serial Over LAN link is established over the primary14871487+ The Serial Over LAN (SoL) link is established over the primary18551488ethernet (eth0) only, therefore, any loss of link to eth0 will result18561489in losing your SoL connection. It will not fail over with other18571857-network traffic.14901490+network traffic, as the SoL system is beyond the control of the14911491+bonding driver.1858149218591493 It may be desirable to disable spanning tree on the switch18601494(either the internal Ethernet Switch Module, or an external switch) to18611861-avoid fail-over delays issues when using bonding.14951495+avoid fail-over delay issues when using bonding.186214961863149718641864-14. Frequently Asked Questions14981498+16. Frequently Asked Questions18651499==============================18661500186715011. Is it SMP safe?···187315052. What type of cards will work with it?1874150618751507 Any Ethernet type cards (you can even mix cards - a Intel18761876-EtherExpress PRO/100 and a 3com 3c905b, for example). They need not18771877-be of the same speed.15081508+EtherExpress PRO/100 and a 3com 3c905b, for example). For most modes,15091509+devices need not be of the same speed.18781510187915113. How many bonding devices can I have?18801512···18921524disabled. The active-backup mode will fail over to a backup link, and18931525other modes will ignore the failed link. The link will continue to be18941526monitored, and should it recover, it will rejoin the bond (in whatever18951895-manner is appropriate for the mode). See the section on High18961896-Availability for additional information.15271527+manner is appropriate for the mode). See the sections on High15281528+Availability and the documentation for each mode for additional15291529+information.1897153018981531 Link monitoring can be enabled via either the miimon or18991899-arp_interval paramters (described in the module paramters section,15321532+arp_interval parameters (described in the module parameters section,19001533above). In general, miimon monitors the carrier state as sensed by19011534the underlying network device, and the arp monitor (arp_interval)19021535monitors connectivity to another host on the local network.···19051536 If no link monitoring is configured, the bonding driver will19061537be unable to detect link failures, and will assume that all links are19071538always available. This will likely result in lost packets, and a19081908-resulting degredation of performance. The precise performance loss15391539+resulting degradation of performance. The precise performance loss19091540depends upon the bonding mode and network configuration.19101541191115426. Can bonding be used for High Availability?···19191550 In the basic balance modes (balance-rr and balance-xor), it19201551works with any system that supports etherchannel (also called19211552trunking). Most managed switches currently available have such19221922-support, and many unmananged switches as well.15531553+support, and many unmanaged switches as well.1923155419241555 The advanced balance modes (balance-tlb and balance-alb) do19251556not have special switch requirements, but do need device drivers that19261557support specific features (described in the appropriate section under19271927-module paramters, above).15581558+module parameters, above).1928155919291560 In 802.3ad mode, it works with with systems that support IEEE19301561802.3ad Dynamic Link Aggregation. Most managed and many unmanaged···19341565193515668. Where does a bonding device get its MAC address from?1936156719371937- If not explicitly configured with ifconfig, the MAC address of19381938-the bonding device is taken from its first slave device. This MAC19391939-address is then passed to all following slaves and remains persistent19401940-(even if the the first slave is removed) until the bonding device is19411941-brought down or reconfigured.15681568+ If not explicitly configured (with ifconfig or ip link), the15691569+MAC address of the bonding device is taken from its first slave15701570+device. This MAC address is then passed to all following slaves and15711571+remains persistent (even if the the first slave is removed) until the15721572+bonding device is brought down or reconfigured.1942157319431574 If you wish to change the MAC address, you can set it with19441944-ifconfig:15751575+ifconfig or ip link:1945157619461577# ifconfig bond0 hw ether 00:11:22:33:44:5515781578+15791579+# ip link set bond0 address 66:77:88:99:aa:bb1947158019481581 The MAC address can be also changed by bringing down/up the19491582device and then changing its slaves (or their order):···19621591then restore the MAC addresses that the slaves had before they were19631592enslaved.1964159319651965-15. Resources and Links15941594+16. Resources and Links19661595=======================1967159619681597The latest version of the bonding driver can be found in the latest19691598version of the linux kernel, found on http://kernel.org1970159916001600+The latest version of this document can be found in either the latest16011601+kernel source (named Documentation/networking/bonding.txt), or on the16021602+bonding sourceforge site:16031603+16041604+http://www.sourceforge.net/projects/bonding16051605+19711606Discussions regarding the bonding driver take place primarily on the19721607bonding-devel mailing list, hosted at sourceforge.net. If you have19731973-questions or problems, post them to the list.16081608+questions or problems, post them to the list. The list address is:1974160919751610bonding-devel@lists.sourceforge.net1976161116121612+ The administrative interface (to subscribe or unsubscribe) can16131613+be found at:16141614+19771615https://lists.sourceforge.net/lists/listinfo/bonding-devel19781978-19791979-There is also a project site on sourceforge.19801980-19811981-http://www.sourceforge.net/projects/bonding1982161619831617Donald Becker's Ethernet Drivers and diag programs may be found at :19841618 - http://www.scyld.com/network/
+1-1
drivers/net/hamradio/Kconfig
···17171818config 6PACK1919 tristate "Serial port 6PACK driver"2020- depends on AX25 && BROKEN_ON_SMP2020+ depends on AX252121 ---help---2222 6pack is a transmission protocol for the data exchange between your2323 PC and your TNC (the Terminal Node Controller acts as a kind of
+1-1
drivers/net/sk98lin/skgeinit.c
···20162016 * we set the PHY to coma mode and switch to D3 power state.20172017 */20182018 if (pAC->GIni.GIYukonLite &&20192019- pAC->GIni.GIChipRev == CHIP_REV_YU_LITE_A3) {20192019+ pAC->GIni.GIChipRev >= CHIP_REV_YU_LITE_A3) {2020202020212021 /* for all ports switch PHY to coma mode */20222022 for (i = 0; i < pAC->GIni.GIMacsFound; i++) {
+4-4
drivers/net/sk98lin/skxmac2.c
···1065106510661066 /* WA code for COMA mode */10671067 if (pAC->GIni.GIYukonLite &&10681068- pAC->GIni.GIChipRev == CHIP_REV_YU_LITE_A3) {10681068+ pAC->GIni.GIChipRev >= CHIP_REV_YU_LITE_A3) {1069106910701070 SK_IN32(IoC, B2_GP_IO, &DWord);10711071···1110111011111111 /* WA code for COMA mode */11121112 if (pAC->GIni.GIYukonLite &&11131113- pAC->GIni.GIChipRev == CHIP_REV_YU_LITE_A3) {11131113+ pAC->GIni.GIChipRev >= CHIP_REV_YU_LITE_A3) {1114111411151115 SK_IN32(IoC, B2_GP_IO, &DWord);11161116···21262126 int Ret = 0;2127212721282128 if (pAC->GIni.GIYukonLite &&21292129- pAC->GIni.GIChipRev == CHIP_REV_YU_LITE_A3) {21292129+ pAC->GIni.GIChipRev >= CHIP_REV_YU_LITE_A3) {2130213021312131 /* save current power mode */21322132 LastMode = pAC->GIni.GP[Port].PPhyPowerState;···22532253 int Ret = 0;2254225422552255 if (pAC->GIni.GIYukonLite &&22562256- pAC->GIni.GIChipRev == CHIP_REV_YU_LITE_A3) {22562256+ pAC->GIni.GIChipRev >= CHIP_REV_YU_LITE_A3) {2257225722582258 /* save current power mode */22592259 LastMode = pAC->GIni.GP[Port].PPhyPowerState;