Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Jan 2001 15:32:41 -0800
From:      Julian Elischer <julian@elischer.org>
To:        Patrick Bihan-Faou <patrick@netzuno.com>
Cc:        Mitch Collinsworth <mitch@ccmr.cornell.edu>, freebsd-net@FreeBSD.ORG
Subject:   Re: How to send arp request with no other traffic
Message-ID:  <3A6E1499.D9578008@elischer.org>
References:  <HJEEKLMFLKEOKHOKNPBMKEDBCJAA.patrick@netzuno.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Patrick Bihan-Faou wrote:
> 
> Hi,
> 
> > You've asked two different questions here, with differing answers:
> >
> > 1) How to do an arp resolution without sending traffic to the IP, and
> > 2) Is it possible to do it all in one command.
> >
> > The answer to 2) is: of course.
> 
> Thanks for the nice explanation of the arp mechanism. This was not really my
> question (I already knew that much). My real question was "2: is is possible
> to do it all in one command" and more specifically HOW...
> 
> The arp(8) command does not do it or at least does not seem to do it. After
> browsing through the FreeBSD source, the only way to trigger the arp
> resolution is to attempt to send traffic to a given IP.

If you send a hand crafted arp packet, the response will be put 
into the arp table (whatever it is).

Failing that you need to have a way of giving the arp code a way to
know what to look up. At present the only way of doing that is to
give it an unresolved IP packet. you could also ask the interface to 
take on the other address as an alias as that also causes an arp 
request but the retunr causes an error message when it clashes
with the local alias.
My best bet:
send a hand crafted arp packet out through the nergraph
hook on the interface and let the response be put in the table.


> 
> Patrick.
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-net" in the body of the message

-- 
      __--_|\  Julian Elischer
     /       \ julian@elischer.org
    (   OZ    ) World tour 2000
---> X_.---._/  from Perth, presently in:  Budapest
            v


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3A6E1499.D9578008>