arping(8) | arping(8) |
arping - sends arp and/or ip pings to a given host
arping [-0aAbBdDeFhpqrRuUv] [-S host/ip] [-T host/ip] [-s MAC] [-t MAC] [-c count] [-i interface] [ -w seconds ] [ -W seconds ] [ -V vlan ] [ -Q priority ] [ -g group ] <host | -B>
arping --help
The arping utility sends ARP and/or ICMP requests to the specified host and displays the replies. The host may be specified by its hostname, its IP address, or its MAC address.
One request is sent each second.
When pinging an IP an ARP who-has query is sent. When pinging a MAC address a directed broadcast ICMP Echo request is sent. For more technical explanation and an FAQ, see the README file.
Note on timing
ARP packets are usually replied to (on a LAN) so fast that the OS task scheduler can’t keep up to get exact enough timing. On an idle system the roundtrip times will be pretty much accurate, but with more load the timing gets less exact.
To get more exact timing on a non-idle system, re-nice arping to -15 or so.
# nice -n -15 arping foobar
This is not just an issue with arping, it is with normal ping also (at least it is on my system). But it doesn’t show up as much with ping since arping packets (when pinging IP) doesn’t traverse the IP stack when received and are therefore replied to faster.
Example:
To check the address of MAC-A, use knowledge of MAC-B and IP-B.
$ arping -S <IP-B> -s <MAC-B> -p <MAC-A>
Show index=received/sent instead of just index=received when pinging MACs.
Send unsolicited ARP. This sets the destination MAC address in the ARP frame to the broadcast address. Unsolicited ARP is used to update the neighbours’ ARP caches.
Example:
$ arping -i <interface> -U <interface IP>
Verbose output. Use twice for more messages.
VLAN tag to set. Defaults to no VLAN tag.
Specify a timeout before ping exits regardless of how many packets have been sent or received.
Time to wait between pings.
Enable seccomp (default seccomp state depends on compile options)
Disable seccomp (default seccomp state depends on compile options)
# arping -c 3 88.1.180.225 ARPING 88.1.180.225 60 bytes from 00:11:85:4c:01:01 (88.1.180.225): index=0 time=13.910 msec 60 bytes from 00:11:85:4c:01:01 (88.1.180.225): index=1 time=13.935 msec 60 bytes from 00:11:85:4c:01:01 (88.1.180.225): index=2 time=13.944 msec
--- 88.1.180.225 statistics --- 3 packets transmitted, 3 packets received, 0% unanswered
# arping -c 3 00:11:85:4c:01:01 ARPING 00:11:85:4c:01:01 60 bytes from 88.1.180.225 (00:11:85:4c:01:01): icmp_seq=0 time=13.367 msec 60 bytes from 88.1.180.225 (00:11:85:4c:01:01): icmp_seq=1 time=13.929 msec 60 bytes from 88.1.180.225 (00:11:85:4c:01:01): icmp_seq=2 time=13.929 msec
--- 00:11:85:4c:01:01 statistics --- 3 packets transmitted, 3 packets received, 0% unanswered
# arping -C 2 -c 10 -r 88.1.180.225 00:11:85:4c:01:01 00:11:85:4c:01:01
You have to use -B instead of arpinging 255.255.255.255, and -b instead of -S 255.255.255.255. This is libnets fault.
Arping was written by Thomas Habets <thomas@habets.se>.
http://www.habets.pp.se/synscan/
git clone http://github.com/ThomasHabets/arping.git
21th June, 2003 | arping |