LACP 2 – Eliminating All the SPOFs! An Exercise in Redundancy

Share this post on:

How to do it…

While this can be done from the GUI, this recipe will cover doing this from the command line. As a note, when working on the main network connection to the server, you will want to be on the system console. Doing this via a remote connection such as SSH can leave you in a situation where you lose access to the server. Following are the steps to configure a redundant connection.

  1. The first thing you will need to do is create the bond. In this example, we will create it using the balance-alb mode to best balance both incoming and outgoing traffic:


nmcli connection add type bond con-name “Bond 0” ifname bond0 bond.options “mode=balance-alb”

2. Next, we will configure the bond to use DHCP. On production servers, you would normally use a manually configured IP address:


nmcli connection modify “Bond 0” ipv4.method auto

3. Add the adapters that will be members of the bond. In this case, we will be using enp0s3 and enp0s8:

Note

If you are adding a port into a bond that is already in use, you should delete that port now. In this case, enp0s3 was in use, so it was deleted with the following command:

nmcli connection del enp0s3


nmcli connection add type ethernet slave-type bond con-name bond0-if1 ifname enp0s3 master bond0
nmcli connection add type ethernet slave-type bond con-name bond0-if2 ifname enp0s8 master bond0

  • Now, we will start the connection and check the status:


nmcli connection up “Bond 0”
nmcli device

When completed, the output of the nmcli device command should look like the following:

Figure 6.27 – nmcli device output with a working bind

You can see bond0 as the device, with members enp0s3 and enp0s8.

  • When you look at the IP address, you will see that that is now on the bond0 device. This can be checked with the ifconfig bond0 command, with the output as follows:

Figure 6.28 – Output from ifconfig bond0

You can continue to use the system normally now, but with bond0 being the network device.

How it works…

Now that we have a working bond, let’s look at the traffic going in and out. To do this, we need to install the iptraf-ng command:


dnf -y install iptraf-ng

This tool allows you to monitor Ethernet traffic on a server. For this example, we will run the iptraf-ng command. This will launch the program, and you will be on the main screen, as seen in the following screenshot:

Figure 6.29 – iptraf main menu

From here, we will look at the General interface statistics by hitting the S key. This will then show a real-time flow of traffic on each interface:

Figure 6.30 – General interface statistics

You can see that both in and out traffic is balanced between the two physical interfaces. This is because the bond was built using the balance-alb mode. To generate this traffic, a simple flood ping was used from the client2 system. This was done with the following command:


ping -f 192.168.200.179

Note

Be careful using the -f option, as this will flood the network with traffic, and it is generally not acceptable to do so on production networks without coordinating with the network and security teams. It can cause performance issues for systems using the network.

There is a better way to really stress the network, though. That is to use a tool that will generate the maximum levels of packets the interface will support.

Share this post on:

Author: Stacy Atkins Prince

View all posts by Stacy Atkins Prince >

Leave a Reply

Your email address will not be published. Required fields are marked *