Learn how to configure network teaming in Linux with this comprehensive guide. Follow step-by-step instructions to combine multiple network interfaces for improved performance, redundancy, and reliability. #centlinux #linux #networking
Table of Contents
What is Network Teaming?
Link aggregation is a process of combining two or more network interfaces to work as a single unit. This combined interface is called Network Bond or Network Team based on the link aggregation method used to create it. Network Bond is a legacy method and it is now about to deprecate in favor of Network Team. Two main advantages of Network Teaming are redundancy and load balancing. Redundancy increases Network Availability, whereas Load Balancing increases Network Efficiency.
In this article, we will configure a Network Team of two interfaces using nmcli for High Availability of our Linux server.
Environment Specification
We have configured a Linux machine with three network interfaces.
- Hostname – server1.example.com
- IP Address – 192.168.116.11/24 (static)
- Team IP Address – 192.168.116.155/24 (dhcp)
- Network Device 1 – eno16777728
- Network Device 2 – eno33554968
- Network Device 3 – eno50332192
- Operating System – RHEL 7.0
Recommended Online Training: Learn Bash Shell in Linux for Beginners
Configure Network Teaming in Linux
We have three network interfaces on our server, one of them is already configured and working fine. The other two interfaces are not in use. We will use these two devices to create a Network Team.
First of all check the status of network devices and connections.
# nmcli device status
DEVICE TYPE STATE CONNECTION
eno16777728 ethernet connected eno16777728
eno33554968 ethernet disconnected --
eno50332192 ethernet disconnected --
lo loopback unmanaged --
# nmcli connection show
NAME UUID TYPE DEVICE
eno16777728 a5c248f9-1118-443e-a2bc-7b2de73afe72 802-3-ethernet eno16777728
Above commands shows that are there are two disconnected devices, and there is only one connection is created on the server. Therefore, we can create connections for remaining two devices and utilize it as a Network Team.
A Network Team consist of one team-master and two or more team-slaves connections. Therefore, create the team-master connection now.
# nmcli connection add con-name team0 ifname team0 autoconnect yes type team config '{ "runner": { "name": "activebackup" }}'
Connection 'team0' (f74faadb-9441-44f0-9b99-1433f4dd4882) successfully added.
We have created a team-master with activebackup runner, because we are creating a Network Team for High Availability.
Now its time to add our team-slaves to this team.
# nmcli connection add con-name team0-slave0 ifname eno33554968 autoconnect yes type team-slave master team0
Connection 'team0-slave0' (a4d66f51-f40b-4558-9b3b-2df5fb24eb14) successfully added.
# nmcli connection add con-name team0-slave1 ifname eno50332192 autoconnect yes type team-slave master team0
Connection 'team0-slave1' (7e72d440-b54a-46ea-a973-54d5ec4cb87c) successfully added.
Check the status of network devices and connections.
# nmcli connection show
NAME UUID TYPE DEVICE
team0-slave0 a4d66f51-f40b-4558-9b3b-2df5fb24eb14 802-3-ethernet eno33554968
team0 f74faadb-9441-44f0-9b99-1433f4dd4882 team team0
eno16777728 a5c248f9-1118-443e-a2bc-7b2de73afe72 802-3-ethernet eno16777728
team0-slave1 7e72d440-b54a-46ea-a973-54d5ec4cb87c 802-3-ethernet eno50332192 # nmcli device status
DEVICE TYPE STATE CONNECTION
eno16777728 ethernet connected eno16777728
eno33554968 ethernet connected team0-slave0
eno50332192 ethernet connected team0-slave1
team0 team connected team0
lo loopback unmanaged --
You may observe that both of our formerly disconnected devices are now connected.
Check the IP Address of the Team.
# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eno16777728: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:0c:29:63:0c:9a brd ff:ff:ff:ff:ff:ff
inet 192.168.116.11/24 brd 192.168.116.255 scope global eno16777728
valid_lft forever preferred_lft forever
inet6 fd15:4ba5:5a2b:1008:20c:29ff:fe63:c9a/64 scope global dynamic
valid_lft 86383sec preferred_lft 14383sec
inet6 fe80::20c:29ff:fe63:c9a/64 scope link
valid_lft forever preferred_lft forever
3: eno33554968: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master team0 state UP qlen 1000
link/ether 00:0c:29:63:0c:a4 brd ff:ff:ff:ff:ff:ff
4: eno50332192: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master team0 state UP qlen 1000
link/ether 00:0c:29:63:0c:a4 brd ff:ff:ff:ff:ff:ff
5: team0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP
link/ether 00:0c:29:63:0c:a4 brd ff:ff:ff:ff:ff:ff
inet 192.168.116.155/24 brd 192.168.116.255 scope global dynamic team0
valid_lft 1463sec preferred_lft 1463sec
inet6 fd15:4ba5:5a2b:1008:7496:bff:fed9:159c/64 scope global dynamic
valid_lft 86383sec preferred_lft 86383sec
inet6 fe80::7496:bff:fed9:159c/64 scope link
valid_lft forever preferred_lft forever
Our team has been configured successfully and a dynamic IP address has been assigned by the DHCP server to the Network Team connection.
Check the status of the Network Team and its runner.
# teamdctl team0 state view
setup:
runner: activebackup
ports:
eno33554968
link watches:
link summary: up
instance[link_watch_0]:
name: ethtool
link: up
eno50332192
link watches:
link summary: up
instance[link_watch_0]:
name: ethtool
link: up
runner:
active port: eno33554968
The same steps can be used to configure a Network Team with others runners like loadbalancer, roundrobin, etc.
If you are new to Linux and facing difficulty in working at Linux Bash prompt. We recommend that, you should read The Linux Command Line, 2nd Edition: A Complete Introduction by William Shotts.
Final Thoughts
If you found this guide on configuring network teaming in Linux helpful and need further assistance, I’m here to help. I offer professional services to ensure your network teaming setup is optimized for performance and reliability. Visit my Fiverr profile for more details and to get started: Linux Server Administrator. Let’s enhance your network configuration together!