admin管理员组

文章数量:1632063

具体步骤如下:

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

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
 

本文标签: 网卡两块冗余绑定主机