RHEL7: Configure network teaming between two RHEL systems.

Share this link

Presentation

There are several ways to configure network teaming in RHEL 7:

  • using the nmtui command and a Text User Interface,
  • using the nmcli command at the Command Line Interface,
  • using the graphical interface,
  • through direct changes in the network configuration files.

For the rest of this tutorial, it is the nmcli option that has been chosen because it’s the quickest method and arguably the least prone to errors.

Prerequisites

To put into practice this tutorial, you need two VM and access to their respective console.
Each VM has been installed with a base distribution (minimal distribution should work but was not tested). Each VM’s got two network interfaces called eth0 and eth1.

Install the teamd package:

# yum install -y teamd

If a previous network configuration was set up, remove it on both VM:

# nmcli con show
NAME                UUID                                  TYPE            DEVICE
Wired connection 1  f32cfcb7-3567-4313-9cf3-bdd87010c7a2  802-3-ethernet  eth1  
System eth0         257e9416-b420-4218-b1eb-f14302f20941  802-3-ethernet  eth0  
# nmcli con del f32cfcb7-3567-4313-9cf3-bdd87010c7a2
# nmcli con del 257e9416-b420-4218-b1eb-f14302f20941

Teaming Configuration

Execute the following steps at the console of both VM.

Create the teaming interface:

# nmcli con add type team con-name myteam0 ifname team0 config '{ "runner": {"name": "loadbalance"}}'
 team0 config '{ "runner": {"name": "loadbalance"}}'
[10655.288431] IPv6: ADDRCONF(NETDEV_UP): team0: link is not ready
[10655.306955] team0: Mode changed to "loadbalance"
Connection 'myteam0' (ab0a5f7b-2547-4d4f-8fc8-834030839fc1) successfully added.

Note1: If you don’t specify con-name myteam0, the teaming interface will be named team-team0.
Note2: Examples of configuration are available in the /usr/share/doc/teamd-*/example_configs. You can also get some examples through man teamd.conf.

Now, the file /etc/sysconfig/network-scripts/ifcfg-myteam0 contains the main following lines:

DEVICE=team0
TEAM_CONFIG="{ \"runner\": {\"name\": \"loadbalance\"}}"
DEVICETYPE=Team
NAME=myteam0
ONBOOT=yes

Add an IPv4 configuration:
In RHEL 7.0:

# nmcli con mod myteam0 ipv4.addresses "192.168.1.10/24 192.168.1.1"
# nmcli con mod myteam0 ipv4.method manual

From RHEL 7.1 on:

# nmcli con mod myteam0 ipv4.addresses 192.168.1.10/24
# nmcli con mod myteam0 ipv4.gateway 192.168.1.1
# nmcli con mod myteam0 ipv4.method manual

Note: If you don’t specify any IP configuration, both VM will get their ip address and gateway through DHCP by default.

Add the eth0 interface to the teaming interface:

# nmcli con add type team-slave con-name team0-slave0 ifname eth0 master team0
[10707.777803] team0: Port device eth0 added
[10707.779146] IPv6: ADDRCONF(NETDEV_CHANGE): team0: link becomes ready
Connection 'team0-slave0' (a9a5b612-aad6-48b0-a097-88db35c898d3) successfully added.

Note1: If you don’t specify con-name team0-slave0, the teaming slave interface will be named team-slave-eth0.
Note2: The file /etc/sysconfig/network-scripts/ifcfg-team0-slave0 has been created with the following main lines:

NAME=team0-slave0
DEVICE=eth0
ONBOOT=yes
TEAM_MASTER=team0
DEVICETYPE=TeamPort

Add the eth1 interface to the teaming interface:

# nmcli con add type team-slave con-name team0-slave1 ifname eth1 master team0
[10750.419419] team0: Port device eth1 added
Connection 'team0-slave1' (e468dce3-a032-4088-8173-e7bee1bd4ad5) successfully added.

Note1: If you don’t specify con-name team0-slave1, the teaming slave interface will be named team-slave-eth1.
Note2: The file /etc/sysconfig/network-scripts/ifcfg-team0-slave1 has been created with the following main lines:

NAME=team0-slave1
DEVICE=eth1
ONBOOT=yes
TEAM_MASTER=team0
DEVICETYPE=TeamPort

Activate the teaming interface:

# nmcli con up myteam0
[10818.800169] team0: Port device eth1 removed
[10818.803399] team0: Port device eth0 removed
[10818.939884] team0: Port device eth1 added
[10818.941069] IPv6: ADDRCONF(NETDEV_CHANGE): team0: link becomes ready
[10818.971887] team0: Port device eth0 added
[10819.932168] IPv6: team0: IPv6 duplicate address fe80::5054:ff:fe3f:860a detected!
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/32)

Check the configuration:

