118cca897Sbostic.\" Copyright (c) 1985, 1986, 1988, 1994 218cca897Sbostic.\" The Regents of the University of California. All rights reserved. 38ec14519Smckusick.\" 418cca897Sbostic.\" %sccs.include.redist.roff% 58ec14519Smckusick.\" 6*f97d9704Sbostic.\" @(#)arp4.4 6.5 (Berkeley) 04/18/94 7fafd3ec3Sbostic.\" 8*f97d9704Sbostic.Dd 9*f97d9704Sbostic.Dt ARP 4 10*f97d9704Sbostic.Os BSD 4 11*f97d9704Sbostic.Sh NAME 12*f97d9704Sbostic.Nm arp 13*f97d9704Sbostic.Nd Address Resolution Protocol 14*f97d9704Sbostic.Sh SYNOPSIS 15*f97d9704Sbostic.Em "pseudo-device ether" 16*f97d9704Sbostic.Sh DESCRIPTION 17*f97d9704SbosticThe Address Resolution Protocol (ARP) is a protocol used to dynamically 18*f97d9704Sbosticmap between Internet host addresses and 10Mb/s Ethernet addresses. 19*f97d9704SbosticIt is used by all the 10Mb/s Ethernet interface drivers. 2010e3131bSkarelsIt is not specific to Internet protocols or to 10Mb/s Ethernet, 2110e3131bSkarelsbut this implementation currently supports only that combination. 22*f97d9704Sbostic.Pp 23*f97d9704SbosticARP caches Internet-Ethernet address mappings. 24*f97d9704SbosticWhen an interface requests a mapping for an address not in the cache, 25*f97d9704SbosticARP queues the message which requires the mapping and broadcasts 268ec14519Smckusicka message on the associated network requesting the address mapping. 278ec14519SmckusickIf a response is provided, the new mapping is cached and any pending 2810e3131bSkarelsmessage is transmitted. 29*f97d9704SbosticARP will queue at most one packet while waiting for a response to a 30*f97d9704Sbosticmapping request; 318ec14519Smckusickonly the most recently ``transmitted'' packet is kept. 3218cca897SbosticIf the target host does not respond after several requests, 3318cca897Sbosticthe host is considered to be down for a short period (normally 20 seconds), 34*f97d9704Sbosticallowing an error to be returned to transmission attempts during this 35*f97d9704Sbosticinterval. 3618cca897SbosticThe error is 3718cca897Sbostic.Li EHOSTDOWN 3818cca897Sbosticfor a non-responding destination host, and 3918cca897Sbostic.Li EHOSTUNREACH 4018cca897Sbosticfor a non-responding router. 41*f97d9704Sbostic.Pp 42*f97d9704SbosticThe ARP cache is stored in the system routing table as 43*f97d9704Sbosticdynamically-created host routes. 44*f97d9704SbosticThe route to a directly-attached Ethernet network is installed as a 45*f97d9704Sbostic.Dq cloning 46*f97d9704Sbosticroute (one with the 4718cca897Sbostic.Li RTF_CLONING 4818cca897Sbosticflag set), 49*f97d9704Sbosticcausing routes to individual hosts on that network to be created on 50*f97d9704Sbosticdemand. 51*f97d9704SbosticThese routes time out periodically (normally 20 minutes after validated; 52*f97d9704Sbosticentries are not validated when not in use). 5318cca897SbosticAn entry for a host which is not responding is a 54*f97d9704Sbostic.Dq reject 55*f97d9704Sbosticroute (one with the 5618cca897Sbostic.Li RTF_REJECT 5718cca897Sbosticflag set). 58*f97d9704Sbostic.Pp 59*f97d9704SbosticARP entries may be added, deleted or changed with the 60*f97d9704Sbostic.Xr arp 8 61*f97d9704Sbosticutility. 6218cca897SbosticManually-added entries may be temporary or permanent, 6318cca897Sbosticand may be 64*f97d9704Sbostic.Dq published , 6518cca897Sbosticin which case the system will respond to ARP requests for that host 6618cca897Sbosticas if it were the target of the request. 67*f97d9704Sbostic.Pp 68*f97d9704SbosticIn the past, 69*f97d9704SbosticARP was used to negotiate the use of a trailer encapsulation. 7018cca897SbosticThis is no longer supported. 71*f97d9704Sbostic.Pp 728ec14519SmckusickARP watches passively for hosts impersonating the local host (i.e. a host 73198c992aSmckusickwhich responds to an ARP mapping request for the local host's address). 74*f97d9704Sbostic.Sh DIAGNOSTICS 75*f97d9704Sbostic.Em "duplicate IP address %x!! sent from ethernet address: %x:%x:%x:%x:%x:%x." 768ec14519SmckusickARP has discovered another host on the local network which responds to 77*f97d9704Sbosticmapping requests for its own Internet address with a different Ethernet 78*f97d9704Sbosticaddress, generally indicating that two hosts are attempting to use the 79*f97d9704Sbosticsame Internet address. 80*f97d9704Sbostic.Sh SEE ALSO 81*f97d9704Sbostic.Xr inet 4 , 82*f97d9704Sbostic.Xr route 4 , 83*f97d9704Sbostic.Xr arp 8 , 84*f97d9704Sbostic.Xr ifconfig 8 , 85*f97d9704Sbostic.Xr route 8 86*f97d9704Sbostic.sp 87*f97d9704Sbostic.Rs 88*f97d9704Sbostic.%A Plummer, D. 89*f97d9704Sbostic.%B "An Ethernet Address Resolution Protocol" 90*f97d9704Sbostic.%T RFC826 91*f97d9704Sbostic.Re 92*f97d9704Sbostic.Rs 93*f97d9704Sbostic.%A Leffler, S.J. 94*f97d9704Sbostic.%A Karels, M.J. 95*f97d9704Sbostic.%B "Trailer Encapsulations 96*f97d9704Sbostic.%T RFC893 97*f97d9704Sbostic.Re 9818cca897Sbostic 99