]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - usr.sbin/arp/arp.4
This commit was generated by cvs2svn to compensate for changes in r131447,
[FreeBSD/FreeBSD.git] / usr.sbin / arp / arp.4
1 .\" Copyright (c) 1985, 1986, 1988, 1994
2 .\"     The Regents of the University of California.  All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\" 3. All advertising materials mentioning features or use of this software
13 .\"    must display the following acknowledgement:
14 .\"     This product includes software developed by the University of
15 .\"     California, Berkeley and its contributors.
16 .\" 4. Neither the name of the University nor the names of its contributors
17 .\"    may be used to endorse or promote products derived from this software
18 .\"    without specific prior written permission.
19 .\"
20 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 .\" SUCH DAMAGE.
31 .\"
32 .\"     @(#)arp4.4      6.5 (Berkeley) 4/18/94
33 .\" $FreeBSD$
34 .\"
35 .Dd June 16, 2004
36 .Dt ARP 4
37 .Os
38 .Sh NAME
39 .Nm arp
40 .Nd Address Resolution Protocol
41 .Sh SYNOPSIS
42 .Cd "device ether"
43 .Sh DESCRIPTION
44 The Address Resolution Protocol (ARP) is used to dynamically
45 map between Protocol Addresses (such as IP addresses) and
46 Local Network Addresses (such as Ethernet addresses).
47 This implementation maps IP addresses to Ethernet,
48 ARCnet,
49 or Token Ring addresses.
50 It is used by all the Ethernet interface drivers.
51 .Pp
52 ARP caches Internet-Ethernet address mappings.
53 When an interface requests a mapping for an address not in the cache,
54 ARP queues the message which requires the mapping and broadcasts
55 a message on the associated network requesting the address mapping.
56 If a response is provided, the new mapping is cached and any pending
57 message is transmitted.
58 ARP will queue at most one packet while waiting for a response to a
59 mapping request;
60 only the most recently ``transmitted'' packet is kept.
61 If the target host does not respond after several requests,
62 the host is considered to be down for a short period (normally 20 seconds),
63 allowing an error to be returned to transmission attempts during this
64 interval.
65 The error is
66 .Er EHOSTDOWN
67 for a non-responding destination host, and
68 .Er EHOSTUNREACH
69 for a non-responding router.
70 .Pp
71 The ARP cache is stored in the system routing table as
72 dynamically-created host routes.
73 The route to a directly-attached Ethernet network is installed as a
74 .Dq cloning
75 route (one with the
76 .Li RTF_CLONING
77 flag set),
78 causing routes to individual hosts on that network to be created on
79 demand.
80 These routes time out periodically (normally 20 minutes after validated;
81 entries are not validated when not in use).
82 An entry for a host which is not responding is a
83 .Dq reject
84 route (one with the
85 .Li RTF_REJECT
86 flag set).
87 .Pp
88 ARP entries may be added, deleted or changed with the
89 .Xr arp 8
90 utility.
91 Manually-added entries may be temporary or permanent,
92 and may be
93 .Dq published ,
94 in which case the system will respond to ARP requests for that host
95 as if it were the target of the request.
96 .Pp
97 In the past,
98 ARP was used to negotiate the use of a trailer encapsulation.
99 This is no longer supported.
100 .Pp
101 ARP watches passively for hosts impersonating the local host (i.e. a host
102 which responds to an ARP mapping request for the local host's address).
103 .Pp
104 Proxy ARP is a feature whereby the local host will respond to requests
105 for addresses other than itself, with its own address.
106 Normally, proxy ARP in
107 .Fx
108 is set up on a host-by-host basis using the
109 .Xr arp 8
110 utility, by adding an entry for each host inside a given subnet for
111 which proxying of ARP requests is desired.
112 However, the
113 .Dq "proxy all"
114 feature causes the local host to act as a proxy for
115 .Em all
116 hosts.
117 It may be enabled by setting the
118 .Xr sysctl 8
119 MIB variable
120 .Va net.link.ether.inet.proxyall
121 to 1.
122 .Sh DIAGNOSTICS
123 .Em "arp: %x:%x:%x:%x:%x:%x is using my IP address %d.%d.%d.%d!" :
124 ARP has discovered another host on the local network which responds to
125 mapping requests for its own Internet address with a different Ethernet
126 address, generally indicating that two hosts are attempting to use the
127 same Internet address.
128 .Pp
129 .Em "arp: ether address is broadcast for IP address %d.%d.%d.%d!" :
130 ARP requested information for a host, and received an answer indicating
131 that the host's ethernet address is the ethernet broadcast address.
132 This indicates a misconfigured or broken device.
133 .Pp
134 .Em "arp: %d.%d.%d.%d moved from %x:%x:%x:%x:%x:%x to %x:%x:%x:%x:%x:%x" :
135 ARP had a cached value for the ethernet address of the referenced host,
136 but received a reply indicating that the host is at a new address.
137 This can happen normally when host hardware addresses change,
138 or when a mobile node arrives or leaves the local subnet.
139 It can also indicate a problem with proxy ARP.
140 This message can only be issued if the sysctl
141 .Va net.link.ether.inet.log_arp_movements
142 is set to 1, which is the system's default behaviour.
143 .Pp
144 .Em "arpresolve: can't allocate llinfo for %d.%d.%d.%d" :
145 The route for the referenced host points to a device upon which ARP is
146 required, but ARP was unable to allocate a routing table entry in which
147 to store the host's MAC address.
148 This usually points to a misconfigured routing table.
149 It can also occur if the kernel cannot allocate memory.
150 .Pp
151 .Em "arp: %d.%d.%d.%d is on if0 but got reply from %x:%x:%x:%x:%x:%x on if1" :
152 Physical connections exist to the same logical IP network on both if0 and if1.
153 It can also occur if an entry already exists in the ARP cache for the IP
154 address above, and the cable has been disconnected from if0, then reconnected
155 to if1.
156 This message can only be issued if the sysctl
157 .Va net.link.ether.inet.log_arp_wrong_iface
158 is set to 1, which is the system's default behaviour.
159 .Sh SEE ALSO
160 .Xr inet 4 ,
161 .Xr route 4 ,
162 .Xr arp 8 ,
163 .Xr ifconfig 8 ,
164 .Xr route 8 ,
165 .Xr sysctl 8
166 .Rs
167 .%A Plummer, D.
168 .%B "An Ethernet Address Resolution Protocol"
169 .%T RFC826
170 .Re
171 .Rs
172 .%A Leffler, S.J.
173 .%A Karels, M.J.
174 .%B "Trailer Encapsulations
175 .%T RFC893
176 .Re