]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - usr.sbin/arp/arp.8
Add 'contrib/unifdef/' from commit '0da44885831dc0a43c4ca6ff04a2430993cc0a80'
[FreeBSD/FreeBSD.git] / usr.sbin / arp / arp.8
1 .\" Copyright (c) 1985, 1991, 1993
2 .\"     The Regents of the University of California.  All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\" 3. Neither the name of the University nor the names of its contributors
13 .\"    may be used to endorse or promote products derived from this software
14 .\"    without specific prior written permission.
15 .\"
16 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
17 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
20 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 .\" SUCH DAMAGE.
27 .\"
28 .\"     @(#)arp.8       8.1 (Berkeley) 6/6/93
29 .\"
30 .Dd July 13, 2020
31 .Dt ARP 8
32 .Os
33 .Sh NAME
34 .Nm arp
35 .Nd address resolution display and control
36 .Sh SYNOPSIS
37 .Nm
38 .Op Fl -libxo Ar options
39 .Op Fl n
40 .Op Fl i Ar interface
41 .Ar hostname
42 .Nm
43 .Op Fl -libxo Ar options
44 .Op Fl n
45 .Op Fl i Ar interface
46 .Fl a
47 .Nm
48 .Fl d Ar hostname
49 .Op Cm pub
50 .Nm
51 .Fl d
52 .Op Fl i Ar interface
53 .Fl a
54 .Nm
55 .Fl s Ar hostname ether_addr
56 .Op Cm temp
57 .Op Cm blackhole No \&| Cm reject
58 .Op Cm pub
59 .Nm
60 .Fl S Ar hostname ether_addr
61 .Op Cm temp
62 .Op Cm blackhole No \&| Cm reject
63 .Op Cm pub
64 .Nm
65 .Fl f Ar filename
66 .Sh DESCRIPTION
67 The
68 .Nm
69 utility displays and modifies the Internet-to-Ethernet address translation
70 tables used by the address resolution protocol
71 .Pq Xr arp 4 .
72 With no flags, the program displays the current
73 .Tn ARP
74 entry for
75 .Ar hostname .
76 The host may be specified by name or by number,
77 using Internet dot notation.
78 .Pp
79 Available options:
80 .Bl -tag -width indent
81 .It Fl -libxo
82 Generate output via
83 .Xr libxo 3
84 in a selection of different human and machine readable formats.
85 See
86 .Xr xo_parse_args 3
87 for details on command line arguments.
88 .It Fl a
89 The program displays or, if it is used with the
90 .Fl d
91 flag, deletes all of the current
92 .Tn ARP
93 entries.
94 .It Fl d
95 A super-user may delete an entry for the host called
96 .Ar hostname
97 with the
98 .Fl d
99 flag.
100 If the
101 .Cm pub
102 keyword is specified, only the
103 .Dq published
104 .Tn ARP
105 entry
106 for this host will be deleted.
107 .Pp
108 Alternatively, the
109 .Fl d
110 flag may be combined with the
111 .Fl a
112 flag to delete all entries.
113 .It Fl i Ar interface
114 Limit the operation scope to the
115 .Tn ARP
116 entries on
117 .Ar interface .
118 Applicable only to the following operations:
119 display one, display all, delete all.
120 .It Fl n
121 Show network addresses as numbers (normally
122 .Nm
123 attempts to display addresses symbolically).
124 .It Fl s Ar hostname ether_addr
125 Create an
126 .Tn ARP
127 entry for the host called
128 .Ar hostname
129 with the Ethernet address
130 .Ar ether_addr .
131 The Ethernet address is given as six hex bytes separated by colons.
132 The entry will be permanent unless the word
133 .Cm temp
134 is given in the command.
135 If the word
136 .Cm pub
137 is given, the entry will be
138 .Dq published ;
139 i.e., this system will
140 act as an
141 .Tn ARP
142 server,
143 responding to requests for
144 .Ar hostname
145 even though the host address is not its own.
146 In this case the
147 .Ar ether_addr
148 can be given as
149 .Cm auto
150 in which case the interfaces on this host will be examined,
151 and if one of them is found to occupy the same subnet, its
152 Ethernet address will be used.
153 .Pp
154 If the
155 .Cm reject
156 keyword is specified the entry will be marked so that traffic to
157 the host will be discarded and the sender will be notified the
158 host is unreachable.
159 The
160 .Cm blackhole
161 keyword is similar in that traffic is discarded but the sender is
162 not notified.
163 These can be used to block external traffic to a host without
164 using a firewall.
165 .It Fl S Ar hostname ether_addr
166 Is just like
167 .Fl s
168 except any existing
169 .Tn ARP
170 entry for this host will be deleted first.
171 .It Fl f Ar filename
172 Cause the file
173 .Ar filename
174 to be read and multiple entries to be set in the
175 .Tn ARP
176 tables.
177 Entries
178 in the file should be of the form
179 .Pp
180 .Bd -ragged -offset indent -compact
181 .Ar hostname ether_addr
182 .Op Cm temp
183 .Op Cm blackhole No \&| Cm reject
184 .Op Cm pub
185 .Ed
186 .Pp
187 with argument meanings as given above.
188 Leading whitespace and empty lines are ignored.
189 A
190 .Ql #
191 character will mark the rest of the line as a comment.
192 .El
193 .Sh SEE ALSO
194 .Xr inet 3 ,
195 .Xr libxo 3 ,
196 .Xr xo_parse_args 3 ,
197 .Xr arp 4 ,
198 .Xr ifconfig 8 ,
199 .Xr ndp 8
200 .Sh HISTORY
201 The
202 .Nm
203 utility appeared in
204 .Bx 4.3 .