$Id: README,v 1.10 2001/03/15 16:34:57 marvin Exp $

 ARP Ping

    By Marvin (marvin@rootbusters.net)


Introduction
------------
Arping is a util to find out it a specific IP address on the LAN is 'taken'
and what MAC address owns it. Sure, you *could* just use 'ping' to find out if
it's taken and even if the computer blocks ping (and everything else) you still
get an entry in your arp cache. But what if you aren't on a routable net? Or
the host blocks ping (all ICMP even)? Then you're screwed. Or you use arping.

Why it's not stupid
-------------------
Say you have a block of N real ARIN-assigned IP-addresses. You want to debug
the net and you don't know which IP addresses are taken. You can't ping anyone
before you take the IP, and you can't pick an IP before you know which are
already taken. Catch 22. But with arping you can 'ping' the IP and if you get
no responce, the IP is availible.

Example uses
------------
If some box is dumping non-IP (like IPX) garbage and you don't know which box
it is, you can ping by MAC to get the IP and fix the problem.

If you are on someone else's net and want to 'borrow' a real IP address instead
of using one of those 10.x.x.x-addresses the dhcp hands out you probably want
to know which ones are taken, or people will get mad (a friend of mine got a
call on his cellphone about 15 secs after he accidentally 'stole' an IP, oops).

Compiling
---------
Type 'make linux' to compile under linux and 'make openbsd' to compile under
openbsd. Follow this pattern for compilation under solaris and freebsd.
If you have some other OS, try all before mailing me.

'make install' will copy arping to /usr/local/bin.
 
How it does it
--------------
Bah, just read the source. Or the help text.

FAQ
---
Q: after compiling arping without any problem, i test it first with
   localhost... but it doesn't respond. Isn't that strange?

A: Not really, as you can see by typing 'ifconfig' the lo (local) interface
   does not have a MAC address. It's not a physical device! MAC addresses are
   there to differentiate computers on a shared medium (the aether, or ether)
   and since packets to localhost does not go over any wire there is no need
   to identify which box is talking to which. There is only one.
---
Q: I run the program and it segfaults no matter which address I try to ping.

A: Libnet segfaults when given a non-existing interface, I'm looking for how
   to check the validity of an interface before sending it to libnet but for
   now just give it an existing interface or change the default in the source.

   Update (version 0.9): arping should now pick an interface that exists, so
   there should be no more segfaults unless you override it with the -i switch.
---
Q: Arping find some hosts, but not others. why?   btw, I have several NICs.

A: You have to choose interface with the -i switch if the default is wrong for
   you.
---
Q: I tried to ping my own MAC addr, but it doesn't work.

A: A sane OS will think it's suspicios if you send packets to yourself over
   the wire and will ignore them.

   And why would you want to lookup the IP or MAC of yourself? ifconfig
   can tell you that.
---
Q: I can't ping any MAC address on my LAN.

A: Arping when pinging a MAC relies on the host to answer a broadcast ping
   (icmp echo request) properly (IIRC: not the windows way). If you want a
   host to pop up on MAC ping, you have to config it to respond to broadcast
   pings.
   (for linux, make sure /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts is 0)
---
Q: It doesn't compile, I get some error message about libnet and/or libpcap

A: Arping depends on libnet and libpcap, get libnet at:
   http://www.packetfactory.net/libnet and libpcap from your distribution.
   (alt. you can search for libpcap on freshmeat.net)
---
Q: I get bus error on my bigendian box

A: Damn, I thought I fixed those. Tell me how you got it and I'll try to fix
   it.
---
Q: I get "libnet_get_ipaddr(): no error" when I run arping with ip 0.0.0.0.

A: Use the -0 switch.

License
-------
It's GPL, see the LICENSE file.

-------------------------------------------------------------------------------
Send questions/suggestions/patches/rants/money/sparcs to marvin@rootbusters.net
