In this post I will show you how to bond two NIC interfaces together on Centos 7 using the bond 5 mode option and while using a single static IP. I’m also assuming you have firewalld configured in this tutorial which is why I have included the zone definitions below.
I have chosen the bond 5 mode as it is my favorite. What is bond 5?
Adaptive transmit load balancing: channel bonding that does not require any special switch support. The outgoing traffic is distributed according to the current load (computed relative to the speed) on each slave. Incoming traffic is received by the current slave. If the receiving slave fails, another slave takes over the MAC address of the failed receiving slave.
- Prerequisite: Ethtool support in the base drivers for retrieving the speed of each slave.
As you can see, bond 5 acts as a load balancer between the NIC’s and also as a fail over should a NIC fail. Let’s get started.
First, navigate to the /etc/sysconfig/network-scripts/ directory by typing the following command.
Next, let’s create a new interface file called ifcfg-bond0 using your favorite editor.
Paste the following lines into this new file and save:
Be sure to replace the (X’s) with your ISP information. Also be sure to use the correct zone in your setup.
Next, let’s update the two interfaces that you want to use as the slave for the newly created bond interface above. Let’s open each one again with your favorite editor and make the following changes.
You should have noticed the following lines in each file.
Please note, I’m not 100% sure if the zone is needed in the two slave interface files but I have added it just to be 100% sure it works correctly. Feel free to test without the zone definition here if you like as it is already defined in the bond interface.
Reload Firewalld
Restart your network.
Now let’s check our bond status.
As you can see, the new bond interface is working and the active interface is enp10s0.