Link aggregation, teaming
Pre-requisite
- Add at least three network interfaces to your system like enp0s,8, 9, and 10
1. Check device status
# nmcli device status
2. Create Team master interface using Network Manager with type team.
# nmcli con add con-name team0 type team ifname team0 config '{"runner": {"name": "loadbalance"}}'
3. Create Team slave interfaces and attach to your Team master.
# nmcli con add con-name team0-p01 type team-slave ifname enp0s8 master team0
# nmcli con add con-name team0-p02 type team-slave ifname enp0s3 master team0
4. Modify team0 interface and assign an ipv4 address
# nmcli con mod team0 ipv4.addresses 192.168.1.153/24
# nmcli con mod team0 ipv4.method manual
# nmcli con mod team0 team.config '{"runner": "name": "activebackup"}}'
6. Check the team configuration with teamdctl.
# teamdctl team0 state
Note: Since bridging does not work using Network Manager, you have to shutdown the team0 interface, stop and disable Network Manager.
# nmcli con down team0
# nmcli stop NetworkManager
# nmcli disable NetworkManager
Edit the team0 interface configuration file and add the BRIDGE=brteam0 name pair.
# vi /etc/sysconfig/network-scripts/ifcfg-team0
BRIDGE=brteam0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[root@suvi ~]# ifconfig -a
enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.10.9 netmask 255.255.255.0 broadcast 192.168.10.255
inet6 fe80::a00:27ff:fe0b:df72 prefixlen 64 scopeid 0x20<link>
ether 08:00:27:0b:df:72 txqueuelen 1000 (Ethernet)
RX packets 1863 bytes 226507 (221.1 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 550 bytes 67232 (65.6 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
enp0s8: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
ether 08:00:27:06:12:46 txqueuelen 1000 (Ethernet)
RX packets 1453 bytes 144415 (141.0 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
enp0s9: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
ether 08:00:27:0c:a4:4d txqueuelen 1000 (Ethernet)
RX packets 1403 bytes 139359 (136.0 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
enp0s10: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
ether 08:00:27:30:19:f4 txqueuelen 1000 (Ethernet)
RX packets 1403 bytes 139359 (136.0 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 0 (Local Loopback)
RX packets 12 bytes 748 (748.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 12 bytes 748 (748.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
virbr0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 192.168.122.1 netmask 255.255.255.0 broadcast 192.168.122.255
ether 52:54:00:49:7b:a8 txqueuelen 0 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
virbr0-nic: flags=4098<BROADCAST,MULTICAST> mtu 1500
ether 52:54:00:49:7b:a8 txqueuelen 500 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
[root@suvi ~]# nmcli con add con-name team0 type team ifname team0 config '{"runner": {"name": "loadbalance"}}'
Connection 'team0' (aef9296e-1085-4c6f-8e89-c2305107cefb) successfully added.
[root@suvi ~]# nmcli con add con-name team-p01 type team-slave ifname enp0s8 master team0
Connection 'team-p01' (b4646ae1-ba1a-4677-8b64-4688b6588cc6) successfully added.
[root@suvi ~]# nmcli con add con-name teamp-02 type team-slave ifname enp0s9 master team0
Connection 'teamp-02' (d7fe0e5a-851a-4f46-8150-16a8b59c726b) successfully added.
[root@suvi ~]# mncli con mod team0 ipv4.addresses 192.168.10.115/24
bash: mncli: command not found...
Similar command is: 'nmcli'
[root@suvi ~]# nmcli con mod team0 ipv4.addresses 192.168.10.115/24
[root@suvi ~]# nmcli con mod team0 ipv4.method manual
[root@suvi ~]# Make sure to assign ipv4.addresses to the team before defining ipv4.method^C
[root@suvi ~]#
[root@suvi ~]# nmcli con up team0
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/6)
[root@suvi ~]# teamdctl team0 state
setup:
runner: loadbalance
ports:
enp0s8
link watches:
link summary: up
instance[link_watch_0]:
name: ethtool
link: up
down count: 0
enp0s9
link watches:
link summary: up
instance[link_watch_0]:
name: ethtool
link: up
down count: 0
[root@suvi ~]# ifconfig -a
enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.10.9 netmask 255.255.255.0 broadcast 192.168.10.255
inet6 fe80::a00:27ff:fe0b:df72 prefixlen 64 scopeid 0x20<link>
ether 08:00:27:0b:df:72 txqueuelen 1000 (Ethernet)
RX packets 8888 bytes 987962 (964.8 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1763 bytes 224986 (219.7 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
enp0s8: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
ether 08:00:27:06:12:46 txqueuelen 1000 (Ethernet)
RX packets 7279 bytes 780181 (761.8 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 29 bytes 4737 (4.6 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
enp0s9: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
ether 08:00:27:06:12:46 txqueuelen 1000 (Ethernet)
RX packets 7214 bytes 772648 (754.5 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 20 bytes 3459 (3.3 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
enp0s10: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
ether 08:00:27:30:19:f4 txqueuelen 1000 (Ethernet)
RX packets 7215 bytes 772590 (754.4 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 0 (Local Loopback)
RX packets 17 bytes 1176 (1.1 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 17 bytes 1176 (1.1 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
team0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.10.115 netmask 255.255.255.0 broadcast 192.168.10.255
inet6 fe80::a00:27ff:fe06:1246 prefixlen 64 scopeid 0x20<link>
ether 08:00:27:06:12:46 txqueuelen 0 (Ethernet)
RX packets 11093 bytes 1054957 (1.0 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 49 bytes 8136 (7.9 KiB)
TX errors 0 dropped 1 overruns 0 carrier 0 collisions 0
virbr0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 192.168.122.1 netmask 255.255.255.0 broadcast 192.168.122.255
ether 52:54:00:49:7b:a8 txqueuelen 0 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
virbr0-nic: flags=4098<BROADCAST,MULTICAST> mtu 1500
ether 52:54:00:49:7b:a8 txqueuelen 500 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
[root@suvi ~]# cat /etc/sysconfig/network-scripts/ifcfg-team0
DEVICE=team0
TEAM_CONFIG="{\"runner\": {\"name\": \"loadbalance\"}}"
DEVICETYPE=Team
BOOTPROTO=none
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
NAME=team0
UUID=aef9296e-1085-4c6f-8e89-c2305107cefb
ONBOOT=yes
IPADDR=192.168.10.115
PREFIX=24
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
[root@suvi ~]#
[root@suvi ~]# cat /etc/sysconfig/network-scripts/ifcfg-team-p01
NAME=team-p01
UUID=b4646ae1-ba1a-4677-8b64-4688b6588cc6
DEVICE=enp0s8
ONBOOT=yes
TEAM_MASTER=team0
DEVICETYPE=TeamPort
[root@suvi ~]#
[root@suvi ~]# teamnl team0 ports
4: enp0s9: up 1000Mbit FD
3: enp0s8: up 1000Mbit FD
[root@suvi ~]# teamdctl team0 config dump
{
"device": "team0",
"ports": {
"enp0s8": {
"link_watch": {
"name": "ethtool"
}
},
"enp0s9": {
"link_watch": {
"name": "ethtool"
}
}
},
"runner": {
"name": "loadbalance",
"tx_hash": [
"eth",
"ipv4",
"ipv6"
]
}
}
[root@suvi ~]#
[root@suvi ~]# df -h /home
Filesystem Size Used Avail Use% Mounted on
/etc/auto.autofs 0 0 0 - /home
[root@suvi ~]#
Pre-requisite
- Add at least three network interfaces to your system like enp0s,8, 9, and 10
1. Check device status
# nmcli device status
2. Create Team master interface using Network Manager with type team.
# nmcli con add con-name team0 type team ifname team0 config '{"runner": {"name": "loadbalance"}}'
3. Create Team slave interfaces and attach to your Team master.
# nmcli con add con-name team0-p01 type team-slave ifname enp0s8 master team0
# nmcli con add con-name team0-p02 type team-slave ifname enp0s3 master team0
4. Modify team0 interface and assign an ipv4 address
# nmcli con mod team0 ipv4.addresses 192.168.1.153/24
# nmcli con mod team0 ipv4.method manual
# nmcli con mod team0 team.config '{"runner": "name": "activebackup"}}'
6. Check the team configuration with teamdctl.
# teamdctl team0 state
Note: Since bridging does not work using Network Manager, you have to shutdown the team0 interface, stop and disable Network Manager.
# nmcli con down team0
# nmcli stop NetworkManager
# nmcli disable NetworkManager
Edit the team0 interface configuration file and add the BRIDGE=brteam0 name pair.
# vi /etc/sysconfig/network-scripts/ifcfg-team0
BRIDGE=brteam0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[root@suvi ~]# ifconfig -a
enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.10.9 netmask 255.255.255.0 broadcast 192.168.10.255
inet6 fe80::a00:27ff:fe0b:df72 prefixlen 64 scopeid 0x20<link>
ether 08:00:27:0b:df:72 txqueuelen 1000 (Ethernet)
RX packets 1863 bytes 226507 (221.1 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 550 bytes 67232 (65.6 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
enp0s8: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
ether 08:00:27:06:12:46 txqueuelen 1000 (Ethernet)
RX packets 1453 bytes 144415 (141.0 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
enp0s9: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
ether 08:00:27:0c:a4:4d txqueuelen 1000 (Ethernet)
RX packets 1403 bytes 139359 (136.0 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
enp0s10: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
ether 08:00:27:30:19:f4 txqueuelen 1000 (Ethernet)
RX packets 1403 bytes 139359 (136.0 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 0 (Local Loopback)
RX packets 12 bytes 748 (748.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 12 bytes 748 (748.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
virbr0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 192.168.122.1 netmask 255.255.255.0 broadcast 192.168.122.255
ether 52:54:00:49:7b:a8 txqueuelen 0 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
virbr0-nic: flags=4098<BROADCAST,MULTICAST> mtu 1500
ether 52:54:00:49:7b:a8 txqueuelen 500 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
[root@suvi ~]# nmcli con add con-name team0 type team ifname team0 config '{"runner": {"name": "loadbalance"}}'
Connection 'team0' (aef9296e-1085-4c6f-8e89-c2305107cefb) successfully added.
[root@suvi ~]# nmcli con add con-name team-p01 type team-slave ifname enp0s8 master team0
Connection 'team-p01' (b4646ae1-ba1a-4677-8b64-4688b6588cc6) successfully added.
[root@suvi ~]# nmcli con add con-name teamp-02 type team-slave ifname enp0s9 master team0
Connection 'teamp-02' (d7fe0e5a-851a-4f46-8150-16a8b59c726b) successfully added.
[root@suvi ~]# mncli con mod team0 ipv4.addresses 192.168.10.115/24
bash: mncli: command not found...
Similar command is: 'nmcli'
[root@suvi ~]# nmcli con mod team0 ipv4.addresses 192.168.10.115/24
[root@suvi ~]# nmcli con mod team0 ipv4.method manual
[root@suvi ~]# Make sure to assign ipv4.addresses to the team before defining ipv4.method^C
[root@suvi ~]#
[root@suvi ~]# nmcli con up team0
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/6)
[root@suvi ~]# teamdctl team0 state
setup:
runner: loadbalance
ports:
enp0s8
link watches:
link summary: up
instance[link_watch_0]:
name: ethtool
link: up
down count: 0
enp0s9
link watches:
link summary: up
instance[link_watch_0]:
name: ethtool
link: up
down count: 0
[root@suvi ~]# ifconfig -a
enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.10.9 netmask 255.255.255.0 broadcast 192.168.10.255
inet6 fe80::a00:27ff:fe0b:df72 prefixlen 64 scopeid 0x20<link>
ether 08:00:27:0b:df:72 txqueuelen 1000 (Ethernet)
RX packets 8888 bytes 987962 (964.8 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1763 bytes 224986 (219.7 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
enp0s8: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
ether 08:00:27:06:12:46 txqueuelen 1000 (Ethernet)
RX packets 7279 bytes 780181 (761.8 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 29 bytes 4737 (4.6 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
enp0s9: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
ether 08:00:27:06:12:46 txqueuelen 1000 (Ethernet)
RX packets 7214 bytes 772648 (754.5 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 20 bytes 3459 (3.3 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
enp0s10: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
ether 08:00:27:30:19:f4 txqueuelen 1000 (Ethernet)
RX packets 7215 bytes 772590 (754.4 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 0 (Local Loopback)
RX packets 17 bytes 1176 (1.1 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 17 bytes 1176 (1.1 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
team0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.10.115 netmask 255.255.255.0 broadcast 192.168.10.255
inet6 fe80::a00:27ff:fe06:1246 prefixlen 64 scopeid 0x20<link>
ether 08:00:27:06:12:46 txqueuelen 0 (Ethernet)
RX packets 11093 bytes 1054957 (1.0 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 49 bytes 8136 (7.9 KiB)
TX errors 0 dropped 1 overruns 0 carrier 0 collisions 0
virbr0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 192.168.122.1 netmask 255.255.255.0 broadcast 192.168.122.255
ether 52:54:00:49:7b:a8 txqueuelen 0 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
virbr0-nic: flags=4098<BROADCAST,MULTICAST> mtu 1500
ether 52:54:00:49:7b:a8 txqueuelen 500 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
[root@suvi ~]# cat /etc/sysconfig/network-scripts/ifcfg-team0
DEVICE=team0
TEAM_CONFIG="{\"runner\": {\"name\": \"loadbalance\"}}"
DEVICETYPE=Team
BOOTPROTO=none
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
NAME=team0
UUID=aef9296e-1085-4c6f-8e89-c2305107cefb
ONBOOT=yes
IPADDR=192.168.10.115
PREFIX=24
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
[root@suvi ~]#
[root@suvi ~]# cat /etc/sysconfig/network-scripts/ifcfg-team-p01
NAME=team-p01
UUID=b4646ae1-ba1a-4677-8b64-4688b6588cc6
DEVICE=enp0s8
ONBOOT=yes
TEAM_MASTER=team0
DEVICETYPE=TeamPort
[root@suvi ~]#
[root@suvi ~]# teamnl team0 ports
4: enp0s9: up 1000Mbit FD
3: enp0s8: up 1000Mbit FD
[root@suvi ~]# teamdctl team0 config dump
{
"device": "team0",
"ports": {
"enp0s8": {
"link_watch": {
"name": "ethtool"
}
},
"enp0s9": {
"link_watch": {
"name": "ethtool"
}
}
},
"runner": {
"name": "loadbalance",
"tx_hash": [
"eth",
"ipv4",
"ipv6"
]
}
}
[root@suvi ~]#
Filesystem Size Used Avail Use% Mounted on
/etc/auto.autofs 0 0 0 - /home
[root@suvi ~]#
No comments:
Post a Comment