Bonding is a Linux kernel characteristic that enables a number of community interfaces (comparable to ens192, ens224) to be aggregated right into a single digital community interface referred to as channel bonding (bond0). It will increase the throughput and supply redundancy.
Community bonding helps 7 modes and you’ll configure it based mostly in your necessities. Hyperlink Aggregation Management Protocol (LACP – Mode 4 (802.3ad)) mode is extensively used as a result of it helps hyperlink aggregation and redundancy.
On this article, we’ll learn to configure NIC or community bonding in RHEL system.
Stipulations for LACP Bonding:
- The Community crew must allow LACP (802.3ad) on the Community change ports to combination the hyperlinks.
- A Linux system ought to have two interfaces.
- If it’s a bodily server, we suggest configuring bonding between the On-Board and PCI interfaces to keep away from a single level of failure on the community card on the host facet.
Bonding Module
Verify if the bonding module is already loaded in your Linux system utilizing the lsmod command.
lsmod | grep -i bonding bonding 12451 0
It could have loaded by default. In any other case, load it utilizing the modprobe command.
modprobe bonding
Creating Bond Interface
Create a bond interface file 'ifcfg-bond0'
beneath the listing '/and so forth/sysconfig/network-scripts/'
. You could want to alter the next values like IP, MASK and GATEWAY in response to your Community.
vi /and so forth/sysconfig/network-scripts/ifcfg-bond0 TYPE=Bond DEVICE=bond0 NAME=bond0 BONDING_MASTER=sure BOOTPROTO=none ONBOOT=sure IPADDR=192.168.1.100 NETMASK=255.255.255.0 GATEWAY=192.168.1.1 BONDING_OPTS="mode=4 miimon=100 lacp_rate=1"
Parameter | Description |
---|---|
BONDING_MASTER=sure | It signifies that the machine is a bonding grasp machine. |
mode=4 | Bonding mode – IEEE 802.3ad Dynamic hyperlink aggregation (LACP). |
miimon=100 | It specifies the MII hyperlink monitoring frequency in milliseconds, which determines how typically the hyperlink state of every slave is inspected for hyperlink failures. A worth of zero disables MII hyperlink monitoring. A worth of 100 is an efficient start line. |
lacp_rate=1 | An possibility that specifies the speed wherein we’ll ask our hyperlink associate to ship LACPDUs each 1 second. The default is gradual, which is 0 ‘ZERO’. |
Configuring First Slave Interface
Modify the primary slave that you just need to convey into bonding. Please use the proper interface title as per your atmosphere.
vi /and so forth/sysconfig/network-scripts/ifcfg-ens192 TYPE=Ethernet BOOTPROTO=none DEVICE=ens192 ONBOOT=sure MASTER=bond0 SLAVE=sure
Configuring Second Slave Interface
Modify the second slave that you just need to convey into bonding. Please use the proper interface title as per your atmosphere.
vi /and so forth/sysconfig/network-scripts/ifcfg-ens224 TYPE=Ethernet BOOTPROTO=none DEVICE=ens224 ONBOOT=sure MASTER=bond0 SLAVE=sure
Restarting community companies
Restart the community companies to allow the bonding interface.
systemctl restart community
Confirm bonding Configuration
Use the ip command to verify the binding interface and its slave interfaces. Sure, Bond0 is up and operating now.

