具体步骤如下:
1.一台主机两块网卡,添加网卡
首先在软件VMware Workstation Pro主界面的上侧指示栏上点击“虚拟机”
接着选中最下面的“设置”,在设置硬件中选择“添加”这一项,最后选中“网络适配器”,完成即可。
图片步骤如下:
本次实验需要添加两块网卡,重复此步骤一次,保证两个网卡是同一种网络模式(同一网段)。
在软件中查看网卡是否添加完成,主机能否识别网卡
命令:
[root@localhost ~]# ip a
2.激活真实网卡
命令:
[root@localhost huawei]# nmcli device connect ens224
[root@localhost huawei]# nmcli device connect ens256
查看
保证两个网卡都可用
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)
结束