Active-Backup bond does not failover to the secondary link

https://access.redhat.com/solutions/438333

 SOLUTION 已验证 - 已更新 2018年十一月26日19:40 - 

English 

环境

  • 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.

    Raw

    # 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.

    Raw

    $ 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

    Raw

    $ 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

    Raw

    $ 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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值