Viewing Bonding Interface Standing
Verify the next file to see detailed data of bonding interface and their slave interfaces. The output seems good and we are able to see Bonding Mode, MII Standing, MII Polling Interval, LACP charge, Variety of Ports, and so forth,.
cat /proc/web/bonding/bond0 Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011) Bonding Mode: IEEE 802.3ad Dynamic hyperlink aggregation Transmit Hash Coverage: layer (0) MII Standing: up MII Polling Interval (ms): 100 Up Delay (ms): 0 Down Delay (ms): 0 802.3ad information LACP charge: quick Min hyperlinks: 0 Aggregator choice coverage (ad_select): steady System precedence: 65535 System MAC handle: c8:5b:76:4d:d4:5c Lively Aggregator Data: Aggregator ID: 1 Variety of ports: 2 Actor Key: 15 Associate Key: 32773 Associate Mac Handle: e4:a7:a0:32:fc:e9 Slave Interface: ens192 MII Standing: up Pace: 10000 Mbps Duplex: full Hyperlink Failure Rely: 0 Everlasting HW addr: c8:5b:76:4d:d4:5c Slave queue ID: 0 Aggregator ID: 1 Actor Churn State: none Associate Churn State: none Actor Churned State: 0 Associate Churned State: 0 particulars actor lacp pdu: system precedence: 65535 system mac handle: c8:5b:76:4d:d4:5c port key: 15 port precedence: 255 port quantity: 1 port state: 63 particulars Associate lacp pdu: system precedence: 32667 system mac handle: e4:a7:a0:32:fc:e9 oper key: 32773 port precedence: 32768 port quantity: 290 port state: 61 Slave Interface: ens224 MII Standing: up Pace: 10000 Mbps Duplex: full Hyperlink Failure Rely: 0 Everlasting HW addr: e4:a7:a0:32:fc:e9 Slave queue ID: 0 Aggregator ID: 1 Actor Churn State: none Associate Churn State: none Actor Churned State: 0 Associate Churned State: 0 particulars actor lacp pdu: system precedence: 65535 system mac handle: e4:a7:a0:32:fc:e9 port key: 15 port precedence: 255 port quantity: 2 port state: 63 particulars Associate lacp pdu: system precedence: 32667 system mac handle: c8:5b:76:4d:d4:5c oper key: 32773 port precedence: 32768 port quantity: 16674 port state: 61
Fault Tolerance/Redundancy Testing
To check fault tolerance and hyperlink pace, you possibly can convey down one interface at a time and verify whether or not the server remains to be reachable or not.
- Take a look at Case-1: To verify hyperlink pace use the ethtool command when each the Slave Interfaces are up and operating.
- Take a look at Case-2: Deliver down First Slave interface and take a look at entry the system.
- Take a look at Case-3: Deliver down Second Slave interface and take a look at entry the system.
Take a look at Case-1:
To verify the connection pace, run: Sure, I can see 20 Gbps
pace on Bond0
as every slave helps 10 Gbps.
ethtool bond0 Settings for bond0: Supported ports: [ ] Supported hyperlink modes: Not reported Supported pause body use: No Helps auto-negotiation: No Supported FEC modes: Not reported Marketed hyperlink modes: Not reported Marketed pause body use: No Marketed auto-negotiation: No Marketed FEC modes: Not reported Pace: 20000Mb/s Duplex: Full Port: Different PHYAD: 0 Transceiver: inside Auto-negotiation: off Hyperlink detected: sure
Take a look at Case-2:
Let’s convey down the First Slave interface.
ifdown ens192
Gadget 'ens192' efficiently disconnected.
Strive accessing the system through ssh. Sure, it’s accessible now.
ssh [email protected]
Now you possibly can see solely 10 Gbps pace on bond0 as one of many slave interface is already down.
ethtool bond0 | grep -i pace Pace: 10000Mb/s
Now, verify bonding interface standing once more. It exhibits just one energetic Slave interface.
cat /proc/web/bonding/bond0
Take a look at Case-3:
Let’s convey down the Second Slave interface and carry out the identical take a look at as #Take a look at Case-2:
ifdown ens224
Gadget 'ens224' efficiently disconnected.
Last Ideas
I hope you realized easy methods to configure LACP bonding on RHEL.
On this tutorial, we’ve got proven you one of many best methods to configure Community Bonding or NIC Teaming on a RHEL system.
When you have any questions or suggestions, be at liberty to remark under.