Configure Network Teaming2023/03/08 |
Configure Network Teaming to bind multiple network interfaces into a single load balanced or fault-toleranced interface and so on.
The Network Bonding feature which is the same solution of network load-balancing or fault-tolerance is also provided.
Refer to the comparison of network teaming and bonding features below.
⇒ https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/networking_guide/sec-comparison_of_network_teaming_to_bonding
There are some runners (modes) for configuring network teaming like follows.
|
|||||||||||||||
[1] | Configure Network Teaming. |
# display network devices [root@dlp ~]# nmcli device DEVICE TYPE STATE CONNECTION enp1s0 ethernet connected enp1s0 enp7s0 ethernet disconnected -- lo loopback unmanaged -- # delete existing network connections [root@dlp ~]# nmcli connection delete enp1s0 Connection 'enp1s0' (0c5a95c5-1c2a-351d-add2-7fee398c96ab) successfully deleted.[root@dlp ~]# nmcli device DEVICE TYPE STATE CONNECTION enp1s0 ethernet disconnected -- enp7s0 ethernet disconnected -- lo loopback unmanaged -- # add a new teaming device [team0] (any name you like) # refer to the description above for each runner [root@dlp ~]# nmcli connection add type team con-name team0 ifname team0 config '{"runner": {"name": "roundrobin"}}' Connection 'team0' (d69d25e5-e6b7-4f52-b704-d5b92386782d) successfully added. # add member devices to the teaming device [root@dlp ~]# nmcli connection add type team-slave con-name team0-member0 ifname enp1s0 master team0 Connection 'team0-member0' (cc71a02d-c5d5-4770-810a-1bab658adec7) successfully added. [root@dlp ~]# nmcli connection add type team-slave con-name team0-member1 ifname enp7s0 master team0 Connection 'team0-member1' (d34c57d5-d6df-47f5-a7a1-d6de3ad951da) successfully added.[root@dlp ~]# nmcli device DEVICE TYPE STATE CONNECTION team0 team connected team0 enp1s0 ethernet connected team0-member0 enp7s0 ethernet connected team0-member1 lo loopback unmanaged --[root@dlp ~]# nmcli connection NAME UUID TYPE DEVICE team0 d69d25e5-e6b7-4f52-b704-d5b92386782d team team0 team0-member0 cc71a02d-c5d5-4770-810a-1bab658adec7 ethernet enp1s0 team0-member1 d34c57d5-d6df-47f5-a7a1-d6de3ad951da ethernet enp7s0 # set IP address and so on to the teaming device and restart it # IP address [root@dlp ~]# nmcli connection modify team0 ipv4.addresses 10.0.0.30/24
# gatway [root@dlp ~]# nmcli connection modify team0 ipv4.gateway 10.0.0.1
# DNS - specify with space separated if set multiple DNS servers [root@dlp ~]# nmcli connection modify team0 ipv4.dns "10.0.0.10 10.0.0.11"
# DNS search base - specify with space separated if set multiple domains [root@dlp ~]# nmcli connection modify team0 ipv4.dns-search "srv.world"
[root@dlp ~]#
nmcli connection modify team0 ipv4.method manual [root@dlp ~]# nmcli connection down team0 && nmcli connection up team0 Connection 'team0' successfully deactivated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/2) Connection successfully activated (master waiting for slaves) (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/5) # verify teaming state [root@dlp ~]# teamdctl team0 state setup: runner: roundrobin ports: enp1s0 link watches: link summary: up instance[link_watch_0]: name: ethtool link: up down count: 0 enp7s0 link watches: link summary: up instance[link_watch_0]: name: ethtool link: up down count: 0[root@dlp ~]# ip address 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel master team0 state UP group default qlen 1000 link/ether 52:54:00:dc:08:f7 brd ff:ff:ff:ff:ff:ff 3: enp7s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel master team0 state UP group default qlen 1000 link/ether 52:54:00:dc:08:f7 brd ff:ff:ff:ff:ff:ff permaddr 52:54:00:7b:26:e7 5: team0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000 link/ether 52:54:00:dc:08:f7 brd ff:ff:ff:ff:ff:ff inet 10.0.0.30/24 brd 10.0.0.255 scope global noprefixroute team0 valid_lft forever preferred_lft forever inet6 fe80::7433:2d1a:fd37:aee9/64 scope link noprefixroute valid_lft forever preferred_lft forever # configuration files are stored under the place [root@dlp ~]# ll /etc/NetworkManager/system-connections total 12 -rw-------. 1 root root 162 Jun 29 14:36 team0-member0.nmconnection -rw-------. 1 root root 162 Jun 29 14:37 team0-member1.nmconnection -rw-------. 1 root root 314 Jun 29 14:39 team0.nmconnection |