xref: /openbsd/usr.sbin/arp/arp.8 (revision 9490d37c)
1.\"	$OpenBSD: arp.8,v 1.18 2007/05/31 19:20:22 jmc Exp $
2.\"	$NetBSD: arp.8,v 1.7 1995/03/01 11:50:59 chopps Exp $
3.\"
4.\" Copyright (c) 1985, 1991, 1993
5.\"	The Regents of the University of California.  All rights reserved.
6.\"
7.\" Redistribution and use in source and binary forms, with or without
8.\" modification, are permitted provided that the following conditions
9.\" are met:
10.\" 1. Redistributions of source code must retain the above copyright
11.\"    notice, this list of conditions and the following disclaimer.
12.\" 2. Redistributions in binary form must reproduce the above copyright
13.\"    notice, this list of conditions and the following disclaimer in the
14.\"    documentation and/or other materials provided with the distribution.
15.\" 3. Neither the name of the University nor the names of its contributors
16.\"    may be used to endorse or promote products derived from this software
17.\"    without specific prior written permission.
18.\"
19.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
20.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
23.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29.\" SUCH DAMAGE.
30.\"
31.\"	from: @(#)arp.8	8.1 (Berkeley) 6/6/93
32.\"
33.Dd $Mdocdate: May 31 2007 $
34.Dt ARP 8
35.Os
36.Sh NAME
37.Nm arp
38.Nd address resolution display and control
39.Sh SYNOPSIS
40.Nm arp
41.Op Fl adn
42.Ar hostname
43.Nm arp
44.Op Fl F
45.Op Fl f Ar file
46.Fl s Ar hostname ether_addr
47.Op Cm temp | permanent
48.Op Cm pub
49.Sh DESCRIPTION
50The
51.Nm
52program displays and modifies the Internet-to-Ethernet address translation
53tables used by the address resolution protocol
54.Pq Xr arp 4 .
55With no flags, the program displays the current
56.Tn ARP
57entry for
58.Ar hostname .
59The host may be specified by name or by number,
60using Internet dot notation.
61.Pp
62Available options:
63.Bl -tag -width Ds
64.It Fl a
65Display all of the current
66.Tn ARP
67entries.
68See also the
69.Fl d
70option below.
71.It Fl d
72Delete an entry for the host called
73.Ar hostname .
74Alternatively, the
75.Fl d
76flag may be combined with the
77.Fl a
78flag to delete all entries, with hostname lookups automatically
79disabled.
80Only the superuser may delete entries.
81.It Fl F
82Force existing entries for the given host to be overwritten
83(only relevant to the
84.Fl f
85and
86.Fl s
87options).
88.It Fl f Ar file
89Process entries from
90.Ar file
91to be set in the
92.Tn ARP
93tables.
94Any entries in the file that already exist for a given host
95will not be overwritten unless
96.Fl F
97is given.
98Entries in the file should be of the form:
99.Bd -filled -offset indent
100.Ar hostname ether_addr
101.Op Cm temp | permanent
102.Op Cm pub
103.Ed
104.Pp
105The entry will be static, i.e., will not time out, unless the word
106.Cm temp
107is given in the command.
108A static
109.Tn ARP
110entry can be overwritten by network traffic, unless the word
111.Cm permanent
112is given.
113If the word
114.Cm pub
115is given, the entry will be
116.Dq published ;
117i.e., this system will
118act as an
119.Tn ARP
120server,
121responding to requests for
122.Ar hostname
123even though the host address is not its own.
124This behavior has traditionally been called
125.Em proxy ARP .
126.It Fl n
127Show network addresses as numbers (normally
128.Nm
129attempts to display addresses symbolically).
130.It Xo
131.Fl s Ar hostname ether_addr
132.Op Cm temp | permanent
133.Op Cm pub
134.Xc
135Create an
136.Tn ARP
137entry for the host called
138.Ar hostname
139with the Ethernet address
140.Ar ether_addr .
141The Ethernet address is given as six hexadecimal bytes separated by
142colons.
143.Pp
144The
145.Cm permanent , pub ,
146or
147.Cm temp
148modifiers may be specified with meanings as given above.
149.Pp
150If the entry already exists for the given host, it will not
151be replaced unless
152.Fl F
153is given.
154.El
155.Sh EXAMPLES
156View the current
157.Xr arp 4
158table:
159.Pp
160.Dl $ arp -a
161.Pp
162Create a permanent
163entry (one that cannot be overwritten by other network traffic):
164.Pp
165.Dl # arp -s 10.0.0.2 00:90:27:bb:cc:dd permanent
166.Pp
167Create proxy ARP
168entries on interface fxp0
169(MAC address 00:90:27:bb:cc:dd),
170for IP addresses 204.1.2.3 and 204.1.2.4:
171.Bd -literal -offset indent
172# arp -s 204.1.2.3 00:90:27:bb:cc:dd pub
173# arp -s 204.1.2.4 00:90:27:bb:cc:dd pub
174.Ed
175.Sh SEE ALSO
176.Xr inet 3 ,
177.Xr arp 4 ,
178.Xr ifconfig 8
179.Sh HISTORY
180The
181.Nm
182command appeared in
183.Bx 4.3 .
184