RHCE第一天实验

在当前主机添加两块网卡,将两块网卡绑定实现网卡冗余操作。

1.在虚拟机上添加两个网卡

RHCE第一天实验_第1张图片

2.激活网卡设备

[root@localhost csj]# nmcli device connect ens192
Device 'ens192' successfully activated with 'd39753bd-90ca-4932-8041-eddf26fa23d7'.
[root@localhost csj]# nmcli device connect ens224
Device 'ens224' successfully activated with '28c282ff-c245-4059-8e56-d9ba7d585ebf'.

查看示例文件的

[root@localhost csj]# cd /usr/share/doc/teamd/example_configs/
[root@localhost example_configs]# ll
total 64
-rw-r--r--. 1 root root 305 Dec  9  2018 activebackup_arp_ping_1.conf
-rw-r--r--. 1 root root 194 Dec  9  2018 activebackup_ethtool_1.conf
-rw-r--r--. 1 root root 447 Dec  9  2018 activebackup_multi_lw_1.conf
-rw-r--r--. 1 root root 285 Dec  9  2018 activebackup_nsna_ping_1.conf
-rw-r--r--. 1 root root 318 Dec  9  2018 activebackup_tipc.conf
-rw-r--r--. 1 root root  96 Dec  9  2018 broadcast.conf
-rw-r--r--. 1 root root 209 Dec  9  2018 lacp_1.conf
-rw-r--r--. 1 root root  98 Dec  9  2018 loadbalance_1.conf
-rw-r--r--. 1 root root  93 Dec  9  2018 random.conf
-rw-r--r--. 1 root root  97 Dec  9  2018 roundrobin.conf

 3.创建虚拟team网卡以及工作方式

[root@localhost csj]# nmcli connection add type team con-name team0 ifname team0 config '{"runner":      {"name": "activebackup"}}'
Connection 'team0' (7d33fd7c-847b-4941-8295-d48321a134b2) successfully added.

4.绑定网卡

[root@localhost csj]# nmcli connection add type team-slave con-name team0-port1 ifname ens192 master team0
Connection 'team0-port1' (c85735a2-37b4-4400-b903-6af7468d2087) successfully added.
[root@localhost csj]# nmcli connection add type team-slave con-name team0-port2 ifname ens224 master team0
Connection 'team0-port2' (fe99a890-2c1b-44c8-a89d-425c339a9f34) successfully added.

5.激活从设备,主设备

[root@localhost csj]# nmcli connection up team0-port1
Connection successfully activated 
[root@localhost csj]# nmcli connection up team0-port2
Connection successfully activated 
[root@localhost csj]# nmcli connection up team0
Connection successfully activated 

RHCE第一天实验_第2张图片

 RHCE第一天实验_第3张图片

 查看team0会话文件

[root@localhost csj]# vim /etc/sysconfig/network-scripts/ifcfg-team0

查看状态信息

[root@localhost csj]# teamdctl team0 stat

你可能感兴趣的:(服务器,网络,linux)