@@ -49,7 +49,8 @@ Table of Contents
49493.3 Configuring Bonding Manually with Ifenslave
50503.3.1 Configuring Multiple Bonds Manually
51513.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
5354
54554. Querying Bonding Configuration
55564.1 Bonding Configuration
@@ -161,8 +162,8 @@ onwards) do not have /usr/include/linux symbolically linked to the
161162default kernel source include directory.
162163
163164SECOND IMPORTANT NOTE:
164- If you plan to configure bonding using sysfs, you do not need
165- to use ifenslave.
165+ If you plan to configure bonding using sysfs or using the
166+ /etc/network/interfaces file, you do not need to use ifenslave.
166167
1671682. Bonding Driver Options
168169=========================
@@ -779,22 +780,26 @@ resend_igmp
779780
780781 You can configure bonding using either your distro's network
781782initialization scripts, or manually using either ifenslave or the
782- sysfs interface. Distros generally use one of two packages for the
783- network initialization scripts: initscripts or sysconfig. Recent
784- versions of these packages have support for bonding, while older
783+ sysfs interface. Distros generally use one of three packages for the
784+ network initialization scripts: initscripts, sysconfig or interfaces.
785+ Recent versions of these packages have support for bonding, while older
785786versions do not.
786787
787788 We will first describe the options for configuring bonding for
788- distros using versions of initscripts and sysconfig with full or
789- partial support for bonding, then provide information on enabling
789+ distros using versions of initscripts, sysconfig and interfaces with full
790+ or partial support for bonding, then provide information on enabling
790791bonding without support from the network initialization scripts (i.e.,
791792older versions of initscripts or sysconfig).
792793
793- If you're unsure whether your distro uses sysconfig or
794- initscripts, or don't know if it's new enough, have no fear.
794+ If you're unsure whether your distro uses sysconfig,
795+ initscripts or interfaces , or don't know if it's new enough, have no fear.
795796Determining this is fairly straightforward.
796797
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:
798803
799804$ rpm -qf /sbin/ifup
800805
@@ -1327,8 +1332,62 @@ echo 2000 > /sys/class/net/bond1/bonding/arp_interval
13271332echo +eth2 > /sys/class/net/bond1/bonding/slaves
13281333echo +eth3 > /sys/class/net/bond1/bonding/slaves
13291334
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
13311389----------------------------------------------
1390+
13321391When using the bonding driver, the physical port which transmits a frame is
13331392typically selected by the bonding driver, and is not relevant to the user or
13341393system administrator. The output port is simply selected using the policies of
0 commit comments