| 1 |
manpage(arping)(8)(21th June, 2003)(arping)() |
| 2 |
|
| 3 |
manpagename(arping)(sends arp and/or ip pings to a given host) |
| 4 |
|
| 5 |
manpagesynopsis() |
| 6 |
bf(arping) [-0aAbBdDeFhpqrRuUv] [-S em(host/ip)] [-T em(host/ip)] [-s em(MAC)] \ |
| 7 |
[-t em(MAC)] [-c em(count)] [-i em(interface)] [ -w em(seconds) ] [ -W em(seconds) ] [ -V em(vlan) ] [ -Q em(priority) ] [ -g em(group) ] \ |
| 8 |
<em(host) | -B> |
| 9 |
|
| 10 |
bf(arping) --help |
| 11 |
|
| 12 |
manpagedescription() |
| 13 |
The em(arping) utility sends bf(ARP) and/or bf(ICMP) requests to the specified em(host) and displays the replies. The em(host) may be specified by its bf(hostname), its bf(IP) address, or its bf(MAC) address. |
| 14 |
|
| 15 |
One request is sent each second. |
| 16 |
|
| 17 |
When pinging an IP an ARP who-has query is sent. When pinging a MAC |
| 18 |
address a directed broadcast ICMP Echo request is sent. For more |
| 19 |
technical explanation and an FAQ, see the README file. |
| 20 |
|
| 21 |
em(Note on timing) |
| 22 |
|
| 23 |
ARP packets are usually replied to (on a LAN) so fast that the OS task |
| 24 |
scheduler can't keep up to get exact enough timing. |
| 25 |
On an idle system the roundtrip times will be pretty much accurate, but |
| 26 |
with more load the timing gets less exact. |
| 27 |
|
| 28 |
To get more exact timing on a non-idle system, re-nice arping to -15 or so. |
| 29 |
|
| 30 |
# nice -n -15 arping foobar |
| 31 |
|
| 32 |
This is not just an issue with arping, it is with normal ping also |
| 33 |
(at least it is on my system). But it doesn't show up as much with ping |
| 34 |
since arping packets (when pinging IP) doesn't traverse the IP stack when |
| 35 |
received and are therefore replied to faster. |
| 36 |
|
| 37 |
manpageoptions() |
| 38 |
|
| 39 |
dit(--help) Show extended help. Not quite as extensive as this manpage, |
| 40 |
but more than -h. |
| 41 |
dit(-0) Use this option to ping with source IP address 0.0.0.0. Use this |
| 42 |
when you haven't configured your interface yet. |
| 43 |
Note that this may get the MAC-ping unanswered. |
| 44 |
This is an alias for -S 0.0.0.0. |
| 45 |
dit(-a) Audible ping. |
| 46 |
dit(-A) Only count addresses matching requested address (This *WILL* |
| 47 |
break most things you do. Only useful if you are arpinging many |
| 48 |
hosts at once. See arping-scan-net.sh for an example). |
| 49 |
dit(-b) Like -0 but source broadcast source address (255.255.255.255). |
| 50 |
Note that this may get the arping unanswered since it's not normal behavior |
| 51 |
for a host. |
| 52 |
dit(-B) Use instead of host if you want to address 255.255.255.255. |
| 53 |
dit(-c em(count)) Only send em(count) requests. |
| 54 |
dit(-C em(count)) Only wait for em(count) replies, regardless of -c and -w. |
| 55 |
dit(-d) Find duplicate replies. Exit with 1 if there are answers from |
| 56 |
two different MAC addresses. |
| 57 |
dit(-D) Display answers as exclamation points and missing packets as dots. |
| 58 |
Like flood ping on a Cisco. |
| 59 |
dit(-e) Like -a but beep when there is no reply. |
| 60 |
dit(-F) Don't try to be smart about the interface name. Even if this |
| 61 |
switch is not given, -i disables this smartness. |
| 62 |
dit(-g em(group)) setgid() to this group instead of the nobody group. |
| 63 |
dit(-h) Displays a help message and exits. |
| 64 |
dit(-i em(interface)) Don't guess, use the specified interface. |
| 65 |
dit(-m em(type)) Type of timestamp to use for incoming packets. |
| 66 |
Use -vv when pinging to list available ones. |
| 67 |
dit(-p) Turn on promiscious mode on interface, use this if you don't |
| 68 |
"own" the MAC address you are using. |
| 69 |
dit(-P) Send ARP replies instead of requests. Useful with -U. |
| 70 |
dit(-q) Does not display messages, except error messages. |
| 71 |
dit(-Q em(priority)) 802.1p priority to set. Should be used with 802.1Q tag (-V). |
| 72 |
Defaults to 0. |
| 73 |
dit(-r) Raw output: only the MAC/IP address is displayed for each reply. |
| 74 |
dit(-R) Raw output: Like -r but shows "the other one", can be combined with |
| 75 |
-r. |
| 76 |
dit(-s em(MAC)) Set source MAC address. You may need to use -p with this. |
| 77 |
dit(-S em(IP)) Like -b and -0 but with set source address. |
| 78 |
Note that this may get the arping unanswered if the target does not have |
| 79 |
routing to the IP. If you don't own the IP you are using, you may need to turn |
| 80 |
on promiscious mode on the interface (with -p). With this switch you can find |
| 81 |
out what IP-address a host has without taking an IP-address yourself. |
| 82 |
dit(-t em(MAC)) Set target MAC address to use when pinging IP address. |
| 83 |
dit(-T em(IP)) Use -T as target address when pinging MACs that won't |
| 84 |
respond to a broadcast ping but perhaps to a directed broadcast. |
| 85 |
|
| 86 |
em(Example): |
| 87 |
mancommand(.nf) |
| 88 |
mancommand(.sp) |
| 89 |
To check the address of MAC-A, use knowledge of MAC-B and IP-B. |
| 90 |
|
| 91 |
$ arping -S <IP-B> -s <MAC-B> -p <MAC-A> |
| 92 |
dit(-u) Show index=received/sent instead of just index=received when |
| 93 |
pinging MACs. |
| 94 |
dit(-U) Send unsolicited ARP. This sets the destination MAC address in |
| 95 |
the ARP frame to the broadcast address. Unsolicited ARP is used |
| 96 |
to update the neighbours' ARP caches. |
| 97 |
|
| 98 |
em(Example): |
| 99 |
mancommand(.nf) |
| 100 |
mancommand(.sp) |
| 101 |
$ arping -i <interface> -U <interface IP> |
| 102 |
dit(-v) Verbose output. Use twice for more messages. |
| 103 |
dit(-V em(vlan)) VLAN tag to set. Defaults to no VLAN tag. |
| 104 |
dit(-w em(sec)) Specify a timeout before ping exits regardless of how many packets have been sent or received. |
| 105 |
dit(-W em(sec)) Time to wait between pings. |
| 106 |
dit(-z) Enable seccomp (default seccomp state depends on compile options) |
| 107 |
dit(-Z) Disable seccomp (default seccomp state depends on compile options) |
| 108 |
|
| 109 |
|
| 110 |
manpagesection(EXAMPLES) |
| 111 |
mancommand(.nf) |
| 112 |
mancommand(.sp) |
| 113 |
# bf(arping -c 3 88.1.180.225) |
| 114 |
ARPING 88.1.180.225 |
| 115 |
60 bytes from 00:11:85:4c:01:01 (88.1.180.225): index=0 time=13.910 msec |
| 116 |
60 bytes from 00:11:85:4c:01:01 (88.1.180.225): index=1 time=13.935 msec |
| 117 |
60 bytes from 00:11:85:4c:01:01 (88.1.180.225): index=2 time=13.944 msec |
| 118 |
|
| 119 |
--- 88.1.180.225 statistics --- |
| 120 |
3 packets transmitted, 3 packets received, 0% unanswered |
| 121 |
|
| 122 |
# bf(arping -c 3 00:11:85:4c:01:01) |
| 123 |
ARPING 00:11:85:4c:01:01 |
| 124 |
60 bytes from 88.1.180.225 (00:11:85:4c:01:01): icmp_seq=0 time=13.367 msec |
| 125 |
60 bytes from 88.1.180.225 (00:11:85:4c:01:01): icmp_seq=1 time=13.929 msec |
| 126 |
60 bytes from 88.1.180.225 (00:11:85:4c:01:01): icmp_seq=2 time=13.929 msec |
| 127 |
|
| 128 |
--- 00:11:85:4c:01:01 statistics --- |
| 129 |
3 packets transmitted, 3 packets received, 0% unanswered |
| 130 |
|
| 131 |
# bf(arping -C 2 -c 10 -r 88.1.180.225) |
| 132 |
00:11:85:4c:01:01 |
| 133 |
00:11:85:4c:01:01 |
| 134 |
|
| 135 |
mancommand(.fi) |
| 136 |
mancommand(.in) |
| 137 |
|
| 138 |
|
| 139 |
manpagebugs() |
| 140 |
|
| 141 |
You have to use -B instead of arpinging 255.255.255.255, and -b |
| 142 |
instead of -S 255.255.255.255. This is libnets fault. |
| 143 |
|
| 144 |
manpageseealso() |
| 145 |
|
| 146 |
bf(ping(8)), bf(arp(8)), bf(rarp(8)) |
| 147 |
|
| 148 |
manpageauthor() |
| 149 |
|
| 150 |
Arping was written by Thomas Habets <[email protected]>. |
| 151 |
|
| 152 |
http://www.habets.pp.se/synscan/ |
| 153 |
|
| 154 |
git clone http://github.com/ThomasHabets/arping.git |