linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Christopher Friesen" <cfriesen@nortelnetworks.com>
To: linux-kernel@vger.kernel.org
Subject: questions about link-level loopback, PF_PACKET and ETH_P_LOOP
Date: Thu, 14 Jun 2001 17:03:31 -0400	[thread overview]
Message-ID: <3B2926A3.C3B65EBB@nortelnetworks.com> (raw)


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.

Needless to say, I've been having some issues.

1) Is it even possible to do something like this?  I notice that tcpdump shows
the packets outgoing (and properly formatted) but the packets don't seem to come
back to me.  Even if I send it out with the broadcast address, I don't seem to
get the packet back to the interface that sent it.  Is this standard behaviour? 
Is there any way to send out a packet addressed to myself and have it come back
to me?

2) Using ETH_P_LOOP as the protocol in the call to socket(), I can't seem to
receive any messages whatsoever.  If I set this to ETH_P_ALL, then I get all
messages (including ones with protocol set to ETH_P_LOOP).   It almost seems
like ETH_P_LOOP isn't properly handled by the kernel.  Is this the case?

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.

If anyone has any bright ideas, I'd be glad to hear them.

Thanks,

Chris


-- 
Chris Friesen                    | MailStop: 043/33/F10  
Nortel Networks                  | work: (613) 765-0557
3500 Carling Avenue              | fax:  (613) 765-2986
Nepean, ON K2H 8E9 Canada        | email: cfriesen@nortelnetworks.com

             reply	other threads:[~2001-06-14 21:04 UTC|newest]

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

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=3B2926A3.C3B65EBB@nortelnetworks.com \
    --to=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).