How to configure Interface Teaming with LACP using CentOS 7 and Redhat 7
Interface teaming is introduced in RHEL7 as an additional choice to implement fault tolerance and enhance throughput. It is widely considered more superior technique then Nic bonding and has much superior handling of packet flow then bonding. In this blog we will configure Nic teaming with LACP
The LACP mode can be active or passive. If the actor and partner are both in passive mode, they do not exchange LACP packets, which results in the aggregated Ethernet links not coming up. If either the actor or partner is active, they do exchange LACP packets. By default, LACP is turned off on aggregated Ethernet interfaces. We will configure active LACP on our side. One of the requirements here will be Active or passive LACP implemented on other side of this connection.
1. First we check interfaces to make sure they are up.
#ipaddr 4: em3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000 link/ether f0:4d:a2:01:70:3e brd ff:ff:ff:ff:ff:ff 5: em4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000 link/ether f0:4d:a2:01:70:40 brd ff:ff:ff:ff:ff:ff
2. Make sure teamd software package in installed.
[root@k1 network-scripts]# yum list teamd Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirror.cs.pitt.edu * extras: mirror.trouble-free.net * updates: mirror.trouble-free.net Installed Packages teamd.x86_64 1.15-1.el7 @anaconda Available Packages teamd.i686 1.15-1.el7 base
if not installed run
#yum -y install teamd
3. Make sure team driver is loaded in the kernel.
[root@k1 network-scripts]# modinfo team filename: /lib/modules/3.10.0-229.el7.x86_64/kernel/drivers/net/team/team.ko alias: rtnl-link-team description: Ethernet team device driver author: Jiri Pirko <jpirko@redhat.com> license: GPL v2 rhelversion: 7.1 srcversion: 826BA00FFA42C01088C8CEA depends: intree: Y vermagic: 3.10.0-229.el7.x86_64 SMP mod_unload modversions signer: CentOS Linux kernel signing key sig_key: A6:2A:0E:1D:6A:6E:48:4E:9B:FD:73:68:AF:34:08:10:48:E5:35:E5 sig_hashalgo: sha256
if not loaded run
#modprobe team
4. Create file called /etc/sysconfig/network-scripts/ifcfg-team0
DEVICE=team0 NAME=team0 DEVICETYPE=Team TEAM_CONFIG='{"runner":{"name": "lacp"}}' ONBOOT=yes BOOTPROTO=none IPADDR=192.168.18.7 PREFIX=24
5. Edit /etc/sysconfig/network-scripts/ifcfg-em3 and /etc/sysconfig/network-scripts/ifcfg-em4 files.
NAME=em3 UUID=42c93cd3-6efa-47a2-96d9-6fe619c2a90d DEVICE=em3 ONBOOT=yes DEVICETYPE=TeamPort TEAM_MASTER=team0 TEAM_PORT_CONFIG='{"prio":9}' NAME=em4 UUID=ae9a34fd-88d6-4d3e-83dc-0a83fe7ac9a2 DEVICE=em4 ONBOOT=yes DEVICETYPE=TeamPort TEAM_MASTER=team0 TEAM_PORT_CONFIG='{"prio":10}'
6. Activate team0.
#ifup team0 4: em3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master team0 state UP qlen 1000 link/ether f0:4d:a2:01:70:3e brd ff:ff:ff:ff:ff:ff 5: em4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master team0 state UP qlen 1000 link/ether f0:4d:a2:01:70:3e brd ff:ff:ff:ff:ff:ff 8: team0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP link/ether f0:4d:a2:01:70:3e brd ff:ff:ff:ff:ff:ff inet 192.168.18.7/24 brd 192.168.18.255 scope global team0 valid_lft forever preferred_lft forever inet6 fe80::f24d:a2ff:fe01:703e/64 scope link valid_lft forever preferred_lft forever
7. Run test commands to make sure your link is correctly setup.
[root@k1 network-scripts]# teamnl team0 ports 5: em4: up 1000Mbit FD 4: em3: up 1000Mbit FD