Network interface failure detection

Donald Becker becker at
Fri Mar 15 18:24:04 EST 2002

On Fri, 15 Mar 2002, lakshmi wrote:

> Does anybody know about a means by which
> it can be found out whether a network
> interface card has failed or somebody has
> pulled out the ethernet cable?

Not in general.

You can use 'mii-diag'
to find if you have lost link beat, but if the NIC has suffered a
hardware failure the status information is likely to be invalid.

> For example, there is a routing socket API
> using which it can be found if a route was
> added or not.

That's a different question: you can find the current routing
information in the same way that 'route' does.  But that might not tell
you if e.g. BGP is still working.

> Similarly will the IP layer or the data link
> layer report some sort of an indication of
> the ethernet card fails? Is it possible to
> detect at the IP layer or at the data link
> layer if the ethernet cable was pulled out?

That's what 'mii-diag' will tell you:
presario$ mii-diag eth0
Basic registers of MII PHY #1:  1000 7829 0022 1720 01e1 45e1 0007 2001.
 The autonegotiated capability is 01e0.
The autonegotiated media type is 100baseTx-FD.
 Basic mode control register 0x1000: Auto-negotiation enabled.
 Basic mode status register 0x7829 ... 782d.
   Link status: previously broken, but now reestablished.
 Your link partner advertised 45e1: Flow-control 100baseTx-FD 100baseTx 10baseT-FD 10baseT, w/ 802.3X flow control.
   End of basic transceiver informaion.

Also check out the "--status" flag, which likely does exactly what you

Donald Becker				becker at
Scyld Computing Corporation
410 Severn Ave. Suite 210		Second Generation Beowulf Clusters
Annapolis MD 21403			410-990-9993

Beowulf mailing list, Beowulf at
To change your subscription (digest mode or unsubscribe) visit

More information about the Beowulf mailing list