本文主要是介绍nmcli 网卡链路绑定team,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
[root@server0 ~]# nmcli con show
创建一个名为team0并且属性为team的链路接口
[root@server0 ~]# nmcli con add type team con-name team0 ifname team0 config ‘{“runner”: {“name”:”activebackup”}}’
为team0配置ip地址与网关
[root@server0 ~]# nmcli connection modify team0 ipv4.addresses “192.168.25.211/24 192.168.25.250”
为team0配置DNS
[root@server0 ~]# nmcli connection modify team0 ipv4.dns “192.168.10.86 192.168.10.87”
设置team0的属性为 manual
[root@server0 ~]# nmcli connection modify team0 ipv4.method manual
将ent34网卡口 加到team0接口
[root@server0 ~]# nmcli connection add type team-slave conn-name team-port1 ifname ens34 master team0
将ent35网卡口 加到team0接口
[root@server0 ~]# nmcli connection add type team-slave conn-name team-port2 ifname ens35 master team0
启用接口中的网卡
[root@server0 ~]# nmcli connection up team-port1;nmcli connection up team-port2
[root@server0 ~]# teamdctl team0 state view
setup:
runner: activebackup
ports:
ens34
link watches:
link summary: up
instance[link_watch_0]:
name: ethtool
link: up
ens35
link watches:
link summary: up
instance[link_watch_0]:
name: ethtool
link: up
runner:
active port: ens34 //当前team0的主接口
转:http://blog.163.com/qiushuhui1989%40126/blog/static/2701108920152544352794/
这篇关于nmcli 网卡链路绑定team的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!