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 

 

 查看team0会话文件

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

查看状态信息

[root@localhost csj]# teamdctl team0 stat

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值