Re: Non-MII card link detection



Hi,

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

>> 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 10.1.1.255"
>> [...]
>> Comments ?
> 
> 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.

I just tested on an ethernet interface that the kernel sends the packet to
the wire (maybe we should test on more cards).
The simple test I made is this:

ifconfig eth0 10.1.1.1 netmask 255.255.255.0 up
arp -s 10.1.1.2 MY_ETH0_MAC_ADDRESS
ping 10.1.1.2

Now we have some unicast packets sent to ourselves every some seconds.
They can be seen on tcpdump, and there are only this icmp packets, no arp
or other stuff.

When I don't have ethernet connection, RX_bytes of the interface are not
growing. When I connect the card to an empty hub, I have RX_bytes growing,
so we are actually receiving our packets back.

Again, this is just a proof of concept that it can be done.
In NM we should put some code that does this, or call an external program
that will do it.
If needed, I can try to make a small C program that does this and can be
later integrated in NM, but first we need to agree on the approach.

Dan, do you have other ideas/progresses on Non-MII card link detection ?

Thanks,
Paul





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