Configure NIC(Network Interface Card) bonding in CentOS 7 / RHEL 7
NIC(Network Interface Card) bonding is also known as Network bonding. It can be defined as the aggregation or combination of multiple NIC into a single bond interface. It’s main purpose is to provide high availability and redundancy.
In this article we will learn how to configure nic or netwok bonding in CentOS 7 & RHEL 7. In my case i have two interface cards (enp0s3 & enp0s8) and will form a bond interface (bond0).
If bonding module is not loaded on your linux box then use the below command to load.
To list the bonding module info, use following command.
Output will be something like below
Step:1 Create Bond Interface File
Create a bond interface file (ifcfg-bond0) under the folder “/etc/sysconfig/network-scripts/”
Save & exit the file.
Specify the IP address, Netmask & bonding modes as per your requirement. In my example i am using ‘mode=5′ which is used to provide fault tolerance and load balancing.
Step:2 Edit the NIC interface files
Step:3 Restart the Network Service
Below command will restart the network service and will bring above changes into the effect.
Step:4 Test & Verify bond interface.
Use ‘ifconfig‘ & ‘ip add‘ command to check bond interface along with its slave interfaces.
Use following command to view bond interface settings like bonding mode & slave interface.
Step:5 Fault tolerance testing
To test the fault tolerance we can down one interface and check whether you are still able access the server.
Post a Comment