xref: /freebsd/usr.sbin/arp/arp.8 (revision ae83180158c4c937f170e31eff311b18c0286a93)
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. All advertising materials mentioning features or use of this software
13.\"    must display the following acknowledgement:
14.\"	This product includes software developed by the University of
15.\"	California, Berkeley and its contributors.
16.\" 4. Neither the name of the University nor the names of its contributors
17.\"    may be used to endorse or promote products derived from this software
18.\"    without specific prior written permission.
19.\"
20.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE.
31.\"
32.\"     @(#)arp.8	8.1 (Berkeley) 6/6/93
33.\" $FreeBSD$
34.\"
35.Dd June 6, 1993
36.Dt ARP 8
37.Os
38.Sh NAME
39.Nm arp
40.Nd address resolution display and control
41.Sh SYNOPSIS
42.Nm
43.Op Fl n
44.Ar hostname
45.Nm
46.Op Fl n
47.Fl a
48.Nm
49.Fl d Ar hostname
50.Op Cm pub
51.Nm
52.Fl d
53.Fl a
54.Nm
55.Fl s Ar hostname ether_addr
56.Op Cm temp
57.Op Cm pub Op Cm only
58.Nm
59.Fl S Ar hostname ether_addr
60.Op Cm temp
61.Op Cm pub Op Cm only
62.Nm
63.Fl f Ar filename
64.Sh DESCRIPTION
65The
66.Nm
67utility displays and modifies the Internet-to-Ethernet address translation
68tables used by the address resolution protocol
69.Pq Xr arp 4 .
70With no flags, the program displays the current
71.Tn ARP
72entry for
73.Ar hostname .
74The host may be specified by name or by number,
75using Internet dot notation.
76.Pp
77Available options:
78.Bl -tag -width indent
79.It Fl a
80The program displays or deletes all of the current
81.Tn ARP
82entries.
83.It Fl d
84A super-user may delete an entry for the host called
85.Ar hostname
86with the
87.Fl d
88flag.
89If the
90.Cm pub
91keyword is specified, only the
92.Dq published
93.Tn ARP
94entry
95for this host will be deleted.
96.Pp
97Alternatively, the
98.Fl d
99flag may be combined with the
100.Fl a
101flag to delete all entries.
102.It Fl n
103Show network addresses as numbers (normally
104.Nm
105attempts to display addresses symbolically).
106.It Fl s Ar hostname ether_addr
107Create an
108.Tn ARP
109entry for the host called
110.Ar hostname
111with the Ethernet address
112.Ar ether_addr .
113The Ethernet address is given as six hex bytes separated by colons.
114The entry will be permanent unless the word
115.Cm temp
116is given in the command.
117If the word
118.Cm pub
119is given, the entry will be
120.Dq published ;
121i.e., this system will
122act as an
123.Tn ARP
124server,
125responding to requests for
126.Ar hostname
127even though the host address is not its own.
128In this case the
129.Ar ether_addr
130can be given as
131.Cm auto
132in which case the interfaces on this host will be examined,
133and if one of them is found to occupy the same subnet, its
134Ethernet address will be used.
135If the
136.Cm only
137keyword is also specified, this will create a
138.Dq "published (proxy only)"
139entry.
140This type of entry is created automatically if
141.Nm
142detects that a routing table entry for
143.Ar hostname
144already exists.
145.It Fl S Ar hostname ether_addr
146Is just like
147.Fl s
148except any existing
149.Tn ARP
150entry for this host will be deleted first.
151.It Fl f Ar filename
152Cause the file
153.Ar filename
154to be read and multiple entries to be set in the
155.Tn ARP
156tables.  Entries
157in the file should be of the form
158.Pp
159.Bd -ragged -offset indent -compact
160.Ar hostname ether_addr
161.Op Cm temp
162.Op Cm pub
163.Ed
164.Pp
165with argument meanings as given above.
166.El
167.Sh SEE ALSO
168.Xr inet 3 ,
169.Xr arp 4 ,
170.Xr ifconfig 8
171.Sh HISTORY
172The
173.Nm
174utility appeared in
175.Bx 4.3 .
176