xref: /freebsd/usr.sbin/arp/arp.4 (revision 31a322801a376f68565df3cb7fb4c7257157c464)
184e59eb5SGarrett Wollman.\" Copyright (c) 1985, 1986, 1988, 1994
284e59eb5SGarrett Wollman.\"	The Regents of the University of California.  All rights reserved.
384e59eb5SGarrett Wollman.\"
484e59eb5SGarrett Wollman.\" Redistribution and use in source and binary forms, with or without
584e59eb5SGarrett Wollman.\" modification, are permitted provided that the following conditions
684e59eb5SGarrett Wollman.\" are met:
784e59eb5SGarrett Wollman.\" 1. Redistributions of source code must retain the above copyright
884e59eb5SGarrett Wollman.\"    notice, this list of conditions and the following disclaimer.
984e59eb5SGarrett Wollman.\" 2. Redistributions in binary form must reproduce the above copyright
1084e59eb5SGarrett Wollman.\"    notice, this list of conditions and the following disclaimer in the
1184e59eb5SGarrett Wollman.\"    documentation and/or other materials provided with the distribution.
1284e59eb5SGarrett Wollman.\" 3. All advertising materials mentioning features or use of this software
1384e59eb5SGarrett Wollman.\"    must display the following acknowledgement:
1484e59eb5SGarrett Wollman.\"	This product includes software developed by the University of
1584e59eb5SGarrett Wollman.\"	California, Berkeley and its contributors.
1684e59eb5SGarrett Wollman.\" 4. Neither the name of the University nor the names of its contributors
1784e59eb5SGarrett Wollman.\"    may be used to endorse or promote products derived from this software
1884e59eb5SGarrett Wollman.\"    without specific prior written permission.
1984e59eb5SGarrett Wollman.\"
2084e59eb5SGarrett Wollman.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
2184e59eb5SGarrett Wollman.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2284e59eb5SGarrett Wollman.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2384e59eb5SGarrett Wollman.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
2484e59eb5SGarrett Wollman.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2584e59eb5SGarrett Wollman.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2684e59eb5SGarrett Wollman.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2784e59eb5SGarrett Wollman.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2884e59eb5SGarrett Wollman.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2984e59eb5SGarrett Wollman.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3084e59eb5SGarrett Wollman.\" SUCH DAMAGE.
3184e59eb5SGarrett Wollman.\"
3284e59eb5SGarrett Wollman.\"	@(#)arp4.4	6.5 (Berkeley) 4/18/94
3384e59eb5SGarrett Wollman.\"
3484e59eb5SGarrett Wollman.Dd April 18, 1994
3584e59eb5SGarrett Wollman.Dt ARP 4
3684e59eb5SGarrett Wollman.Os BSD 4
3784e59eb5SGarrett Wollman.Sh NAME
3884e59eb5SGarrett Wollman.Nm arp
3984e59eb5SGarrett Wollman.Nd Address Resolution Protocol
4084e59eb5SGarrett Wollman.Sh SYNOPSIS
4184e59eb5SGarrett Wollman.Em "pseudo-device ether"
4284e59eb5SGarrett Wollman.Sh DESCRIPTION
4384e59eb5SGarrett WollmanThe Address Resolution Protocol (ARP) is a protocol used to dynamically
4484e59eb5SGarrett Wollmanmap between Internet host addresses and 10Mb/s Ethernet addresses.
4584e59eb5SGarrett WollmanIt is used by all the 10Mb/s Ethernet interface drivers.
4684e59eb5SGarrett WollmanIt is not specific to Internet protocols or to 10Mb/s Ethernet,
4784e59eb5SGarrett Wollmanbut this implementation currently supports only that combination.
4884e59eb5SGarrett Wollman.Pp
4984e59eb5SGarrett WollmanARP caches Internet-Ethernet address mappings.
5084e59eb5SGarrett WollmanWhen an interface requests a mapping for an address not in the cache,
5184e59eb5SGarrett WollmanARP queues the message which requires the mapping and broadcasts
5284e59eb5SGarrett Wollmana message on the associated network requesting the address mapping.
5384e59eb5SGarrett WollmanIf a response is provided, the new mapping is cached and any pending
5484e59eb5SGarrett Wollmanmessage is transmitted.
5584e59eb5SGarrett WollmanARP will queue at most one packet while waiting for a response to a
5684e59eb5SGarrett Wollmanmapping request;
5784e59eb5SGarrett Wollmanonly the most recently ``transmitted'' packet is kept.
5884e59eb5SGarrett WollmanIf the target host does not respond after several requests,
5984e59eb5SGarrett Wollmanthe host is considered to be down for a short period (normally 20 seconds),
6084e59eb5SGarrett Wollmanallowing an error to be returned to transmission attempts during this
6184e59eb5SGarrett Wollmaninterval.
6284e59eb5SGarrett WollmanThe error is
6384e59eb5SGarrett Wollman.Li EHOSTDOWN
6484e59eb5SGarrett Wollmanfor a non-responding destination host, and
6584e59eb5SGarrett Wollman.Li EHOSTUNREACH
6684e59eb5SGarrett Wollmanfor a non-responding router.
6784e59eb5SGarrett Wollman.Pp
6884e59eb5SGarrett WollmanThe ARP cache is stored in the system routing table as
6984e59eb5SGarrett Wollmandynamically-created host routes.
7084e59eb5SGarrett WollmanThe route to a directly-attached Ethernet network is installed as a
7184e59eb5SGarrett Wollman.Dq cloning
7284e59eb5SGarrett Wollmanroute (one with the
7384e59eb5SGarrett Wollman.Li RTF_CLONING
7484e59eb5SGarrett Wollmanflag set),
7584e59eb5SGarrett Wollmancausing routes to individual hosts on that network to be created on
7684e59eb5SGarrett Wollmandemand.
7784e59eb5SGarrett WollmanThese routes time out periodically (normally 20 minutes after validated;
7884e59eb5SGarrett Wollmanentries are not validated when not in use).
7984e59eb5SGarrett WollmanAn entry for a host which is not responding is a
8084e59eb5SGarrett Wollman.Dq reject
8184e59eb5SGarrett Wollmanroute (one with the
8284e59eb5SGarrett Wollman.Li RTF_REJECT
8384e59eb5SGarrett Wollmanflag set).
8484e59eb5SGarrett Wollman.Pp
8584e59eb5SGarrett WollmanARP entries may be added, deleted or changed with the
8684e59eb5SGarrett Wollman.Xr arp 8
8784e59eb5SGarrett Wollmanutility.
8884e59eb5SGarrett WollmanManually-added entries may be temporary or permanent,
8984e59eb5SGarrett Wollmanand may be
9084e59eb5SGarrett Wollman.Dq published ,
9184e59eb5SGarrett Wollmanin which case the system will respond to ARP requests for that host
9284e59eb5SGarrett Wollmanas if it were the target of the request.
9384e59eb5SGarrett Wollman.Pp
9484e59eb5SGarrett WollmanIn the past,
9584e59eb5SGarrett WollmanARP was used to negotiate the use of a trailer encapsulation.
9684e59eb5SGarrett WollmanThis is no longer supported.
9784e59eb5SGarrett Wollman.Pp
9884e59eb5SGarrett WollmanARP watches passively for hosts impersonating the local host (i.e. a host
9984e59eb5SGarrett Wollmanwhich responds to an ARP mapping request for the local host's address).
10084e59eb5SGarrett Wollman.Sh DIAGNOSTICS
10131a32280SBill Fenner.Em "arp: %x:%x:%x:%x:%x:%x is using my IP address %d.%d.%d.%d!" :
10284e59eb5SGarrett WollmanARP has discovered another host on the local network which responds to
10384e59eb5SGarrett Wollmanmapping requests for its own Internet address with a different Ethernet
10484e59eb5SGarrett Wollmanaddress, generally indicating that two hosts are attempting to use the
10584e59eb5SGarrett Wollmansame Internet address.
10631a32280SBill Fenner.Pp
10731a32280SBill Fenner.Em "arp: ether address is broadcast for IP address %d.%d.%d.%d!" :
10831a32280SBill FennerARP requested information for a host, and received an answer indicating
10931a32280SBill Fennerthat the host's ethernet address is the ethernet broadcast address.
11031a32280SBill FennerThis indicates a misconfigured or broken device.
11131a32280SBill Fenner.Pp
11231a32280SBill Fenner.Em "arp: %d.%d.%d.%d moved from %x:%x:%x:%x:%x:%x to %x:%x:%x:%x:%x:%x" :
11331a32280SBill FennerARP had a cached value for the ethernet address of the referenced host,
11431a32280SBill Fennerbut received a reply indicating that the host is at a new address.  This
11531a32280SBill Fennercan happen normally when host hardware addresses change, or when a mobile
11631a32280SBill Fennernode arrives or leaves the local subnet.  It can also indicate a problem
11731a32280SBill Fennerwith proxy ARP.
11831a32280SBill Fenner.Pp
11931a32280SBill Fenner.Em "arpresolve: can't allocate llinfo for %d.%d.%d.%d" :
12031a32280SBill FennerThe route for the referenced host points to a device upon which ARP is
12131a32280SBill Fennerrequired, but ARP was unable to allocate a routing table entry in which
12231a32280SBill Fennerto store the host's MAC address.  This usually points to a misconfigured
12331a32280SBill Fennerrouting table.  It can also occur if the kernel cannot allocate memory.
12484e59eb5SGarrett Wollman.Sh SEE ALSO
12584e59eb5SGarrett Wollman.Xr inet 4 ,
12684e59eb5SGarrett Wollman.Xr route 4 ,
12784e59eb5SGarrett Wollman.Xr arp 8 ,
12884e59eb5SGarrett Wollman.Xr ifconfig 8 ,
12984e59eb5SGarrett Wollman.Xr route 8
13084e59eb5SGarrett Wollman.sp
13184e59eb5SGarrett Wollman.Rs
13284e59eb5SGarrett Wollman.%A Plummer, D.
13384e59eb5SGarrett Wollman.%B "An Ethernet Address Resolution Protocol"
13484e59eb5SGarrett Wollman.%T RFC826
13584e59eb5SGarrett Wollman.Re
13684e59eb5SGarrett Wollman.Rs
13784e59eb5SGarrett Wollman.%A Leffler, S.J.
13884e59eb5SGarrett Wollman.%A Karels, M.J.
13984e59eb5SGarrett Wollman.%B "Trailer Encapsulations
14084e59eb5SGarrett Wollman.%T RFC893
14184e59eb5SGarrett Wollman.Re
14284e59eb5SGarrett Wollman
143