Jump to contentJump to page navigation: previous page [access key p]/next page [access key n]
documentation.suse.com / Managing network teaming devices

Managing network teaming devices

Publication Date: 27 Jun 2024
WHAT?

Combine two or more network interfaces into a single teamed device.

WHY?

Network teaming can increase bandwidth and/or provide redundancy.

EFFORT

Approximately 15 minutes to read and understand the content.

REQUIREMENTS
  • Network connection

  • Basic understanding of networking and IP addresses

  • Existing network interfaces to include in the teamed device

  • Switch support, depending on the teaming mode

  • The package libteam-tools is installed

This article is about network teaming. To configure network bonding, see Managing network bonding devices.

1 Configuring network teaming

Network teaming combines two or more network interfaces into a single teamed device to increase bandwidth and/or provide redundancy. The behavior of the teamed device is configured using teaming modes.

1.1 Requirements

  • Network connection

  • Basic understanding of networking and IP addresses

  • Existing network interfaces to include in the teamed device

  • Switch support, depending on the teaming mode

  • The package libteam-tools is installed

1.2 Restrictions

Do not split teams over multiple switches

In most hardware setups, all network interfaces in a teamed device must be connected to the same switch. For more information, consult your switch vendor documentation.

No teaming in YaST

Currently, YaST cannot create a teamed device. You must configure network teaming manually.

Teaming and virtualization

Teamed devices are made up of multiple network interfaces. In most configurations you should only configure teaming in the host. Virtual interfaces to guests are then created as a bridge with the teamed devices, simplifying guest creation and deployment.

It is possible, but not recommended, to configure teaming in a guest. When configuring teaming in a guest, you must assign multiple interfaces to the guest and configure the host without teaming. You must also be careful to configure the host and its network bridges so that you do not mix teaming in the host and guests.

1.3 Teaming modes

The following teaming modes are available:

broadcast

All traffic is broadcast on all interfaces. Provides fault tolerance. Requires switch support.

roundrobin

Packets are transmitted in round-robin fashion from the first to the last available interface. Provides fault tolerance and load balancing. Requires switch support.

activebackup

Only one network interface is active. If it fails, a different interface becomes active. Provides fault tolerance.

loadbalance

The teamed device transmits packets via all its interfaces, performing load balancing (passive or active) with a use of hash functions. For passive load balancing, only the BPF hash function is used. For active load balancing, the runner finds the best balance by moving hashes between available interfaces. Provides fault tolerance and load balancing. No specific switch support is required.

lacp

All interfaces in the LACP group must share the same speed and duplex settings, and must be connected to the same switch. Provides fault tolerance and load balancing. Requires ethtool support in the interface drivers, and a switch that supports and is configured for IEEE 802.3ad Dynamic link aggregation. If your switch supports it, this is the preferred mode.

Consult your hardware manual to check which modes your switch supports.

1.4 Configuring network teaming with ifcfg

  1. Create a configuration file named /etc/sysconfig/network/ifcfg-team0. If you need more than one teamed device, give them ascending numbers. For more information, see man ifcfg, man ifcfg-team, and /etc/sysconfig/network/ifcfg.template.

    In the configuration file, define the following parameters:

    STARTMODE=MODE 1
    BOOTPROTO=IP_ASSIGNMENT 2
    IPADDR=IPv4_ADDRESS3
    IPADDR6=IPv6_ADDRESS3
    
    TEAM_RUNNER="TEAMING_MODE" 4
    
    TEAM_PORT_DEVICE_0="FIRST_DEVICE_NAME" 5
    TEAM_PORT_DEVICE_1="SECOND_DEVICE_NAME" 5
    
    TEAM_LW_NAME="LINK_WATCHER" 6

    1

    Defines how the teamed device starts. Use auto to start the interface automatically on every reboot, or use manual to prevent the interface from starting automatically.

    2

    Defines how IP addresses are assigned to the teamed device. Use static to manually assign static IP addresses, or use dhcp to automatically assign dynamic IP addresses.

    3

    Specifies the IPv4 and IPv6 addresses for the device, if you are manually assigning static IP addresses.

    4

    Defines the teaming mode for this interface. Some teaming modes require additional variables. See man ifcfg-team for more information about mode-specific variables.

    5

    Specifies two or more network interfaces to include in the teamed device.

    6

    Defines a link watcher to monitor the state of subordinate devices.

    The default option ethtool only checks if the device is up and accessible. This option is fast, but does not check if the device can actually send or receive packets.

    If you need higher confidence in the connection, use the arp_ping option. This sends pings to a host specified by the variable TEAM_LW_ARP_PING_TARGET_HOST. The teamed device is only considered to be up if replies are received.

    See man ifcfg-team for more information about watcher-specific variables.

    Example 1: Configuration for load balancing with lacp
    STARTMODE=auto
    BOOTPROTO=static
    IPADDR="192.168.1.1/24"
    IPADDR6="fd00:deca:fbad:50::1/64"
    
    TEAM_RUNNER="lacp"
    TEAM_LACP_SELECT_POLICY="lacp_prio"
    TEAM_LACP_TX_HASH="ipv4,ipv6,eth,vlan"
    TEAM_LACP_TX_BALANCER_NAME="basic"
    TEAM_LACP_TX_BALANCER_INTERVAL="100"
    
    TEAM_PORT_DEVICE_0="eth0"
    TEAM_PORT_DEVICE_1="eth1"
    
    TEAM_LW_NAME="ethtool"
    TEAM_LW_ETHTOOL_DELAY_UP="10"
    TEAM_LW_ETHTOOL_DELAY_DOWN="10"
    Example 2: Configuration for failover with activebackup
    STARTMODE=auto
    BOOTPROTO=static
    IPADDR="192.168.1.2/24"
    IPADDR6="fd00:deca:fbad:50::2/64"
    
    TEAM_RUNNER=activebackup
    
    TEAM_PORT_DEVICE_0="eth0"
    TEAM_PORT_DEVICE_1="eth1"
    
    TEAM_LW_NAME=ethtool
    TEAM_LW_ETHTOOL_DELAY_UP="10"
    TEAM_LW_ETHTOOL_DELAY_DOWN="10"
  2. Back up the existing ifcfg files for the network interfaces that you included in the teamed device, in case you need to restore them later.

  3. Remove the ifcfg files of the network interfaces that you included in the teamed device. Do not remove the backup files.

  4. Check if everything is included in Wicked's configuration file:

    > sudo wicked show-config
  5. Start the teamed device:

    > sudo wicked ifup all team0

    If you need additional debug information, use the option --debug all after the all subcommand.

    Important

    Do not use systemctl to start or stop the teamed device. Always use the wicked command.

  6. Check the status of the teamed device:

    • Get the state of the teamd instance from Wicked:

      > sudo wicked ifstatus --verbose team0
    • Get the state of the entire instance:

      > sudo teamdctl team0 state
    • Get the systemd state of the teamd instance:

      > sudo systemctl status teamd@team0

    Each command shows a slightly different view depending on your needs.

