diff options
Diffstat (limited to 'Documentation/networking/bonding.txt')
-rw-r--r-- | Documentation/networking/bonding.txt | 160 |
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 | ||
6 | Initial release : Thomas Davis <tadavis at lbl.gov> | 6 | Initial release : Thomas Davis <tadavis at lbl.gov> |
7 | Corrections, HA extensions : 2000/10/03-15 : | 7 | Corrections, HA extensions : 2000/10/03-15 : |
@@ -49,7 +49,8 @@ Table of Contents | |||
49 | 3.3 Configuring Bonding Manually with Ifenslave | 49 | 3.3 Configuring Bonding Manually with Ifenslave |
50 | 3.3.1 Configuring Multiple Bonds Manually | 50 | 3.3.1 Configuring Multiple Bonds Manually |
51 | 3.4 Configuring Bonding Manually via Sysfs | 51 | 3.4 Configuring Bonding Manually via Sysfs |
52 | 3.5 Overriding Configuration for Special Cases | 52 | 3.5 Configuration with Interfaces Support |
53 | 3.6 Overriding Configuration for Special Cases | ||
53 | 54 | ||
54 | 4. Querying Bonding Configuration | 55 | 4. Querying Bonding Configuration |
55 | 4.1 Bonding Configuration | 56 | 4.1 Bonding Configuration |
@@ -161,8 +162,8 @@ onwards) do not have /usr/include/linux symbolically linked to the | |||
161 | default kernel source include directory. | 162 | default kernel source include directory. |
162 | 163 | ||
163 | SECOND IMPORTANT NOTE: | 164 | SECOND 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 |
165 | to use ifenslave. | 166 | /etc/network/interfaces file, you do not need to use ifenslave. |
166 | 167 | ||
167 | 2. Bonding Driver Options | 168 | 2. 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 | ||
586 | num_grat_arp | 587 | num_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 | |||
597 | num_unsol_na | 588 | num_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 | ||
607 | primary | 606 | primary |
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 | ||
767 | resend_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 | ||
769 | 3. Configuring Bonding Devices | 785 | 3. 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 |
773 | initialization scripts, or manually using either ifenslave or the | 789 | initialization scripts, or manually using either ifenslave or the |
774 | sysfs interface. Distros generally use one of two packages for the | 790 | sysfs interface. Distros generally use one of three packages for the |
775 | network initialization scripts: initscripts or sysconfig. Recent | 791 | network initialization scripts: initscripts, sysconfig or interfaces. |
776 | versions of these packages have support for bonding, while older | 792 | Recent versions of these packages have support for bonding, while older |
777 | versions do not. | 793 | versions 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 |
780 | distros using versions of initscripts and sysconfig with full or | 796 | distros using versions of initscripts, sysconfig and interfaces with full |
781 | partial support for bonding, then provide information on enabling | 797 | or partial support for bonding, then provide information on enabling |
782 | bonding without support from the network initialization scripts (i.e., | 798 | bonding without support from the network initialization scripts (i.e., |
783 | older versions of initscripts or sysconfig). | 799 | older 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, |
786 | initscripts, or don't know if it's new enough, have no fear. | 802 | initscripts or interfaces, or don't know if it's new enough, have no fear. |
787 | Determining this is fairly straightforward. | 803 | Determining this is fairly straightforward. |
788 | 804 | ||
789 | First, issue the command: | 805 | First, look for a file called interfaces in /etc/network directory. |
806 | If this file is present in your system, then your system use interfaces. See | ||
807 | Configuration 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 | |||
1319 | echo +eth2 > /sys/class/net/bond1/bonding/slaves | 1339 | echo +eth2 > /sys/class/net/bond1/bonding/slaves |
1320 | echo +eth3 > /sys/class/net/bond1/bonding/slaves | 1340 | echo +eth3 > /sys/class/net/bond1/bonding/slaves |
1321 | 1341 | ||
1322 | 3.5 Overriding Configuration for Special Cases | 1342 | 3.5 Configuration with Interfaces Support |
1343 | ----------------------------------------- | ||
1344 | |||
1345 | This section applies to distros which use /etc/network/interfaces file | ||
1346 | to describe network interface configuration, most notably Debian and it's | ||
1347 | derivatives. | ||
1348 | |||
1349 | The ifup and ifdown commands on Debian don't support bonding out of | ||
1350 | the box. The ifenslave-2.6 package should be installed to provide bonding | ||
1351 | support. Once installed, this package will provide bond-* options to be used | ||
1352 | into /etc/network/interfaces. | ||
1353 | |||
1354 | Note that ifenslave-2.6 package will load the bonding module and use | ||
1355 | the ifenslave command when appropriate. | ||
1356 | |||
1357 | Example Configurations | ||
1358 | ---------------------- | ||
1359 | |||
1360 | In /etc/network/interfaces, the following stanza will configure bond0, in | ||
1361 | active-backup mode, with eth0 and eth1 as slaves. | ||
1362 | |||
1363 | auto bond0 | ||
1364 | iface bond0 inet dhcp | ||
1365 | bond-slaves eth0 eth1 | ||
1366 | bond-mode active-backup | ||
1367 | bond-miimon 100 | ||
1368 | bond-primary eth0 eth1 | ||
1369 | |||
1370 | If the above configuration doesn't work, you might have a system using | ||
1371 | upstart for system startup. This is most notably true for recent | ||
1372 | Ubuntu versions. The following stanza in /etc/network/interfaces will | ||
1373 | produce the same result on those systems. | ||
1374 | |||
1375 | auto bond0 | ||
1376 | iface bond0 inet dhcp | ||
1377 | bond-slaves none | ||
1378 | bond-mode active-backup | ||
1379 | bond-miimon 100 | ||
1380 | |||
1381 | auto eth0 | ||
1382 | iface eth0 inet manual | ||
1383 | bond-master bond0 | ||
1384 | bond-primary eth0 eth1 | ||
1385 | |||
1386 | auto eth1 | ||
1387 | iface eth1 inet manual | ||
1388 | bond-master bond0 | ||
1389 | bond-primary eth0 eth1 | ||
1390 | |||
1391 | For a full list of bond-* supported options in /etc/network/interfaces and some | ||
1392 | more advanced examples tailored to you particular distros, see the files in | ||
1393 | /usr/share/doc/ifenslave-2.6. | ||
1394 | |||
1395 | 3.6 Overriding Configuration for Special Cases | ||
1323 | ---------------------------------------------- | 1396 | ---------------------------------------------- |
1397 | |||
1324 | When using the bonding driver, the physical port which transmits a frame is | 1398 | When using the bonding driver, the physical port which transmits a frame is |
1325 | typically selected by the bonding driver, and is not relevant to the user or | 1399 | typically selected by the bonding driver, and is not relevant to the user or |
1326 | system administrator. The output port is simply selected using the policies of | 1400 | system administrator. The output port is simply selected using the policies of |
@@ -2491,18 +2565,15 @@ enslaved. | |||
2491 | 16. Resources and Links | 2565 | 16. Resources and Links |
2492 | ======================= | 2566 | ======================= |
2493 | 2567 | ||
2494 | The 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 |
2495 | version of the linux kernel, found on http://kernel.org | 2569 | version of the linux kernel, found on http://kernel.org |
2496 | 2570 | ||
2497 | The 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 |
2498 | kernel source (named Documentation/networking/bonding.txt), or on the | 2572 | source (named Documentation/networking/bonding.txt). |
2499 | bonding sourceforge site: | ||
2500 | |||
2501 | http://www.sourceforge.net/projects/bonding | ||
2502 | 2573 | ||
2503 | Discussions regarding the bonding driver take place primarily on the | 2574 | Discussions regarding the usage of the bonding driver take place on the |
2504 | bonding-devel mailing list, hosted at sourceforge.net. If you have | 2575 | bonding-devel mailing list, hosted at sourceforge.net. If you have questions or |
2505 | questions or problems, post them to the list. The list address is: | 2576 | problems, post them to the list. The list address is: |
2506 | 2577 | ||
2507 | bonding-devel@lists.sourceforge.net | 2578 | bonding-devel@lists.sourceforge.net |
2508 | 2579 | ||
@@ -2511,6 +2582,17 @@ be found at: | |||
2511 | 2582 | ||
2512 | https://lists.sourceforge.net/lists/listinfo/bonding-devel | 2583 | https://lists.sourceforge.net/lists/listinfo/bonding-devel |
2513 | 2584 | ||
2585 | Discussions regarding the developpement of the bonding driver take place | ||
2586 | on the main Linux network mailing list, hosted at vger.kernel.org. The list | ||
2587 | address is: | ||
2588 | |||
2589 | netdev@vger.kernel.org | ||
2590 | |||
2591 | The administrative interface (to subscribe or unsubscribe) can | ||
2592 | be found at: | ||
2593 | |||
2594 | http://vger.kernel.org/vger-lists.html#netdev | ||
2595 | |||
2514 | Donald Becker's Ethernet Drivers and diag programs may be found at : | 2596 | Donald 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 | ||