1 .\" This man page is Copyright (C) 1999 Matthew Wilcox <willy@bofh.ai>.
2 .\" %%%LICENSE_START(VERBATIM_ONE_PARA)
3 .\" Permission is granted to distribute possibly modified copies
4 .\" of this page provided the header is included verbatim,
5 .\" and in case of nontrivial modification author and date
6 .\" of the modification is added to the header.
9 .\" Modified June 1999 Andi Kleen
10 .\" $Id: arp.7,v 1.10 2000/04/27 19:31:38 ak Exp $
12 .TH ARP 7 2020-08-13 "Linux" "Linux Programmer's Manual"
14 arp \- Linux ARP kernel module.
16 This kernel protocol module implements the Address Resolution
17 Protocol defined in RFC\ 826.
18 It is used to convert between Layer2 hardware addresses
19 and IPv4 protocol addresses on directly connected networks.
20 The user normally doesn't interact directly with this module except to
22 instead it provides a service for other protocols in the kernel.
24 A user process can receive ARP packets by using
27 There is also a mechanism for managing the ARP cache
28 in user-space by using
31 The ARP table can also be controlled via
37 The ARP module maintains a cache of mappings between hardware addresses
38 and protocol addresses.
39 The cache has a limited size so old and less
40 frequently used entries are garbage-collected.
41 Entries which are marked
42 as permanent are never deleted by the garbage-collector.
44 be directly manipulated by the use of ioctls and its behavior can be
47 interfaces described below.
49 When there is no positive feedback for an existing mapping after some
52 interfaces below), a neighbor cache entry is considered stale.
53 Positive feedback can be gotten from a higher layer; for example from
55 Other protocols can signal forward progress
60 When there is no forward progress, ARP tries to reprobe.
61 It first tries to ask a local arp daemon
63 times for an updated MAC address.
64 If that fails and an old MAC address is known, a unicast probe is sent
67 If that fails too, it will broadcast a new ARP
68 request to the network.
69 Requests are sent only when there is data queued
72 Linux will automatically add a nonpermanent proxy arp entry when it
73 receives a request for an address it forwards to and proxy arp is
74 enabled on the receiving interface.
75 When there is a reject route for the target, no proxy arp entry is added.
77 Three ioctls are available on all
80 They take a pointer to a
87 struct sockaddr arp_pa; /* protocol address */
88 struct sockaddr arp_ha; /* hardware address */
89 int arp_flags; /* flags */
90 struct sockaddr arp_netmask; /* netmask of protocol address */
96 .BR SIOCSARP ", " SIOCDARP " and " SIOCGARP
97 respectively set, delete, and get an ARP mapping.
98 Setting and deleting ARP maps are privileged operations and may
99 be performed only by a process with the
101 capability or an effective UID of 0.
108 must have the same type as the device which is specified in
111 is a zero-terminated string which names a device.
119 ATF_COM:Lookup complete
120 ATF_PERM:Permanent entry
121 ATF_PUBL:Publish entry
122 ATF_USETRAILERS:Trailers requested
123 ATF_NETMASK:Use a netmask
124 ATF_DONTPUB:Don't answer
133 Linux 2.2 does not support proxy network ARP entries, so this
134 should be set to 0xffffffff, or 0 to remove an existing proxy arp entry.
136 is obsolete and should not be used.
138 ARP supports a range of
140 interfaces to configure parameters on a global or per-interface basis.
141 The interfaces can be accessed by reading or writing the
142 .I /proc/sys/net/ipv4/neigh/*/*
144 Each interface in the system has its own directory in
145 .IR /proc/sys/net/ipv4/neigh/ .
146 The setting in the "default" directory is used for all newly created
148 Unless otherwise specified, time-related interfaces are specified
151 .IR anycast_delay " (since Linux 2.2)"
152 .\" Precisely: 2.1.79
153 The maximum number of jiffies to delay before replying to a
154 IPv6 neighbor solicitation message.
155 Anycast support is not yet implemented.
156 Defaults to 1 second.
158 .IR app_solicit " (since Linux 2.2)"
159 .\" Precisely: 2.1.79
160 The maximum number of probes to send to the user space ARP daemon via
161 netlink before dropping back to multicast probes (see
165 .IR base_reachable_time " (since Linux 2.2)"
166 .\" Precisely: 2.1.79
167 Once a neighbor has been found, the entry is considered to be valid
168 for at least a random value between
169 .IR base_reachable_time "/2 and 3*" base_reachable_time /2.
170 An entry's validity will be extended if it receives positive feedback
171 from higher level protocols.
172 Defaults to 30 seconds.
173 This file is now obsolete in favor of
174 .IR base_reachable_time_ms .
176 .IR base_reachable_time_ms " (since Linux 2.6.12)"
178 .IR base_reachable_time ,
179 but measures time in milliseconds.
180 Defaults to 30000 milliseconds.
182 .IR delay_first_probe_time " (since Linux 2.2)"
183 .\" Precisely: 2.1.79
184 Delay before first probe after it has been decided that a neighbor
186 Defaults to 5 seconds.
188 .IR gc_interval " (since Linux 2.2)"
189 .\" Precisely: 2.1.79
190 How frequently the garbage collector for neighbor entries
191 should attempt to run.
192 Defaults to 30 seconds.
194 .IR gc_stale_time " (since Linux 2.2)"
195 .\" Precisely: 2.1.79
196 Determines how often to check for stale neighbor entries.
197 When a neighbor entry is considered stale, it is resolved again before
199 Defaults to 60 seconds.
201 .IR gc_thresh1 " (since Linux 2.2)"
202 .\" Precisely: 2.1.79
203 The minimum number of entries to keep in the ARP cache.
204 The garbage collector will not run if there are fewer than
205 this number of entries in the cache.
208 .IR gc_thresh2 " (since Linux 2.2)"
209 .\" Precisely: 2.1.79
210 The soft maximum number of entries to keep in the ARP cache.
211 The garbage collector will allow the number of entries to exceed
212 this for 5 seconds before collection will be performed.
215 .IR gc_thresh3 " (since Linux 2.2)"
216 .\" Precisely: 2.1.79
217 The hard maximum number of entries to keep in the ARP cache.
218 The garbage collector will always run if there are more than
219 this number of entries in the cache.
222 .IR locktime " (since Linux 2.2)"
223 .\" Precisely: 2.1.79
224 The minimum number of jiffies to keep an ARP entry in the cache.
225 This prevents ARP cache thrashing if there is more than one potential
226 mapping (generally due to network misconfiguration).
227 Defaults to 1 second.
229 .IR mcast_solicit " (since Linux 2.2)"
230 .\" Precisely: 2.1.79
231 The maximum number of attempts to resolve an address by
232 multicast/broadcast before marking the entry as unreachable.
235 .IR proxy_delay " (since Linux 2.2)"
236 .\" Precisely: 2.1.79
237 When an ARP request for a known proxy-ARP address is received, delay up to
239 jiffies before replying.
240 This is used to prevent network flooding in some cases.
241 Defaults to 0.8 seconds.
243 .IR proxy_qlen " (since Linux 2.2)"
244 .\" Precisely: 2.1.79
245 The maximum number of packets which may be queued to proxy-ARP addresses.
248 .IR retrans_time " (since Linux 2.2)"
249 .\" Precisely: 2.1.79
250 The number of jiffies to delay before retransmitting a request.
251 Defaults to 1 second.
252 This file is now obsolete in favor of
253 .IR retrans_time_ms .
255 .IR retrans_time_ms " (since Linux 2.6.12)"
256 The number of milliseconds to delay before retransmitting a request.
257 Defaults to 1000 milliseconds.
259 .IR ucast_solicit " (since Linux 2.2)"
260 .\" Precisely: 2.1.79
261 The maximum number of attempts to send unicast probes before asking
266 .IR unres_qlen " (since Linux 2.2)"
267 .\" Precisely: 2.1.79
268 The maximum number of packets which may be queued for each unresolved
269 address by other network layers.
274 changed in Linux 2.0 to include the
276 member and the ioctl numbers changed at the same time.
277 Support for the old ioctls was dropped in Linux 2.2.
279 Support for proxy arp entries for networks (netmask not equal 0xffffffff)
280 was dropped in Linux 2.2.
281 It is replaced by automatic proxy arp setup by
282 the kernel for all reachable hosts on other interfaces (when
283 forwarding and proxy arp is enabled for the interface).
287 interfaces did not exist before Linux 2.2.
289 Some timer settings are specified in jiffies, which is architecture-
290 and kernel version-dependent; see
293 There is no way to signal positive feedback from user space.
294 This means connection-oriented protocols implemented in user space
295 will generate excessive ARP traffic, because ndisc will regularly
296 reprobe the MAC address.
297 The same problem applies for some kernel protocols (e.g., NFS over UDP).
299 This man page mashes together functionality that is IPv4-specific
300 with functionality that is shared between IPv4 and IPv6.
302 .BR capabilities (7),
306 RFC\ 826 for a description of ARP.
307 RFC\ 2461 for a description of IPv6 neighbor discovery and the base
309 Linux 2.2+ IPv4 ARP uses the IPv6 algorithms when applicable.