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