Whamcloud - gitweb
FIX: proofed against origional
[doc/manual.git] / SettingUpBonding.xml
index 88bc47d..1b8658b 100644 (file)
@@ -1,59 +1,57 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<chapter version="5.0" xml:lang="en-US" xmlns="http://docbook.org/ns/docbook" xmlns:xl="http://www.w3.org/1999/xlink" xml:id='settingupbonding'>
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- This document was created with Syntext Serna Free. -->
+<chapter xmlns="http://docbook.org/ns/docbook" xmlns:xl="http://www.w3.org/1999/xlink" version="5.0" xml:lang="en-US" xml:id="settingupbonding">
   <info>
-    <title xml:id='settingupbonding.title'>Setting Up Network Interface Bonding</title>
+    <title xml:id="settingupbonding.title">Setting Up Network Interface Bonding</title>
   </info>
-
   <para>This chapter describes how to use multiple network interfaces in parallel to increase bandwidth and/or redundancy. Topics include:</para>
-
   <itemizedlist>
-      <listitem>
-          <para>
-              <xref linkend='dbdoclet.50438258_95824'/>
+    <listitem>
+      <para>
+              <xref linkend="dbdoclet.50438258_95824"/>
           </para>
-      </listitem>
-      <listitem>
-          <para>
-              <xref linkend='dbdoclet.50438258_29107'/>
+    </listitem>
+    <listitem>
+      <para>
+              <xref linkend="dbdoclet.50438258_29107"/>
           </para>
-      </listitem>
-      <listitem>
-          <para>
-              <xref linkend='dbdoclet.50438258_25353'/>
+    </listitem>
+    <listitem>
+      <para>
+              <xref linkend="dbdoclet.50438258_25353"/>
           </para>
-      </listitem>
-      <listitem>
-          <para>
-              <xref linkend='dbdoclet.50438258_26899'/>
+    </listitem>
+    <listitem>
+      <para>
+              <xref linkend="dbdoclet.50438258_26899"/>
           </para>
-      </listitem>
-      <listitem>
-          <para>
-              <xref linkend='dbdoclet.50438258_54769'/>
+    </listitem>
+    <listitem>
+      <para>
+              <xref linkend="dbdoclet.50438258_54769"/>
           </para>
-      </listitem>
-      <listitem>
-          <para>
-              <xref linkend='dbdoclet.50438258_92244'/>
+    </listitem>
+    <listitem>
+      <para>
+              <xref linkend="dbdoclet.50438258_92244"/>
           </para>
-      </listitem>
+    </listitem>
   </itemizedlist>
-
-  <note><para>Using network interface bonding is optional.</para></note>
-
-
-    <section xml:id="dbdoclet.50438258_95824">
-      <title>7.1 Network Interface Bonding Overview</title>
-      <para>Bonding, also known as link aggregation, trunking and port trunking, is a method of aggregating multiple physical network links into a single logical link for increased bandwidth.</para>
-      <para>Several different types of bonding are available in Linux. All these types are referred to as 'modes', and use the bonding kernel module.</para>
-      <para>Modes 0 to 3 allow load balancing and fault tolerance by using multiple interfaces. Mode 4 aggregates a group of interfaces into a single virtual interface where all members of the group share the same speed and duplex settings. This mode is described under IEEE spec 802.3ad, and it is referred to as either 'mode 4' or '802.3ad.'</para>
-    </section>
-    <section xml:id="dbdoclet.50438258_29107">
-      <title>7.2 Requirements</title>
-      <para>The most basic requirement for successful bonding is that both endpoints of the connection must be capable of bonding. In a normal case, the non-server endpoint is a switch. (Two systems connected via crossover cables can also use bonding.) Any switch used must explicitly handle 802.3ad Dynamic Link Aggregation.</para>
-      <para>The kernel must also be configured with bonding. All supported Lustre kernels have bonding functionality. The network driver for the interfaces to be bonded must have the ethtool functionality to determine slave speed and duplex settings. All recent network drivers implement it.</para>
-      <para>To verify that your interface works with ethtool, run:</para>
-      <screen># which ethtool
+  <note>
+    <para>Using network interface bonding is optional.</para>
+  </note>
+  <section xml:id="dbdoclet.50438258_95824">
+    <title>7.1 Network Interface Bonding Overview</title>
+    <para>Bonding, also known as link aggregation, trunking and port trunking, is a method of aggregating multiple physical network links into a single logical link for increased bandwidth.</para>
+    <para>Several different types of bonding are available in Linux. All these types are referred to as &apos;modes&apos;, and use the bonding kernel module.</para>
+    <para>Modes 0 to 3 allow load balancing and fault tolerance by using multiple interfaces. Mode 4 aggregates a group of interfaces into a single virtual interface where all members of the group share the same speed and duplex settings. This mode is described under IEEE spec 802.3ad, and it is referred to as either &apos;mode 4&apos; or &apos;802.3ad.&apos;</para>
+  </section>
+  <section xml:id="dbdoclet.50438258_29107">
+    <title>7.2 Requirements</title>
+    <para>The most basic requirement for successful bonding is that both endpoints of the connection must be capable of bonding. In a normal case, the non-server endpoint is a switch. (Two systems connected via crossover cables can also use bonding.) Any switch used must explicitly handle 802.3ad Dynamic Link Aggregation.</para>
+    <para>The kernel must also be configured with bonding. All supported Lustre kernels have bonding functionality. The network driver for the interfaces to be bonded must have the ethtool functionality to determine slave speed and duplex settings. All recent network drivers implement it.</para>
+    <para>To verify that your interface works with ethtool, run:</para>
+    <screen># which ethtool
 /sbin/ethtool
  
 # ethtool eth0
