From owner-freebsd-net@FreeBSD.ORG Fri Aug 15 07:54:09 2003 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 90A1537B401 for ; Fri, 15 Aug 2003 07:54:09 -0700 (PDT) Received: from raven.ravenbrook.com (raven.ravenbrook.com [193.82.131.18]) by mx1.FreeBSD.org (Postfix) with ESMTP id 47ED543FBD for ; Fri, 15 Aug 2003 07:54:08 -0700 (PDT) (envelope-from nb@ravenbrook.com) Received: from thrush.ravenbrook.com (thrush.ravenbrook.com [193.112.141.249]) by raven.ravenbrook.com (8.12.6/8.12.6) with ESMTP id h7FEs5uL072440; Fri, 15 Aug 2003 15:54:05 +0100 (BST) (envelope-from nb@ravenbrook.com) Received: from thrush.ravenbrook.com (localhost [127.0.0.1]) by thrush.ravenbrook.com (8.12.9/8.12.9) with ESMTP id h7FEpVnH076997; Fri, 15 Aug 2003 15:51:31 +0100 (BST) (envelope-from nb@thrush.ravenbrook.com) From: Nick Barnes To: Lars Eggert In-Reply-To: Message from Lars Eggert of "Fri, 15 Aug 2003 07:15:00 PDT." <3F3CEAE4.3060108@isi.edu> Date: Fri, 15 Aug 2003 15:51:31 +0100 Message-ID: <76996.1060959091@thrush.ravenbrook.com> Sender: nb@ravenbrook.com cc: freebsd-net@freebsd.org Subject: Re: Translate MAC address to IP address X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Aug 2003 14:54:09 -0000 At 2003-08-15 14:15:00+0000, Lars Eggert writes: > Nick Barnes wrote: > > Thanks for the reference. I had a look at arping. It works by sending > > a broadcast ping to the specified MAC address (not to the broadcast > > MAC). I note that FreeBSD machines do respond to such pings (unlike > > regular broadcast pings), but some machines do not (e.g. WinXPPro, > > NT4). > > it also supports setting the source IP and MAC address to one specified > on the command line. This usually works for these other boxes, if you > use a valid one for the net you're on. The source IP and MAC are not a problem (they are both set correctly already). The problem is that the ping packets don't have an appropriate destination IP address. This can be set with the -T option for arping, but if I set it to anything other than the target machine's actual address (which I'm trying to use arping to find!) then WinXPPro, for instance, will not respond: # XP Pro 193.112.141.247 00:07:e9:92:c0:76 # default arping, destination address 255.255.255.255: # NO RESPONSE # ./arping -c 1 -q -i rl0 00:07:e9:92:c0:76 15:43:02.245550 0:50:fc:1:f4:e 0:7:e9:92:c0:76 0800 60: 193.112.141.249 > 255.255.255.255: icmp: echo request # # Use -T to set destination address to local broadcast 193.112.141.255: # NO RESPONSE # ./arping -T 193.112.141.255 -c 1 -q -i rl0 00:07:e9:92:c0:76 15:43:14.577626 0:50:fc:1:f4:e 0:7:e9:92:c0:76 0800 60: 193.112.141.249 > 193.112.141.255: icmp: echo request # # Use -T to set destination address to another local address 193.112.141.248: # NO RESPONSE # ./arping -T 193.112.141.248 -c 1 -q -i rl0 00:07:e9:92:c0:76 15:44:45.764904 0:50:fc:1:f4:e 0:7:e9:92:c0:76 0800 60: 193.112.141.249 > 193.112.141.248: icmp: echo request # # Use -T to set destination address to the actual target address # (which we are trying to use arping to find): # RESPONSE (i.e. the machine is working). # ./arping -T 193.112.141.247 -c 1 -q -i rl0 00:07:e9:92:c0:76 15:48:47.687538 0:50:fc:1:f4:e 0:7:e9:92:c0:76 0800 60: 193.112.141.249 > 193.112.141.247: icmp: echo request 15:48:47.687680 0:7:e9:92:c0:76 ff:ff:ff:ff:ff:ff 0806 60: arp who-has 193.112.141.249 tell 193.112.141.247 15:48:47.687710 0:50:fc:1:f4:e 0:7:e9:92:c0:76 0806 60: arp reply 193.112.141.249 is-at 0:50:fc:1:f4:e 15:48:47.687775 0:7:e9:92:c0:76 0:50:fc:1:f4:e 0800 60: 193.112.141.247 > 193.112.141.249: icmp: echo reply # Nick B