Chapter 12. Configuring network teaming
This section describes the basics of network teaming, the differences between bonding and teaming, and how to configure a network team on Red Hat Enterprise Linux 8.
You can create network teams on different types of devices, such as:
- Physical and virtual Ethernet devices
- Network bonds
- Network bridges
- VLAN devices
12.1. Understanding network teaming
Network teaming is a feature that combines or aggregates network interfaces to provide a logical interface with higher throughput or redundancy.
Network teaming uses a kernel driver to implement fast handling of packet flows, as well as user-space libraries and services for other tasks. This way, network teaming is an easily extensible and scalable solution for load-balancing and redundancy requirements.
Certain network teaming features, such as the fail-over mechanism, do not support direct cable connections without a network switch. For further details, see Is bonding supported with direct connection using crossover cables?
12.2. Understanding the default behavior of controller and port interfaces
Consider the following default behavior of, when managing or troubleshooting team or bond port interfaces using the NetworkManager
service:
- Starting the controller interface does not automatically start the port interfaces.
- Starting a port interface always starts the controller interface.
- Stopping the controller interface also stops the port interface.
- A controller without ports can start static IP connections.
- A controller without ports waits for ports when starting DHCP connections.
- A controller with a DHCP connection waiting for ports completes when you add a port with a carrier.
- A controller with a DHCP connection waiting for ports continues waiting when you add a port without carrier.
12.3. Comparison of network teaming and bonding features
Learn about the features supported in network teams and network bonds:
Feature | Network bond | Network team |
---|---|---|
Broadcast Tx policy | Yes | Yes |
Round-robin Tx policy | Yes | Yes |
Active-backup Tx policy | Yes | Yes |
LACP (802.3ad) support | Yes (active only) | Yes |
Hash-based Tx policy | Yes | Yes |
User can set hash function | No | Yes |
Tx load-balancing support (TLB) | Yes | Yes |
LACP hash port select | Yes | Yes |
Load-balancing for LACP support | No | Yes |
Ethtool link monitoring | Yes | Yes |
ARP link monitoring | Yes | Yes |
NS/NA (IPv6) link monitoring | No | Yes |
Ports up/down delays | Yes | Yes |
Port priorities and stickiness (“primary” option enhancement) | No | Yes |
Separate per-port link monitoring setup | No | Yes |
Multiple link monitoring setup | Limited | Yes |
Lockless Tx/Rx path | No (rwlock) | Yes (RCU) |
VLAN support | Yes | Yes |
User-space runtime control | Limited | Yes |
Logic in user-space | No | Yes |
Extensibility | Hard | Easy |
Modular design | No | Yes |
Performance overhead | Low | Very low |
D-Bus interface | No | Yes |
Multiple device stacking | Yes | Yes |
Zero config using LLDP | No | (in planning) |
NetworkManager support | Yes | Yes |
12.4. Understanding the teamd service, runners, and link-watchers
The team service, teamd
, controls one instance of the team driver. This instance of the driver adds instances of a hardware device driver to form a team of network interfaces. The team driver presents a network interface, for example team0
, to the kernel.
The teamd
service implements the common logic to all methods of teaming. Those functions are unique to the different load sharing and backup methods, such as round-robin, and implemented by separate units of code referred to as runners
. Administrators specify runners in JavaScript Object Notation (JSON) format, and the JSON code is compiled into an instance of teamd
when the instance is created. Alternatively, when using NetworkManager
, you can set the runner in the team.runner
parameter, and NetworkManager
auto-creates the corresponding JSON code.
The following runners are available:
-
broadcast
: Transmits data over all ports. -
roundrobin
: Transmits data over all ports in turn. -
activebackup
: Transmits data over one port while the others are kept as a backup. -
loadbalance
: Transmits data over all ports with active Tx load balancing and Berkeley Packet Filter (BPF)-based Tx port selectors. -
random
: Transmits data on a randomly selected port. -
lacp
: Implements the 802.3ad Link Aggregation Control Protocol (LACP).
The teamd
services uses a link watcher to monitor the state of subordinate devices. The following link-watchers are available:
-
ethtool
: Thelibteam
library uses theethtool
utility to watch for link state changes. This is the default link-watcher. -
arp_ping
: Thelibteam
library uses thearp_ping
utility to monitor the presence of a far-end hardware address using Address Resolution Protocol (ARP). -
nsna_ping
: On IPv6 connections, thelibteam
library uses the Neighbor Advertisement and Neighbor Solicitation features from the IPv6 Neighbor Discovery protocol to monitor the presence of a neighbor’s interface.
Each runner can use any link watcher, with the exception of lacp
. This runner can only use the ethtool
link watcher.
12.5. Installing the teamd service
To configure a network team in NetworkManager
, you require the teamd
service and the team plug-in for NetworkManager
. Both are installed on Red Hat Enterprise Linux 8 by default. This section describes how you install the required packages in case that you remove them.
Prerequisites
- An active Red Hat subscription is assigned to the host.
Procedure
Install the
teamd
andNetworkManager-team
packages:# yum install teamd NetworkManager-team
12.6. Configuring a network team using nmcli commands
This section describes how to configure a network team using nmcli
utility.
Prerequisites
- Two or more physical or virtual network devices are installed on the server.
- To use Ethernet devices as ports of the team, the physical or virtual Ethernet devices must be installed on the server and connected to a switch.
To use bond, bridge, or VLAN devices as ports of the team, you can either create these devices while you create the team or you can create them in advance as described in:
Procedure
Create a team interface:
#
nmcli connection add type team con-name team0 ifname team0 team.runner activebackup
This command creates a network team named
team0
that uses theactivebackup
runner.Optionally, set a link watcher. For example, to set the
ethtool
link watcher in theteam0
connection profile:#
nmcli connection modify team0 team.link-watchers "name=ethtool"
Link watchers support different parameters. To set parameters for a link watcher, specify them space-separated in the
name
property. Note that the name property must be surrounded by quotes. For example, to use theethtool
link watcher and set itsdelay-up
parameter to2500
milliseconds (2.5 seconds):#
nmcli connection modify team0 team.link-watchers "name=ethtool delay-up=2500"
To set multiple link watchers and each of them with specific parameters, the link watchers must be separated by a comma. The following example sets the
ethtool
link watcher with thedelay-up
parameter and thearp_ping
link watcher with thesource-host
andtarget-host
parameter:#
nmcli connection modify team0 team.link-watchers "name=ethtool delay-up=2, name=arp_ping source-host=192.0.2.1 target-host=192.0.2.2"
Display the network interfaces, and note the names of the interfaces you want to add to the team:
#
nmcli device status
DEVICE TYPE STATE CONNECTION enp7s0 ethernet disconnected -- enp8s0 ethernet disconnected -- bond0 bond connected bond0 bond1 bond connected bond1 ...In this example:
-
enp7s0
andenp8s0
are not configured. To use these devices as ports, add connection profiles in the next step. Note that you can only use Ethernet interfaces in a team that are not assigned to any connection. -
bond0
andbond1
have existing connection profiles. To use these devices as ports, modify their profiles in the next step.
-
Assign the port interfaces to the team:
If the interfaces you want to assign to the team are not configured, create new connection profiles for them:
#
nmcli connection add type ethernet slave-type team con-name team0-port1 ifname enp7s0 master team0
#nmcli connection add type ethernet slave-type team con-name team0-port2 ifname enp8s0 master team0
. These commands create profiles for
enp7s0
andenp8s0
, and add them to theteam0
connection.To assign an existing connection profile to the team, set the
master
parameter of these connections toteam0
:#
nmcli connection modify bond0 master team0
#nmcli connection modify bond1 master team0
These commands assign the existing connection profiles named
bond0
andbond1
to theteam0
connection.
Configure the IP settings of the team. Skip this step if you want to use this team as a ports of other devices.
Configure the IPv4 settings. For example, to set a static IPv4 address, network mask, default gateway, DNS server, and DNS search domain the
team0
connection, enter:#
nmcli connection modify team0 ipv4.addresses '192.0.2.1/24'
#nmcli connection modify team0 ipv4.gateway '192.0.2.254'
#nmcli connection modify team0 ipv4.dns '192.0.2.253'
#nmcli connection modify team0 ipv4.dns-search 'example.com'
#nmcli connection modify team0 ipv4.method manual
Configure the IPv6 settings. For example, to set a static IPv6 address, network mask, default gateway, DNS server, and DNS search domain of the
team0
connection, enter:#
nmcli connection modify team0 ipv6.addresses '2001:db8:1::1/64'
#nmcli connection modify team0 ipv6.gateway '2001:db8:1::fffe'
#nmcli connection modify team0 ipv6.dns '2001:db8:1::fffd'
#nmcli connection modify team0 ipv6.dns-search 'example.com'
#nmcli connection modify team0 ipv6.method manual
Activate the connection:
#
nmcli connection up team0
Verification steps
Display the status of the team:
#
teamdctl team0 state
setup: runner: activebackup ports: enp7s0 link watches: link summary: up instance[link_watch_0]: name: ethtool link: up down count: 0 enp8s0 link watches: link summary: up instance[link_watch_0]: name: ethtool link: up down count: 0 runner: active port: enp7s0In this example, both ports are up.
Additional resources
- For more information on testing connections, see Chapter 39, Testing basic network settings.
- If the connection does not have a default gateway, see Section 18.8, “Configuring NetworkManager to avoid using a specific profile to provide a default gateway”.
- Section 12.4, “Understanding the teamd service, runners, and link-watchers”.
-
For
nmcli
examples, see thenmcli-examples(7)
man page. -
For all team properties you can set, see the
team
section in thenm-settings(5)
man page. -
For parameters you can set in the JSON configuration, as well as JSON examples, see the
teamd.conf(5)
man page.
12.7. Configuring a network team using nm-connection-editor
This section describes how you configure a network team using the nm-connection-editor
application.
Note that nm-connection-editor
can add only new ports to a team. To use an existing connection profile as a port, create the team using the nmcli
utility as described in Section 12.6, “Configuring a network team using nmcli commands”.
Prerequisites
- Two or more physical or virtual network devices are installed on the server.
- To use Ethernet devices as ports of the team, the physical or virtual Ethernet devices must be installed on the server.
- To use team, bond, or VLAN devices as ports of the team, ensure that these devices are not already configured.
Procedure
Open a terminal, and enter
nm-connection-editor
:$
nm-connection-editor
- Click the button to add a new connection.
-
Select the
Team
connection type, and click . In the
Team
tab:-
Optional: Set the name of the team interface in the
Interface name
field. Click the
button to add a new connection profile for a network interface and adding the profile as a port to the team.-
Select the connection type of the interface. For example, select
Ethernet
for a wired connection. - Optional: Set a connection name for the port.
-
If you create a connection profile for an Ethernet device, open the
Ethernet
tab, and select in theDevice
field the network interface you want to add as a port to the team. If you selected a different device type, configure it accordingly. Note that you can only use Ethernet interfaces in a team that are not assigned to any connection. - Click .
-
Select the connection type of the interface. For example, select
Repeat the previous step for each interface you want to add to the team.
Click the
button to set advanced options to the team connection.-
In the
Runner
tab, select the runner. -
In the
Link Watcher
tab, set the link watcher and its optional settings. - Click .
-
In the
-
Optional: Set the name of the team interface in the
Configure the IP settings of the team. Skip this step if you want to use this team as a port of other devices.
-
In the
IPv4 Settings
tab, configure the IPv4 settings. For example, set a static IPv4 address, network mask, default gateway, DNS server, and DNS search domain: -
In the
IPv6 Settings
tab, configure the IPv6 settings. For example, set a static IPv6 address, network mask, default gateway, DNS server, and DNS search domain:
-
In the
- Save the team connection.
-
Close
nm-connection-editor
.
Verification steps
Display the status of the team:
#
teamdctl team0 state
setup: runner: activebackup ports: enp7s0 link watches: link summary: up instance[link_watch_0]: name: ethtool link: up down count: 0 enp8s0 link watches: link summary: up instance[link_watch_0]: name: ethtool link: up down count: 0 runner: active port: enp7s0
Additional resources
- Section 13.6, “Configuring a network bond using nm-connection-editor”
- Section 11.2, “Configuring a network bridge using nm-connection-editor”
- Section 10.2, “Configuring VLAN tagging using nm-connection-editor”
- For more information on testing connections, see Chapter 39, Testing basic network settings.
- If the connection does not have a default gateway, see Section 18.8, “Configuring NetworkManager to avoid using a specific profile to provide a default gateway”.
- Section 12.4, “Understanding the teamd service, runners, and link-watchers”.
- If the configuration on the disk does not match the configuration on the device, starting or restarting NetworkManager creates an in-memory connection that reflects the configuration of the device. For further details and how to avoid this problem, see NetworkManager duplicates a connection after restart of NetworkManager service.