iperf – network stress tool
We will use a tool called iperf. It will generate the maximum amount of traffic that the interface can support. To install iperf, run the following command on all systems:
dnf –y install iperf3
We also will need to open up a TCP port for the system to use and reload the firewall. Each instance of the server can only handle a single client connection. We will add multiple ports to enable running multiple servers, each with a different port. This is done with the following commands:
firewall-cmd –permanent –add-port=8000-8010/tcp
firewall-cmd –reload
iperf works using a client-server model. In order to use it, we first need to start an iperf server on the networking system. With this example, we will set up the server to listen on port 8001 using TCP. This is started with the following command:
[root@networking ~]# iperf3 -s -p 8001
———————————————————–
Server listening on 8001
———————————————————–
We will repeat the same command in a different window, running on port 8002 instead:
[root@networking ~]# iperf3 -s -p 8002
———————————————————–
Server listening on 8002
———————————————————–
Now, with two servers running, we can run a test from client1.
The test is run with the following command:
iperf -c 192.168.200.179 -p 8001
The test will kick off and for a few seconds run the maximum traffic possible, as seen in the following output:

Figure 6.31 – iperf client output
While the test runs, we can monitor the performance from the iptraf command, and we will see most of the traffic is hitting a single interface. This is seen in the following screenshot:

Figure 6.32 – Single-client traffic
This traffic is all on the enp0s8 interface. This is because the load-balancing algorithm uses the MAC address of the client. This limits the traffic to a single interface in the bond.
Next up, can run a test from client1 and client2 simultaneously. The difference is that client2 will use port 8002. The results are seen in the following screenshot:

Figure 6.33 – Test with two different clients
Here, we can see that both interfaces are being used for heavy network loads. This is happening because each client is using a different MAC address. If a third client were used, we would then see it competing for traffic for one of the interfaces, potentially causing issues.
This is an important factor to consider when bonding in environments where heavy network performance is required from multiple clients. When using bonds, and you have random performance latency issues, monitor the ports. You might face some contention. One way to address this is to add additional ports to the bond. You can also upgrade the interfaces to units that can support more bandwidth.