]>
Commit | Line | Data |
---|---|---|
7af5ce03 A |
1 | .\" Copyright (c) 2012 Apple Inc. All rights reserved. |
2 | .\" | |
3 | .\" @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | |
4 | .\" | |
5 | .\" This file contains Original Code and/or Modifications of Original Code | |
6 | .\" as defined in and that are subject to the Apple Public Source License | |
7 | .\" Version 2.0 (the 'License'). You may not use this file except in | |
8 | .\" compliance with the License. The rights granted to you under the License | |
9 | .\" may not be used to create, or enable the creation or redistribution of, | |
10 | .\" unlawful or unlicensed copies of an Apple operating system, or to | |
11 | .\" circumvent, violate, or enable the circumvention or violation of, any | |
12 | .\" terms of an Apple operating system software license agreement. | |
13 | .\" | |
14 | .\" Please obtain a copy of the License at | |
15 | .\" http://www.opensource.apple.com/apsl/ and read it before using this file. | |
16 | .\" | |
17 | .\" The Original Code and all software distributed under the License are | |
18 | .\" distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | |
19 | .\" EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | |
20 | .\" INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | |
21 | .\" FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | |
22 | .\" Please see the License for the specific language governing rights and | |
23 | .\" limitations under the License. | |
24 | .\" | |
25 | .\" @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | |
26 | .\" | |
b7080c8e A |
27 | .\" Copyright (c) 1985, 1991, 1993 |
28 | .\" The Regents of the University of California. All rights reserved. | |
29 | .\" | |
30 | .\" Redistribution and use in source and binary forms, with or without | |
31 | .\" modification, are permitted provided that the following conditions | |
32 | .\" are met: | |
33 | .\" 1. Redistributions of source code must retain the above copyright | |
34 | .\" notice, this list of conditions and the following disclaimer. | |
35 | .\" 2. Redistributions in binary form must reproduce the above copyright | |
36 | .\" notice, this list of conditions and the following disclaimer in the | |
37 | .\" documentation and/or other materials provided with the distribution. | |
b7080c8e A |
38 | .\" 4. Neither the name of the University nor the names of its contributors |
39 | .\" may be used to endorse or promote products derived from this software | |
40 | .\" without specific prior written permission. | |
41 | .\" | |
42 | .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | |
43 | .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
44 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |
45 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | |
46 | .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
47 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
48 | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
49 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
50 | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
51 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
52 | .\" SUCH DAMAGE. | |
53 | .\" | |
9c859447 A |
54 | .\" @(#)arp.8 8.1 (Berkeley) 6/6/93 |
55 | .\" $FreeBSD: src/usr.sbin/arp/arp.8,v 1.25.2.1 2008/04/25 16:38:14 sam Exp $ | |
b7080c8e | 56 | .\" |
9c859447 | 57 | .Dd March 18, 2008 |
b7080c8e | 58 | .Dt ARP 8 |
9c859447 | 59 | .Os |
b7080c8e A |
60 | .Sh NAME |
61 | .Nm arp | |
62 | .Nd address resolution display and control | |
63 | .Sh SYNOPSIS | |
9c859447 A |
64 | .Nm |
65 | .Op Fl n | |
66 | .Op Fl i Ar interface | |
b7080c8e | 67 | .Ar hostname |
9c859447 A |
68 | .Nm |
69 | .Op Fl n | |
70 | .Op Fl i Ar interface | |
fdfd5971 | 71 | .Op Fl l |
b7080c8e | 72 | .Fl a |
9c859447 | 73 | .Nm |
b7080c8e | 74 | .Fl d Ar hostname |
9c859447 A |
75 | .Op Cm pub |
76 | .Op Cm ifscope interface | |
77 | .Nm | |
78 | .Fl d | |
79 | .Op Fl i Ar interface | |
80 | .Fl a | |
81 | .Nm | |
b7080c8e | 82 | .Fl s Ar hostname ether_addr |
9c859447 A |
83 | .Op Cm temp |
84 | .Op Cm reject | |
85 | .Op Cm blackhole | |
86 | .Op Cm pub Op Cm only | |
87 | .Op Cm ifscope interface | |
88 | .Nm | |
89 | .Fl S Ar hostname ether_addr | |
90 | .Op Cm temp | |
91 | .Op Cm reject | |
92 | .Op Cm blackhole | |
93 | .Op Cm pub Op Cm only | |
94 | .Op Cm ifscope interface | |
95 | .Nm | |
b7080c8e A |
96 | .Fl f Ar filename |
97 | .Sh DESCRIPTION | |
98 | The | |
9c859447 A |
99 | .Nm |
100 | utility displays and modifies the Internet-to-Ethernet address translation | |
b7080c8e A |
101 | tables used by the address resolution protocol |
102 | .Pq Xr arp 4 . | |
103 | With no flags, the program displays the current | |
104 | .Tn ARP | |
105 | entry for | |
106 | .Ar hostname . | |
107 | The host may be specified by name or by number, | |
108 | using Internet dot notation. | |
109 | .Pp | |
110 | Available options: | |
9c859447 | 111 | .Bl -tag -width indent |
b7080c8e | 112 | .It Fl a |
9c859447 | 113 | The program displays or deletes all of the current |
b7080c8e A |
114 | .Tn ARP |
115 | entries. | |
116 | .It Fl d | |
117 | A super-user may delete an entry for the host called | |
118 | .Ar hostname | |
119 | with the | |
120 | .Fl d | |
121 | flag. | |
9c859447 A |
122 | If the |
123 | .Cm pub | |
124 | keyword is specified, only the | |
125 | .Dq published | |
126 | .Tn ARP | |
127 | entry | |
128 | for this host will be deleted. | |
129 | If the | |
130 | .Cm ifscope | |
131 | keyword is specified, the entry specific to the interface will be deleted. | |
132 | .Pp | |
133 | Alternatively, the | |
134 | .Fl d | |
135 | flag may be combined with the | |
136 | .Fl a | |
137 | flag to delete all entries. | |
138 | .It Fl i Ar interface | |
139 | Limit the operation scope to the | |
140 | .Tn ARP | |
141 | entries on | |
142 | .Ar interface . | |
143 | Applicable only to the following operations: | |
144 | display one, display all, delete all. | |
fdfd5971 A |
145 | .It Fl l |
146 | Show link-layer reachability information. | |
9c859447 A |
147 | .It Fl n |
148 | Show network addresses as numbers (normally | |
149 | .Nm | |
150 | attempts to display addresses symbolically). | |
b7080c8e A |
151 | .It Fl s Ar hostname ether_addr |
152 | Create an | |
153 | .Tn ARP | |
154 | entry for the host called | |
155 | .Ar hostname | |
9c859447 | 156 | with the Ethernet address |
b7080c8e A |
157 | .Ar ether_addr . |
158 | The Ethernet address is given as six hex bytes separated by colons. | |
159 | The entry will be permanent unless the word | |
9c859447 A |
160 | .Cm temp |
161 | is given in the command. | |
b7080c8e | 162 | If the word |
9c859447 A |
163 | .Cm pub |
164 | is given, the entry will be | |
165 | .Dq published ; | |
166 | i.e., this system will | |
b7080c8e A |
167 | act as an |
168 | .Tn ARP | |
169 | server, | |
9c859447 | 170 | responding to requests for |
b7080c8e A |
171 | .Ar hostname |
172 | even though the host address is not its own. | |
9c859447 A |
173 | In this case the |
174 | .Ar ether_addr | |
175 | can be given as | |
176 | .Cm auto | |
177 | in which case the interfaces on this host will be examined, | |
178 | and if one of them is found to occupy the same subnet, its | |
179 | Ethernet address will be used. | |
180 | If the | |
181 | .Cm only | |
182 | keyword is also specified, this will create a | |
183 | .Dq "published (proxy only)" | |
184 | entry. | |
185 | This type of entry is created automatically if | |
186 | .Nm | |
187 | detects that a routing table entry for | |
188 | .Ar hostname | |
189 | already exists. | |
190 | .Pp | |
191 | If the | |
192 | .Cm reject | |
193 | keyword is specified the entry will be marked so that traffic to | |
194 | the host will be discarded and the sender will be notified the | |
195 | host is unreachable. | |
196 | The | |
197 | .Cm blackhole | |
198 | keyword is similar in that traffic is discarded but the sender is | |
199 | not notified. | |
200 | These can be used to block external traffic to a host without | |
201 | using a firewall. | |
202 | .Pp | |
203 | If the | |
204 | .Cm ifscope | |
205 | keyword is specified, the entry will set with an additional property that | |
206 | strictly associate the entry to the interface. This allows | |
207 | for the presence of mutiple entries with the same destination | |
208 | on different interfaces. | |
209 | .It Fl S Ar hostname ether_addr | |
210 | Is just like | |
211 | .Fl s | |
212 | except any existing | |
213 | .Tn ARP | |
214 | entry for this host will be deleted first. | |
215 | .It Fl f Ar filename | |
216 | Cause the file | |
b7080c8e A |
217 | .Ar filename |
218 | to be read and multiple entries to be set in the | |
219 | .Tn ARP | |
9c859447 A |
220 | tables. |
221 | Entries | |
b7080c8e A |
222 | in the file should be of the form |
223 | .Pp | |
9c859447 | 224 | .Bd -ragged -offset indent -compact |
b7080c8e | 225 | .Ar hostname ether_addr |
9c859447 A |
226 | .Op Cm temp |
227 | .Op Cm pub Op Cm only | |
228 | .Op Cm ifscope interface | |
b7080c8e A |
229 | .Ed |
230 | .Pp | |
231 | with argument meanings as given above. | |
9c859447 A |
232 | Leading whitespace and empty lines are ignored. |
233 | A | |
234 | .Ql # | |
235 | character will mark the rest of the line as a comment. | |
7af5ce03 A |
236 | .It Fl x |
237 | Show extended link-layer reachability information in addition to that shown by | |
238 | the | |
239 | .Fl l | |
240 | flag. | |
b7080c8e A |
241 | .El |
242 | .Sh SEE ALSO | |
243 | .Xr inet 3 , | |
244 | .Xr arp 4 , | |
fdfd5971 A |
245 | .Xr ifconfig 8 , |
246 | .Xr ndp 8 | |
b7080c8e A |
247 | .Sh HISTORY |
248 | The | |
249 | .Nm | |
9c859447 | 250 | utility appeared in |
fdfd5971 | 251 | .Bx 4.3 . |