linux网卡 bonding active-backup 模式不能生效
相关配置:
//
[root@sr-iov-1 network-scripts]# cat ifcfg-bond0
DEVICE=bond0
IPADDR=12.12.12.11
#NETWORK=192.168.1.0
NETMASK=255.255.255.0
USERCTL=no
BOOTPROTO=none
ONBOOT=yes
[root@sr-iov-1 network-scripts]#
[root@sr-iov-1 ~]# cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)
Bonding Mode: fault-tolerance (active-backup)
Primary Slave: None
Currently Active Slave: eno16777984
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0
Slave Interface: eno16777984
MII Status: up
Speed: 10000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 00:0c:29:4e:bf:c9
Slave queue ID: 0
Slave Interface: eno33561344
MII Status: up
Speed: 10000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 00:0c:29:4e:bf:ca
Slave queue ID: 0
[root@sr-iov-1 ~]#
此时,可以在其他机器上ping 通 bond0 12.12.12.11, 此时网卡 eno16777984 为活跃网卡。
将eno16777984 用命令 ifconfig eno16777984 down 之后。bond0的信息如下:
[root@sr-iov-1 ~]# cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)
Bonding Mode: fault-tolerance (active-backup)
Primary Slave: None
Currently Active Slave: eno33561344
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0
Slave Interface: eno16777984
MII Status: down
Speed: 10000 Mbps
Duplex: full
Link Failure Count: 1
Permanent HW addr: 00:0c:29:4e:bf:c9
Slave queue ID: 0
Slave Interface: eno33561344
MII Status: up
Speed: 10000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 00:0c:29:4e:bf:ca
Slave queue ID: 0
[root@sr-iov-1 ~]#
上线说明,已经将活跃网卡切换为了 eno33561344。
但是此时, ping 12.12.12.11再也ping不通了。请问,这是为什么呢?