xref: /netbsd/usr.sbin/arp/arp.4 (revision bf9ec67e)
1.\"	$NetBSD: arp.4,v 1.7 2002/02/08 01:38:46 ross Exp $
2.\"
3.\" Copyright (c) 1985, 1986, 1988, 1994
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. All advertising materials mentioning features or use of this software
15.\"    must display the following acknowledgement:
16.\"	This product includes software developed by the University of
17.\"	California, Berkeley and its contributors.
18.\" 4. Neither the name of the University nor the names of its contributors
19.\"    may be used to endorse or promote products derived from this software
20.\"    without specific prior written permission.
21.\"
22.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
23.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
26.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32.\" SUCH DAMAGE.
33.\"
34.\"	from: @(#)arp4.4	6.5 (Berkeley) 4/18/94
35.\"
36.Dd April 18, 1994
37.Dt ARP 4
38.Os
39.Sh NAME
40.Nm arp
41.Nd Address Resolution Protocol
42.Sh SYNOPSIS
43.Fd #include \*[Lt]netinet/if_ether.h\*[Gt]
44.Sh DESCRIPTION
45The Address Resolution Protocol (ARP) is a protocol used to dynamically
46map between Internet host addresses and Ethernet addresses.
47It is used by all the Ethernet interface drivers.
48It is not specific to Internet protocols or to Ethernet,
49but this implementation currently supports only that combination.
50.Pp
51ARP caches Internet-Ethernet address mappings.
52When an interface requests a mapping for an address not in the cache,
53ARP queues the message which requires the mapping and broadcasts
54a message on the associated network requesting the address mapping.
55If a response is provided, the new mapping is cached and any pending
56message is transmitted.
57ARP will queue at most one packet while waiting for a response to a
58mapping request;
59only the most recently ``transmitted'' packet is kept.
60If the target host does not respond after several requests,
61the host is considered to be down for a short period (normally 20 seconds),
62allowing an error to be returned to transmission attempts during this
63interval.
64The error is
65.Er EHOSTDOWN
66for a non-responding destination host, and
67.Er EHOSTUNREACH
68for a non-responding router.
69.Pp
70The ARP cache is stored in the system routing table as
71dynamically-created host routes.
72The route to a directly-attached Ethernet network is installed as a
73.Dq cloning
74route (one with the
75.Dv RTF_CLONING
76flag set),
77causing routes to individual hosts on that network to be created on
78demand.
79These routes time out periodically (normally 20 minutes after validated;
80entries are not validated when not in use).
81An entry for a host which is not responding is a
82.Dq reject
83route (one with the
84.Dv RTF_REJECT
85flag set).
86.Pp
87ARP entries may be added, deleted or changed with the
88.Xr arp 8
89utility.
90Manually-added entries may be temporary or permanent,
91and may be
92.Dq published ,
93in which case the system will respond to ARP requests for that host
94as if it were the target of the request.
95.Pp
96In the past,
97ARP was used to negotiate the use of a trailer encapsulation.
98This is no longer supported.
99.Pp
100ARP watches passively for hosts impersonating the local host (i.e. a host
101which responds to an ARP mapping request for the local host's address).
102.Sh DIAGNOSTICS
103.Bl -diag
104.It "duplicate IP address %x sent from ethernet address %x:%x:%x:%x:%x:%x."
105ARP has discovered another host on the local network which responds to
106mapping requests for its own Internet address with a different Ethernet
107address, generally indicating that two hosts are attempting to use the
108same Internet address.
109.El
110.Sh SEE ALSO
111.Xr inet 4 ,
112.Xr route 4 ,
113.Xr arp 8 ,
114.Xr ifconfig 8 ,
115.Xr route 8
116.sp
117.Rs
118.%A Plummer, D.
119.%B "An Ethernet Address Resolution Protocol"
120.%T RFC826
121.Re
122.Rs
123.%A Leffler, S.J.
124.%A Karels, M.J.
125.%B "Trailer Encapsulations"
126.%T RFC893
127.Re
128