aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/networking/bonding.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/networking/bonding.txt')
-rw-r--r--Documentation/networking/bonding.txt160
1 files changed, 121 insertions, 39 deletions
diff --git a/Documentation/networking/bonding.txt b/Documentation/networking/bonding.txt
index d2b62b71b617..675612ff41ae 100644
--- a/Documentation/networking/bonding.txt
+++ b/Documentation/networking/bonding.txt
@@ -1,7 +1,7 @@
1 1
2 Linux Ethernet Bonding Driver HOWTO 2 Linux Ethernet Bonding Driver HOWTO
3 3
4 Latest update: 23 September 2009 4 Latest update: 27 April 2011
5 5
6Initial release : Thomas Davis <tadavis at lbl.gov> 6Initial release : Thomas Davis <tadavis at lbl.gov>
7Corrections, HA extensions : 2000/10/03-15 : 7Corrections, HA extensions : 2000/10/03-15 :
@@ -49,7 +49,8 @@ Table of Contents
493.3 Configuring Bonding Manually with Ifenslave 493.3 Configuring Bonding Manually with Ifenslave
503.3.1 Configuring Multiple Bonds Manually 503.3.1 Configuring Multiple Bonds Manually
513.4 Configuring Bonding Manually via Sysfs 513.4 Configuring Bonding Manually via Sysfs
523.5 Overriding Configuration for Special Cases 523.5 Configuration with Interfaces Support
533.6 Overriding Configuration for Special Cases
53 54
544. Querying Bonding Configuration 554. Querying Bonding Configuration
554.1 Bonding Configuration 564.1 Bonding Configuration
@@ -161,8 +162,8 @@ onwards) do not have /usr/include/linux symbolically linked to the
161default kernel source include directory. 162default kernel source include directory.
162 163
163SECOND IMPORTANT NOTE: 164SECOND IMPORTANT NOTE:
164 If you plan to configure bonding using sysfs, you do not need 165 If you plan to configure bonding using sysfs or using the
165to use ifenslave. 166/etc/network/interfaces file, you do not need to use ifenslave.
166 167
1672. Bonding Driver Options 1682. Bonding Driver Options
168========================= 169=========================
@@ -367,7 +368,7 @@ fail_over_mac
367 gratuitous ARP is lost, communication may be 368 gratuitous ARP is lost, communication may be
368 disrupted. 369 disrupted.
369 370
370 When this policy is used in conjuction with the mii 371 When this policy is used in conjunction with the mii
371 monitor, devices which assert link up prior to being 372 monitor, devices which assert link up prior to being
372 able to actually transmit and receive are particularly 373 able to actually transmit and receive are particularly
373 susceptible to loss of the gratuitous ARP, and an 374 susceptible to loss of the gratuitous ARP, and an
@@ -584,25 +585,23 @@ mode
584 chosen. 585 chosen.
585 586
586num_grat_arp 587num_grat_arp
587
588 Specifies the number of gratuitous ARPs to be issued after a
589 failover event. One gratuitous ARP is issued immediately after
590 the failover, subsequent ARPs are sent at a rate of one per link
591 monitor interval (arp_interval or miimon, whichever is active).
592
593 The valid range is 0 - 255; the default value is 1. This option
594 affects only the active-backup mode. This option was added for
595 bonding version 3.3.0.
596
597num_unsol_na 588num_unsol_na
598 589
599 Specifies the number of unsolicited IPv6 Neighbor Advertisements 590 Specify the number of peer notifications (gratuitous ARPs and
600 to be issued after a failover event. One unsolicited NA is issued 591 unsolicited IPv6 Neighbor Advertisements) to be issued after a
601 immediately after the failover. 592 failover event. As soon as the link is up on the new slave
593 (possibly immediately) a peer notification is sent on the
594 bonding device and each VLAN sub-device. This is repeated at
595 each link monitor interval (arp_interval or miimon, whichever
596 is active) if the number is greater than 1.
602 597
603 The valid range is 0 - 255; the default value is 1. This option 598 The valid range is 0 - 255; the default value is 1. These options
604 affects only the active-backup mode. This option was added for 599 affect only the active-backup mode. These options were added for
605 bonding version 3.4.0. 600 bonding versions 3.3.0 and 3.4.0 respectively.
601
602 From Linux 2.6.40 and bonding version 3.7.1, these notifications
603 are generated by the ipv4 and ipv6 code and the numbers of
604 repetitions cannot be set independently.
606 605
607primary 606primary
608 607
@@ -765,28 +764,49 @@ xmit_hash_policy
765 does not exist, and the layer2 policy is the only policy. The 764 does not exist, and the layer2 policy is the only policy. The
766 layer2+3 value was added for bonding version 3.2.2. 765 layer2+3 value was added for bonding version 3.2.2.
767 766
767resend_igmp
768
769 Specifies the number of IGMP membership reports to be issued after
770 a failover event. One membership report is issued immediately after
771 the failover, subsequent packets are sent in each 200ms interval.
772
773 The valid range is 0 - 255; the default value is 1. A value of 0
774 prevents the IGMP membership report from being issued in response
775 to the failover event.
776
777 This option is useful for bonding modes balance-rr (0), active-backup
778 (1), balance-tlb (5) and balance-alb (6), in which a failover can
779 switch the IGMP traffic from one slave to another. Therefore a fresh
780 IGMP report must be issued to cause the switch to forward the incoming
781 IGMP traffic over the newly selected slave.
782
783 This option was added for bonding version 3.7.0.
768 784
7693. Configuring Bonding Devices 7853. Configuring Bonding Devices
770============================== 786==============================
771 787
772 You can configure bonding using either your distro's network 788 You can configure bonding using either your distro's network
773initialization scripts, or manually using either ifenslave or the 789initialization scripts, or manually using either ifenslave or the
774sysfs interface. Distros generally use one of two packages for the 790sysfs interface. Distros generally use one of three packages for the
775network initialization scripts: initscripts or sysconfig. Recent 791network initialization scripts: initscripts, sysconfig or interfaces.
776versions of these packages have support for bonding, while older 792Recent versions of these packages have support for bonding, while older
777versions do not. 793versions do not.
778 794
779 We will first describe the options for configuring bonding for 795 We will first describe the options for configuring bonding for
780distros using versions of initscripts and sysconfig with full or 796distros using versions of initscripts, sysconfig and interfaces with full
781partial support for bonding, then provide information on enabling 797or partial support for bonding, then provide information on enabling
782bonding without support from the network initialization scripts (i.e., 798bonding without support from the network initialization scripts (i.e.,
783older versions of initscripts or sysconfig). 799older versions of initscripts or sysconfig).
784 800
785 If you're unsure whether your distro uses sysconfig or 801 If you're unsure whether your distro uses sysconfig,
786initscripts, or don't know if it's new enough, have no fear. 802initscripts or interfaces, or don't know if it's new enough, have no fear.
787Determining this is fairly straightforward. 803Determining this is fairly straightforward.
788 804
789 First, issue the command: 805 First, look for a file called interfaces in /etc/network directory.
806If this file is present in your system, then your system use interfaces. See
807Configuration with Interfaces Support.
808
809 Else, issue the command:
790 810
791$ rpm -qf /sbin/ifup 811$ rpm -qf /sbin/ifup
792 812
@@ -1319,8 +1339,62 @@ echo 2000 > /sys/class/net/bond1/bonding/arp_interval
1319echo +eth2 > /sys/class/net/bond1/bonding/slaves 1339echo +eth2 > /sys/class/net/bond1/bonding/slaves
1320echo +eth3 > /sys/class/net/bond1/bonding/slaves 1340echo +eth3 > /sys/class/net/bond1/bonding/slaves
1321 1341
13223.5 Overriding Configuration for Special Cases 13423.5 Configuration with Interfaces Support
1343-----------------------------------------
1344
1345 This section applies to distros which use /etc/network/interfaces file
1346to describe network interface configuration, most notably Debian and it's
1347derivatives.
1348
1349 The ifup and ifdown commands on Debian don't support bonding out of
1350the box. The ifenslave-2.6 package should be installed to provide bonding
1351support. Once installed, this package will provide bond-* options to be used
1352into /etc/network/interfaces.
1353
1354 Note that ifenslave-2.6 package will load the bonding module and use
1355the ifenslave command when appropriate.
1356
1357Example Configurations
1358----------------------
1359
1360In /etc/network/interfaces, the following stanza will configure bond0, in
1361active-backup mode, with eth0 and eth1 as slaves.
1362
1363auto bond0
1364iface bond0 inet dhcp
1365 bond-slaves eth0 eth1
1366 bond-mode active-backup
1367 bond-miimon 100
1368 bond-primary eth0 eth1
1369
1370If the above configuration doesn't work, you might have a system using
1371upstart for system startup. This is most notably true for recent
1372Ubuntu versions. The following stanza in /etc/network/interfaces will
1373produce the same result on those systems.
1374
1375auto bond0
1376iface bond0 inet dhcp
1377 bond-slaves none
1378 bond-mode active-backup
1379 bond-miimon 100
1380
1381auto eth0
1382iface eth0 inet manual
1383 bond-master bond0
1384 bond-primary eth0 eth1
1385
1386auto eth1
1387iface eth1 inet manual
1388 bond-master bond0
1389 bond-primary eth0 eth1
1390
1391For a full list of bond-* supported options in /etc/network/interfaces and some
1392more advanced examples tailored to you particular distros, see the files in
1393/usr/share/doc/ifenslave-2.6.
1394
13953.6 Overriding Configuration for Special Cases
1323---------------------------------------------- 1396----------------------------------------------
1397
1324When using the bonding driver, the physical port which transmits a frame is 1398When using the bonding driver, the physical port which transmits a frame is
1325typically selected by the bonding driver, and is not relevant to the user or 1399typically selected by the bonding driver, and is not relevant to the user or
1326system administrator. The output port is simply selected using the policies of 1400system administrator. The output port is simply selected using the policies of
@@ -2491,18 +2565,15 @@ enslaved.
249116. Resources and Links 256516. Resources and Links
2492======================= 2566=======================
2493 2567
2494The latest version of the bonding driver can be found in the latest 2568 The latest version of the bonding driver can be found in the latest
2495version of the linux kernel, found on http://kernel.org 2569version of the linux kernel, found on http://kernel.org
2496 2570
2497The latest version of this document can be found in either the latest 2571 The latest version of this document can be found in the latest kernel
2498kernel source (named Documentation/networking/bonding.txt), or on the 2572source (named Documentation/networking/bonding.txt).
2499bonding sourceforge site:
2500
2501http://www.sourceforge.net/projects/bonding
2502 2573
2503Discussions regarding the bonding driver take place primarily on the 2574 Discussions regarding the usage of the bonding driver take place on the
2504bonding-devel mailing list, hosted at sourceforge.net. If you have 2575bonding-devel mailing list, hosted at sourceforge.net. If you have questions or
2505questions or problems, post them to the list. The list address is: 2576problems, post them to the list. The list address is:
2506 2577
2507bonding-devel@lists.sourceforge.net 2578bonding-devel@lists.sourceforge.net
2508 2579
@@ -2511,6 +2582,17 @@ be found at:
2511 2582
2512https://lists.sourceforge.net/lists/listinfo/bonding-devel 2583https://lists.sourceforge.net/lists/listinfo/bonding-devel
2513 2584
2585 Discussions regarding the developpement of the bonding driver take place
2586on the main Linux network mailing list, hosted at vger.kernel.org. The list
2587address is:
2588
2589netdev@vger.kernel.org
2590
2591 The administrative interface (to subscribe or unsubscribe) can
2592be found at:
2593
2594http://vger.kernel.org/vger-lists.html#netdev
2595
2514Donald Becker's Ethernet Drivers and diag programs may be found at : 2596Donald Becker's Ethernet Drivers and diag programs may be found at :
2515 - http://web.archive.org/web/*/http://www.scyld.com/network/ 2597 - http://web.archive.org/web/*/http://www.scyld.com/network/
2516 2598