网卡绑定可采用team或者bond方式,模式如下:
|
使用team方式绑定网卡步骤如下:
1、创建team虚拟网卡,绑定网卡ens4f0,ens4f1,采用lacp方式
nmcli connection add type team con-name team0 ifname team0 config '{"runner":{"name":"lacp"}}' --创建team
nmcli connection modify team0 ipv4.addresses "172.24.6.110/24 172.24.6.110" --设置IP,掩码,网关
nmcli connection modify team0 ipv4.method manual --手动
nmcli connection add type team-slave con-name team0-1 ifname ens4f0 master team0 --创建team-slave,指向ens4f0
nmcli connection add type team-slave con-name team0-2 ifname ens4f1 master team0 --创建team-slave,指向ens4f1
2、启动team0
nmcli con up team0
3、查看team0状态ifconfig
teamdctl team0 state view
4、查看验证nmcli con show
若删除网卡team0命令如下:
nmcli con delete team0
nmcli con delete team0-1
nmcli con delete team0-2
注意:lacp方式接入交换机侧需要开启LACP功能