Re: Non-MII card link detection


On Tue, 08 Feb 2005 08:18:35 -0600, Jeffrey C. Ollie wrote:

> On Tue, 2005-02-08 at 12:59 +0200, Paul Ionescu wrote:
>> On Sun, 06 Feb 2005 14:07:20 +0200, Paul Ionescu wrote:
>> > 
>> > Every X seconds we send a special frame on the wire, the destination
>> > address is our own MAC address of that interface, which means that we
>> > are the end destination of that packet. The ether-type can be 0x9000
>> > which is
>> >  registered for loopback packets.
>> > If the link is up, we should receive this packet because it has our
>> > own mac address as destination, which will be reflected in rx_packets
>> > counter. Now, if we miss Y packet in a row, we could assume the link
>> > is off.
>> I actually did some further test, and so far I like what I found. I used
>> only ready available tools (like ping) because I did not have time to do
>> some real programs.
>> [...]
>> I did "ping -b"
>> [...]
>> Comments ?

I did ping -b only to test the logic. Of course I don't want to use it in
a normal network.
I just did not had any knowledge of a quick hack to send that loopback
packet on the wire.

> Using "ping -b" itself would be bad, very bad on large networks.  Just
> imagine the effect of a broadcast ping on a network of several hundred or
> several thousand hosts (large corporate, government, or educational
> networks or cable modem networks).  Sending out a specially crafted
> ethernet packet with our own ethernet address as the destination would
> probably be fine, assuming the kernel would actually send it out the wire
> and wouldn't short circuit the transmission.
> In fact, looking at a dump of my network it looks like I have a Cisco
> system out there doing a similar thing:

Yes, some cisco equipment does this.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]