@@ -101,32 +99,33 @@ Settings for eth1:
    # which ifenslave
    /sbin/ifenslave
 </screen>
-    </section>
-    <section xml:id="dbdoclet.50438258_25353">
-      <title>7.3 Bonding Module Parameters</title>
-      <para>Bonding module parameters control various aspects of bonding.</para>
-      <para>Outgoing traffic is mapped across the slave interfaces according to the transmit hash policy. For Lustre, we recommend that you set the xmit_hash_policy option to the layer3+4 option for bonding. This policy uses upper layer protocol information if available to generate the hash. This allows traffic to a particular network peer to span multiple slaves, although a single connection does not span multiple slaves.</para>
-      <screen>$ xmit_hash_policy=layer3+4
+  </section>
+  <section xml:id="dbdoclet.50438258_25353">
+    <title>7.3 Bonding Module Parameters</title>
+    <para>Bonding module parameters control various aspects of bonding.</para>
+    <para>Outgoing traffic is mapped across the slave interfaces according to the transmit hash policy. For Lustre, we recommend that you set the xmit_hash_policy option to the layer3+4 option for bonding. This policy uses upper layer protocol information if available to generate the hash. This allows traffic to a particular network peer to span multiple slaves, although a single connection does not span multiple slaves.</para>
+    <screen>$ xmit_hash_policy=layer3+4
 </screen>
-      <para>The miimon option enables users to monitor the link status. (The parameter is a time interval in milliseconds.) It makes an interface failure transparent to avoid serious network degradation during link failures. A reasonable default setting is 100 milliseconds; run:</para>
-      <screen>$ miimon=100
+    <para>The miimon option enables users to monitor the link status. (The parameter is a time interval in milliseconds.) It makes an interface failure transparent to avoid serious network degradation during link failures. A reasonable default setting is 100 milliseconds; run:</para>
+    <screen>$ miimon=100
 </screen>
-      <para>For a busy network, increase the timeout.</para>
-    </section>
-    <section xml:id="dbdoclet.50438258_26899">
-      <title>7.4 Setting Up Bonding</title>
-      <para>To set up bonding:</para>
-
-      <orderedlist>
-          <listitem>
-      <para>Create a virtual &apos;bond&apos; interface by creating a configuration file in:</para>
-      <screen>/etc/sysconfig/network-scripts/ # vi /etc/sysconfig/ network-scripts/ifcfg-\
+    <para>For a busy network, increase the timeout.</para>
+  </section>
+  <section xml:id="dbdoclet.50438258_26899">
+    <title>7.4 Setting Up Bonding</title>
+    <para>To set up bonding:</para>
+    <orderedlist>
+      <listitem>
+        <para><emphasis role="bold">Create a virtual &apos;bond&apos; interface by creating a configuration file in:</emphasis></para>
+        <screen>/etc/sysconfig/network-scripts/ # vi /etc/sysconfig/ network-scripts/ifcfg-\
 bond0
 </screen>
