Network Teaming
Redhat
Install the Teaming Daemon
Configuring teaming with nmcli
nmcli
The nmcli
tool is a command line tool for working with the Network Manager.
First we can display the devices that are currently in place.
In the virtual machine that I am testing with, I have 3 network interfaces where eno16777736
is the primary interface that I am managing the VM with via SSH, this interface will not be used in the team. Wired connection1/2 which correspond to devices eno33554984
and eno50332208
respectively will be used in the team.
Next we create a team called team0
.
Now if we show the connections again we should see team0
listed as device nm-team
.
This team is not yet doing anything, so we next add in our two interfaces.
Now if we show the connections again we should see the two team-slaves listed.
This automatically creates the following configuration files for the team:
Note: If you edit any of these files manually, you will need to run the nmcli con reload
command so that network manager reads the configuration changes.
The team has now been set with default configuration, it will use DHCP by default however we can manually specify IP address configuration if required with the below commands.
Enabling the team
At this point the documentation generally says you can run nmcli con up team0
to bring the team up, however this will not work as we first need to bring up the ports – that is our interfaces within the team.
After bringing a port up the team should become active, in my test the team is using DHCP so it was able to successfully get an IP address as shown below after the first command above was issued. It is important to note that the team interface is only started when one of its port interfaces is started however this does not automatically start all other port interfaces in the team. Starting the team interface alone does not automatically start all of the port interfaces. If you mess up the ordering you can run systemctl restart network
and it should bring up the ports and team correctly and give the same result as below.
The team is now up and running! I performed some basic testing by running a constant ping to the team at 192.168.1.50 which was responding with <1ms, after disabling one of the network interfaces on the virtual machine that was part of the team the response instantly increased to 13ms and then returned back to <1ms. This shows that the connectivity was still working as expected with only one of the two interfaces in the team available.
Modifying the team
By default our team is using the round robin runner, as shown below.
This shows our two ports which are the interfaces we added into the team, the runner is round robin by default. A runner is essentially a different method that the team can use to handle the traffic, the different runners available are listed below.
roundrobin: This is the default that we are using, it simply sends packets to all interfaces in the team in a round robin manner, that is one at a time followed by the next interface.
broadcast: All traffic is sent over all ports.
activebackup: One interface is in use while the other is set aside as a backup, the link is monitored for changes and will use the failover link if needed.
loadbalance: Traffic is balanced over all interfaces based on Tx traffic, equal load should be shared over available interfaces..
You can specify the runner that you want to use for the team when you create the team with the below command, it’s similar to the command we used to create the initial team with the exception of the config part added to the end.
Alternatively you can modify the current team by simply editing the configuration file that was created in /etc/sysconfig/network-scripts/ifcfg-team0
and add a line such as the one below.
You don’t have to memorize the syntax used for the runner, simply check the /usr/share/doc/teamd-X.XX/example_configs/
directory for example configurations. You can copy and paste the runners used into your nmcli
command.
After this I ran systemctl restart network
to apply the change, you can then confirm that this is the runner that the team is using:
Further documentation and help
If you have any problems, run the below command to access the manual page containing various nmcli
examples and then perform a search for team
for additional information.
The below command may also be helpful to get some useful debugging information out from a team.
Other ways to configure teaming
The nmcli
command is not the only way to configure network teaming, however it does give the best understanding of how all of the different components work.
Teaming can also be set up non persistently with teamd
, or it can also be set up with a text user interface via nmtui
or through the graphical user interface network settings via nm-connection-editor
.
Last updated