redhat7网卡绑定
nmcli connection add type team con-name team0 ifname team0 config ‘{"runner": {"name": "activebackup"}}’(指定网卡运行模式)
nmcli connection reload
nmcli connection show
[root@ZJHZ-BMC-test2 ~]# nmcli connection show
NAME UUID TYPE DEVICE
con-team0 a9bf9dff-fbd0-408f-a765-f0bf0d5016fb team team0
nmcli connection add type team-slave con-name 224 ifname ens224 master team0
nmcli connection add type team-slave con-name 192 ifname ens192 master team0
[root@ZJHZ-BMC-test2 ~]# nmcli connection show
NAME UUID TYPE DEVICE
224 4bde4c2a-794c-4514-a500-6e4ea52b6ab2 802-3-ethernet ens224
192 db20bc00-223a-423c-b95e-6ffbb3b55522 802-3-ethernet ens192
con-team0 a9bf9dff-fbd0-408f-a765-f0bf0d5016fb team team0
nmcli connection modify team0 ipv4.addresses 192.168.111.123/24 (ip地址也可以添加网关)
nmcli connection modify team0 ipv4.method manual (改为手动启动)
nmcli con up team0
teamdctl team0 state (查看team状态)
setup:
runner: activebackup
ports:
ens224
link watches:
link summary: up
instance[link_watch_0]:
name: ethtool
link: up
down count: 0
ens192
link watches:
link summary: up
instance[link_watch_0]:
name: ethtool
link: up
down count: 0
runner:
active port: ens192