summaryrefslogtreecommitdiff
path: root/doc/arping.8
blob: 1650f4a729cabe7bcaf5e72762c3ea316f2e8ad2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
.TH "arping" "8" "21th June, 2003" "arping" ""

.PP 
.SH "NAME"
arping \- sends arp and/or ip pings to a given host
.PP 
.SH "SYNOPSIS"
\fBarping\fP [\-0aAbBdDeFhpqrRuUv] [\-S \fIhost/ip\fP] [\-T \fIhost/ip\fP] [\-s \fIMAC\fP]    [\-t \fIMAC\fP] [\-c \fIcount\fP] [\-i \fIinterface\fP] [ \-w \fIseconds\fP ] [ \-W \fIseconds\fP ] [ \-V \fIvlan\fP ] [ \-Q \fIpriority\fP ] [ \-g \fIgroup\fP ] <\fIhost\fP | \-B>
.PP 
\fBarping\fP \-\-help
.PP 
.SH "DESCRIPTION"
The \fIarping\fP utility sends \fBARP\fP and/or \fBICMP\fP requests to the specified \fIhost\fP and displays the replies\&. The \fIhost\fP may be specified by its \fBhostname\fP, its \fBIP\fP address, or its \fBMAC\fP address\&.
.PP 
One request is sent each second\&.
.PP 
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\&.
.PP 
\fINote on timing\fP
.PP 
ARP packets are usually replied to (on a LAN) so fast that the OS task
scheduler can\(cq\&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\&.
.PP 
To get more exact timing on a non\-idle system, re\-nice arping to \-15 or so\&.
.PP 
# nice \-n \-15 arping foobar
.PP 
This is not just an issue with arping, it is with normal ping also
(at least it is on my system)\&. But it doesn\(cq\&t show up as much with ping
since arping packets (when pinging IP) doesn\(cq\&t traverse the IP stack when
received and are therefore replied to faster\&.
.PP 
.SH "OPTIONS"

.PP 
.IP "\-\-help"
Show extended help\&. Not quite as extensive as this manpage,
but more than \-h\&.
.IP "\-0"
Use this option to ping with source IP address 0\&.0\&.0\&.0\&. Use this
when you haven\(cq\&t configured your interface yet\&.
Note that this may get the MAC\-ping unanswered\&.
This is an alias for \-S 0\&.0\&.0\&.0\&.
.IP "\-a"
Audible ping\&.
.IP "\-A"
Only count addresses matching requested address (This *WILL*
break most things you do\&. Only useful if you are arpinging many
hosts at once\&. See arping\-scan\-net\&.sh for an example)\&.
.IP "\-b"
Like \-0 but source broadcast source address (255\&.255\&.255\&.255)\&.
Note that this may get the arping unanswered since it\(cq\&s not normal behavior
for a host\&.
.IP "\-B"
Use instead of host if you want to address 255\&.255\&.255\&.255\&.
.IP "\-c \fIcount\fP"
Only send \fIcount\fP requests\&.
.IP "\-C \fIcount\fP"
Only wait for \fIcount\fP replies, regardless of \-c and \-w\&.
.IP "\-d"
Find duplicate replies\&. Exit with 1 if there are answers from
two different MAC addresses\&.
.IP "\-D"
Display answers as exclamation points and missing packets as dots\&.
Like flood ping on a Cisco\&.
.IP "\-e"
Like \-a but beep when there is no reply\&.
.IP "\-F"
Don\(cq\&t try to be smart about the interface name\&. Even if this
switch is not given, \-i disables this smartness\&.
.IP "\-g \fIgroup\fP"
setgid() to this group instead of the nobody group\&.
.IP "\-h"
Displays a help message and exits\&.
.IP "\-i \fIinterface\fP"
Don\(cq\&t guess, use the specified interface\&.
.IP "\-m \fItype\fP"
Type of timestamp to use for incoming packets\&.
Use \-vv when pinging to list available ones\&.
.IP "\-p"
Turn on promiscious mode on interface, use this if you don\(cq\&t
\(dq\&own\(dq\& the MAC address you are using\&.
.IP "\-P"
Send ARP replies instead of requests\&. Useful with \-U\&.
.IP "\-q"
Does not display messages, except error messages\&.
.IP "\-Q \fIpriority\fP"
802\&.1p priority to set\&. Should be used with 802\&.1Q tag (\-V)\&.
Defaults to 0\&.
.IP "\-r"
Raw output: only the MAC/IP address is displayed for each reply\&.
.IP "\-R"
Raw output: Like \-r but shows \(dq\&the other one\(dq\&, can be combined with
\-r\&.
.IP "\-s \fIMAC\fP"
Set source MAC address\&. You may need to use \-p with this\&.
.IP "\-S \fIIP\fP"
Like \-b and \-0 but with set source address\&.
Note that this may get the arping unanswered if the target does not have
routing to the IP\&. If you don\(cq\&t own the IP you are using, you may need to turn
on promiscious mode on the interface (with \-p)\&. With this switch you can find
out what IP\-address a host has without taking an IP\-address yourself\&.
.IP "\-t \fIMAC\fP"
Set target MAC address to use when pinging IP address\&.
.IP "\-T \fIIP\fP"
Use \-T as target address when pinging MACs that won\(cq\&t
respond to a broadcast ping but perhaps to a directed broadcast\&.
.PP 
\fIExample\fP:
.nf
.sp
To check the address of MAC\-A, use knowledge of MAC\-B and IP\-B\&.
.PP 
$ arping \-S <IP\-B> \-s <MAC\-B> \-p <MAC\-A>
.IP "\-u"
Show index=received/sent instead of just index=received when
pinging MACs\&.
.IP "\-U"
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\(cq\& ARP caches\&.
.PP 
\fIExample\fP:
.nf
.sp
$ arping \-i <interface> \-U <interface IP>
.IP "\-v"
Verbose output\&. Use twice for more messages\&.
.IP "\-V \fIvlan\fP"
VLAN tag to set\&. Defaults to no VLAN tag\&.
.IP "\-w \fIsec\fP"
Specify a timeout before ping exits regardless of how many packets have been sent or received\&.
.IP "\-W \fIsec\fP"
Time to wait between pings\&.
.IP "\-z"
Enable seccomp (default seccomp state depends on compile options)
.IP "\-Z"
Disable seccomp (default seccomp state depends on compile options)
.PP 
.SH "EXAMPLES"
.nf
.sp
# \fBarping \-c 3 88\&.1\&.180\&.225\fP
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
.PP 
\-\-\- 88\&.1\&.180\&.225 statistics \-\-\-
3 packets transmitted, 3 packets received,   0% unanswered
.PP 
# \fBarping \-c 3 00:11:85:4c:01:01\fP
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
.PP 
\-\-\- 00:11:85:4c:01:01 statistics \-\-\-
3 packets transmitted, 3 packets received,   0% unanswered
.PP 
# \fBarping \-C 2 \-c 10 \-r 88\&.1\&.180\&.225\fP
00:11:85:4c:01:01
00:11:85:4c:01:01
.PP 
.fi
.in
.PP 
.SH "BUGS"

.PP 
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\&.
.PP 
.SH "SEE ALSO"

.PP 
\fBping(8)\fP, \fBarp(8)\fP, \fBrarp(8)\fP
.PP 
.SH "AUTHOR"

.PP 
Arping was written by Thomas Habets <thomas@habets\&.se>\&.
.PP 
http://www\&.habets\&.pp\&.se/synscan/
.PP 
git clone http://github\&.com/ThomasHabets/arping\&.git