centos7 team網卡綁定不生效
Ens37 ens38 網卡下有配置情況下,team0綁定後可以生效但是
使用teamdctl team0 st 查看不到端口具體信息
[root@system1 ~]# teamdctl team0 st
setup:
runner: activebackup
runner:
active port:
[root@system1 ~]#
[root@system1 ~]# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eno16777736: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:0c:29:24:30:26 brd ff:ff:ff:ff:ff:ff
inet 192.168.171.128/24 brd 192.168.171.255 scope global eno16777736
inet6 fe80::20c:29ff:fe24:3026/64 scope link
valid_lft forever preferred_lft forever
3: ens37: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:0c:29:24:30:30 brd ff:ff:ff:ff:ff:ff
inet 192.168.171.132/24 brd 192.168.171.255 scope global dynamic ens37
inet6 fe80::20c:29ff:fe24:3030/64 scope link
valid_lft forever preferred_lft forever
4: ens38: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:0c:29:24:30:3a brd ff:ff:ff:ff:ff:ff
inet 192.168.171.135/24 brd 192.168.171.255 scope global ens38
valid_lft forever preferred_lft forever
inet6 fe80::20c:29ff:fe24:303a/64 scope link
valid_lft forever preferred_lft forever
5: team0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN
link/ether c6:52:68:78:b8:fb brd ff:ff:ff:ff:ff:ff
inet 192.168.171.136/24 brd 192.168.171.255 scope global team0
valid_lft forever preferred_lft forever
2、esn37 ens38 接口下有配置
刪除端口配置
nmcli conn del team0-port1
nmcli conn del team0-port2
nmcli conn del ens37
nmcli conn del ens38
Nmcli con show
Ip addr
3、重新添加team-slave端口
添加team-slave 端口
Nmcli con add type team con-name team0-port1 ifname ens37 master team0
Nmcli con add type team con-name team0-port2 ifname ens38master team0
4、檢查team0狀態,狀態正常
[root@system1 network-scripts]# teamdctl team0 st
setup:
runner: activebackup
ports:
ens37
link watches:
link summary: up
instance[link_watch_0]:
name: ethtool
link: up
down count: 0
ens38
link watches:
link summary: up
instance[link_watch_0]:
name: ethtool
link: up
down count: 0
runner:
active port: ens37
5、ifdown ens37端口
初始狀態活動端口為ens37, 網絡正常 ,關閉ens37端口,活動端口切換為ens38,ping丟包2個
[root@system1 network-scripts]# ifdown ifcfg-team0-port1
Device ‘ens37‘ successfully disconnected.
[root@system1 network-scripts]# teamdctl team0 st
setup:
runner: activebackup
ports:
ens38
link watches:
link summary: up
instance[link_watch_0]:
name: ethtool
link: up
down count: 0
runner:
active port: ens38
[root@system1 network-scripts]#
6、ifup ens37端口
Ping短暫中斷,後面恢復正常active prots依然為ens38 ,沒有發生搶占,非常OK
[root@system1 network-scripts]# teamdctl team0 st
setup:
runner: activebackup
ports:
ens38
link watches:
link summary: up
instance[link_watch_0]:
name: ethtool
link: up
down count: 0
ens37
link watches:
link summary: up
instance[link_watch_0]:
name: ethtool
link: up
down count: 0
runner:
active port: ens38
[root@system1 network-scripts]#
centos7 team網卡綁定不生效