1*b121e2b7Sschwarze.\" $OpenBSD: arp.4,v 1.23 2021/01/02 15:24:24 schwarze Exp $ 2df930be7Sderaadt.\" $NetBSD: arp.4,v 1.2 1995/03/01 11:50:56 chopps Exp $ 3df930be7Sderaadt.\" 4df930be7Sderaadt.\" Copyright (c) 1985, 1986, 1988, 1994 5df930be7Sderaadt.\" The Regents of the University of California. All rights reserved. 6df930be7Sderaadt.\" 7df930be7Sderaadt.\" Redistribution and use in source and binary forms, with or without 8df930be7Sderaadt.\" modification, are permitted provided that the following conditions 9df930be7Sderaadt.\" are met: 10df930be7Sderaadt.\" 1. Redistributions of source code must retain the above copyright 11df930be7Sderaadt.\" notice, this list of conditions and the following disclaimer. 12df930be7Sderaadt.\" 2. Redistributions in binary form must reproduce the above copyright 13df930be7Sderaadt.\" notice, this list of conditions and the following disclaimer in the 14df930be7Sderaadt.\" documentation and/or other materials provided with the distribution. 1529295d1cSmillert.\" 3. Neither the name of the University nor the names of its contributors 16df930be7Sderaadt.\" may be used to endorse or promote products derived from this software 17df930be7Sderaadt.\" without specific prior written permission. 18df930be7Sderaadt.\" 19df930be7Sderaadt.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 20df930be7Sderaadt.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21df930be7Sderaadt.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22df930be7Sderaadt.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 23df930be7Sderaadt.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24df930be7Sderaadt.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25df930be7Sderaadt.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26df930be7Sderaadt.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27df930be7Sderaadt.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28df930be7Sderaadt.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29df930be7Sderaadt.\" SUCH DAMAGE. 30df930be7Sderaadt.\" 31df930be7Sderaadt.\" from: @(#)arp4.4 6.5 (Berkeley) 4/18/94 32df930be7Sderaadt.\" 33*b121e2b7Sschwarze.Dd $Mdocdate: January 2 2021 $ 34df930be7Sderaadt.Dt ARP 4 35e0b2f00fSaaron.Os 36df930be7Sderaadt.Sh NAME 37df930be7Sderaadt.Nm arp 38df930be7Sderaadt.Nd Address Resolution Protocol 39df930be7Sderaadt.Sh SYNOPSIS 40da02b739Sjmc.Cd "pseudo-device ether" 41df930be7Sderaadt.Sh DESCRIPTION 426f10db5aSaaronThe Address Resolution Protocol (ARP) is used to dynamically 431d80e1f1Snaddymap between Internet host addresses and Ethernet addresses. 441d80e1f1SnaddyIt is used by all of the Ethernet interface drivers. 451d80e1f1SnaddyIt is not specific to Internet protocols or to Ethernet, 46df930be7Sderaadtbut this implementation currently supports only that combination. 47df930be7Sderaadt.Pp 48df930be7SderaadtARP caches Internet-Ethernet address mappings. 49df930be7SderaadtWhen an interface requests a mapping for an address not in the cache, 50df930be7SderaadtARP queues the message which requires the mapping and broadcasts 51df930be7Sderaadta message on the associated network requesting the address mapping. 52df930be7SderaadtIf a response is provided, the new mapping is cached and any pending 53df930be7Sderaadtmessage is transmitted. 54df930be7SderaadtARP will queue at most one packet while waiting for a response to a 55df930be7Sderaadtmapping request; 566f10db5aSaarononly the most recently transmitted packet is kept. 57df930be7SderaadtIf the target host does not respond after several requests, 58df930be7Sderaadtthe host is considered to be down for a short period (normally 20 seconds), 59df930be7Sderaadtallowing an error to be returned to transmission attempts during this 60df930be7Sderaadtinterval. 61df930be7SderaadtThe error is 62*b121e2b7Sschwarze.Er EHOSTDOWN 63df930be7Sderaadtfor a non-responding destination host, and 64*b121e2b7Sschwarze.Er EHOSTUNREACH 65df930be7Sderaadtfor a non-responding router. 66df930be7Sderaadt.Pp 67df930be7SderaadtThe ARP cache is stored in the system routing table as 68892a7bb8Saarondynamically created host routes. 69892a7bb8SaaronThe route to a directly attached Ethernet network is installed as a 70df930be7Sderaadt.Dq cloning 71df930be7Sderaadtroute (one with the 72*b121e2b7Sschwarze.Dv RTF_CLONING 73df930be7Sderaadtflag set), 74df930be7Sderaadtcausing routes to individual hosts on that network to be created on 75df930be7Sderaadtdemand. 76df930be7SderaadtThese routes time out periodically (normally 20 minutes after validated; 77df930be7Sderaadtentries are not validated when not in use). 78df930be7SderaadtAn entry for a host which is not responding is a 79df930be7Sderaadt.Dq reject 80df930be7Sderaadtroute (one with the 81*b121e2b7Sschwarze.Dv RTF_REJECT 82df930be7Sderaadtflag set). 83df930be7Sderaadt.Pp 84df930be7SderaadtARP entries may be added, deleted or changed with the 85df930be7Sderaadt.Xr arp 8 86df930be7Sderaadtutility. 87c27a11a5ShoManually added entries may be temporary, static or permanent, 88df930be7Sderaadtand may be 89df930be7Sderaadt.Dq published , 90df930be7Sderaadtin which case the system will respond to ARP requests for that host 91cdbdb68aSaaronas if it were the target of the request. 92cdbdb68aSaaronA static entry will not 93c27a11a5Shotime out, but may be overwritten by network traffic, while a permanent 94c27a11a5Shoentry will not time out and cannot be overwritten. 95df930be7Sderaadt.Pp 9642671979SaaronARP watches passively for hosts impersonating the local host (i.e., a host 97df930be7Sderaadtwhich responds to an ARP mapping request for the local host's address). 98df930be7Sderaadt.Sh DIAGNOSTICS 99da02b739Sjmc.Bl -diag 100add6e4aeSjmc.It "duplicate IP address %x!! sent from ethernet address: %x:%x:%x:%x:%x:%x" 101df930be7SderaadtARP has discovered another host on the local network which responds to 102df930be7Sderaadtmapping requests for its own Internet address with a different Ethernet 103df930be7Sderaadtaddress, generally indicating that two hosts are attempting to use the 104df930be7Sderaadtsame Internet address. 105add6e4aeSjmc.It "arp info overwritten for %x!! by %x:%x:%x:%x:%x:%x on %x" 106c27a11a5ShoAn existing route has been overwritten with a new Ethernet address, for 107cdbdb68aSaaronexample when the other host has changed Ethernet cards. 108cdbdb68aSaaronIf the route 109c27a11a5Shopreviously was static/non-expiring, the new route will expire normally. 110add6e4aeSjmc.It "arp: attempt to overwrite permanent entry for %x!! by %x:%x:%x:%x:%x:%x on %x" 111c27a11a5ShoAs above, but the existing route had been manually set up as permanent. 112c27a11a5ShoThe routing information is not modified. 113add6e4aeSjmc.It "arp: attempt to overwrite entry for %x!! on %x by %x:%x:%x:%x:%x:%x on %x" 114c6e9457bShoARP has noticed an attempt to overwrite a host's routing entry on one 115c6e9457bShointerface with a routing entry for a different interface. 116c6e9457bShoThe routing information is not modified. 117add6e4aeSjmc.It "arp: received reply to broadcast or multicast address" 118add6e4aeSjmcARP received a response which is a broadcast or multicast address. 119add6e4aeSjmcThis might indicate an ARP spoofing attempt. 120add6e4aeSjmc.It "arp: ether address is broadcast for IP address %s!" 121add6e4aeSjmcARP requested information for a host, and received an answer indicating that 122add6e4aeSjmcthe host's Ethernet address is the Ethernet broadcast address. 123add6e4aeSjmcThis indicates a misconfigured or broken device. 124add6e4aeSjmc.It "arp: ether address is multicast for IP address %s!" 125add6e4aeSjmcARP requested information for a host, and received an answer indicating that 126add6e4aeSjmcthe host's Ethernet address is the Ethernet multicast address. 127add6e4aeSjmcThis indicates a misconfigured or broken device. 128add6e4aeSjmc.It "arp: attempt to add entry for %s on %s by %s on %s" 129add6e4aeSjmcThis usually indicates there is more than one interface 130add6e4aeSjmcconnected to the same hub, 131add6e4aeSjmcor that the networks have somehow been short-circuited 132add6e4aeSjmc(e.g. IPs that should have been present on interface one 133add6e4aeSjmcare present on interface two). 134add6e4aeSjmc.It "arplookup: unable to enter address for %s" 135add6e4aeSjmcAn IP received on the interface does not match the network/netmask 136add6e4aeSjmcof the interface. 137add6e4aeSjmcThis indicates a netmask problem. 138da02b739Sjmc.El 139df930be7Sderaadt.Sh SEE ALSO 140df930be7Sderaadt.Xr inet 4 , 141df930be7Sderaadt.Xr route 4 , 142df930be7Sderaadt.Xr arp 8 , 143df930be7Sderaadt.Xr ifconfig 8 , 144df930be7Sderaadt.Xr route 8 145e8dc2910Sjmc.Sh STANDARDS 146e8dc2910Sjmc.Rs 147e8dc2910Sjmc.%A David C. Plummer 148e8dc2910Sjmc.%D November 1982 149e8dc2910Sjmc.%R RFC 826 150e8dc2910Sjmc.%T "An Ethernet Address Resolution Protocol" 151e8dc2910Sjmc.Re 152