-          </listitem>
-          <listitem>
-      <para>Append the following lines to the file.</para>
-      <screen>DEVICE=bond0
+      </listitem>
+      <listitem>
+        <emphasis role="bold">
+          <para>Append the following lines to the file.</para>
+        </emphasis>
+        <screen>DEVICE=bond0
 IPADDR=192.168.10.79 # Use the free IP Address of your network
 NETWORK=192.168.10.0
 NETMASK=255.255.255.0
@@ -134,18 +133,18 @@ USERCTL=no
 BOOTPROTO=none
 ONBOOT=yes
 </screen>
-          </listitem>
-          <listitem>
-      <para> Attach one or more slave interfaces to the bond interface. Modify the eth0 and eth1 configuration files (using a VI text editor).</para>
-      <orderedlist>
+      </listitem>
+      <listitem>
+        <para><emphasis role="bold">Attach one or more slave interfaces to the bond interface. Modify the eth0 and eth1 configuration files (using a VI text editor).</emphasis></para>
+        <orderedlist>
           <listitem>
-      <para>Use the VI text editor to open the eth0 configuration file.</para>
-      <screen># vi /etc/sysconfig/network-scripts/ifcfg-eth0
+            <para><emphasis role="bold">Use the VI text editor to open the eth0 configuration file.</emphasis></para>
+            <screen># vi /etc/sysconfig/network-scripts/ifcfg-eth0
 </screen>
           </listitem>
           <listitem>
-      <para>Modify/append the eth0 file as follows:</para>
-      <screen>DEVICE=eth0
+            <para><emphasis role="bold">Modify/append the eth0 file as follows:</emphasis></para>
+            <screen>DEVICE=eth0
 USERCTL=no
 ONBOOT=yes
 MASTER=bond0
@@ -154,13 +153,13 @@ BOOTPROTO=none
 </screen>
           </listitem>
           <listitem>
-      <para>Use the VI text editor to open the eth1 configuration file.</para>
-      <screen># vi /etc/sysconfig/network-scripts/ifcfg-eth1
+            <para><emphasis role="bold">Use the VI text editor to open the eth1 configuration file.</emphasis></para>
+            <screen># vi /etc/sysconfig/network-scripts/ifcfg-eth1
 </screen>
           </listitem>
           <listitem>
-      <para>Modify/append the eth1 file as follows:</para>
-      <screen>DEVICE=eth1
+            <para><emphasis role="bold">Modify/append the eth1 file as follows:</emphasis></para>
+            <screen>DEVICE=eth1
 USERCTL=no
 ONBOOT=yes
 MASTER=bond0
@@ -168,40 +167,41 @@ SLAVE=yes
 BOOTPROTO=none
 </screen>
           </listitem>
-          </orderedlist>
-          </listitem>
-          <listitem>
-      <para>Set up the bond interface and its options in /etc/modprobe.conf. Start the slave interfaces by your normal network method.</para>
-      <screen># vi /etc/modprobe.conf
+        </orderedlist>
+      </listitem>
+      <listitem>
+        <para><emphasis role="bold">Set up the bond interface and its options in /etc/modprobe.conf. Start the slave interfaces by your normal network method.</emphasis></para>
+        <screen># vi /etc/modprobe.conf
 </screen>
-      <orderedlist>
+        <orderedlist>
           <listitem>
-      <para>Append the following lines to the file.</para>
-      <screen>alias bond0 bonding
+            <para><emphasis role="bold">Append the following lines to the file.</emphasis></para>
+            <screen>alias bond0 bonding
 options bond0 mode=balance-alb miimon=100
 </screen>
           </listitem>
           <listitem>
-      <para>Load the bonding module.</para>
-      <screen># modprobe bonding
+            <para><emphasis role="bold">Load the bonding module.</emphasis></para>
+            <screen># modprobe bonding
 # ifconfig bond0 up
 # ifenslave bond0 eth0 eth1
 </screen>
           </listitem>
