Initial import from FreeBSD RELENG_4:
[dragonfly.git] / usr.sbin / arp / arp.8
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: src/usr.sbin/arp/arp.8,v 1.8.2.11 2003/03/11 21:13:48 trhodes Exp $
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
65 The
66 .Nm
67 utility displays and modifies the Internet-to-Ethernet address translation
68 tables used by the address resolution protocol
69 .Pq Xr arp 4 .
70 With no flags, the program displays the current
71 .Tn ARP
72 entry for
73 .Ar hostname .
74 The host may be specified by name or by number,
75 using Internet dot notation.
76 .Pp
77 Available options:
78 .Bl -tag -width indent
79 .It Fl a
80 The program displays or deletes all of the current
81 .Tn ARP
82 entries.
83 .It Fl d
84 A super-user may delete an entry for the host called
85 .Ar hostname
86 with the
87 .Fl d
88 flag.
89 If the
90 .Cm pub
91 keyword is specified, only the
92 .Dq published
93 .Tn ARP
94 entry
95 for this host will be deleted.
96 .Pp
97 Alternatively, the
98 .Fl d
99 flag may be combined with the
100 .Fl a
101 flag to delete all entries.
102 .It Fl n
103 Show network addresses as numbers (normally
104 .Nm
105 attempts to display addresses symbolically).
106 .It Fl s Ar hostname ether_addr
107 Create an
108 .Tn ARP
109 entry for the host called
110 .Ar hostname
111 with the Ethernet address
112 .Ar ether_addr .
113 The Ethernet address is given as six hex bytes separated by colons.
114 The entry will be permanent unless the word
115 .Cm temp
116 is given in the command.
117 If the word
118 .Cm pub
119 is given, the entry will be
120 .Dq published ;
121 i.e., this system will
122 act as an
123 .Tn ARP
124 server,
125 responding to requests for
126 .Ar hostname
127 even though the host address is not its own.
128 In this case the
129 .Ar ether_addr
130 can be given as
131 .Cm auto
132 in which case the interfaces on this host will be examined,
133 and if one of them is found to occupy the same subnet, its
134 Ethernet address will be used.
135 If the
136 .Cm only
137 keyword is also specified, this will create a
138 .Dq "published (proxy only)"
139 entry.
140 This type of entry is created automatically if
141 .Nm
142 detects that a routing table entry for
143 .Ar hostname
144 already exists.
145 .It Fl S Ar hostname ether_addr
146 Is just like
147 .Fl s
148 except any existing
149 .Tn ARP
150 entry for this host will be deleted first.
151 .It Fl f Ar filename
152 Cause the file
153 .Ar filename
154 to be read and multiple entries to be set in the
155 .Tn ARP
156 tables.  Entries
157 in 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
165 with argument meanings as given above.
166 Leading whitespace and empty lines are ignored.
167 A
168 .Ql #
169 character will mark the rest of the line as a comment.
170 .El
171 .Sh SEE ALSO
172 .Xr inet 3 ,
173 .Xr arp 4 ,
174 .Xr ifconfig 8
175 .Sh HISTORY
176 The
177 .Nm
178 utility appeared in
179 .Bx 4.3 .