What is bonding?
Generally speaking, in the Linux world, this action combines multiple physical interfaces into one or more logical interface.
Why you may want to bond?
TipsAndTricks/BondingInterfaces - CentOS Wiki
Bonding is useful in many instances such as fault tolerance (redundancy), aggregation, and load balancing.
Modes/Tpes include:
mode=1 (active-backup)
mode=2 (balance-xor)
mode=3 (broadcast)
mode=4 (802.3ad)
mode=5 (balance-tlb)
mode=6 (balance-alb)
Process:
1. Configure bonding (note- the system will expect eth0 for the bond. I would recommend you use eth0 for the bonding process)
2. Run nwsetup-tui to implement the new eth0 bond.
From command line on the host being bonded.
Login = root
Password = your_password
Ifconfig -a
Ensure that em1, em2, em3, em4, and lo are visible
Em3 and Em4 are fiber
Em3 + Em4 = Eth0 (both of the fiber ports will be bonded into one)
modprobe --first-time bonding
Enables the bonding
This will load the drivers
modinfo bonding
Check that bonding has been enabled
cd /etc/sysconfig/network-scripts/
Vi ifcfg-eth0 to create the file and put the follow information in… use the IP for the bond here. Also, here is where the mode will be set.
TYPE=Bond
BONDING_MASTER=yes
PREFIX=26
BONDING_OPTS="mode=1 miimon=100"
NAME=eth0
DEVICE=eth0
BOOTPROTO=static
IPADDR=10.x.x.x
NETMASK=255.255.255.192
GATEWAY=10.x.x.x
NM_CONTROLLED=no
ONBOOT=yes
PEERDNS=no
Save
WARNING: Before proceeding please back up all the ifcfg files in the following directory /etc/sysconfig/network-scripts/
Save
vi ifcfg-em3
Ensure em3 has the following
BOOTPROTO=none
ONBOOT=yes
Add to the bottom of the file
MASTER=eth0
SLAVE=yes
Save or quit if no changes -- typically slave will need to be added.
vi ifcfg-em4
Ensure em4 has the following
BOOTPROTO=none
ONBOOT=yes
Add to the bottom of the file
MASTER=eth0
SLAVE=yes
Save or quit if no changes -- typically slave will need to be added.
(Optional) Ensure em1 or the management interface used
vi ifcfg-em1
ONBOOT=no
vi ifcfg-em2
ONBOOT=no
Save or quit
service network restart
Ensure that "bonding: eth0 is being created" …
cat /proc/net/bonding/eth0
Ensure all the devices are listed - eth0, em3, em4
Speed
Bonding Mode: fault-tolerance (active-backup)
Copper = 1000
Fiber = 10000
Disable IPv6
vi /etc/sysctl.conf
append
ipv6.conf.all.disable_ipv6 = 1
ipv6.conf.default.disable_ipv6 = 1
sysctl -p
Disable em1 and em2
WARNING: wipes the config file for em1 and em2
echo "DEVICE=em1" > /etc/sysconfig/network-scripts/ifcfg-em1 && service network restart
echo "DEVICE=em2" > /etc/sysconfig/network-scripts/ifcfg-em2 && service network restart
Reboot and make sure everything comes up properly.
Once the system comes login as root and run the following:
nwsetup-tui
When the network section appears choose eth0 and provide the network information. Finish the setup and validate everything is working properly.
Please let me know your thought or suggestions.