-          </orderedlist>
-          </listitem>
-          <listitem>
-      <para>Start/restart the slave interfaces (using your normal network method).</para>
-
-      <note>
-          <para>You must modprobe the bonding module for each bonded interface. If you wish to create bond0 and bond1, two entries in modprobe.conf are required.</para></note>
-
-      <para>The examples below are from RedHat systems. For setup use: /etc/sysconfig/networking-scripts/ifcfg-* The website referenced below includes detailed instructions for other configuration methods, instructions to use DHCP with bonding, and other setup details. We strongly recommend you use this website.</para>
-      <para><link xl:href="http://www.linuxfoundation.org/collaborate/workgroups/networking/bonding">http://www.linuxfoundation.org/collaborate/workgroups/networking/bonding</link></para>
-          </listitem>
-          <listitem>
-      <para>Check /proc/net/bonding to determine status on bonding. There should be a file there for each bond interface.</para>
-      <screen># cat /proc/net/bonding/bond0
+        </orderedlist>
+      </listitem>
+      <listitem>
+        <emphasis role="bold">
+          <para>Start/restart the slave interfaces (using your normal network method).</para>
+        </emphasis>
+        <note>
+          <para>You must modprobe the bonding module for each bonded interface. If you wish to create bond0 and bond1, two entries in modprobe.conf are required.</para>
+        </note>
+        <para>The examples below are from RedHat systems. For setup use: <literal>/etc/sysconfig/networking-scripts/ifcfg-*</literal> The website referenced below includes detailed instructions for other configuration methods, instructions to use DHCP with bonding, and other setup details. We strongly recommend you use this website.</para>
+        <para><link xl:href="http://www.linuxfoundation.org/collaborate/workgroups/networking/bonding">http://www.linuxfoundation.org/collaborate/workgroups/networking/bonding</link></para>
+      </listitem>
+      <listitem>
+        <para><emphasis role="bold">Check /proc/net/bonding to determine status on bonding. There should be a file there for each bond interface.</emphasis></para>
+        <screen># cat /proc/net/bonding/bond0
 Ethernet Channel Bonding Driver: v3.0.3 (March 23, 2006)
  
 Bonding Mode: load balancing (round-robin)
@@ -220,10 +220,10 @@ MII Status: up
 Link Failure Count: 0
 Permanent HW addr: 00:14:2a:7c:40:1d
 </screen>
-          </listitem>
-          <listitem>
-      <para>Use ethtool or ifconfig to check the interface state. ifconfig lists the first bonded interface as 'bond0.'</para>
-      <screen>ifconfig
+      </listitem>
+      <listitem>
+        <para><emphasis role="bold">Use ethtool or ifconfig to check the interface state. ifconfig lists the first bonded interface as &apos;bond0.&apos;</emphasis></para>
+        <screen>ifconfig
 bond0      Link encap:Ethernet  HWaddr 4C:00:10:AC:61:E0
    inet addr:192.168.10.79  Bcast:192.168.10.255 \     Mask:255.255.255.0
    inet6 addr: fe80::4e00:10ff:feac:61e0/64 Scope:Link
@@ -251,14 +251,12 @@ eth1       Link encap:Ethernet  HWaddr 4C:00:10:AC:61:E0
    RX bytes:152299 (148.7 KiB)  TX bytes:64517 (63.0 KiB)
    Interrupt:185 Base address:0x6000
 </screen>
-          </listitem>
-      </orderedlist>
-
-
-      <section remap="h3">
-        <title>7.4.1 Examples</title>
-        <para>This is an example showing modprobe.conf entries for bonding Ethernet interfaces eth1 and eth2 to bond0:</para>
-        <screen># cat /etc/modprobe.conf
+      </listitem>
+    </orderedlist>
+    <section remap="h3">
+      <title>7.4.1 Examples</title>
+      <para>This is an example showing <literal>modprobe.conf</literal> entries for bonding Ethernet interfaces <literal>eth1</literal> and <literal>eth2</literal> to <literal>bond0</literal>:</para>
+      <screen># cat /etc/modprobe.conf
 alias eth0 8139too
 alias scsi_hostadapter sata_via
 alias scsi_hostadapter1 usb-storage
@@ -291,18 +289,20 @@ PEERDNS=yes
 MASTER=bond0
 SLAVE=yes
 </screen>
