xref: /netbsd-src/usr.sbin/arp/arp.8 (revision 5f7096188587a2c7c95fa3c69b78e1ec9c7923d0)
1.\" Copyright (c) 1985, 1991 The Regents of the University of California.
2.\" 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.\"     from: @(#)arp.8	6.5 (Berkeley) 3/16/91
33.\"	$Id: arp.8,v 1.2 1993/08/01 07:25:34 mycroft Exp $
34.\"
35.Dd March 16, 1991
36.Dt ARP 8
37.Os BSD 4.3
38.Sh NAME
39.Nm arp
40.Nd address resolution display and control
41.Sh SYNOPSIS
42.Nm arp
43.Ar hostname
44.Nm arp
45.Fl a
46.Op Ar vmunix
47.Op Ar kmem
48.Nm arp
49.Fl d Ar hostname
50.Nm arp
51.Fl s Ar hostname ether_addr
52.Op Ar temp
53.Op Ar pub
54.Op Ar trail
55.Nm arp
56.Fl f Ar filename
57.Sh DESCRIPTION
58The
59.Nm arp
60program displays and modifies the Internet-to-Ethernet address translation
61tables used by the address resolution protocol
62.Pq Xr arp 4 .
63With no flags, the program displays the current
64.Tn ARP
65entry for
66.Ar hostname .
67The host may be specified by name or by number,
68using Internet dot notation.
69.Pp
70Available options:
71.Bl -tag -width Ds
72.It Fl a
73The program displays all of the current
74.Tn ARP
75entries by reading the table
76from the file
77.Ar kmem
78(default /dev/kmem) based on the kernel file
79.Ar vmunix
80(default
81.Pa /vmunix ) .
82.It Fl d
83A super-user may delete an entry for the host called
84.Ar hostname
85with the
86.Fl d
87flag.
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.
108The word
109.Ar trail
110indicates that trailer encapsulations may be sent to this host.
111.It Fl f
112Causes the file
113.Ar filename
114to be read and multiple entries to be set in the
115.Tn ARP
116tables.  Entries
117in the file should be of the form
118.Pp
119.Bd -filled -offset indent -compact
120.Ar hostname ether_addr
121.Op Ar temp
122.Op Ar pub
123.Op Ar trail
124.Ed
125.Pp
126with argument meanings as given above.
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