1.\" $OpenBSD: arp.4,v 1.13 2003/03/14 10:07:35 jmc Exp $ 2.\" $NetBSD: arp.4,v 1.2 1995/03/01 11:50:56 chopps Exp $ 3.\" 4.\" Copyright (c) 1985, 1986, 1988, 1994 5.\" The Regents of the University of California. All rights reserved. 6.\" 7.\" Redistribution and use in source and binary forms, with or without 8.\" modification, are permitted provided that the following conditions 9.\" are met: 10.\" 1. Redistributions of source code must retain the above copyright 11.\" notice, this list of conditions and the following disclaimer. 12.\" 2. Redistributions in binary form must reproduce the above copyright 13.\" notice, this list of conditions and the following disclaimer in the 14.\" documentation and/or other materials provided with the distribution. 15.\" 3. All advertising materials mentioning features or use of this software 16.\" must display the following acknowledgement: 17.\" This product includes software developed by the University of 18.\" California, Berkeley and its contributors. 19.\" 4. Neither the name of the University nor the names of its contributors 20.\" may be used to endorse or promote products derived from this software 21.\" without specific prior written permission. 22.\" 23.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 24.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 25.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 26.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 27.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 28.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 29.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33.\" SUCH DAMAGE. 34.\" 35.\" from: @(#)arp4.4 6.5 (Berkeley) 4/18/94 36.\" 37.Dd April 18, 1994 38.Dt ARP 4 39.Os 40.Sh NAME 41.Nm arp 42.Nd Address Resolution Protocol 43.Sh SYNOPSIS 44.Cd "pseudo-device ether" 45.Sh DESCRIPTION 46The Address Resolution Protocol (ARP) is used to dynamically 47map between Internet host addresses and Ethernet addresses. 48It is used by all of the Ethernet interface drivers. 49It is not specific to Internet protocols or to Ethernet, 50but this implementation currently supports only that combination. 51.Pp 52ARP caches Internet-Ethernet address mappings. 53When an interface requests a mapping for an address not in the cache, 54ARP queues the message which requires the mapping and broadcasts 55a message on the associated network requesting the address mapping. 56If a response is provided, the new mapping is cached and any pending 57message is transmitted. 58ARP will queue at most one packet while waiting for a response to a 59mapping request; 60only the most recently transmitted packet is kept. 61If the target host does not respond after several requests, 62the host is considered to be down for a short period (normally 20 seconds), 63allowing an error to be returned to transmission attempts during this 64interval. 65The error is 66.Li EHOSTDOWN 67for a non-responding destination host, and 68.Li EHOSTUNREACH 69for a non-responding router. 70.Pp 71The ARP cache is stored in the system routing table as 72dynamically created host routes. 73The route to a directly attached Ethernet network is installed as a 74.Dq cloning 75route (one with the 76.Li RTF_CLONING 77flag set), 78causing routes to individual hosts on that network to be created on 79demand. 80These routes time out periodically (normally 20 minutes after validated; 81entries are not validated when not in use). 82An entry for a host which is not responding is a 83.Dq reject 84route (one with the 85.Li RTF_REJECT 86flag set). 87.Pp 88ARP entries may be added, deleted or changed with the 89.Xr arp 8 90utility. 91Manually added entries may be temporary, static or permanent, 92and may be 93.Dq published , 94in which case the system will respond to ARP requests for that host 95as if it were the target of the request. 96A static entry will not 97time out, but may be overwritten by network traffic, while a permanent 98entry will not time out and can not be overwritten. 99.Pp 100In the past, 101ARP was used to negotiate the use of a trailer encapsulation. 102This is no longer supported. 103.Pp 104ARP watches passively for hosts impersonating the local host (i.e., a host 105which responds to an ARP mapping request for the local host's address). 106.Sh DIAGNOSTICS 107.Bl -diag 108.It "duplicate IP address %x!! sent from ethernet address: %x:%x:%x:%x:%x:%x." 109ARP has discovered another host on the local network which responds to 110mapping requests for its own Internet address with a different Ethernet 111address, generally indicating that two hosts are attempting to use the 112same Internet address. 113.Pp 114.It "arp info overwritten for %x!! by %x:%x:%x:%x:%x:%x on %x." 115An existing route has been overwritten with a new Ethernet address, for 116example when the other host has changed Ethernet cards. 117If the route 118previously was static/non-expiring, the new route will expire normally. 119.Pp 120.It "arp: attempt to overwrite permanent entry for %x!! by %x:%x:%x:%x:%x:%x on %x." 121As above, but the existing route had been manually setup as permanent. 122The routing information is not modified. 123.Pp 124.It "arp: attempt to overwrite entry for %x!! on %x by %x:%x:%x:%x:%x:%x on %x." 125ARP has noticed an attempt to overwrite a host's routing entry on one 126interface with a routing entry for a different interface. 127The routing information is not modified. 128.El 129.Sh SEE ALSO 130.Xr inet 4 , 131.Xr route 4 , 132.Xr arp 8 , 133.Xr ifconfig 8 , 134.Xr route 8 135.sp 136.Rs 137.%A Plummer, D. 138.%B "An Ethernet Address Resolution Protocol" 139.%T RFC826 140.Re 141.Rs 142.%A Karels, M.J. 143.%A Leffler, S.J. 144.%B "Trailer Encapsulations 145.%T RFC893 146.Re 147 148