Chapter 16. 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.

Prerequisites

  • Red Hat Enterprise Linux 8 is installed.
  • The system has an active subscription assigned.

16.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.

Note that in the context of network teaming, the term port is also known as slave. In the teamd service, the term port is preferred while in the NetworkManager service, the term slave refers to interfaces which create a team.

Important

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?

16.2. Understanding the default behavior of master and slave interfaces

Consider the following default behavior of, when managing or troubleshooting team or bond port interfaces using the NetworkManager service:

  • Starting the master interface does not automatically start the port interfaces.
  • Starting a port interface always starts the master interface.
  • Stopping the master interface also stops the port interface.
  • A master without ports can start static IP connections.
  • A master without ports waits for ports when starting DHCP connections.
  • A master with a DHCP connection waiting for ports completes when you add a port with a carrier.
  • A master with a DHCP connection waiting for ports continues waiting when you add a port without carrier.

16.3. Comparison of network teaming and bonding features

The following table compares features supported in network teams and network bonds:

FeatureNetwork bondNetwork 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

16.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

  1. Install the teamd and NetworkManager-team packages:

    # yum install teamd NetworkManager-team

16.6. Configuring a network team using nmcli commands

This section describes how you configure a network team using nmcli commands.

Prerequisites

  • Two or more network cards are installed in the server.
  • The network cards are connected to a switch.

Procedure

  1. Create the team interface. For example, to create a team interface that uses the activebackup runner and both the interface and connection named team0, enter:

    # nmcli connection add type team con-name team0 ifname team0 team.runner activebackup
  2. Optionally, set a link watcher. For example, to set the ethtool link watcher, modify the team0 connection:

    # 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 the ethtool link watcher and set its delay-up parameter to 2500 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 the delay-up parameter and the arp_ping link watcher with the source-host and target-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"
  3. 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
  4. 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/32'
    # nmcli connection modify team0 ipv6.gateway '2001:db8::fffe'
    # nmcli connection modify team0 ipv6.dns '2001:db8::fffd'
    # nmcli connection modify team0 ipv6.dns-search 'example.com'
    # nmcli connection modify team0 ipv6.method manual
  5. Optionally, display the network interfaces, and note the names of the interfaces you want to add to the team in the next step:

    # nmcli device
    DEVICE  TYPE      STATE         CONNECTION
    enp1s0  ethernet  connected     enp1s0
    enp7s0  ethernet  disconnected  --
    enp8s0  ethernet  disconnected  --
    lo      loopback  unmanaged     --
    Important

    You can only use network interfaces in a team that are not assigned to any connection. In the above example, you can only use the enp7s0 and enp8s0 interfaces.

  6. Assign the port interfaces to the team’s connection. For example, to add the interfaces named enp7s0 and enp8s0 to the team0 connection:

    # 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
  7. Activate the connection. For example, to activate the team0 connection:

    # nmcli connection up team0
  8. Optionally, 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

    In the example, both ports are up.

Additional resources

16.7. Configuring a network team using nm-connection-editor

This section describes how you configure a network team using the nm-connection-editor application.

Prerequisites

  • Two or more network cards are installed in the server.
  • The network cards are connected to a switch.

Procedure

  1. Open a terminal, and enter nm-connection-editor:

    $ nm-connection-editor
  2. Click the + button to add a new connection.
  3. Select the Team connection type, and click Create.
  4. On the Team tab:

    1. Optionally, set the name of the team interface in the Interface name field.
    2. Click the Add button to add a network interface as a slave to the team.

      1. Select the connection type of the interface. For example, select Ethernet for a wired connection.
      2. Optionally, set a connection name for the slave device.
      3. In the Device field on the Ethernet tab, select the network interface you want to add as a slave to the team.

        Important

        You can only use network interfaces in a team that are not configured.

      4. Click Save.
    3. Repeat the previous step for each interface you want to add to the team.

      add nic to team in nm connection editor

    4. Click the Advanced button to set advanced options to the team connection.

      1. On the Runner tab, select the runner.
      2. On the Link Watcher tab, set the link link watcher and its optional settings.
      3. Click OK.
  5. On 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: team IPv4 settings nm connection editor
  6. On 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: team IPv6 settings nm connection editor
  7. Click Save to save the team connection.
  8. Close nm-connection-editor.
  9. Optionally, 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