Configure Network Teaming2021/12/09 |
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' (c0ab6b8c-0eac-a1b4-1c47-efe4b2d1191f) 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' (6af49df1-4134-43b2-801b-5167593f9338) successfully added. # add member devices to the teaming device [root@dlp ~]# nmcli connection add type team-slave con-name team0-slave0 ifname enp1s0 master team0 Connection 'team0-slave0' (5e5a6bb7-7a1b-4184-88c3-c837511a7b0f) successfully added. [root@dlp ~]# nmcli connection add type team-slave con-name team0-slave1 ifname enp7s0 master team0 Connection 'team0-slave1' (91d86c8a-5d47-4d53-896d-94428c6675dd) successfully added.[root@dlp ~]# nmcli device DEVICE TYPE STATE CONNECTION team0 team connected team0 enp1s0 ethernet connected team0-slave0 enp7s0 ethernet connected team0-slave1 lo loopback unmanaged --[root@dlp ~]# nmcli connection NAME UUID TYPE DEVICE team0 6af49df1-4134-43b2-801b-5167593f9338 team team0 team0-slave0 5e5a6bb7-7a1b-4184-88c3-c837511a7b0f ethernet enp1s0 team0-slave1 91d86c8a-5d47-4d53-896d-94428c6675dd 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:65:52:ca 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:65:52:ca brd ff:ff:ff:ff:ff:ff permaddr 52:54:00:ff:86:42 5: team0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000 link/ether 52:54:00:65:52:ca 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::9540:27b:57f:e58e/64 scope link noprefixroute valid_lft forever preferred_lft forever # configuration files are stored under the place [root@dlp ~]# ll /etc/sysconfig/network-scripts total 12 -rw-r--r--. 1 root root 428 Dec 9 10:48 ifcfg-team0 -rw-r--r--. 1 root root 123 Dec 9 10:46 ifcfg-team0-slave0 -rw-r--r--. 1 root root 123 Dec 9 10:46 ifcfg-team0-slave1 |
Sponsored Link |