How to Configure Network Teaming in RHEL 7 ?

Network Teaming in RHEL 7 is not replacement of bonds. But it’s alternate option depending upon the requirement. In this post I am going to show you how to create team using two ethernet interfaces. I am creating it using static network configuration files.

Step 1 : I have create configuration file for team. Below is the content of that file.

[root@node1 ~]# more /etc/sysconfig/network-scripts/ifcfg-team0
DEVICE=team0
DEVICETYPE=Team
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.120.11
NETMASK=255.255.255.0
TEAM_CONFIG='{“runner”: {“name”: “activebackup”}, “link_watch”: {“name”:”ethtool”}}’

Step 2 : After that I have configured the files for two interfaces which are going to part of team configuration.I have given one priority of 100 and 99 to another interface.

[root@node1 ~]# more /etc/sysconfig/network-scripts/ifcfg-ens38
DEVICE=ens38
HWADDR=00:0c:29:9e:4c:f7
DEVICETYPE=TeamPort
ONBOOT=yes
TEAM_MASTER=team0
TEAM_PORT_CONFIG='{“prio”: 100}’

[root@node1 ~]# more /etc/sysconfig/network-scripts/ifcfg-ens39
DEVICE=ens39
HWADDR=00:0c:29:9e:4c:01
DEVICETYPE=TeamPort
ONBOOT=yes
TEAM_MASTER=team0
TEAM_PORT_CONFIG='{“prio”: 99}’

Step 3 : After configuing configuration files. We can restart the network service.

[root@node1 ~]# systemctl restart network

Step 4 : In the output of ifconfig you can see the team0 will come up. Now to check the whether our configuration is as expected. We can issue the below commands.

a) How to check which NICs are part of team ?

[root@node1 network-scripts]# teamnl team0 ports
5: ens39: up 1000Mbit FD
4: ens38: up 1000Mbit FD

b) How to check which NIC is currently working actively in team ?

[root@node1 network-scripts]# teamdctl team0 state
setup:
runner: activebackup
ports:
ens38
link watches:
link summary: up
instance[link_watch_0]:
name: ethtool
link: up
ens39
link watches:
link summary: up
instance[link_watch_0]:
name: ethtool
link: up
runner:
active port: ens38

From above output we clearly see that ens38 is our active NIC.

c) How to check the fail over in team?

[root@node1 network-scripts]# ip link set ens38 down

[root@node1 network-scripts]# teamdctl team0 state view
setup:
runner: activebackup
ports:
ens38
link watches:
link summary: down
instance[link_watch_0]:
name: ethtool
link: down
ens39
link watches:
link summary: up
instance[link_watch_0]:
name: ethtool
link: up
runner:
active port: ens39

We can see that active port has changed to another NIC ens39 when we manually bring down the ens38. That means our team0 is working as expected. Very soon I will come up with Bridge configuration as well.

Advertisements

3 thoughts on “How to Configure Network Teaming in RHEL 7 ?

  1. Vikrant Post author

    team configuration file is present at step 1.

    TEAM_CONFIG='{“runner”: {“name”: “activebackup”}, “link_watch”: {“name”:”ethtool”}}’

    I hope that helps.

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s