Whamcloud - gitweb
LUDOC-403 acl: Update link for POSIX ACL paper
[doc/manual.git] / SettingUpBonding.xml
index 88bc47d..1cab082 100644 (file)
@@ -1,65 +1,60 @@
-<?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'>
-  <info>
-    <title xml:id='settingupbonding.title'>Setting Up Network Interface Bonding</title>
-  </info>
-
+<?xml version='1.0' encoding='UTF-8'?><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">
+  <title xml:id="settingupbonding.title">Setting Up Network Interface Bonding</title>
   <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>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 the Linux distribution. 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>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
 Settings for eth0:
            Supported ports: [ TP MII ]
-           Supported link modes:   10baseT/Half 10baseT/Full
+           Supported link modes:   10baseT/Half 10baseT/Full
                                    100baseT/Half 100baseT/Full
            Supports auto-negotiation: Yes
            Advertised link modes:  10baseT/Half 10baseT/Full
@@ -101,66 +96,64 @@ 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
-</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
-</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-\
-bond0
-</screen>
-          </listitem>
-          <listitem>
-      <para>Append the following lines to the file.</para>
-      <screen>DEVICE=bond0
+  </section>
+  <section xml:id="dbdoclet.50438258_25353">
+    <title>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. We recommend that you set the <literal>xmit_hash_policy</literal> 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 <literal>miimon</literal> 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>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:</para>
+        <screen># vi /etc/sysconfig/network-scripts/ifcfg-bond0</screen>
+      </listitem>
+      <listitem>
+        <para>Append the following lines to the file.</para>
+        <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
 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>
+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>
-      <para>Use the VI text editor to open the eth0 configuration file.</para>
-      <screen># vi /etc/sysconfig/network-scripts/ifcfg-eth0
-</screen>
+            <para>Use the VI text editor to open the eth0 configuration file.</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>Modify/append the eth0 file as follows:</para>
+            <screen>DEVICE=eth0
 USERCTL=no
 ONBOOT=yes
 MASTER=bond0
 SLAVE=yes
-BOOTPROTO=none
-</screen>
+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
-</screen>
+            <para>Use the VI text editor to open the eth1 configuration file.</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>Modify/append the eth1 file as follows:</para>
+            <screen>DEVICE=eth1
 USERCTL=no
 ONBOOT=yes
 MASTER=bond0
@@ -168,40 +161,43 @@ 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>Set up the bond interface and its options in <literal>/etc/modprobe.d/bond.conf</literal>. Start the slave interfaces by your normal network method.</para>
+        <screen># vi /etc/modprobe.d/bond.conf
 </screen>
-      <orderedlist>
+        <orderedlist>
           <listitem>
-      <para>Append the following lines to the file.</para>
-      <screen>alias bond0 bonding
+            <para>Append the following lines to the file.</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>Load the bonding module.</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>
+        <para>Start/restart the slave interfaces (using your normal network method).</para>
+        <note>
+          <para>You must <literal>modprobe</literal> the bonding module for each bonded interface. If you wish to create bond0 and bond1, two entries in <literal>bond.conf</literal> file are required.</para>
+        </note>
+        <para>The examples below are from systems running Red Hat Enterprise Linux. 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>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
 Ethernet Channel Bonding Driver: v3.0.3 (March 23, 2006)
  
 Bonding Mode: load balancing (round-robin)
@@ -220,10 +216,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>Use ethtool or ifconfig to check the interface state. ifconfig lists the first bonded interface as &apos;bond0.&apos;</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,24 +247,16 @@ 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>Examples</title>
+      <para>This is an example showing <literal>bond.conf</literal> entries for bonding Ethernet interfaces <literal>eth1</literal> and <literal>eth2</literal> to <literal>bond0</literal>:</para>
+      <screen># cat /etc/modprobe.d/bond.conf
 alias eth0 8139too
-alias scsi_hostadapter sata_via
-alias scsi_hostadapter1 usb-storage
-alias snd-card-0 snd-via82xx
-options snd-card-0 index=0
-options snd-via82xx index=0
+alias eth1 via-rhine
 alias bond0 bonding
 options bond0 mode=balance-alb miimon=100
-options lnet networks=tcp
-alias eth1 via-rhine
  
 # cat /etc/sysconfig/network-scripts/ifcfg-bond0
 DEVICE=bond0
@@ -291,18 +279,11 @@ 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>
+      <note>
+        <para>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>
+      </note>
+      <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
@@ -325,34 +306,40 @@ UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500  Metric:1
 RX packets:3651769 errors:0 dropped:0 overruns:0 frame:0
 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)
-</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>
+Interrupt:9 Base address:0x1400</screen>
     </section>
+  </section>
+  <section xml:id="dbdoclet.50438258_54769">
+    <title>Configuring a Lustre File System with Bonding</title>
+    <para>The Lustre software uses the IP address of the bonded interfaces and requires no special
+      configuration. The bonded interface is treated as a regular TCP/IP interface. If needed,
+      specify <literal>bond0</literal> using the Lustre <literal>networks</literal> parameter in
+        <literal>/etc/modprobe</literal>.</para>
+    <screen>options lnet networks=tcp(bond0)</screen>
+  </section>
+  <section xml:id="dbdoclet.50438258_92244">
+    <title>Bonding References</title>
+    <para>We recommend the following bonding references:</para>
+    <itemizedlist>
+      <listitem>
+        <para>In the Linux kernel source tree, see
+            <literal>documentation/networking/bonding.txt</literal></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>. 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>
+      </listitem>
+    </itemizedlist>
+  </section>
 </chapter>