Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Jan 2001 18:09:53 -0500 (EST)
From:      Mitch Collinsworth <mitch@ccmr.cornell.edu>
To:        Patrick Bihan-Faou <patrick@netzuno.com>
Cc:        freebsd-net@FreeBSD.ORG
Subject:   Re: How to send arp request with no other traffic
Message-ID:  <Pine.LNX.4.10.10101231801100.22935-100000@ruby.ccmr.cornell.edu>
In-Reply-To: <HJEEKLMFLKEOKHOKNPBMEEDACJAA.patrick@netzuno.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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.

The answer to 1) goes something like this: arp doesn't send traffic to
the IP.  It sends an arp query to the ethernet broadcast address asking
"What is the MAC address for this IP?"  Anyone who has the answer,
normally just the system with that IP, but sometimes another system
configured to answer for it, responds with an answer.  At that point the
originating system then has the MAC address to use for that IP and it
can begin sending packets to that MAC address (or not).  At the physical
layer you don't send to an IP, you send to a MAC.  So yes, you can
resolve an arp without ever sending a directed packet to the IP or MAC
in question.  But you will (normally) trigger the system in question to
send a packet to you.

-Mitch


On Tue, 23 Jan 2001, Patrick Bihan-Faou wrote:

> Hi,
> 
> How could I perform a arp resolution without attempting to send traffic to
> the IP address I am looking up ?
> 
> To rephrase my question, if I use arp(8), to obtain the mac address
> associated with a specific IP address and that information is not yet in the
> arp cache, arp(8) returns:
> 
> bash-2.03$ arp 192.168.10.208
> 192.168.10.208 (192.168.10.208) -- no entry
> 
> 
> so to obtain the information I want, I need to first do a ping:
> 
> bash-2.03$ ping -c 1 192.168.10.208
> PING 192.168.10.208 (192.168.10.208): 56 data bytes
> 64 bytes from 192.168.10.208: icmp_seq=0 ttl=255 time=0.355 ms
> 
> --- 192.168.10.208 ping statistics ---
> 1 packets transmitted, 1 packets received, 0% packet loss
> round-trip min/avg/max/stddev = 0.355/0.355/0.355/0.000 ms
> bash-2.03$ arp 192.168.10.208
> ? (192.168.10.208) at 0:90:27:a7:6a:e0 [ethernet]
> 
> 
> While this is not a major concern, it would be nice if it was possible to
> trigger the arp lookup directly without using another command. Maybe with a
> special switch to the arp(8) command:
> 
> bash-2.03$ arp -q 192.168.10.208
> ? (192.168.10.208) at 0:90:27:a7:6a:e0 [ethernet]
> 
> 
> 
> Can anybody give me a hint on how I could implement that option ?
> 
> 
> Patrick.
> 
> 
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-net" in the body of the message
> 



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?Pine.LNX.4.10.10101231801100.22935-100000>