要求:在当前主机添加两块网卡,将两块网卡绑定实现网卡冗余操作。
首先添加两块网卡
会话连接
3.添加虚拟网卡team0(主设备)
[root@localhost example_configs]# nmcli connection add type team con-name team0 ifname team0 config '{"runner": {"name": "activebackup"}}'
"runner": {"name": "activebackup"}出处
[root@localhost huawei]# cd /usr/share/doc/teamd/example_configs/ //切换目录(共享文本)
[root@localhost example_configs]# ll //查看模式
[root@localhost example_configs]# vim activebackup_arp_ping_2.conf //查看主备模式
4.虚拟网卡绑定真实网卡(从设备)
[root@localhost example_configs]# nmcli connection add type team-slave con-name team0-port1 ifname ens224 master team0
[root@localhost example_configs]# nmcli connection add type team-slave con-name team0-port2 ifname ens256 master team0
缺少device
5.添加设备
先激活从会话,再激活主会话
[root@localhost example_configs]# nmcli connection up team0-port1
[root@localhost example_configs]# nmcli connection up team0-port2
[root@localhost example_configs]# nmcli connection up team0
查看(状态UP)