Linux bonding

From JJBwiki

Jump to: navigation, search


[edit] How to setup bonding on Redhat

  • identify which interfaces you want to bond.
  • edit /etc/modprobe.conf and add the following section (modify to suit your situation)
install bond0 /sbin/modprobe -a eth1 eth5 && /sbin/modprobe bonding
alias bond0 bonding
install bond1 /sbin/modprobe -a eth3 eth4 && /sbin/modprobe bonding
alias bond1 bonding
options bonding mode=1 miimon=100 max_bonds=2

The 'mode=1' can be 0,1,2,3,4 (or even 5 and 6, which are rare)

0 is Round Robin balanced. (works horribly)
1 is Active Passive (just works)
2 is XOR balanced. (unknown)
3 is spamming (broadcasts all traffic on all slaves)
4 is 8023ad (port-channel style failover/load balancing)
5 is transmit load balancing.
6 is Adaptive load balancing, uses arp mangling.
  • edit the interface scripts to read like the following (for a slave):
DEVICE=eth1 
BOOTPROTO=none 
ONBOOT=yes 
MASTER=bond0 
SLAVE=yes 
USERCTL=no
  • create the bonding script in the /etc/sysconfig/network-scripts/ directory (ie ifcfg-bond0)
DEVICE=bond0 
BOOTPROTO=none 
ONBOOT=yes 
NETWORK=10.4.3.0
NETMASK=255.255.255.0 
IPADDR=10.4.3.100 
USERCTL=no
Personal tools