If you make changes to the ifcfg-team0 file after starting the device, reload its configuration with the command wicked ifreload team0.

2 Adding VLANS over a teamed device

VLANs allow the running of multiple logical (virtual) Ethernets over one single physical Ethernet. They logically split the network into different broadcast domains so that packets are only switched between members that are designated for the same VLAN.

2.1 Requirements

  • VLAN tags are enabled on the switch. Consult your hardware manual for details.

  • To use load balancing for the teamed device, the switch must support LACP (802.3ad).

  • A teamed device is already configured.

2.2 Adding VLANs over a teamed device

The examples in this procedure use the IP addresses 192.168.10.1 and 192.168.20.1. Replace these with the actual IP addresses for your devices.

  1. In /etc/sysconfig/network, create a file named ifcfg-vlan0 and add the following content:

    STARTMODE="auto"
    BOOTPROTO="static" 1
    IPADDR='192.168.10.1/24' 2
    ETHERDEVICE="team0" 3
    VLAN_ID="0" 4
    VLAN='yes'

    1

    Specifies that the IP address is fixed.

    2

    Defines the IP address and netmask.

    3

    Contains the real interface to use for the VLAN interface. This example uses the teamed device team0.

    4

    Specifies a unique ID for the VLAN.

  2. Copy the file /etc/sysconfig/network/ifcfg-vlan0 to /etc/sysconfig/network/ifcfg-vlan1 and change the following values:

    • IPADDR='192.168.20.1/24'.

    • VLAN_ID='1'.

  3. Start the two VLANs:

    > sudo wicked ifup vlan0 vlan1
  4. Check the status of the VLANs:

    > ip addr

    You can check a specific device by using the show subcommand:

    > ip addr show vlan0

3 Removing a teamed device

Use this procedure to remove the configuration for a bonded or teamed device and restore the member interfaces to their original, separate configuration.

The following examples use the device name team0. Replace this with the actual name of your device.

  1. Stop the device:

    > sudo wicked ifdown team0
  2. Hide the configuration file by renaming it from /etc/sysconfig/network/ifcfg-team0 to /etc/sysconfig/network/.ifcfg-team0.

    Alternatively, if you definitely do not need the configuration anymore, remove the file instead of renaming it.

  3. To re-enable the network interfaces that were included in the device, restore their original configuration from the backup files.

  4. Reload the network configuration:

    > sudo wicked ifreload all
  5. Check the status of the remaining network interfaces:

    > ip addr

4 Network bonding or network teaming: feature comparison

Network bonding and network teaming are different methods for combining network connections to provide a single combined interface. Bonding is handled exclusively in the kernel. Teaming includes a small set of kernel modules that provide an interface for teamd instances, but everything else is handled in user space.

Table 1: Bonding and teaming feature comparison
FeatureBondingTeaming
broadcast, round-robin TX policyyesyes
active-backup TX policyyesyes
LACP (802.3ad) supportyesyes
hash-based TX policyyesyes
user can set hash functionnoyes
TX load-balancing support (TLB)yesyes
TX load-balancing support for LACPnoyes
Ethtool link monitoringyesyes
ARP link monitoringyesyes
NS/NA (IPV6) link monitoringnoyes
RCU locking on TX/RX pathsnoyes
port prio and stickinessnoyes
separate per-port link monitoring setupnoyes
multiple link monitoring setuplimitedyes
VLAN supportyesyes
multiple device stackingyesyes