Network bonding /NIC teaming is the bonding together of two or more physical network interfaces so that they appear as one logical device.
Advantages of network bonding
- Improvement in network performance by increasing the link speed beyond the limits of one single network card.
- Increasing the redundancy for higher availability.(two 1GB network cards bonded together to establish a 2-gigabit connection).
Two or more physical network card will be assigned one IP address. And they will represent the same MAC address. If one of the network card fails, the IP address still remains accessible.
Configuration
1: Create a bond0 configuration file
# vi /etc/sysconfig/network-scripts/ifcfg-bond0
edit the below lines
DEVICE=bond0
IPADDR=192.168.1.28 ( use your network IP )
NETWORK=192.168.1.0
NETMASK=255.255.255.0
USERCTL=no
BOOTPROTO=none
ONBOOT=yes
2:eth0 and eth1 config files modification:
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
———–Modify as below
DEVICE=eth0
USERCTL=no
ONBOOT=yes
MASTER=bond0
SLAVE=yes
BOOTPROTO=none
# vi /etc/sysconfig/network-scripts/ifcfg-eth1
———–Modify as below
DEVICE=eth1
USERCTL=no
ONBOOT=yes
MASTER=bond0
SLAVE=yes
BOOTPROTO=none
Save & Exit
3: Load bond driver/module
# vi /etc/modprobe.conf
————-edit the below two lines
alias bond0 bonding
options bond0 mode=balance-alb miimon=100
Next load the bonding module:
# modprobe bonding
4: Test configuration
bring up bond0 interface:
# service network restart
# less /proc/net/bonding/bond0Output:
Bonding Mode: load balancing (round-robin)
MII Status: up
MII Polling Interval (ms): 0
Up Delay (ms): 0
Down Delay (ms): 0
Slave Interface: eth0
MII Status: up
Link Failure Count: 0
Permanent HW addr: 00:0b:24:b6:ff:34
Slave Interface: eth1
MII Status: up
Link Failure Count: 0
Permanent HW addr: 00:0b:24:b6:ff:56