linux-old/Documentation/networking/bonding.txt
<<
>>
Prefs
   1Installation:
   2
   3Apply patch.  (if your reading this in
   4/usr/src/linux/Documentation/networking/bonding.txt, then it's already
   5applied.)
   6
   7Run make menuconfig/xconfig/config, and select 'bonding device' in
   8network devices.
   9
  10Build the new kernel/modules.
  11
  12Get update ifenslave.c (included in tar file.) (location to be determined.)
  13
  14install ifenslave.c; do:
  15        gcc -O2 -o ifenslave ifenslave.c
  16        cp ifenslave /sbin/ifenslave
  17
  18Modify /etc/conf.modules by adding the line:
  19        alias bond0 bonding
  20
  21If you running a RH5.0 or newer distribution, do:
  22
  23cd /etc/sysconfig/network-scripts
  24cp ifcfg-eth0 ifcfg-bond0
  25edit ifcfg-bond0, and make it look the following:
  26
  27DEVICE=bond0
  28USERCTL=no
  29ONBOOT=yes
  30BOOTPROTO=none
  31BROADCAST=XXX.XXX.XXX.255
  32NETWORK=XXX.XXX.XXX.0
  33NETMASK=255.255.255.0
  34IPADDR=XXX.XXX.XXX.XXX
  35
  36(put the approiate values for you network in where the XXX's are at.)
  37
  38Then, edit ifcfg-eth0/ifcfg-eth1 (and all the other slave devices), and make them
  39look like this:
  40
  41DEVICE=eth0
  42USERCTL=no
  43ONBOOT=yes
  44MASTER=bond0
  45SLAVE=yes
  46BOOTPROTO=none
  47
  48Reboot, and the network should come up bonded together.
  49
  50For other distributions, you need to do something like:
  51
  52/sbin/ifconfig bond0 addresss netmask xxx.xxx.xxx.xxx broadcast xxx.xxx.xxx.xxx up
  53/sbin/ifenslave bond0 eth0
  54/sbin/ifenslave bond0 eth1
  55
  56When properly configured, it will look this:
  57
  58[root]# /sbin/ifconfig
  59bond0     Link encap:Ethernet  HWaddr 00:C0:F0:1F:37:B4  
  60          inet addr:XXX.XXX.XXX.YYY  Bcast:XXX.XXX.XXX.255  Mask:255.255.252.0
  61          UP BROADCAST RUNNING MASTER MULTICAST  MTU:1500  Metric:1
  62          RX packets:7224794 errors:0 dropped:0 overruns:0 frame:0
  63          TX packets:3286647 errors:1 dropped:0 overruns:1 carrier:0
  64          collisions:0 txqueuelen:0 
  65
  66eth0      Link encap:Ethernet  HWaddr 00:C0:F0:1F:37:B4  
  67          inet addr:XXX.XXX.XXX.YYY  Bcast:XXX.XXX.XXX.255  Mask:255.255.252.0
  68          UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1
  69          RX packets:3573025 errors:0 dropped:0 overruns:0 frame:0
  70          TX packets:1643167 errors:1 dropped:0 overruns:1 carrier:0
  71          collisions:0 txqueuelen:100 
  72          Interrupt:10 Base address:0x1080 
  73
  74eth1      Link encap:Ethernet  HWaddr 00:C0:F0:1F:37:B4  
  75          inet addr:XXX.XXX.XXX.YYY  Bcast:XXX.XXX.XXX.255  Mask:255.255.252.0
  76          UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1
  77          RX packets:3651769 errors:0 dropped:0 overruns:0 frame:0
  78          TX packets:1643480 errors:0 dropped:0 overruns:0 carrier:0
  79          collisions:0 txqueuelen:100 
  80          Interrupt:9 Base address:0x1400 
  81
  82Questions:
  83
  841.  Is it SMP safe?
  85
  86        Yes.  The old 2.0.xx channel bonding patch wasn't SMP safe.
  87This one was designed from the start to be SMP safe.
  88
  892.  What type of cards can it work with it?
  90
  91        Any Ethernet type cards (ie, you can even mix cards - a tulip
  92and a 3com 3c905, for example).  You can even bond together Gigabit
  93Ethernet cards!
  94
  953.  How many bond devices can I have?
  96
  97        Just one at this time.
  98
  994.  How many slaves can a bond device have?
 100
 101        Limited by the number of cards you can place in your system.
 102
 1035.  What happens when a slave dies?
 104
 105        Currently, the ethernet drivers don't really handle this
 106situation very well.  The tulip driver never stalls; it just starts to
 107throw packets away!
 108
 1096.  If this was fixed, can bonding be used for High Availability?
 110
 111        Yes!
 112
 1137.  Which switches/systems does it work with?
 114
 115        Cisco 5500 series (look for EtherChannel support).
 116        SunTrunking software.
 117
 1188.  Where does the bond0 device get it's mac address from?
 119
 120        It's taken from the first slave device.  If you remove that
 121first slave device, the MAC address continues to be associated with
 122it.  If you wish to remove that MAC address, you have to ifconfig
 123bond0 down, and then modprobe -r bonding.  If you wish, you can also
 124assign a MAC address when you ifconfig the bond0 device.
 125
 1269.  Which transmit policy is used?
 127
 128        Round robin, based on order of enslaving.
lxr.linux.no kindly hosted by Redpill Linpro AS, provider of Linux consulting and operations services since 1995.