建立虚拟网卡即网卡绑定
虚拟机Server0上
1.建立team虚拟的网卡
参考 man teamd.conf —— '{"runner":{"name":"activebackup"}}'
nmcli connection add type team
con-name team0 ifname team0 autoconnect yes
config '{"runner": {"name": "activebackup"}}'
建立一个类型为team的网卡,配置文件名字为team0,
ifconfig命令显示的设备名为team0,每次开机自动启动 team运行的模式为热备份方式
vim /etc/sysconfig/network-scripts/ifcfg-team0
ifconfig team0
2.添加奴隶
nmcli connection add type team-slave con-name team0-1 ifname eth1 master team0
nmcli connection add type team-slave con-name team0-2 ifname eth2 master team0
添加一个类型为team-slave的成员,配置文件名team0-1,设备为eth1,添加到team0组队中
3.配置IP地址
nmcli connection modify team0
ipv4.method manual ipv4.addresses 192.168.1.1/24
connection.autoconnect yes
4.激活 [root@server0 ~]# nmcli connection up team0 [root@server0 ~]# nmcli connection up team0-1 [root@server0 ~]# nmcli connection up team0-2 [root@server0 ~]# ifconfig team0
5.查看team信息 [root@server0 ~]# teamdctl team0 state
6.如出现配置错误 [root@server0 ~]# nmcli connection delete team0 [root@server0 ~]# nmcli connection delete team0-1 [root@server0 ~]# nmcli connection delete team0-2 ################################################### **