xref: /dflybsd-src/share/man/man4/arp.4 (revision b827281d520bce9adb089448d34c95e230af51da)
115bcc4a7SSascha Wildner.\" Copyright (c) 1985, 1986, 1988, 1994
215bcc4a7SSascha Wildner.\"	The Regents of the University of California.  All rights reserved.
315bcc4a7SSascha Wildner.\"
415bcc4a7SSascha Wildner.\" Redistribution and use in source and binary forms, with or without
515bcc4a7SSascha Wildner.\" modification, are permitted provided that the following conditions
615bcc4a7SSascha Wildner.\" are met:
715bcc4a7SSascha Wildner.\" 1. Redistributions of source code must retain the above copyright
815bcc4a7SSascha Wildner.\"    notice, this list of conditions and the following disclaimer.
915bcc4a7SSascha Wildner.\" 2. Redistributions in binary form must reproduce the above copyright
1015bcc4a7SSascha Wildner.\"    notice, this list of conditions and the following disclaimer in the
1115bcc4a7SSascha Wildner.\"    documentation and/or other materials provided with the distribution.
12dc71b7abSJustin C. Sherrill.\" 3. Neither the name of the University nor the names of its contributors
1315bcc4a7SSascha Wildner.\"    may be used to endorse or promote products derived from this software
1415bcc4a7SSascha Wildner.\"    without specific prior written permission.
1515bcc4a7SSascha Wildner.\"
1615bcc4a7SSascha Wildner.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
1715bcc4a7SSascha Wildner.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1815bcc4a7SSascha Wildner.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1915bcc4a7SSascha Wildner.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
2015bcc4a7SSascha Wildner.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2115bcc4a7SSascha Wildner.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2215bcc4a7SSascha Wildner.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2315bcc4a7SSascha Wildner.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2415bcc4a7SSascha Wildner.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2515bcc4a7SSascha Wildner.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2615bcc4a7SSascha Wildner.\" SUCH DAMAGE.
2715bcc4a7SSascha Wildner.\"
2815bcc4a7SSascha Wildner.\"	@(#)arp4.4	6.5 (Berkeley) 4/18/94
2915bcc4a7SSascha Wildner.\" $FreeBSD: src/usr.sbin/arp/arp.4,v 1.4.2.5 2003/03/12 22:08:13 trhodes Exp $
30*b827281dSSascha Wildner.\" $DragonFly: src/usr.sbin/arp/arp.4,v 1.3 2007/11/23 23:16:37 swildner Exp $
3115bcc4a7SSascha Wildner.\"
3215bcc4a7SSascha Wildner.Dd April 18, 1994
3315bcc4a7SSascha Wildner.Dt ARP 4
3415bcc4a7SSascha Wildner.Os
3515bcc4a7SSascha Wildner.Sh NAME
3615bcc4a7SSascha Wildner.Nm arp
3715bcc4a7SSascha Wildner.Nd Address Resolution Protocol
3815bcc4a7SSascha Wildner.Sh SYNOPSIS
3915bcc4a7SSascha Wildner.Cd "device ether"
4015bcc4a7SSascha Wildner.Sh DESCRIPTION
4115bcc4a7SSascha WildnerThe Address Resolution Protocol (ARP) is used to dynamically
4215bcc4a7SSascha Wildnermap between Protocol Addresses (such as IP addresses) and
4315bcc4a7SSascha WildnerLocal Network Addresses (such as Ethernet addresses).
4415bcc4a7SSascha WildnerThis implementation maps IP addresses to Ethernet,
4515bcc4a7SSascha WildnerARCnet,
4615bcc4a7SSascha Wildneror Token Ring addresses.
4715bcc4a7SSascha WildnerIt is used by all the Ethernet interface drivers.
4815bcc4a7SSascha Wildner.Pp
4915bcc4a7SSascha WildnerARP caches Internet-Ethernet address mappings.
5015bcc4a7SSascha WildnerWhen an interface requests a mapping for an address not in the cache,
5115bcc4a7SSascha WildnerARP queues the message which requires the mapping and broadcasts
5215bcc4a7SSascha Wildnera message on the associated network requesting the address mapping.
5315bcc4a7SSascha WildnerIf a response is provided, the new mapping is cached and any pending
5415bcc4a7SSascha Wildnermessage is transmitted.
5515bcc4a7SSascha WildnerARP will queue at most one packet while waiting for a response to a
5615bcc4a7SSascha Wildnermapping request;
5715bcc4a7SSascha Wildneronly the most recently ``transmitted'' packet is kept.
5815bcc4a7SSascha WildnerIf the target host does not respond after several requests,
5915bcc4a7SSascha Wildnerthe host is considered to be down for a short period (normally 20 seconds),
6015bcc4a7SSascha Wildnerallowing an error to be returned to transmission attempts during this
6115bcc4a7SSascha Wildnerinterval.
6215bcc4a7SSascha WildnerThe error is
6315bcc4a7SSascha Wildner.Er EHOSTDOWN
6415bcc4a7SSascha Wildnerfor a non-responding destination host, and
6515bcc4a7SSascha Wildner.Er EHOSTUNREACH
6615bcc4a7SSascha Wildnerfor a non-responding router.
6715bcc4a7SSascha Wildner.Pp
6815bcc4a7SSascha WildnerThe ARP cache is stored in the system routing table as
6915bcc4a7SSascha Wildnerdynamically-created host routes.
7015bcc4a7SSascha WildnerThe route to a directly-attached Ethernet network is installed as a
7115bcc4a7SSascha Wildner.Dq cloning
7215bcc4a7SSascha Wildnerroute (one with the
7315bcc4a7SSascha Wildner.Li RTF_CLONING
7415bcc4a7SSascha Wildnerflag set),
7515bcc4a7SSascha Wildnercausing routes to individual hosts on that network to be created on
7615bcc4a7SSascha Wildnerdemand.
7715bcc4a7SSascha WildnerThese routes time out periodically (normally 20 minutes after validated;
7815bcc4a7SSascha Wildnerentries are not validated when not in use).
7915bcc4a7SSascha WildnerAn entry for a host which is not responding is a
8015bcc4a7SSascha Wildner.Dq reject
8115bcc4a7SSascha Wildnerroute (one with the
8215bcc4a7SSascha Wildner.Li RTF_REJECT
8315bcc4a7SSascha Wildnerflag set).
8415bcc4a7SSascha Wildner.Pp
8515bcc4a7SSascha WildnerARP entries may be added, deleted or changed with the
8615bcc4a7SSascha Wildner.Xr arp 8
8715bcc4a7SSascha Wildnerutility.
8815bcc4a7SSascha WildnerManually-added entries may be temporary or permanent,
8915bcc4a7SSascha Wildnerand may be
9015bcc4a7SSascha Wildner.Dq published ,
9115bcc4a7SSascha Wildnerin which case the system will respond to ARP requests for that host
92*b827281dSSascha Wildneras if it were the target of the request.
9315bcc4a7SSascha Wildner.Pp
9415bcc4a7SSascha WildnerIn the past,
9515bcc4a7SSascha WildnerARP was used to negotiate the use of a trailer encapsulation.
9615bcc4a7SSascha WildnerThis is no longer supported.
9715bcc4a7SSascha Wildner.Pp
9815bcc4a7SSascha WildnerARP watches passively for hosts impersonating the local host (i.e. a host
9915bcc4a7SSascha Wildnerwhich responds to an ARP mapping request for the local host's address).
10015bcc4a7SSascha Wildner.Sh DIAGNOSTICS
10115bcc4a7SSascha Wildner.Em "arp: %x:%x:%x:%x:%x:%x is using my IP address %d.%d.%d.%d!" :
10215bcc4a7SSascha WildnerARP has discovered another host on the local network which responds to
10315bcc4a7SSascha Wildnermapping requests for its own Internet address with a different Ethernet
10415bcc4a7SSascha Wildneraddress, generally indicating that two hosts are attempting to use the
10515bcc4a7SSascha Wildnersame Internet address.
10615bcc4a7SSascha Wildner.Pp
10715bcc4a7SSascha Wildner.Em "arp: ether address is broadcast for IP address %d.%d.%d.%d!" :
10815bcc4a7SSascha WildnerARP requested information for a host, and received an answer indicating
10915bcc4a7SSascha Wildnerthat the host's ethernet address is the ethernet broadcast address.
11015bcc4a7SSascha WildnerThis indicates a misconfigured or broken device.
11115bcc4a7SSascha Wildner.Pp
11215bcc4a7SSascha Wildner.Em "arp: %d.%d.%d.%d moved from %x:%x:%x:%x:%x:%x to %x:%x:%x:%x:%x:%x" :
11315bcc4a7SSascha WildnerARP had a cached value for the ethernet address of the referenced host,
11415bcc4a7SSascha Wildnerbut received a reply indicating that the host is at a new address.  This
11515bcc4a7SSascha Wildnercan happen normally when host hardware addresses change, or when a mobile
11615bcc4a7SSascha Wildnernode arrives or leaves the local subnet.  It can also indicate a problem
11715bcc4a7SSascha Wildnerwith proxy ARP.
11815bcc4a7SSascha Wildner.Pp
11915bcc4a7SSascha Wildner.Em "arpresolve: can't allocate llinfo for %d.%d.%d.%d" :
12015bcc4a7SSascha WildnerThe route for the referenced host points to a device upon which ARP is
12115bcc4a7SSascha Wildnerrequired, but ARP was unable to allocate a routing table entry in which
12215bcc4a7SSascha Wildnerto store the host's MAC address.  This usually points to a misconfigured
12315bcc4a7SSascha Wildnerrouting table.  It can also occur if the kernel cannot allocate memory.
12415bcc4a7SSascha Wildner.Sh SEE ALSO
12515bcc4a7SSascha Wildner.Xr inet 4 ,
12615bcc4a7SSascha Wildner.Xr route 4 ,
12715bcc4a7SSascha Wildner.Xr arp 8 ,
12815bcc4a7SSascha Wildner.Xr ifconfig 8 ,
12915bcc4a7SSascha Wildner.Xr route 8
13015bcc4a7SSascha Wildner.Rs
13115bcc4a7SSascha Wildner.%A Plummer, D.
13215bcc4a7SSascha Wildner.%B "An Ethernet Address Resolution Protocol"
13315bcc4a7SSascha Wildner.%T RFC 826
13415bcc4a7SSascha Wildner.Re
13515bcc4a7SSascha Wildner.Rs
13615bcc4a7SSascha Wildner.%A Leffler, S.J.
13715bcc4a7SSascha Wildner.%A Karels, M.J.
13815bcc4a7SSascha Wildner.%B "Trailer Encapsulations"
13915bcc4a7SSascha Wildner.%T RFC 893
14015bcc4a7SSascha Wildner.Re
141