# nmcli con show
NAME          UUID                                  TYPE            DEVICE
team0-slave0  a9a5b612-aad6-48b0-a097-88db35c898d3  802-3-ethernet  eth0
myteam0       ab0a5f7b-2547-4d4f-8fc8-834030839fc1  team            team0
team0-slave1  e468dce3-a032-4088-8173-e7bee1bd4ad5  802-3-ethernet  eth1

You can also use the teamdctl command to check the configuration state:

# teamdctl team0 state
setup:
  runner: loadbalance
ports:
  eth0
    link watches:
      link summary: up
      instance[link_watch_0]:
        name: ethtool
        link: up
  eth1
    link watches:
      link summary: up
      instance[link_watch_0]:
        name: ethtool
        link: up

Or to dump the configuration:

# teamdctl team0 config dump
{
"device": "team0",
"ports": {
"eth0": {
"link_watch": {
"name": "ethtool"
}
},
"eth1": {
"link_watch": {
"name": "ethtool"
}
}
},
"runner": {
"name": "loadbalance",
"tx_hash": [
"eth",
"ipv4",
"ipv6"
]
}
}

You can also get the ports status with the teamnl command:

# teamnl team0 ports
 2: eth0: up 0Mbit HD
 3: eth1: up 0Mbit HD

In addition, you can directly change the content of the files in the /etc/sysconfig/network-scripts directory but you need to apply the following command afterwards:

# nmcli con reload

Source: RHEL 7 Networking Guide and nmcli-examples man page.

Exam Tip

If you don’t remember all the details the day of the exam, get the information in the nmcli-examples and teamd.conf man pages or in the /usr/share/doc/teamd-*/example_ifcfgs and /usr/share/doc/teamd-*/example_ifcfgs directories.

Additional Resources

The RootUsers website’s got an interesting tutorial about Configuring Network Teaming in Linux.
Venkat Nagappan provides a nice video about Setting up Network Teaming and Bridging (20min/2015).

1 Star2 Stars3 Stars4 Stars5 Stars (3 votes, average: 5.00 out of 5)
Loading...

Leave a Reply

32 Comments on "RHEL7: Configure network teaming between two RHEL systems."

Notify of
Sort by:   newest | oldest
Shikaz
Member
Shikaz

if you are working on a server with for example ONLY 2 ethernets , you still nmcli delete one of them and you create the teaming ? or the whole connection will be down for deleting the connection you are using ?

Shikaz
Member
Shikaz

man i have accomplished this by adding 3 Ethernet for tests and kept one up and two for teaming, one thing i don’t understand, when you say that this configuration to be done on 2 VMs what is the relation between them ? i mean each one will have a loadbalance between two ethernet on it’s own, is there any relation between the two machines ?

thanks

alamahant
Member
alamahant

For me it seems absolutely impossible to configure teaming in Centos7 guest both in Vbox and Vmware..I follow the steps EXACTLY like shown here or in the nmcli-examples manual BUT when I try to bring up the team i continuously get Error: Connection activation failed: Active connection removed before it was itialized.
SO ANNOYING……..
Any advice or indication will be greatly appreciated 🙂

alamahant
Member
alamahant

I have been using Vbox on Windows host for all my studying for Rhel.
But this begs the question:On the exams I dont think there will be a Windows host.Most probably a Rhel 7 Desktop running 2 servers as KVM guests..I mean there must be be a Desktop somewhere…And there must be 2 servers also..Its is veeeeryyyyy unclear.
I think RH should have been more clear about the exam environment..
🙂

Rookie23
Member
Rookie23

But graphical interface is allowed on those two VMs for RHCE? I find teaming to be configured easiest via GUI, one task done in like 2-3 minutes or similar.
Also, one question, is it possible that if I configure bonding/teaming with graphical interface, I don’t have the output with teamdctl team0 state?
I only have
setup:
runner: roundrobin

Thanks!

Rookie23
Member
Rookie23

When you do it by GUI, the output of commands is not shown until you do a restart, found that one out 🙂
I am asking because for a lot of stuff, Ghori mentions GUI in his books, and for some, use of GUI is much much quicker, that’s why I ask.
Of course, in production world, there won’t be a GUI, but on exam, in my opinion it’s just an issue of speed.
My question was just, is GUI available both on host and VMs or not at all?

brucemzn
Member
brucemzn

@ Rookie
GUI is available on the VMs during the exam. You just have to start it or enable it.

tron
Member
tron

Just FYI, it is convenient to know that there are example team configs in /usr/share/doc/teamd-1.5/example_configs.

That way, is easier to copy-paste a sample config instead of having to build it by memory or scanning the manual if, e.g., a LACP team is requested, or an ARP ping watch.

Regarding the connection activation failure, be carefull at the runner syntax. If the syntax is bad (say you type runer instead of runner, or loadbaalance) that is the problem that you will get.
I’ve done this under vmware (both Workstation and ESXi) w/o trouble.

molecule1
Member
molecule1

On my test server (CentOS 7.2) it says “Error: Connection activation failed: NetworkManager plugin for ‘team’ unavailable”. I had to install NetworkManager-team and restart NetworkManager to enable the plugin.
Just FYI

