xref: /netbsd-src/usr.sbin/arp/arp.8 (revision 23c8222edbfb0f0932d88a8351d3a0cf817dfb9e)
1.\"	$NetBSD: arp.8,v 1.16 2003/08/07 11:25:12 agc Exp $
2.\"
3.\" Copyright (c) 1985, 1991, 1993
4.\"	The Regents of the University of California.  All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\"    notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\"    notice, this list of conditions and the following disclaimer in the
13.\"    documentation and/or other materials provided with the distribution.
14.\" 3. Neither the name of the University nor the names of its contributors
15.\"    may be used to endorse or promote products derived from this software
16.\"    without specific prior written permission.
17.\"
18.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28.\" SUCH DAMAGE.
29.\"
30.\"	from: @(#)arp.8	8.2 (Berkeley) 4/27/95
31.\"
32.Dd April 27, 1995
33.Dt ARP 8
34.Os
35.Sh NAME
36.Nm arp
37.Nd address resolution display and control
38.Sh SYNOPSIS
39.Nm
40.Op Fl n
41.Ar hostname
42.Nm
43.Op Fl nv
44.Fl a
45.Nm
46.Op Fl v
47.Fl d
48.Op Fl a | Ar hostname
49.Nm
50.Fl s Ar hostname ether_addr
51.Op Ar temp
52.Op Ar pub
53.Nm
54.Fl f Ar filename
55.Sh DESCRIPTION
56The
57.Nm
58program displays and modifies the Internet-to-Ethernet address translation
59tables used by the address resolution protocol
60.Pq Xr arp 4 .
61With no flags, the program displays the current
62.Tn ARP
63entry for
64.Ar hostname .
65The host may be specified by name or by number,
66using Internet dot notation.
67.Pp
68Available options:
69.Bl -tag -width Ds
70.It Fl a
71The program displays all of the current
72.Tn ARP
73entries.
74.It Fl d
75A super-user may delete an entry for the host called
76.Ar hostname
77with the
78.Fl d
79flag.  If used with
80.Fl a
81instead of a
82.Ar hostname ,
83it will delete all arp entries.
84.It Fl n
85Show network addresses as numbers (normally
86.Nm
87attempts to display addresses symbolically).
88.It Fl s Ar hostname ether_addr
89Create an
90.Tn ARP
91entry for the host called
92.Ar hostname
93with the Ethernet address
94.Ar ether_addr .
95The Ethernet address is given as six hex bytes separated by colons.
96The entry will be permanent unless the word
97.Ar temp
98is given in the command.
99If the word
100.Ar pub
101is given, the entry will be "published"; i.e., this system will
102act as an
103.Tn ARP
104server,
105responding to requests for
106.Ar hostname
107even though the host address is not its own.
108.It Fl f
109Causes the file
110.Ar filename
111to be read and multiple entries to be set in the
112.Tn ARP
113tables.  Entries
114in the file should be of the form
115.Pp
116.Bd -filled -offset indent -compact
117.Ar hostname ether_addr
118.Op Ar temp
119.Op Ar pub
120.Ed
121.Pp
122with argument meanings as given above.
123.It Fl v
124Display verbose information when adding or deleting
125.Tn ARP
126entries.
127.El
128.Sh SEE ALSO
129.Xr inet 3 ,
130.Xr arp 4 ,
131.Xr ifconfig 8
132.Sh HISTORY
133The
134.Nm
135command appeared in
136.Bx 4.3 .
137