In my ATCA board, there are two NIC hardwired to switch, so I cannot check the bonding funciton by unplug the cable.

In my ATCA board, there are two NIC hardwired to switch, so I cannot check the bonding funciton by unplug the cable.
I want to check the function by "ifconfig ethX down" command, So I modified the driver code.

1.In open function in my driver code, I called netif_carrier_on(dev) to enable the link status up.

2.In close function, called the netif_carrier_off(dev) to enable the link status down.

3.I modified the Ethtool operation get_link method as follows.
static u32 xlr_get_link(struct net_device *dev)
{
struct driver_data *priv = netdev_priv(dev);

return netif_carrier_ok(dev) ? 1 : 0;

}

So, when issue the "ifconfig ethX down", it will call close function, then call netif_carrier_off(dev). The link status of the NIC will be down. Then bonding will failover to the other NIC. My problem is that at this time, I can not ping througth the network.

The following is my operation log:
1. root@localhost:/root> modprobe bonding mode=1 miimon=100 use_carrier=

2. root@localhost:/root> ifconfig bond0 192.168.4.1 up

3. root@localhost:/root> ifenslave bond0 eth2 eth3

4. root@localhost:/root> cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.1.2 (January 20, 2007)

Bonding Mode: fault-tolerance (active-backup)
Primary Slave: None
Currently Active Slave: eth2
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0

Slave Interface: eth2
MII Status: up
Link Failure Count: 0
Permanent HW addr: 00:02:bb:00:52:0a

Slave Interface: eth3
MII Status: up
Link Failure Count: 0
Permanent HW addr: 00:02:bb:00:52:0b

5. root@localhost:/root> ifconfig eth2 down

6. root@localhost:/root> cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.1.2 (January 20, 2007)

Bonding Mode: fault-tolerance (active-backup)
Primary Slave: None
Currently Active Slave: eth3
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0

Slave Interface: eth2
MII Status: down
Link Failure Count: 1
Permanent HW addr: 00:02:bb:00:52:0a

Slave Interface: eth3
MII Status: up
Link Failure Count: 0
Permanent HW addr: 00:02:bb:00:52:0b

At this time, I cannot ping through the Network. But after I ifconfig the eth2 up again, can ping through the network.

It means that the bonding don't switch to the eth3 really. Why?
Who can tell me the root cause?
Thanks a lot.

Shiner

White Paper
Linux Management with Red Hat Satellite: Measuring Business Impact and ROI

Linux has become a key foundation for supporting today's rapidly growing IT environments. Linux is being used to deploy business applications and databases, trading on its reputation as a low-cost operating environment. For many IT organizations, Linux is a mainstay for deploying Web servers and has evolved from handling basic file, print, and utility workloads to running mission-critical applications and databases, physically, virtually, and in the cloud. As Linux grows in importance in terms of value to the business, managing Linux environments to high standards of service quality — availability, security, and performance — becomes an essential requirement for business success.

Learn More

Sponsored by Red Hat

White Paper
Private PaaS for the Agile Enterprise

If you already use virtualized infrastructure, you are well on your way to leveraging the power of the cloud. Virtualization offers the promise of limitless resources, but how do you manage that scalability when your DevOps team doesn’t scale? In today’s hypercompetitive markets, fast results can make a difference between leading the pack vs. obsolescence. Organizations need more benefits from cloud computing than just raw resources. They need agility, flexibility, convenience, ROI, and control.

Stackato private Platform-as-a-Service technology from ActiveState extends your private cloud infrastructure by creating a private PaaS to provide on-demand availability, flexibility, control, and ultimately, faster time-to-market for your enterprise.

Learn More

Sponsored by ActiveState