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.\" $FreeBSD: src/usr.sbin/arp/arp.4,v 1.4.2.5 2003/03/12 22:08:13 trhodes Exp $ 34.\" $DragonFly: src/usr.sbin/arp/arp.4,v 1.3 2007/11/23 23:16:37 swildner Exp $ 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.Cd "device ether" 44.Sh DESCRIPTION 45The Address Resolution Protocol (ARP) is used to dynamically 46map between Protocol Addresses (such as IP addresses) and 47Local Network Addresses (such as Ethernet addresses). 48This implementation maps IP addresses to Ethernet, 49ARCnet, 50or Token Ring addresses. 51It is used by all the Ethernet interface drivers. 52.Pp 53ARP caches Internet-Ethernet address mappings. 54When an interface requests a mapping for an address not in the cache, 55ARP queues the message which requires the mapping and broadcasts 56a message on the associated network requesting the address mapping. 57If a response is provided, the new mapping is cached and any pending 58message is transmitted. 59ARP will queue at most one packet while waiting for a response to a 60mapping request; 61only the most recently ``transmitted'' packet is kept. 62If the target host does not respond after several requests, 63the host is considered to be down for a short period (normally 20 seconds), 64allowing an error to be returned to transmission attempts during this 65interval. 66The error is 67.Er EHOSTDOWN 68for a non-responding destination host, and 69.Er EHOSTUNREACH 70for a non-responding router. 71.Pp 72The ARP cache is stored in the system routing table as 73dynamically-created host routes. 74The route to a directly-attached Ethernet network is installed as a 75.Dq cloning 76route (one with the 77.Li RTF_CLONING 78flag set), 79causing routes to individual hosts on that network to be created on 80demand. 81These routes time out periodically (normally 20 minutes after validated; 82entries are not validated when not in use). 83An entry for a host which is not responding is a 84.Dq reject 85route (one with the 86.Li RTF_REJECT 87flag set). 88.Pp 89ARP entries may be added, deleted or changed with the 90.Xr arp 8 91utility. 92Manually-added entries may be temporary or permanent, 93and may be 94.Dq published , 95in which case the system will respond to ARP requests for that host 96as if it were the target of the request. 97.Pp 98In the past, 99ARP was used to negotiate the use of a trailer encapsulation. 100This is no longer supported. 101.Pp 102ARP watches passively for hosts impersonating the local host (i.e. a host 103which responds to an ARP mapping request for the local host's address). 104.Sh DIAGNOSTICS 105.Em "arp: %x:%x:%x:%x:%x:%x is using my IP address %d.%d.%d.%d!" : 106ARP has discovered another host on the local network which responds to 107mapping requests for its own Internet address with a different Ethernet 108address, generally indicating that two hosts are attempting to use the 109same Internet address. 110.Pp 111.Em "arp: ether address is broadcast for IP address %d.%d.%d.%d!" : 112ARP requested information for a host, and received an answer indicating 113that the host's ethernet address is the ethernet broadcast address. 114This indicates a misconfigured or broken device. 115.Pp 116.Em "arp: %d.%d.%d.%d moved from %x:%x:%x:%x:%x:%x to %x:%x:%x:%x:%x:%x" : 117ARP had a cached value for the ethernet address of the referenced host, 118but received a reply indicating that the host is at a new address. This 119can happen normally when host hardware addresses change, or when a mobile 120node arrives or leaves the local subnet. It can also indicate a problem 121with proxy ARP. 122.Pp 123.Em "arpresolve: can't allocate llinfo for %d.%d.%d.%d" : 124The route for the referenced host points to a device upon which ARP is 125required, but ARP was unable to allocate a routing table entry in which 126to store the host's MAC address. This usually points to a misconfigured 127routing table. It can also occur if the kernel cannot allocate memory. 128.Sh SEE ALSO 129.Xr inet 4 , 130.Xr route 4 , 131.Xr arp 8 , 132.Xr ifconfig 8 , 133.Xr route 8 134.Rs 135.%A Plummer, D. 136.%B "An Ethernet Address Resolution Protocol" 137.%T RFC 826 138.Re 139.Rs 140.%A Leffler, S.J. 141.%A Karels, M.J. 142.%B "Trailer Encapsulations" 143.%T RFC 893 144.Re 145