Skip to contentSkip to conversation

Carrier detection for network interfaces

DISCUSSION Martin Schlemmer 4 participants 8 messages Nov 15, 2003 – Nov 16, 2003

lore
Share & tools
lore
#0 lore raw

Hi

Is there any proper way to detect a carrier signal with network interfaces ? I have recently come across a problem where we tried to do with with checking for 'RUNNING', which do not work for all drivers, as well as mii-tool that fails in some cases.

Thanks,

--
Martin Schlemmer

#1 lore raw
Quoted 4 lines · Martin Schlemmer

Is there any proper way to detect a carrier signal with network interfaces ? I have recently come across a problem where we tried to do with with checking for 'RUNNING', which do not work for all drivers, as well as mii-tool that fails in some cases.

What kernel version?

In 2.6 you have linkwatch. In 2.4 and 2.6, you have ETHTOOL_GLINK, and mii-tool.

Jeff

#2 lore raw
Quoted 7 lines · Jeff Garzik
Quoted 4 lines · Martin Schlemmer

Is there any proper way to detect a carrier signal with network interfaces ? I have recently come across a problem where we tried to do with with checking for 'RUNNING', which do not work for all drivers, as well as mii-tool that fails in some cases.

Quoted 5 lines

What kernel version?

In 2.6 you have linkwatch. In 2.4 and 2.6, you have ETHTOOL_GLINK, and mii-tool.

Anything more shell accessible (sysfs/proc) ?

Thanks,

Signature · 1 line
Martin Schlemmer
#3 lore raw
Quoted 10 lines · Martin Schlemmer
Quoted 8 lines · Jeff Garzik
Quoted 4 lines · Martin Schlemmer

Is there any proper way to detect a carrier signal with network interfaces ? I have recently come across a problem where we tried to do with with checking for 'RUNNING', which do not work for all drivers, as well as mii-tool that fails in some cases.

Quoted 7 lines
Quoted 4 lines

What kernel version?

In 2.6 you have linkwatch. In 2.4 and 2.6, you have ETHTOOL_GLINK, and mii-tool.

Anything more shell accessible (sysfs/proc) ?

ethtool is shell accessible.

Jeff

#4 lore raw
Quoted 18 lines · Jeff Garzik
Quoted 17 lines · Martin Schlemmer
Quoted 13 lines · Jeff Garzik
Quoted 4 lines · Martin Schlemmer

Is there any proper way to detect a carrier signal with network interfaces ? I have recently come across a problem where we tried to do with with checking for 'RUNNING', which do not work for all drivers, as well as mii-tool that fails in some cases.

What kernel version?

In 2.6 you have linkwatch. In 2.4 and 2.6, you have ETHTOOL_GLINK, and mii-tool.

Quoted 5 lines
Quoted 1 line

Anything more shell accessible (sysfs/proc) ?

ethtool is shell accessible.

Yep, thanks. Was just wondering if there was a way that did not depend on additional tools beyond cat, sed, grep, etc.

Thanks,

Signature · 1 line
Martin Schlemmer
#5 lore raw
In reply to Jeff Garzik
Quoted 9 lines · Jeff Garzik
Quoted 4 lines · Martin Schlemmer

Is there any proper way to detect a carrier signal with network interfaces ? I have recently come across a problem where we tried to do with with checking for 'RUNNING', which do not work for all drivers, as well as mii-tool that fails in some cases.

Quoted 3 lines

What kernel version?

In 2.6 you have linkwatch. In 2.4 and 2.6, you have ETHTOOL_GLINK, and mii-tool.

One thing to watch for, lots of drivers will not detect link if the interface itself is not configured to be running (UP). You can configure it up without an IP address of course...

Ben

Signature · 2 lines
Ben Greear <[email protected]>
Candela Technologies Inc  http://www.candelatech.com
#6 lore raw
In reply to Jeff Garzik
Quoted 4 lines · Jeff Garzik

What kernel version?

In 2.6 you have linkwatch. In 2.4 and 2.6, you have ETHTOOL_GLINK, and mii-tool.

Whatever linkwatch is (can't find it with Google and freshmeat quickly).

For 3c59x, neither mii-tool nor ethtool work with 2.6, only mii-diag will do.

Signature · 3 lines
Matthias Andree

Encrypt your mail: my GnuPG key ID is 0x052E7D95
#7 lore raw
Quoted 1 line · Matthias Andree

Whatever linkwatch is (can't find it with Google and freshmeat quickly).

Using netlink for link notification.

Quoted 2 lines

For 3c59x, neither mii-tool nor ethtool work with 2.6, only mii-diag will do.

You need an updated mii-tool.

Jeff