linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Greear <greearb@candelatech.com>
To: Christopher Friesen <cfriesen@nortelnetworks.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: questions about link-level loopback, PF_PACKET and ETH_P_LOOP
Date: Thu, 14 Jun 2001 16:28:24 -0700	[thread overview]
Message-ID: <3B294898.CEFE387F@candelatech.com> (raw)
In-Reply-To: <3B2926A3.C3B65EBB@nortelnetworks.com>

Christopher Friesen wrote:
> 
> I'm attempting to write a piece of code that will validate the physical ethernet
> link from a NIC to the nearest router/hub/switch.  What I'd like to do is to
> send out an ethernet packet addressed to me, bounce it off the
> hub/switch/router, and then read it back in.  This is all at the ethernet layer.
> 

No properly configured ethernet hub or router will return you the
same packet you sent.  You can get some of this information out of the
drivers though, as their hardware knows the link state, at least the
physical layer.

Check out Becker's mii-diag program.  There are some options
in it to dump out all kinds of neat information about the drivers
and link condition.

> The nitty-gritty on this is that I have a machine that has two NICs but only one
> IP address.  I want to do some kind of packet loopback at the ethernet layer to
> verify that my NIC transceiver is working properly.

Ping your switch.  Or use something like ethernet channel bonding.

If both ports are up, then you should be able to send a pkt
from one NIC with your other NICs MAC in it, and the switch should deliver
that pkt to your other NIC.  However, if you don't receive the packet, you
cannot determine which one of your links/NICs is bad without going to
a third party (which I suggest should be your switch itself).

-- 
Ben Greear <greearb@candelatech.com>          <Ben_Greear@excite.com>
President of Candela Technologies Inc      http://www.candelatech.com
ScryMUD:  http://scry.wanfear.com     http://scry.wanfear.com/~greear

      reply	other threads:[~2001-06-14 23:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-14 21:03 questions about link-level loopback, PF_PACKET and ETH_P_LOOP Christopher Friesen
2001-06-14 23:28 ` Ben Greear [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3B294898.CEFE387F@candelatech.com \
    --to=greearb@candelatech.com \
    --cc=cfriesen@nortelnetworks.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).