https://access.redhat.com/solutions/438333
SOLUTION 已验证 - 已更新 2018年十一月26日19:40 -
环境
- Red Hat Enterprise Linux 6
问题
- After creating an active-backup bond (mode 1) the bond will not fail over to the backup link.
- Testing fail over with
ifconfig eth0 down
决议
-
Ensure the bonding options in the configuration file are correct.
# cat /etc/sysconfig/network-scripts/ifcfg-bond0 DEVICE=bond0 IPADDR=X.X.X.X NETMASK=255.255.255.0 ONBOOT=yes BOOTPROTO=none USERCTL=no BONDING_OPTS="mode=1 miimon=1000" <-----
根源
- If the BONDING_OPTS line does not have quotations around the options, only the first parameter is being read. If a miimon is not being set on the bond, it will not detect the link is being brought down.
诊断步骤
-
Check the current bond configuration file.
$ cat etc/sysconfig/network-scripts/ifcfg-bond0 DEVICE=bond0 IPADDR=X.X.X.X NETMASK=255.255.255.0 ONBOOT=yes BOOTPROTO=none USERCTL=no BONDING_OPTS=mode=1 miimon=1000 <----Note there are no ""
-
Verify the settings in /proc/net/bonding/bond0
$ cat /proc/net/bonding/bond0 Ethernet Channel Bonding Driver: v3.6.0 (September 26, 2009) Bonding Mode: fault-tolerance (active-backup) Primary Slave: None Currently Active Slave: eth0 MII Status: up MII Polling Interval (ms): 0 <----Note there is no polling interval Up Delay (ms): 0 Down Delay (ms): 0 Slave Interface: eth0 MII Status: up Speed: 1000 Mbps Duplex: full Link Failure Count: 0 Permanent HW addr: 00:00:00:00:00:00 Slave queue ID: 0 Slave Interface: eth1 MII Status: up Speed: 1000 Mbps Duplex: full Link Failure Count: 0 Permanent HW addr: 00:00:00:00:00:00 Slave queue ID: 0
-
After adding the quotations around the bonding options, you can see the changes in /proc/net/bonding/bond0
$ cat /proc/net/bonding/bond0 Ethernet Channel Bonding Driver: v3.6.0 (September 26, 2009) Bonding Mode: fault-tolerance (active-backup) Primary Slave: None Currently Active Slave: eth0 MII Status: up MII Polling Interval (ms): 1000 <----Note there is now a polling interval Up Delay (ms): 0 Down Delay (ms): 0 Slave Interface: eth0 MII Status: up Speed: 1000 Mbps Duplex: full Link Failure Count: 0 Permanent HW addr: 00:00:00:00:00:00 Slave queue ID: 0 Slave Interface: eth1 MII Status: up Speed: 1000 Mbps Duplex: full Link Failure Count: 0 Permanent HW addr: 00:00:00:00:00:00 Slave queue ID: 0