]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - usr.sbin/arp/arp.4
bsdinstall: complete whitelabeling the installer
[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. 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 .Dd October 7, 2016
29 .Dt ARP 4
30 .Os
31 .Sh NAME
32 .Nm arp
33 .Nd Address Resolution Protocol
34 .Sh SYNOPSIS
35 .Cd "device ether"
36 .Sh DESCRIPTION
37 The Address Resolution Protocol (ARP) is used to dynamically
38 map between Protocol Addresses (such as IP addresses) and
39 Local Network Addresses (such as Ethernet addresses).
40 This implementation maps IP addresses to Ethernet addresses.
41 It is used by all the Ethernet interface drivers.
42 .Pp
43 ARP caches Internet-Ethernet address mappings.
44 When an interface requests a mapping for an address not in the cache,
45 ARP queues the message which requires the mapping and broadcasts
46 a message on the associated network requesting the address mapping.
47 If a response is provided, the new mapping is cached and any pending
48 message is transmitted.
49 ARP will queue at most
50 .Va net.link.ether.inet.maxhold
51 packets while waiting for a response to a mapping request;
52 only the most recently ``transmitted'' packets are kept.
53 If the target host does not respond after several requests,
54 the host is considered to be down allowing an error to be returned to
55 transmission attempts.
56 Further demand for this mapping causes ARP request retransmissions, that
57 are ratelimited to one packet per second.
58 The error is
59 .Er EHOSTDOWN
60 for a non-responding destination host, and
61 .Er EHOSTUNREACH
62 for a non-responding router.
63 .Pp
64 The ARP cache is stored in per-interface link-level table.
65 .Pp
66 ARP entries may be added, deleted or changed with the
67 .Xr arp 8
68 utility.
69 Manually-added entries may be temporary or permanent,
70 and may be
71 .Dq published ,
72 in which case the system will respond to ARP requests for that host
73 as if it were the target of the request.
74 .Pp
75 In the past,
76 ARP was used to negotiate the use of a trailer encapsulation.
77 This is no longer supported.
78 .Pp
79 ARP watches passively for hosts impersonating the local host (i.e., a host
80 which responds to an ARP mapping request for the local host's address).
81 .Pp
82 Proxy ARP is a feature whereby the local host will respond to requests
83 for addresses other than itself, with its own address.
84 Normally, proxy ARP in
85 .Fx
86 is set up on a host-by-host basis using the
87 .Xr arp 8
88 utility, by adding an entry for each host inside a given subnet for
89 which proxying of ARP requests is desired.
90 However, the
91 .Dq "proxy all"
92 feature causes the local host to act as a proxy for
93 .Em all
94 hosts reachable through some other network interface,
95 different from the one the request came in from.
96 It may be enabled by setting the
97 .Xr sysctl 8
98 MIB variable
99 .Va net.link.ether.inet.proxyall
100 to 1.
101 .Sh MIB Variables
102 The ARP protocol implements a number of configurable variables in
103 .Va net.link.ether.inet
104 branch
105 of the
106 .Xr sysctl 3
107 MIB.
108 .Bl -tag -width "log_arp_permanent_modify"
109 .It Va allow_multicast
110 Install ARP entries with the multicast bit set in the hardware address.
111 Installing such entries is an RFC 1812 violation, but some proprietary load
112 balancing techniques require routers to do so.
113 Turned off by default.
114 .It Va garp_rexmit_count
115 Retransmit gratuitous ARP (GARP) packets when an IPv4 address is added to an
116 interface.
117 A GARP is always transmitted when an IPv4 address is added to an interface.
118 A non-zero value causes the GARP packet to be retransmitted the stated number
119 of times.
120 The interval between retransmissions is doubled each time, so the
121 retransmission intervals are: {1, 2, 4, 8, 16, ...} (seconds).
122 The default value of zero means only the initial GARP is sent; no
123 additional GARP packets are retransmitted.
124 The maximum value is sixteen.
125 .Pp
126 The default behavior of a single GARP packet is usually sufficient.
127 However, a single GARP might be dropped or lost in some circumstances.
128 This is particularly harmful when a shared address is passed between cluster
129 nodes.
130 Neighbors on the network link might then work with a stale ARP cache and send
131 packets destined for that address to the node that previously owned the
132 address, which might not respond.
133 .It Va log_arp_movements
134 Log movements of IP addresses from one hardware address to another.
135 See
136 .Sx DIAGNOSTICS
137 below.
138 Turned on by default.
139 .It Va log_arp_permanent_modify
140 Log attempts by a remote host to modify a permanent ARP entry.
141 See
142 .Sx DIAGNOSTICS
143 below.
144 Turned on by default.
145 .It Va log_arp_wrong_iface
146 Log attempts to insert an ARP entry on an interface when the IP network to
147 which the address belongs is connected to another interface.
148 See
149 .Sx DIAGNOSTICS
150 below.
151 Turned on by default.
152 .It Va max_log_per_second
153 Limit the number of remotely triggered logging events to a configured value per
154 second.
155 Default is 1 log message per second.
156 .It Va max_age
157 How long an ARP entry is held in the cache until it needs to be refreshed.
158 Default is 1200 seconds.
159 .It Va maxhold
160 How many packets to hold in the per-entry output queue while the entry
161 is being resolved.
162 Default is 16 packets.
163 .It Va maxtries
164 Number of retransmits before a host is considered down and an error is
165 returned.
166 Default is 5 tries.
167 .It Va proxyall
168 Enables ARP proxying.
169 Turned off by default.
170 .It Va wait
171 Lifetime of an incomplete ARP entry.
172 Default is 20 seconds.
173 .El
174 .Sh DIAGNOSTICS
175 .Bl -diag
176 .It "arp: %x:%x:%x:%x:%x:%x is using my IP address %d.%d.%d.%d on %s!"
177 ARP has discovered another host on the local network which responds to
178 mapping requests for its own Internet address with a different Ethernet
179 address, generally indicating that two hosts are attempting to use the
180 same Internet address.
181 .It "arp: link address is broadcast for IP address %d.%d.%d.%d!"
182 ARP requested information for a host, and received an answer indicating
183 that the host's ethernet address is the ethernet broadcast address.
184 This indicates a misconfigured or broken device.
185 .It "arp: %d.%d.%d.%d moved from %x:%x:%x:%x:%x:%x to %x:%x:%x:%x:%x:%x on %s"
186 ARP had a cached value for the ethernet address of the referenced host,
187 but received a reply indicating that the host is at a new address.
188 This can happen normally when host hardware addresses change,
189 or when a mobile node arrives or leaves the local subnet.
190 It can also indicate a problem with proxy ARP.
191 This message can only be issued if the sysctl
192 .Va net.link.ether.inet.log_arp_movements
193 is set to 1, which is the system's default behaviour.
194 .It "arpresolve: can't allocate llinfo for %d.%d.%d.%d"
195 The route for the referenced host points to a device upon which ARP is
196 required, but ARP was unable to allocate a routing table entry in which
197 to store the host's MAC address.
198 This usually points to a misconfigured routing table.
199 It can also occur if the kernel cannot allocate memory.
200 .It "arp: %d.%d.%d.%d is on if0 but got reply from %x:%x:%x:%x:%x:%x on if1"
201 Physical connections exist to the same logical IP network on both if0 and if1.
202 It can also occur if an entry already exists in the ARP cache for the IP
203 address above, and the cable has been disconnected from if0, then reconnected
204 to if1.
205 This message can only be issued if the sysctl
206 .Va net.link.ether.inet.log_arp_wrong_iface
207 is set to 1, which is the system's default behaviour.
208 .It "arp: %x:%x:%x:%x:%x:%x attempts to modify permanent entry for %d.%d.%d.%d on %s"
209 ARP has received an ARP reply that attempts to overwrite a permanent
210 entry in the local ARP table.
211 This error will only be logged if the sysctl
212 .Va net.link.ether.inet.log_arp_permanent_modify
213 is set to 1, which is the system's default behaviour.
214 .It "arp: %x:%x:%x:%x:%x:%x is multicast"
215 Kernel refused to install an entry with multicast hardware address.
216 If you really want such addresses being installed, set the sysctl
217 .Va net.link.ether.inet.allow_multicast
218 to a positive value.
219 .El
220 .Sh SEE ALSO
221 .Xr inet 4 ,
222 .Xr route 4 ,
223 .Xr arp 8 ,
224 .Xr ifconfig 8 ,
225 .Xr route 8 ,
226 .Xr sysctl 8
227 .Rs
228 .%A Plummer, D.
229 .%B "An Ethernet Address Resolution Protocol"
230 .%T RFC826
231 .Re
232 .Rs
233 .%A Leffler, S.J.
234 .%A Karels, M.J.
235 .%B "Trailer Encapsulations"
236 .%T RFC893
237 .Re