(Optional) Configuring Bond4
If you need to set up a Docker-based environment with bond4 and IPVLAN configurations, configure bond4 as instructed in this section. Otherwise, skip this section.
Bond4 refers to mode 4 in network interface bonding, technically designated as IEEE 802.3ad Link Aggregation Control Protocol (LACP). This configuration enhances bandwidth capacity and ensures redundancy by aggregating multiple physical network interfaces 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 preceding figure, the ports on the switch corresponding to the two NICs (eth1 and eth2) to form a 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.
- Create an Eth-Trunk 12 group and add 25GE 1/0/33 and 25GE 1/0/34 to the group.
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 the steps below.
- 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.
1vi /etc/sysconfig/network-scripts/ifcfg-bond4Add 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

- 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.