Hello,
I'm using a custom board based on the BeagleBone Black, with an AM3352 processor. The board has dual Ethernet (eth0 & eth1). I'm trying to use bonding as a fallback in case one of the lines goes down. I have both Ethernet ports connected to the same external Ethernet switch (same subnet). I'm testing the bonding as follows: While pinging my board continuously from another PC, I remove the eth0 cable to see if the connection falls back to eth1, and if the ping responses resume. I’ve done several tests with 3 different Ethernet switches and the results are inconsistent. Sometimes the ping responses will resume on eth1 after 30-40 seconds. More often, ping responses don’t resume until I reconnect eth0, and disconnect eth1. I’ve included some background below.
1. Ethernet Switches used:
--------------------------
NETGEAR FS108 (Works sometimes)
CISCO CATALYST 2960 SERIES SI (Worked once)
NETGEAR GS108 (Has not worked yet)
2. I’ve made the following changes to the code to enable dual emac and remove vlan tags:
--------------------------------------------------------------------------
In file: "am33xx.dtsi":
dual_emac = <1>;
dual_emac_res_vlan = <1>;
dual_emac_res_vlan = <2>;
In file: "cpsw.c"
//[PATCH] remove vlan tags in CPSW dual emac mode.
// control_reg |= CPSW_VLAN_AWARE;
control_reg &= ~CPSW_VLAN_AWARE;
3. After booting Linux, I issue the following commands to set up bonding:
----------------------------------------------------------------------
echo +bond0 > /sys/class/net/bonding_masters Adds bond 0 interface
ifconfig eth0 down Brings is down
ifconfig eth1 down Brings it down
echo 1 > /sys/class/net/bond0/bonding/mode Sets mode type
ifconfig bond0 192.168.0.17 netmask 255.255.255.0 up Config IP address
echo 100 > /sys/class/net/bond0/bonding/miimon Sets fallover timeout
echo +eth0 > /sys/class/net/bond0/bonding/slaves Add eth0 to bond port
echo +eth1 > /sys/class/net/bond0/bonding/slaves Add eth1 to bond port
4. When I pull out the eth0 cable while pinging my unit, the folling messages indicate it has switched to eth1 – BUT – ping responses don’t always resume:
--------------------------------------------------------------------------
[ 1430.239001] libphy: 4a101000.mdio:03 - Link is Down
[ 1430.302262] bonding: bond0: link status definitely down for interface eth0, disabling it
[ 1430.310806] bonding: bond0: making interface eth1 the new active one.
QUESTIONS:
1. What would cause the fallback to fail?
2. What can I do to make the fallback work consistently?
Thank you,
Everett