NIC Bonding / NIC Teaming

Introduction

NIC Bonding (commonly called Teaming) is a way to bind multiple NICs together for the purposes of redundancy and higher throughput.

Configuration

Create or edit the following files:

  1. /etc/sysconfig/network-scripts/ifcfg-bond0
    DEVICE=bond0
    IPADDR=192.168.1.20
    NETWORK=192.168.1.0
    NETMASK=255.255.255.0
    USERCTL=no
    BOOTPROTO=none
    ONBOOT=yes
    
  2. /etc/sysconfig/network-scripts/ifcfg-eth0
    DEVICE=eth0
    USERCTL=no
    ONBOOT=yes
    MASTER=bond0
    SLAVE=yes
    BOOTPROTO=none
    
  3. /etc/sysconfig/network-scripts/ifcfg-eth1
    DEVICE=eth1
    USERCTL=no
    ONBOOT=yes
    MASTER=bond0
    SLAVE=yes
    BOOTPROTO=none
    

Append the following to /etc/modprobe.confto ensure the bonding module is loaded upon startup:

alias bond0 bonding
options bond0 mode=balance-alb miimon=100

Be careful with what mode you choose. The balance-alb mode is Adaptive load balancing: includes balance-tlb plus receive load balancing (rlb) for IPV4 traffic, and does not require any special switch support.

Load the bonding module and restart the network service:

modprobe bonding
service network restart

Confirm success with the ifconfig command and by checking out /proc/net/bonding/bond0
[root@cdr-mgt ~]# cat /proc/net/bonding/bond1 
Ethernet Channel Bonding Driver: v3.4.0-1 (October 7, 2008)

Bonding Mode: adaptive load balancing
Primary Slave: None
Currently Active Slave: eth3
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0

Slave Interface: eth3
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 00:1b:21:11:ec:81

Slave Interface: eth4
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 00:1b:21:11:ec:84

References

  1. https://access.redhat.com/labs/networkbondinghelper/
  2. http://www.cyberciti.biz/howto/question/static/linux-ethernet-bonding-dr...
  3. http://www.cyberciti.biz/tips/linux-bond-or-team-multiple-network-interf...
  4. https://www.broadcom.com/support/ethernet_nic/faq_drivers.php