1*15bcc4a7SSascha Wildner.\" Copyright (c) 1985, 1986, 1988, 1994 2*15bcc4a7SSascha Wildner.\" The Regents of the University of California. All rights reserved. 3*15bcc4a7SSascha Wildner.\" 4*15bcc4a7SSascha Wildner.\" Redistribution and use in source and binary forms, with or without 5*15bcc4a7SSascha Wildner.\" modification, are permitted provided that the following conditions 6*15bcc4a7SSascha Wildner.\" are met: 7*15bcc4a7SSascha Wildner.\" 1. Redistributions of source code must retain the above copyright 8*15bcc4a7SSascha Wildner.\" notice, this list of conditions and the following disclaimer. 9*15bcc4a7SSascha Wildner.\" 2. Redistributions in binary form must reproduce the above copyright 10*15bcc4a7SSascha Wildner.\" notice, this list of conditions and the following disclaimer in the 11*15bcc4a7SSascha Wildner.\" documentation and/or other materials provided with the distribution. 12*15bcc4a7SSascha Wildner.\" 3. All advertising materials mentioning features or use of this software 13*15bcc4a7SSascha Wildner.\" must display the following acknowledgement: 14*15bcc4a7SSascha Wildner.\" This product includes software developed by the University of 15*15bcc4a7SSascha Wildner.\" California, Berkeley and its contributors. 16*15bcc4a7SSascha Wildner.\" 4. Neither the name of the University nor the names of its contributors 17*15bcc4a7SSascha Wildner.\" may be used to endorse or promote products derived from this software 18*15bcc4a7SSascha Wildner.\" without specific prior written permission. 19*15bcc4a7SSascha Wildner.\" 20*15bcc4a7SSascha Wildner.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 21*15bcc4a7SSascha Wildner.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22*15bcc4a7SSascha Wildner.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23*15bcc4a7SSascha Wildner.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 24*15bcc4a7SSascha Wildner.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25*15bcc4a7SSascha Wildner.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26*15bcc4a7SSascha Wildner.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27*15bcc4a7SSascha Wildner.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28*15bcc4a7SSascha Wildner.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29*15bcc4a7SSascha Wildner.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30*15bcc4a7SSascha Wildner.\" SUCH DAMAGE. 31*15bcc4a7SSascha Wildner.\" 32*15bcc4a7SSascha Wildner.\" @(#)arp4.4 6.5 (Berkeley) 4/18/94 33*15bcc4a7SSascha Wildner.\" $FreeBSD: src/usr.sbin/arp/arp.4,v 1.4.2.5 2003/03/12 22:08:13 trhodes Exp $ 34*15bcc4a7SSascha Wildner.\" $DragonFly: src/usr.sbin/arp/arp.4,v 1.3 2007/11/23 23:16:37 swildner Exp $ 35*15bcc4a7SSascha Wildner.\" 36*15bcc4a7SSascha Wildner.Dd April 18, 1994 37*15bcc4a7SSascha Wildner.Dt ARP 4 38*15bcc4a7SSascha Wildner.Os 39*15bcc4a7SSascha Wildner.Sh NAME 40*15bcc4a7SSascha Wildner.Nm arp 41*15bcc4a7SSascha Wildner.Nd Address Resolution Protocol 42*15bcc4a7SSascha Wildner.Sh SYNOPSIS 43*15bcc4a7SSascha Wildner.Cd "device ether" 44*15bcc4a7SSascha Wildner.Sh DESCRIPTION 45*15bcc4a7SSascha WildnerThe Address Resolution Protocol (ARP) is used to dynamically 46*15bcc4a7SSascha Wildnermap between Protocol Addresses (such as IP addresses) and 47*15bcc4a7SSascha WildnerLocal Network Addresses (such as Ethernet addresses). 48*15bcc4a7SSascha WildnerThis implementation maps IP addresses to Ethernet, 49*15bcc4a7SSascha WildnerARCnet, 50*15bcc4a7SSascha Wildneror Token Ring addresses. 51*15bcc4a7SSascha WildnerIt is used by all the Ethernet interface drivers. 52*15bcc4a7SSascha Wildner.Pp 53*15bcc4a7SSascha WildnerARP caches Internet-Ethernet address mappings. 54*15bcc4a7SSascha WildnerWhen an interface requests a mapping for an address not in the cache, 55*15bcc4a7SSascha WildnerARP queues the message which requires the mapping and broadcasts 56*15bcc4a7SSascha Wildnera message on the associated network requesting the address mapping. 57*15bcc4a7SSascha WildnerIf a response is provided, the new mapping is cached and any pending 58*15bcc4a7SSascha Wildnermessage is transmitted. 59*15bcc4a7SSascha WildnerARP will queue at most one packet while waiting for a response to a 60*15bcc4a7SSascha Wildnermapping request; 61*15bcc4a7SSascha Wildneronly the most recently ``transmitted'' packet is kept. 62*15bcc4a7SSascha WildnerIf the target host does not respond after several requests, 63*15bcc4a7SSascha Wildnerthe host is considered to be down for a short period (normally 20 seconds), 64*15bcc4a7SSascha Wildnerallowing an error to be returned to transmission attempts during this 65*15bcc4a7SSascha Wildnerinterval. 66*15bcc4a7SSascha WildnerThe error is 67*15bcc4a7SSascha Wildner.Er EHOSTDOWN 68*15bcc4a7SSascha Wildnerfor a non-responding destination host, and 69*15bcc4a7SSascha Wildner.Er EHOSTUNREACH 70*15bcc4a7SSascha Wildnerfor a non-responding router. 71*15bcc4a7SSascha Wildner.Pp 72*15bcc4a7SSascha WildnerThe ARP cache is stored in the system routing table as 73*15bcc4a7SSascha Wildnerdynamically-created host routes. 74*15bcc4a7SSascha WildnerThe route to a directly-attached Ethernet network is installed as a 75*15bcc4a7SSascha Wildner.Dq cloning 76*15bcc4a7SSascha Wildnerroute (one with the 77*15bcc4a7SSascha Wildner.Li RTF_CLONING 78*15bcc4a7SSascha Wildnerflag set), 79*15bcc4a7SSascha Wildnercausing routes to individual hosts on that network to be created on 80*15bcc4a7SSascha Wildnerdemand. 81*15bcc4a7SSascha WildnerThese routes time out periodically (normally 20 minutes after validated; 82*15bcc4a7SSascha Wildnerentries are not validated when not in use). 83*15bcc4a7SSascha WildnerAn entry for a host which is not responding is a 84*15bcc4a7SSascha Wildner.Dq reject 85*15bcc4a7SSascha Wildnerroute (one with the 86*15bcc4a7SSascha Wildner.Li RTF_REJECT 87*15bcc4a7SSascha Wildnerflag set). 88*15bcc4a7SSascha Wildner.Pp 89*15bcc4a7SSascha WildnerARP entries may be added, deleted or changed with the 90*15bcc4a7SSascha Wildner.Xr arp 8 91*15bcc4a7SSascha Wildnerutility. 92*15bcc4a7SSascha WildnerManually-added entries may be temporary or permanent, 93*15bcc4a7SSascha Wildnerand may be 94*15bcc4a7SSascha Wildner.Dq published , 95*15bcc4a7SSascha Wildnerin which case the system will respond to ARP requests for that host 96*15bcc4a7SSascha Wildneras if it were the target of the request. 97*15bcc4a7SSascha Wildner.Pp 98*15bcc4a7SSascha WildnerIn the past, 99*15bcc4a7SSascha WildnerARP was used to negotiate the use of a trailer encapsulation. 100*15bcc4a7SSascha WildnerThis is no longer supported. 101*15bcc4a7SSascha Wildner.Pp 102*15bcc4a7SSascha WildnerARP watches passively for hosts impersonating the local host (i.e. a host 103*15bcc4a7SSascha Wildnerwhich responds to an ARP mapping request for the local host's address). 104*15bcc4a7SSascha Wildner.Sh DIAGNOSTICS 105*15bcc4a7SSascha Wildner.Em "arp: %x:%x:%x:%x:%x:%x is using my IP address %d.%d.%d.%d!" : 106*15bcc4a7SSascha WildnerARP has discovered another host on the local network which responds to 107*15bcc4a7SSascha Wildnermapping requests for its own Internet address with a different Ethernet 108*15bcc4a7SSascha Wildneraddress, generally indicating that two hosts are attempting to use the 109*15bcc4a7SSascha Wildnersame Internet address. 110*15bcc4a7SSascha Wildner.Pp 111*15bcc4a7SSascha Wildner.Em "arp: ether address is broadcast for IP address %d.%d.%d.%d!" : 112*15bcc4a7SSascha WildnerARP requested information for a host, and received an answer indicating 113*15bcc4a7SSascha Wildnerthat the host's ethernet address is the ethernet broadcast address. 114*15bcc4a7SSascha WildnerThis indicates a misconfigured or broken device. 115*15bcc4a7SSascha Wildner.Pp 116*15bcc4a7SSascha Wildner.Em "arp: %d.%d.%d.%d moved from %x:%x:%x:%x:%x:%x to %x:%x:%x:%x:%x:%x" : 117*15bcc4a7SSascha WildnerARP had a cached value for the ethernet address of the referenced host, 118*15bcc4a7SSascha Wildnerbut received a reply indicating that the host is at a new address. This 119*15bcc4a7SSascha Wildnercan happen normally when host hardware addresses change, or when a mobile 120*15bcc4a7SSascha Wildnernode arrives or leaves the local subnet. It can also indicate a problem 121*15bcc4a7SSascha Wildnerwith proxy ARP. 122*15bcc4a7SSascha Wildner.Pp 123*15bcc4a7SSascha Wildner.Em "arpresolve: can't allocate llinfo for %d.%d.%d.%d" : 124*15bcc4a7SSascha WildnerThe route for the referenced host points to a device upon which ARP is 125*15bcc4a7SSascha Wildnerrequired, but ARP was unable to allocate a routing table entry in which 126*15bcc4a7SSascha Wildnerto store the host's MAC address. This usually points to a misconfigured 127*15bcc4a7SSascha Wildnerrouting table. It can also occur if the kernel cannot allocate memory. 128*15bcc4a7SSascha Wildner.Sh SEE ALSO 129*15bcc4a7SSascha Wildner.Xr inet 4 , 130*15bcc4a7SSascha Wildner.Xr route 4 , 131*15bcc4a7SSascha Wildner.Xr arp 8 , 132*15bcc4a7SSascha Wildner.Xr ifconfig 8 , 133*15bcc4a7SSascha Wildner.Xr route 8 134*15bcc4a7SSascha Wildner.Rs 135*15bcc4a7SSascha Wildner.%A Plummer, D. 136*15bcc4a7SSascha Wildner.%B "An Ethernet Address Resolution Protocol" 137*15bcc4a7SSascha Wildner.%T RFC 826 138*15bcc4a7SSascha Wildner.Re 139*15bcc4a7SSascha Wildner.Rs 140*15bcc4a7SSascha Wildner.%A Leffler, S.J. 141*15bcc4a7SSascha Wildner.%A Karels, M.J. 142*15bcc4a7SSascha Wildner.%B "Trailer Encapsulations" 143*15bcc4a7SSascha Wildner.%T RFC 893 144*15bcc4a7SSascha Wildner.Re 145