tron
Member
tron

Another tip: it happened to me a couple of times that I made a mistake in the configuration and the team did not come up.

After fixing the team config, it did not come up either… and it ended up being that somehow the team slaves became disconnected.

If you reboot it will be up again, but a faster way to deal with this is nmcli device connect xxx, or something like that 🙂

nuelectron
Member
nuelectron
CertDepot, I am very grateful for you making this website and sharing you knowledge! Thank you and may God continue to bless you. Reading all the books, Michael Jang, Asghar Ghori, Sander van Vugt and others, I see that they are all missing couple of things and you just happen to have that steps which are missing in their books. For instance, reading “Network Teaming” on Sander van Vugt’s book, I was not even told that I had to remove existing network configurations on the slave interfaces. This is just one of them, there are couples of other errors in… Read more »
pistachio
Member
pistachio
Some notes on setting up this environment in VirtualBox.. 1) Go to VirtualBox Preferences>>Network>>Host-only Networks. Make sure you have at least one host-only network (i.e. vboxnet0) 2) Go to your virtual machine settings. Click on network. For Adapter 1, select Host-only adapter. Select your host-only network (i.e. vboxnet0). Click Advanced. Promiscuous Mode should be set to Allow All. 3) Do the exact same thing for Adapter2. 4) Once you are inside your instance, you will need to set your eth0 and eth1 interfaces to promiscuous mode. ip link set eth0 promisc on ip link set eth1 promisc on My guess… Read more »
brucemzn
Member
brucemzn

Hi Everyone
For those having issues with network teaming, nmtui command is easy to use. Get the JSON config examples from:
# cat /usr/share/doc/teamd-1.9/example_configs/

Network teaming can be done in four ways.
1. nmcli command
2. nmtui command
3. nm-connection-editor
4. NetworkManager
Out of the four listed above, please dont use method 3 and 4. I ran into errors. The team never came up

FYI
GUI is available in the exam (Both RHCSA and RHCE) and is 100% allowed. But try by all means to stay away from GUI.

Regards
Bruce

gavidialexis
Member
gavidialexis

Did you tried configuring an Ipv6 on a team interface, i got a error The IPv6 address display:
inet6 x:x:x:x::1/64 scope global tentative dadfailed.

thor22
Member
thor22
I have two servers: Server 1 has 2x10Gbit ethernet connections; Server 2 has 2x10Gbit ethernet connections. Both servers are running CentOS Linux release 7.2.1511 3.10.0-327.18.2.el7.x86_64 with Intel X710 10 GbR latest version 17.0.12 on Dell PowerEdge R730 server. Teaming LACP is UP & RUNNING but when I perform network throughput tests, it’s showing only 9Gb speed. Switch is Dell 10Gb compatible, The configuration on the switch seems ok. What is the bottleneck? Someone can help me? teamd-1.17-6.el7_2.x86_64 # nmcli con show NAME UUID TYPE DEVICE em1 e9757f4f-c0b4-4bbc-bd4e-b66103553000 802-3-ethernet em1 p5p2 5993e656-31cc-197d-8359-a7d520292c34 802-3-ethernet p5p2 p5p1 ae980826-1d4c-660f-07b7-c4ec1025b41b 802-3-ethernet p5p1 team0 702de3eb-2e80-897c-fd52-cd0494dd8123 team… Read more »
power
Member
power

Hi Guys,
What does that mean when during the exam “RHCE – Link Aggregation part” it said:
“Note:- run “lab teambridge setup” to add two more interfaces.In exam you have to configure in both serverX and desktopX machine”
Does each machine have one interface and I should add another one for Link Aggregation ???

phil_guy412
Member
phil_guy412
Why do we need to set up two virtual machines? Is this the given scenario during the exam? I only ask because two of my study materials regarding this topic only explains a scenario where you’re given one virtual machine with multiple network interfaces and you need to team two of the interfaces from this one virtual machine. Is there an exam scenario where I’ll be given two virtual machines and need to team the network interfaces from each virtual machine? Also for the one virtual machine scenario, can I team a primary network interface with a secondary interface or… Read more »
wpDiscuz

RHCSA7: Task of the day

Allowed time: 5 minutes.
Create a new user account called "bob" with password "redhat" and set expiration in one week.

RHCE7: Task of the day

Allowed time: 10 minutes.
Set up a httpd virtual server called "dummy" with DocumentRoot assigned to /opt.

Poll for favorite RHEL 7 book

What is your favorite RHEL 7 book to prepare RHCSA & RHCE exams?

View Results

Loading ... Loading ...

Poll for most difficult RHCSA 7 topic

What do you think is the most difficult RHCSA 7 topic?

View Results

Loading ... Loading ...

Poll for most difficult RHCE 7 topic

What do you think is the most difficult RHCE 7 topic?

View Results

Loading ... Loading ...

Recent Comments