]> git.saurik.com Git - apple/network_cmds.git/blame - arp.tproj/arp.8
network_cmds-606.100.3.tar.gz
[apple/network_cmds.git] / arp.tproj / arp.8
CommitLineData
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
98The
9c859447
A
99.Nm
100utility displays and modifies the Internet-to-Ethernet address translation
b7080c8e
A
101tables used by the address resolution protocol
102.Pq Xr arp 4 .
103With no flags, the program displays the current
104.Tn ARP
105entry for
106.Ar hostname .
107The host may be specified by name or by number,
108using Internet dot notation.
109.Pp
110Available options:
9c859447 111.Bl -tag -width indent
b7080c8e 112.It Fl a
9c859447 113The program displays or deletes all of the current
b7080c8e
A
114.Tn ARP
115entries.
116.It Fl d
117A super-user may delete an entry for the host called
118.Ar hostname
119with the
120.Fl d
121flag.
9c859447
A
122If the
123.Cm pub
124keyword is specified, only the
125.Dq published
126.Tn ARP
127entry
128for this host will be deleted.
129If the
130.Cm ifscope
131keyword is specified, the entry specific to the interface will be deleted.
132.Pp
133Alternatively, the
134.Fl d
135flag may be combined with the
136.Fl a
137flag to delete all entries.
138.It Fl i Ar interface
139Limit the operation scope to the
140.Tn ARP
141entries on
142.Ar interface .
143Applicable only to the following operations:
144display one, display all, delete all.
fdfd5971
A
145.It Fl l
146Show link-layer reachability information.
9c859447
A
147.It Fl n
148Show network addresses as numbers (normally
149.Nm
150attempts to display addresses symbolically).
b7080c8e
A
151.It Fl s Ar hostname ether_addr
152Create an
153.Tn ARP
154entry for the host called
155.Ar hostname
9c859447 156with the Ethernet address
b7080c8e
A
157.Ar ether_addr .
158The Ethernet address is given as six hex bytes separated by colons.
159The entry will be permanent unless the word
9c859447
A
160.Cm temp
161is given in the command.
b7080c8e 162If the word
9c859447
A
163.Cm pub
164is given, the entry will be
165.Dq published ;
166i.e., this system will
b7080c8e
A
167act as an
168.Tn ARP
169server,
9c859447 170responding to requests for
b7080c8e
A
171.Ar hostname
172even though the host address is not its own.
9c859447
A
173In this case the
174.Ar ether_addr
175can be given as
176.Cm auto
177in which case the interfaces on this host will be examined,
178and if one of them is found to occupy the same subnet, its
179Ethernet address will be used.
180If the
181.Cm only
182keyword is also specified, this will create a
183.Dq "published (proxy only)"
184entry.
185This type of entry is created automatically if
186.Nm
187detects that a routing table entry for
188.Ar hostname
189already exists.
190.Pp
191If the
192.Cm reject
193keyword is specified the entry will be marked so that traffic to
194the host will be discarded and the sender will be notified the
195host is unreachable.
196The
197.Cm blackhole
198keyword is similar in that traffic is discarded but the sender is
199not notified.
200These can be used to block external traffic to a host without
201using a firewall.
202.Pp
203If the
204.Cm ifscope
205keyword is specified, the entry will set with an additional property that
206strictly associate the entry to the interface. This allows
207for the presence of mutiple entries with the same destination
208on different interfaces.
209.It Fl S Ar hostname ether_addr
210Is just like
211.Fl s
212except any existing
213.Tn ARP
214entry for this host will be deleted first.
215.It Fl f Ar filename
216Cause the file
b7080c8e
A
217.Ar filename
218to be read and multiple entries to be set in the
219.Tn ARP
9c859447
A
220tables.
221Entries
b7080c8e
A
222in 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
231with argument meanings as given above.
9c859447
A
232Leading whitespace and empty lines are ignored.
233A
234.Ql #
235character will mark the rest of the line as a comment.
7af5ce03
A
236.It Fl x
237Show extended link-layer reachability information in addition to that shown by
238the
239.Fl l
240flag.
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
248The
249.Nm
9c859447 250utility appeared in
fdfd5971 251.Bx 4.3 .