xref: /freebsd/usr.sbin/arp/arp.4 (revision 17ee9d00bc1ae1e598c38f25826f861e4bc6c3ce)
1.\" Copyright (c) 1985, 1986, 1988, 1994
2.\"	The Regents of the University of California.  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.\"	@(#)arp4.4	6.5 (Berkeley) 4/18/94
33.\"
34.Dd April 18, 1994
35.Dt ARP 4
36.Os BSD 4
37.Sh NAME
38.Nm arp
39.Nd Address Resolution Protocol
40.Sh SYNOPSIS
41.Em "pseudo-device ether"
42.Sh DESCRIPTION
43The Address Resolution Protocol (ARP) is a protocol used to dynamically
44map between Internet host addresses and 10Mb/s Ethernet addresses.
45It is used by all the 10Mb/s Ethernet interface drivers.
46It is not specific to Internet protocols or to 10Mb/s Ethernet,
47but this implementation currently supports only that combination.
48.Pp
49ARP caches Internet-Ethernet address mappings.
50When an interface requests a mapping for an address not in the cache,
51ARP queues the message which requires the mapping and broadcasts
52a message on the associated network requesting the address mapping.
53If a response is provided, the new mapping is cached and any pending
54message is transmitted.
55ARP will queue at most one packet while waiting for a response to a
56mapping request;
57only the most recently ``transmitted'' packet is kept.
58If the target host does not respond after several requests,
59the host is considered to be down for a short period (normally 20 seconds),
60allowing an error to be returned to transmission attempts during this
61interval.
62The error is
63.Li EHOSTDOWN
64for a non-responding destination host, and
65.Li EHOSTUNREACH
66for a non-responding router.
67.Pp
68The ARP cache is stored in the system routing table as
69dynamically-created host routes.
70The route to a directly-attached Ethernet network is installed as a
71.Dq cloning
72route (one with the
73.Li RTF_CLONING
74flag set),
75causing routes to individual hosts on that network to be created on
76demand.
77These routes time out periodically (normally 20 minutes after validated;
78entries are not validated when not in use).
79An entry for a host which is not responding is a
80.Dq reject
81route (one with the
82.Li RTF_REJECT
83flag set).
84.Pp
85ARP entries may be added, deleted or changed with the
86.Xr arp 8
87utility.
88Manually-added entries may be temporary or permanent,
89and may be
90.Dq published ,
91in which case the system will respond to ARP requests for that host
92as if it were the target of the request.
93.Pp
94In the past,
95ARP was used to negotiate the use of a trailer encapsulation.
96This is no longer supported.
97.Pp
98ARP watches passively for hosts impersonating the local host (i.e. a host
99which responds to an ARP mapping request for the local host's address).
100.Sh DIAGNOSTICS
101.Em "duplicate IP address %x!! sent from ethernet address: %x:%x:%x:%x:%x:%x."
102ARP has discovered another host on the local network which responds to
103mapping requests for its own Internet address with a different Ethernet
104address, generally indicating that two hosts are attempting to use the
105same Internet address.
106.Sh SEE ALSO
107.Xr inet 4 ,
108.Xr route 4 ,
109.Xr arp 8 ,
110.Xr ifconfig 8 ,
111.Xr route 8
112.sp
113.Rs
114.%A Plummer, D.
115.%B "An Ethernet Address Resolution Protocol"
116.%T RFC826
117.Re
118.Rs
119.%A Leffler, S.J.
120.%A Karels, M.J.
121.%B "Trailer Encapsulations
122.%T RFC893
123.Re
124
125