How to Configure Network NIC Teaming on Debian 11

Configure network NIC teaming on Debian 11 and seamlessly create a customized single network team. By doing so, you’re making a larger pipe for traffic while enjoying a more protective server.

In the following write-up, you’ll learn how to configure network NIC teaming with no hassle whatsoever.

Pre Requisites

Before you hear over and configure network NIC teaming on Debian 11, there are a couple of things to take care of. First, you need to know about several types of runners available and then install Teamd on your system.

There are currently five active runners, namely Broadcast, Round-robin, Active-backup, Loadbalance, and 802.3ad. 

Install Teamd on Debian 11

To install Teamd on your Debian 11 system, launch the Terminal using the “Ctrl+Alt+T” key combination and invoke the apt install command. Once the installation concludes, it is crucial you make sure that you repeat the process for the Network Manager utility.

Input:

$ sudo apt install network-manager

Start and Get the Network Manager Enabled

After the installation finishes, run the following pair of commands and enable the Network Manager.

start the network manager
enable the network manager

How to Configure Network NIC Teaming on Debian 11

You can configure network NIC teaming on Debian 11 by following two methods. While one uses NMCLI, the other demands a manual approach. I’ll demonstrate both in the most easy-to-digest manner in the following guide.

Configure Network NIC Using the Network Manager NMCLI

By employing the previously installed Network Manger utility, we can seamlessly configure the concerned network NIC teaming. Here is how:

Step 1: Identifying the Network Device

To identify the network devices, we can use the nmcli device command in the following manner:

$ nmcli device status
identifying the device

Study the output and list the devices you want to move forward with. However, that’s not enough; you’ll instead require more detailed info. For that purpose, invoke the nmcli connection show command and note the UUID of the concerned devices.

Step 2: Disconnect the Device(s)

After that, use the same UUID to disconnect the devices. The required command for the job will look something like this:

$ sudo nmcli connection delete [UUID]

Run the nmcli device status command one more time and verify if you were successful in disconnecting the device(s)

Step 3: Create Network Team

The next step is creating a network team (suppose teamdistroid). You can build that alongside the active backup runner in the following way:

$ sudo nmcli connection add type team con-name teamdistroid ifname teamdistroid config '{"runner": {"name": "activebackup"}}'
Configure Network NIC Teaming

Step 4: View the Information

After the creation part is sorted, head back to the Terminal and run the nmcli connection show command to view the detailed information about the team.

Input:

$ nmcli connection show teamdistroid

Step 5: Bring Some Configurations

Here you’ll need to configure elements like the team’s IP address, auto-connection status, DNS, etc. Use the command in the following format:

$ sudo nmcli con mod teamdistroid [Required Configuration]

Step 6: Add the Devices as Slave

Run the team-slave command to add the desired devices as slaves. 

Required Input:

$ sudo nmcli con add type team-slave con-name teamdistroid-slave1 ifname [device name] master teamdistroid
Configure Network NIC Teaming
Verification:

To verify if adding the device(s) as a slave was successful or not, invoke nmcli connection show command.

Step 7: Restart the Team

Apply the changes and restart the team to ensure the alterations get flawlessly applied. As it restarts, have a quick view of the team status by running the following command:

$ ip addr show dev teamdistroid
restart the team

Alternatively, you can employ the teamdctl utility and get the job done. The command, in this case, is teamdctl teamdistroid state.

That’s how you can configure network NIC teaming on Debian 11 using the Network Manager utility. But wait, there are some other functions that you must be aware of.

Testing the Team Functionality

Disconnect the active interface by running the nmcli device disconnect command.

Input:

$ sudo nmcli device disconnect [device name]
Configure Network NIC Teaming

Verify the active slave by studying the output for the following command:

$ sudo teamctl teamdistroid state
Deleting a Team

First, bring the connection down.

Input:

$ sudo nmcli connection down teamdistroid
deleting a team

Delete the slave using the following command:

$ sudo nmcli connection delete teamdistroid-slave1
removing team

Now you can delete the team by invoking the nmcli connection team command.

Configure Network NIC Teaming on Debian 11: The Manual Approach

The manual approach of configuring network NIC teaming on Debian 11 involves network bong creation. It takes place by bringing a few edits in the networking script (/etc/network/interfaces)

Step 1: Install the Bonding Module

To install the bonding module on Debian 11, use the sudo apt-get install command and the ifenslave option. 

bonding module

Step 2: Reload the Module

Run the modprobe command in the following manner to reload all the modules.

$ sudo modprobe bonding

Step 3: Load the Kernel with Configurations

Here, you’ll pack the kernel with the required configuration and make sure that the system picks up the same on boot.

Configure Network NIC Teaming

Step 4: Bring the Edits

Launch the /etc/network/interfaces file with the vim editor and correctly add the Bond name alongside the slave interfaces.

Step 5: Finishing Up

Finally, save the file and get the network bond activated. For that, you can use the ifdown and ifup commands.

$ sudo ifdown [device name]
$ sudo ifup bond0

And that wraps up this article. In this tutorial, I’ve guided you on how to configure network NIC teaming on Debian 11, and you’ve also learned about two super-efficient methods that will help you get the job done in minutes.

If this guide helped you, please share it.

Leave a Reply
Related Posts