(Optional) Configuring Bond4
Bond4 refers to mode 4 in NIC bonding, technically designated as IEEE 802.3ad Link Aggregation or Link Aggregation Control Protocol (LACP). This configuration enhances bandwidth capacity and ensures redundancy by aggregating multiple physical NICs into a single logical interface.
Implementing bond4 requires coordinated configuration on both the server and network switch, with prerequisite knowledge of the physical ports of the switch corresponding to the two NICs of the server designated for bonding, and the switch IP address.
Configuring Dynamic LACP on the Switch
- Log in to the switch.
- Check all available physical interfaces on the switch.
1display interface brief
As shown in the figure, the ports on the switch corresponding to the two NICs (Eth1 and Eth2) to form the bond4 group on the server are in the up state and not part of any Eth-Trunk group. This example demonstrates bond4 configuration using ports 25GE1/0/33 and 25GE1/0/34.
- Configure Eth-Trunk12 to aggregate ports 25GE1/0/33 and 25GE1/0/34.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
system-view interface Eth-Trunk 12 mode lacp-dynamic trunkport 25GE 1/0/33 trunkport 25GE 1/0/34 commit quit interface 25GE 1/0/33 eth-trunk 12 commit quit interface 25GE 1/0/34 eth-trunk 12 commit quit

Configuring the Server
To configure NICs Eth1 and Eth2 as a bond4 interface, log in to the server and follow these steps.
- Log in to the server.
- Disable network connectivity for Eth1 and Eth2.
1 2
nmcli con down eth1 nmcli con down eth2
- Back up the /etc/sysconfig/network-scripts/ifcfg-eth1 and /etc/sysconfig/network-scripts/ifcfg-eth2 configuration files for Eth1 and Eth2, and delete the original files.
1 2 3 4 5
cd /etc/sysconfig/network-scripts cp ifcfg-eth1 ifcfg-eth1.bak cp ifcfg-eth2 ifcfg-eth2.bak rm -rf ifcfg-eth1 rm -rf ifcfg-eth2
- Create an 802.3ad-compliant bond4 interface using Eth1 and Eth2.
1 2 3 4 5 6
nmcli con add type bond con-name bond4 ifname bond4 mode 802.3ad nmcli con add type bond-slave ifname eth1 master bond4 nmcli con add type bond-slave ifname eth2 master bond4 nmcli con up bond-slave-eth1 nmcli con up bond-slave-eth2 nmcli con up bond4
- Modify the bond4 interface configuration file.
- Open the ifcfg-bond4 file.
1vi /etc/sysconfig/network-scripts/ifcfg-bond4 - Add an IP address and change BOOTPROTO=dhcp to BOOTPROTO=none.
1 2 3
IPADDR=192.168.xx.xx NETMASK=255.255.255.0 BOOTPROTO=none

- Press Esc to exit the insert mode. Type :wq! and press Enter to save the file and exit.
- Open the ifcfg-bond4 file.
- Restart the network service and bond4 interface.
1 2 3
service NetworkManager restart nmcli con down bond4 nmcli con up bond4
- Check network information about the bond4 interface.
1 2
ip a | grep -C 5 bond4 ip a

- Check the bond4 interface status.
1cat /proc/net/bonding/bond4
The bond4 configuration is correct if the following conditions are met:
- Bonding Mode is IEEE 802.3ad Dynamic link aggregation.
- MII Status is up.
- The servers use the bond4 IP address and can connect to each other.
Checking the Bond4 Configuration on the Switch
1
|
display eth-trunk 12 |

The bond4 configuration is correct if the following conditions are met:
- Working Mode is Dynamic.
- Operating Status is up.
- Number Of Up Ports In Trunk is 2, and the command output contains information about 25GE1/0/33 and 25GE1/0/34.