xref: /netbsd-src/usr.sbin/arp/arp.8 (revision 18dd566a909c3449f45784796f4e0e7a1c9224d3)
1.\"	$NetBSD: arp.8,v 1.27 2021/12/05 07:11:56 msaitoh Exp $
2.\"
3.\" Copyright (c) 1985, 1991, 1993
4.\"	The Regents of the University of California.  All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\"    notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\"    notice, this list of conditions and the following disclaimer in the
13.\"    documentation and/or other materials provided with the distribution.
14.\" 3. Neither the name of the University nor the names of its contributors
15.\"    may be used to endorse or promote products derived from this software
16.\"    without specific prior written permission.
17.\"
18.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28.\" SUCH DAMAGE.
29.\"
30.\"	from: @(#)arp.8	8.2 (Berkeley) 4/27/95
31.\"
32.Dd December 5, 2021
33.Dt ARP 8
34.Os
35.Sh NAME
36.Nm arp
37.Nd address resolution display and control
38.Sh SYNOPSIS
39.Nm
40.Op Fl n
41.Ar hostname
42.Nm
43.Op Fl nv
44.Fl a
45.Nm
46.Op Fl v
47.Fl d
48.Fl a
49.Nm
50.Op Fl v
51.Fl d Ar hostname
52.Op Cm proxy
53.Nm
54.Fl s Ar hostname ether_addr
55.Op Cm temp
56.Op Cm pub Op Cm proxy
57.Nm
58.Fl f Ar filename
59.Sh DESCRIPTION
60The
61.Nm
62program displays and modifies the Internet-to-Ethernet address translation
63tables used by the address resolution protocol
64.Pq Xr arp 4 .
65With no flags, the program displays the current
66.Tn ARP
67entry for
68.Ar hostname .
69The host may be specified by name or by number,
70using Internet dot notation.
71.Pp
72The state of the arp entry is shown as a single letter preceded by the
73time the state is applicable for:
74.Bl -tag -width indent -compact
75.It D
76Delay
77.It I
78Incomplete
79.It N
80Nostate
81.It P
82Probe
83.It R
84Reachable
85.It S
86Stale
87.It U
88Unreachable
89.It W
90Waitdelete
91.It ?
92Unknown state (should never happen).
93.El
94.Pp
95Available options:
96.Bl -tag -width Ds
97.It Fl a
98The program displays all of the current
99.Tn ARP
100entries.
101.It Fl d
102A super-user may delete an entry for the host called
103.Ar hostname
104with the
105.Fl d
106flag.
107If the
108.Cm proxy
109keyword is specified, only the published
110.Dq proxy only
111.Tn ARP
112entry
113for this host will be deleted.
114If used with
115.Fl a
116instead of a
117.Ar hostname ,
118it will delete all arp entries.
119.It Fl f
120Causes the file
121.Ar filename
122to be read and multiple entries to be set in the
123.Tn ARP
124tables.
125Entries in the file should be of the form
126.Pp
127.Bd -filled -offset indent -compact
128.Ar hostname ether_addr
129.Op Cm temp
130.Op Cm pub
131.Ed
132.Pp
133with argument meanings as described below.
134.It Fl n
135Show network addresses as numbers (normally
136.Nm
137attempts to display addresses symbolically).
138.It Fl s Ar hostname ether_addr
139Create an
140.Tn ARP
141entry for the host called
142.Ar hostname
143with the Ethernet address
144.Ar ether_addr .
145The Ethernet address is given as six hex bytes separated by colons.
146The entry will be permanent unless the word
147.Cm temp
148is given in the command.
149If the word
150.Cm pub
151is given, the entry will be "published"; i.e., this system will
152act as an
153.Tn ARP
154server,
155responding to requests for
156.Ar hostname
157even though the host address is not its own.
158.Pp
159If the word
160.Cm proxy
161is also given, the published entry will be a
162.Dq proxy only
163entry.
164In this case the
165.Ar ether_addr
166can be given as
167.Cm auto
168in which case the interfaces on this host will be examined,
169and if one of them is found to occupy the same subnet, its
170Ethernet address will be used.
171.It Fl v
172Display verbose information when adding or deleting
173.Tn ARP
174entries.
175.El
176.Sh SEE ALSO
177.Xr inet 3 ,
178.Xr arp 4 ,
179.Xr ifconfig 8
180.Sh HISTORY
181The
182.Nm
183command appeared in
184.Bx 4.3 .
185