Monday, June 13, 2016

RHEL7 - How To Configure Network Teaming on RHEL7

How To Configure Network Teaming on RHEL7

- It is a process to aggregate multiple network links together into a single logical link which will either increase network throughput or redundancy based on the set up.

- In this process, we assign an IP address to a group of two network interfaces to combine the interface throughput, or for fault tolerance so if one interface fails we can fail over to another one.

- Link aggregation was done using Network bonding method on older version of RHEL. There is a new concept of Network Teaming on RHEL7 which comes with almost all features of binding as with other new features.

Plan:
- In addition to your current interface, add two new interfaces to your system.
- You can use nmcli command line tool or nmtui or through the graphical user interface to configure teaming. Here in this example we use mncli.
- Use 'man 5 nmcli-examples' and 'teamnl nm-team options' for other options available.


Step to create and configure a network team

1. Install a teaming daemon
# yum search teamd
# yum install teamd

2. Configure teamd using nmcli command line tool
# nmcli con show

Look at the output under DEVICE and pick the interface that you are going to use.

3. Create a team called team0
# nmcli con add type team con-name team0

4. List the devices
# nmcli con show

5. Now add interface to the team0
# nmcli con add type team-slave ifname <interface_Name1> master team0
# nmcli con add type team-slave ifname <interface_name2> master team0

6.Now, list the devices
# nmcli con show

7. Verify new interface info is created.
# cd /etc/sysconfig/network-scripts/
# ls -ltr ifcfg*

You will see the newly add configuration for the team and the interfaces.
Note: Do not edit these files manually. If you do, reload the config using "nmcli con reload" command

8. Now, assign IP address. By default it use DHCP.
# nmcli con mod team0 ipv4.method manual
# nmcli con mod team0 ipv4.addresses 192.168.10.33/24
# nmcli con mod team0 ipv4.gateway 192.168.10.1

9. Now, bring the interface up
# nmcli con up team-slave-<your_interface1>
# nmcli con up team-slave-<your_interface2>

10. Verify the ip address
# ip addr show

You should have team up and running.

Issue?
if team0 is not up, try to bring it up
# nmcli con up team0
# systemctl restart network

11. Check the team status
# teamctl nm-team state

The output shows,
runner: roundrobin
and also shows you two interfaces


Some available runners are

-> roundrobin: This is a default method. It sends packets to all interfaces in the team in a round robin fashion, in such one interface at a time and next.

-> broadcast: All the traffic is sent over to all ports.

-> activebackup: One interface is actively in use while the other sits aside as a backup. The link is constantly monitored will be failover if there is issue/change on active interface.

-> loadbalance: Traffic is balanced over all interfaces based on Tx traffic, equal load should be shared over available interfaces.

12. Modify the team
a. If you like to change runner from default to another, at the time of initial set up.
# nmcli con add type team con-name team0 config '{ "runner": {"name": "broadcast"}}'

b. Modify the current team by editing the configuration file /etc/sysconfig/network-scripts/ifcfg-team0 and add a line at the bottom of the page as follow

TEAM_CONFIG='{"runner": {"name": "activebackup"}, "link_watch": {"name": "ethtool"}}'

13. After the config change, restart the network service
# systemctl restart network
# teamctl nm-team state

verify the runner got changed.

This is one way to increase performance or redundancy of your system network connection.

No comments:

Post a Comment