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