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