diff options
Diffstat (limited to 'Documentation/networking/bonding.txt')
-rw-r--r-- | Documentation/networking/bonding.txt | 83 |
1 files changed, 71 insertions, 12 deletions
diff --git a/Documentation/networking/bonding.txt b/Documentation/networking/bonding.txt index 5dc638791d97..25d2f4141d27 100644 --- a/Documentation/networking/bonding.txt +++ b/Documentation/networking/bonding.txt | |||
@@ -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 | ========================= |
@@ -779,22 +780,26 @@ resend_igmp | |||
779 | 780 | ||
780 | You can configure bonding using either your distro's network | 781 | You can configure bonding using either your distro's network |
781 | initialization scripts, or manually using either ifenslave or the | 782 | initialization scripts, or manually using either ifenslave or the |
782 | sysfs interface. Distros generally use one of two packages for the | 783 | sysfs interface. Distros generally use one of three packages for the |
783 | network initialization scripts: initscripts or sysconfig. Recent | 784 | network initialization scripts: initscripts, sysconfig or interfaces. |
784 | versions of these packages have support for bonding, while older | 785 | Recent versions of these packages have support for bonding, while older |
785 | versions do not. | 786 | versions do not. |
786 | 787 | ||
787 | We will first describe the options for configuring bonding for | 788 | We will first describe the options for configuring bonding for |
788 | distros using versions of initscripts and sysconfig with full or | 789 | distros using versions of initscripts, sysconfig and interfaces with full |
789 | partial support for bonding, then provide information on enabling | 790 | or partial support for bonding, then provide information on enabling |
790 | bonding without support from the network initialization scripts (i.e., | 791 | bonding without support from the network initialization scripts (i.e., |
791 | older versions of initscripts or sysconfig). | 792 | older versions of initscripts or sysconfig). |
792 | 793 | ||
793 | If you're unsure whether your distro uses sysconfig or | 794 | If you're unsure whether your distro uses sysconfig, |
794 | initscripts, or don't know if it's new enough, have no fear. | 795 | initscripts or interfaces, or don't know if it's new enough, have no fear. |
795 | Determining this is fairly straightforward. | 796 | Determining this is fairly straightforward. |
796 | 797 | ||
797 | First, issue the command: | 798 | First, look for a file called interfaces in /etc/network directory. |
799 | If this file is present in your system, then your system use interfaces. See | ||
800 | Configuration with Interfaces Support. | ||
801 | |||
802 | Else, issue the command: | ||
798 | 803 | ||
799 | $ rpm -qf /sbin/ifup | 804 | $ rpm -qf /sbin/ifup |
800 | 805 | ||
@@ -1327,8 +1332,62 @@ echo 2000 > /sys/class/net/bond1/bonding/arp_interval | |||
1327 | echo +eth2 > /sys/class/net/bond1/bonding/slaves | 1332 | echo +eth2 > /sys/class/net/bond1/bonding/slaves |
1328 | echo +eth3 > /sys/class/net/bond1/bonding/slaves | 1333 | echo +eth3 > /sys/class/net/bond1/bonding/slaves |
1329 | 1334 | ||
1330 | 3.5 Overriding Configuration for Special Cases | 1335 | 3.5 Configuration with Interfaces Support |
1336 | ----------------------------------------- | ||
1337 | |||
1338 | This section applies to distros which use /etc/network/interfaces file | ||
1339 | to describe network interface configuration, most notably Debian and it's | ||
1340 | derivatives. | ||
1341 | |||
1342 | The ifup and ifdown commands on Debian don't support bonding out of | ||
1343 | the box. The ifenslave-2.6 package should be installed to provide bonding | ||
1344 | support. Once installed, this package will provide bond-* options to be used | ||
1345 | into /etc/network/interfaces. | ||
1346 | |||
1347 | Note that ifenslave-2.6 package will load the bonding module and use | ||
1348 | the ifenslave command when appropriate. | ||
1349 | |||
1350 | Example Configurations | ||
1351 | ---------------------- | ||
1352 | |||
1353 | In /etc/network/interfaces, the following stanza will configure bond0, in | ||
1354 | active-backup mode, with eth0 and eth1 as slaves. | ||
1355 | |||
1356 | auto bond0 | ||
1357 | iface bond0 inet dhcp | ||
1358 | bond-slaves eth0 eth1 | ||
1359 | bond-mode active-backup | ||
1360 | bond-miimon 100 | ||
1361 | bond-primary eth0 eth1 | ||
1362 | |||
1363 | If the above configuration doesn't work, you might have a system using | ||
1364 | upstart for system startup. This is most notably true for recent | ||
1365 | Ubuntu versions. The following stanza in /etc/network/interfaces will | ||
1366 | produce the same result on those systems. | ||
1367 | |||
1368 | auto bond0 | ||
1369 | iface bond0 inet dhcp | ||
1370 | bond-slaves none | ||
1371 | bond-mode active-backup | ||
1372 | bond-miimon 100 | ||
1373 | |||
1374 | auto eth0 | ||
1375 | iface eth0 inet manual | ||
1376 | bond-master bond0 | ||
1377 | bond-primary eth0 eth1 | ||
1378 | |||
1379 | auto eth1 | ||
1380 | iface eth1 inet manual | ||
1381 | bond-master bond0 | ||
1382 | bond-primary eth0 eth1 | ||
1383 | |||
1384 | For a full list of bond-* supported options in /etc/network/interfaces and some | ||
1385 | more advanced examples tailored to you particular distros, see the files in | ||
1386 | /usr/share/doc/ifenslave-2.6. | ||
1387 | |||
1388 | 3.6 Overriding Configuration for Special Cases | ||
1331 | ---------------------------------------------- | 1389 | ---------------------------------------------- |
1390 | |||
1332 | When using the bonding driver, the physical port which transmits a frame is | 1391 | When using the bonding driver, the physical port which transmits a frame is |
1333 | typically selected by the bonding driver, and is not relevant to the user or | 1392 | typically selected by the bonding driver, and is not relevant to the user or |
1334 | system administrator. The output port is simply selected using the policies of | 1393 | system administrator. The output port is simply selected using the policies of |