-        <para>In the following example, the bond0 interface is the master (MASTER) while eth0 and eth1 are slaves (SLAVE).</para>
-        <informaltable frame="none">
-          <tgroup cols="1">
-            <colspec colname="c1" colwidth="100*"/>
-            <tbody>
-              <row>
-                <entry><para><emphasis role="bold">Note -</emphasis>All slaves of bond0 have the same MAC address (Hwaddr) - bond0. All modes, except TLB and ALB, have this MAC address. TLB and ALB require a unique MAC address for each slave.</para></entry>
-              </row>
-            </tbody>
-          </tgroup>
-        </informaltable>
-        <screen>$ /sbin/ifconfig
+      <para>In the following example, the <literal>bond0</literal> interface is the master (MASTER) while <literal>eth0</literal> and <literal>eth1</literal> are slaves (SLAVE).</para>
+      <informaltable frame="none">
+        <tgroup cols="1">
+          <colspec colname="c1" colwidth="100*"/>
+          <tbody>
+            <row>
+              <entry>
+                <para><emphasis role="bold">Note -</emphasis>All slaves of <literal>bond0</literal> have the same MAC address (Hwaddr) - <literal>bond0</literal>. All modes, except TLB and ALB, have this MAC address. TLB and ALB require a unique MAC address for each slave.</para>
+              </entry>
+            </row>
+          </tbody>
+        </tgroup>
+      </informaltable>
+      <screen>$ /sbin/ifconfig
  
 bond0Link encap:EthernetHwaddr 00:C0:F0:1F:37:B4
 inet addr:XXX.XXX.XXX.YYY Bcast:XXX.XXX.XXX.255 Mask:255.255.252.0
@@ -327,32 +327,33 @@ TX packets:1643480 errors:0 dropped:0 overruns:0 carrier:0
 collisions:0 txqueuelen:100
 Interrupt:9 Base address:0x1400
 </screen>
-      </section>
     </section>
-    <section xml:id="dbdoclet.50438258_54769">
-      <title>7.5 Configuring Lustre with Bonding</title>
-      <para>Lustre uses the IP address of the bonded interfaces and requires no special configuration. It treats the bonded interface as a regular TCP/IP interface. If needed, specify bond0 using the Lustre networks parameter in /etc/modprobe.</para>
-      <screen>options lnet networks=tcp(bond0)
+  </section>
+  <section xml:id="dbdoclet.50438258_54769">
+    <title>7.5 Configuring Lustre with Bonding</title>
+    <para>Lustre uses the IP address of the bonded interfaces and requires no special configuration. It treats the bonded interface as a regular TCP/IP interface. If needed, specify bond0 using the Lustre networks parameter in /etc/modprobe.</para>
+    <screen>options lnet networks=tcp(bond0)
 </screen>
-    </section>
-    <section xml:id="dbdoclet.50438258_92244">
-      <title>7.6 Bonding References</title>
-      <para>We recommend the following bonding references:</para>
-      <itemizedlist><listitem>
-          <para> In the Linux kernel source tree, see documentation/networking/bonding.txt</para>
-        </listitem>
-<listitem>
-          <para><link xl:href="http://linux-ip.net/html/ether-bonding.html">http://linux-ip.net/html/ether-bonding.html</link></para>
-        </listitem>
-<listitem>
-          <para><link xl:href="http://www.sourceforge.net/projects/bonding">http://www.sourceforge.net/projects/bonding</link></para>
-        </listitem>
-<listitem>
-          <para> Linux Foundation bonding website: <link xl:href="http://www.linuxfoundation.org/collaborate/workgroups/networking/bonding">http://www.linuxfoundation.org/collaborate/workgroups/networking/bonding</link></para>
-        </listitem>
-</itemizedlist>
-      <para>This is the most extensive reference and we highly recommend it. This website includes explanations of more complicated setups, including the use of DHCP with bonding.</para>
-      <screen> 
+  </section>
+  <section xml:id="dbdoclet.50438258_92244">
+    <title>7.6 Bonding References</title>
+    <para>We recommend the following bonding references:</para>
+    <itemizedlist>
+      <listitem>
+        <para>In the Linux kernel source tree, see documentation/networking/bonding.txt</para>
+      </listitem>
+      <listitem>
+        <para><link xl:href="http://linux-ip.net/html/ether-bonding.html">http://linux-ip.net/html/ether-bonding.html</link></para>
+      </listitem>
+      <listitem>
+        <para><link xl:href="http://www.sourceforge.net/projects/bonding">http://www.sourceforge.net/projects/bonding</link></para>
+      </listitem>
+      <listitem>
+        <para>Linux Foundation bonding website: <link xl:href="http://www.linuxfoundation.org/collaborate/workgroups/networking/bonding">http://www.linuxfoundation.org/collaborate/workgroups/networking/bonding</link></para>
+      </listitem>
+    </itemizedlist>
+    <para>This is the most extensive reference and we highly recommend it. This website includes explanations of more complicated setups, including the use of DHCP with bonding.</para>
+    <screen> 
 </screen>
-    </section>
+  </section>
 </chapter>