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