2 .\" This man page is Copyright (C) 1999 Matthew Wilcox <willy@bofh.ai>.
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.
7 .\" Modified June 1999 Andi Kleen
8 .\" $Id: arp.7,v 1.9 2001/03/12 08:45:27 nakano Exp $
10 .\" Japanese Version Copyright (c) 1999-2001 NAKANO Takeo all rights reserved.
11 .\" Translated 1999-12-06, NAKANO Takeo <nakano@apm.seikei.ac.jp>
12 .\" Updated & Modified 2001-02-16, NAKANO Takeo
13 .\" Updated 2008-12-26, Akihiro MOTOKI, LDP v3.14
16 .\"WORD neighbor cache entry 近傍キャッシュエントリ
18 .\"WORD proxy arp 代理 arp
19 .\"WORD garbage collect (-or) ガベージ・コレクト(コレクタ)
21 .\"WORD neighbor soliciation message 近傍要請メッセージ
22 .\"WORD network flooding ネットワーク・フラッディング
23 .\"WORD thrashing スラッシング
24 .\"WORD connection oriented 接続指向
25 .\"WORD forward progress フォワードプログレス
27 .TH ARP 7 2008-11-25 "Linux" "Linux Programmer's Manual"
29 .\"O arp \- Linux ARP kernel module.
31 arp \- Linux ARP カーネルモジュール
34 .\"O This kernel protocol module implements the Address Resolution
35 .\"O Protocol defined in RFC\ 826.
36 .\"O It is used to convert between Layer2 hardware addresses
37 .\"O and IPv4 protocol addresses on directly connected networks.
38 .\"O The user normally doesn't interact directly with this module except to
40 .\"O instead it provides a service for other protocols in the kernel.
42 RFC\ 826 で定義されている Address Resolution Protocol を
43 実装したものである。 ARP は、ダイレクトに接続されたネットワーク上で、
44 第 2 層のハードウェアアドレスをIPv4 プロトコルアドレスに
45 変換するために用いられる。ユーザーは設定の場合を除いて
47 これはカーネル内部の他のプロトコルにサービスを提供するものである。
49 .\"O A user process can receive ARP packets by using
52 .\"O There is also a mechanism for managing the ARP cache
53 .\"O in user-space by using
56 .\"O The ARP table can also be controlled via
63 ソケットを用いれば ARP パケットを受信することができる。
64 ARP キャッシュをユーザー空間で管理することもできる。
67 を用いる。 ARP テーブルも制御可能で、これには任意の
73 .\"O The ARP module maintains a cache of mappings between hardware addresses
74 .\"O and protocol addresses.
75 .\"O The cache has a limited size so old and less
76 .\"O frequently used entries are garbage-collected.
77 .\"O Entries which are marked
78 .\"O as permanent are never deleted by the garbage-collector.
80 .\"O be directly manipulated by the use of ioctls and its behavior can be
83 .\"O interfaces described below.
84 ARP モジュールはハードウェアアドレスからプロトコルアドレスへの
85 マッピングのキャッシュを管理する。キャッシュの大きさには制限が
86 あるので、古いエントリや利用されないエントリはガベージコレクト
87 される。 permanent (保存) マークがつけられたエントリは、
88 決してガベージコレクタによって消去されない。
89 ioctl を用いればキャッシュを直接操作することもできる。
92 インタフェースによりキャッシュの振る舞いを調整できる。
94 .\"O When there is no positive feedback for an existing mapping after some
97 .\"O interfaces below), a neighbor cache entry is considered stale.
98 .\"O Positive feedback can be gotten from a higher layer; for example from
99 .\"O a successful TCP ACK.
100 .\"O Other protocols can signal forward progress
104 .\"O .BR sendmsg (2).
105 .\"O When there is no forward progress, ARP tries to reprobe.
106 .\"O It first tries to ask a local arp daemon
108 .\"O times for an updated MAC address.
109 .\"O If that fails and an old MAC address is known, an unicast probe is send
110 .\"O .B ucast_solicit
112 .\"O If that fails too, it will broadcast a new ARP
113 .\"O request to the network.
114 .\"O Requests are only sent when there is data queued
117 正のフィードバックが一定時間ない (後述の
120 近傍キャッシュエントリ (neighbor cache entry) は
121 古くなった (stale) とみなされる。
122 正のフィードバックは高位のレイヤーからも取得できる
123 (例えば TCP ACK が成功した場合など)。
129 フォワードプログレス (forward progress) をシグナルできる。
132 まずローカルな arp デーモンに問合わせを行い、
133 更新された MAC アドレスを取得しようとする。
136 回失敗すると、古い MAC アドレスがわかっている場合は、
139 回送られる。これにも失敗すると、新しい ARP リクエスト
141 リクエストは、データが送信キューになければ送られない。
143 .\"O Linux will automatically add a nonpermanent proxy arp entry when it
144 .\"O receives a request for an address it forwards to and proxy arp is
145 .\"O enabled on the receiving interface.
146 .\"O When there is a reject route for the target, no proxy arp entry is added.
147 Linux は、あるアドレスへのリクエストを受信・フォワードし、
148 受信したインターフェースで代理 arp が有効になっている場合には、
149 自動的にそのアドレスを nonpermanent な代理 arp エントリに追加する。
150 そのターゲットに reject route があった場合には、
151 代理 arp エントリは一切追加されない。
154 .\"O Three ioctls are available on all
157 .\"O They take a pointer to a
158 .\"O .I struct arpreq
159 .\"O as their argument.
162 ソケットでは、 3 つの ioctl が使用できる。
170 struct sockaddr arp_pa; /* protocol address */
171 struct sockaddr arp_ha; /* hardware address */
172 int arp_flags; /* flags */
173 struct sockaddr arp_netmask; /* netmask of protocol address */
179 .\"O .BR SIOCSARP ", " SIOCDARP " and " SIOCGARP
180 .\"O respectively set, delete and get an ARP mapping.
181 .\"O Setting and deleting ARP maps are privileged operations and may
182 .\"O only be performed by a process with the
183 .\"O .B CAP_NET_ADMIN
184 .\"O capability or an effective UID of 0.
185 .BR SIOCSARP ", " SIOCDARP ", " SIOCGARP
186 は、それぞれ ARP マッピングを設定・削除・取得する。
187 ARP マップの設定と削除は特権が必要な操作であり、
189 権限を持つプロセスか、実行ユーザー ID が 0 のプロセス
197 .\"O must have the same type as the device which is specified in
200 .\"O is a zero-terminated string which names a device.
208 で設定されたデバイスと同じタイプでなければならない。
210 はデバイスの名前を示す、ゼロで終端された文字列である。
218 .\"O ATF_COM:Lookup complete
219 .\"O ATF_PERM:Permanent entry
220 .\"O ATF_PUBL:Publish entry
221 .\"O ATF_USETRAILERS:Trailers requested
222 .\"O ATF_NETMASK:Use a netmask
223 .\"O ATF_DONTPUB:Don't answer
226 ATF_PERM:エントリを peramanent にする
227 ATF_PUBL:エントリを publish する
228 ATF_USETRAILERS:trailer が必要
229 ATF_NETMASK:netmask を用いる
237 .\"O flag is set, then
239 .\"O should be valid.
240 .\"O Linux 2.2 does not support proxy network ARP entries, so this
241 .\"O should be set to 0xffffffff, or 0 to remove an existing proxy arp entry.
242 .\"O .B ATF_USETRAILERS
243 .\"O is obsolete and should not be used.
248 Linux 2.2 は代理ネットワーク ARP エントリをサポートしていないので、
249 これは 0xffffffff にセットしておくか、あるいは
250 現存の代理 arp エントリを削除したい場合には 0 にしておく必要がある。
252 は obsolete なので、用いるべきでない。
253 .\"O .SS /proc interfaces
255 .\"O ARP supports a range of
257 .\"O interfaces to configure parameters on a global or per-interface basis.
258 .\"O The interfaces can be accessed by reading or writing the
259 .\"O .I /proc/sys/net/ipv4/neigh/*/*
261 .\"O Each interface in the system has its own directory in
262 .\"O .IR /proc/sys/net/ipv4/neigh/ .
263 .\"O The setting in the "default" directory is used for all newly created
265 .\"O Unless otherwise specified, time-related sysctls are specified
267 ARP では、グローバルなパラメータやインターフェースごとのパラメータを
269 インタフェースを通して設定することができる。
271 .I proc/sys/net/ipv4/neigh/*/*
273 システムにあるそれぞれのインターフェースには、
275 .I /proc/sys/net/ipv4/neigh/
277 "default" ディレクトリに対して設定をすると、
278 それ以降生成されるデバイス全てに対してその設定が用いられる。
279 特に指定がなければ、時間に関る sysctl の単位は秒である。
281 .\"O .IR anycast_delay " (since Linux 2.2)"
282 .IR anycast_delay " (Linux 2.2 以降)"
283 .\" Precisely: 2.1.79
284 .\"O The maximum number of jiffies to delay before replying to a
285 .\"O IPv6 neighbor solicitation message.
286 .\"O Anycast support is not yet implemented.
287 .\"O Defaults to 1 second.
288 IPv6 の近傍要請メッセージ (neighbor soliciation message)
289 に応答するまでの最大遅延時間 (jiffy 単位)。
290 anycast のサポートはまだ実装されていない。
293 .\"O .IR app_solicit " (since Linux 2.2)"
294 .IR app_solicit " (Linux 2.2 以降)"
295 .\" Precisely: 2.1.79
296 .\"O The maximum number of probes to send to the user space ARP daemon via
297 .\"O netlink before dropping back to multicast probes (see
298 .\"O .IR mcast_solicit ).
300 ユーザー空間の ARP デーモンに netlink を用いて探索させる最大回数。
301 これを越えるとマルチキャストによる探索に移行する
305 .\"O .IR base_reachable_time " (since Linux 2.2)"
306 .IR base_reachable_time " (Linux 2.2 以降)"
307 .\" Precisely: 2.1.79
308 .\"O Once a neighbor has been found, the entry is considered to be valid
309 .\"O for at least a random value between
310 .\"O .IR base_reachable_time "/2 and 3*" base_reachable_time /2.
311 .\"O An entry's validity will be extended if it receives positive feedback
312 .\"O from higher level protocols.
313 .\"O Defaults to 30 seconds.
315 .IR base_reachable_time "/2 から 3*" base_reachable_time /2
316 の間のランダムな値の時間、有効であるとみなされる。
317 エントリの有効性は、高位のプロトコルからポジティブなフィードバックを
318 受け取ると延長される。デフォルトは 30 秒。
319 .\"O This file is now obsolete in favor of
320 .\"O .IR base_reachable_time_ms .
321 このファイルは現在は非推奨であり、代わりに
322 .I base_reachable_time_ms
325 .\"O .IR base_reachable_time_ms " (since Linux 2.6.12)"
326 .IR base_reachable_time_ms " (Linux 2.6.12 以降)"
328 .\"O .IR base_reachable_time ,
329 .\"O but measures time in milliseconds.
330 .\"O Defaults to 30000 milliseconds.
331 .I base_reachable_time
335 .\"O .IR delay_first_probe_time " (since Linux 2.2)"
336 .IR delay_first_probe_time " (Linux 2.2 以降)"
337 .\" Precisely: 2.1.79
338 .\"O Delay before first probe after it has been decided that a neighbor
340 .\"O Defaults to 5 seconds.
341 近傍ホストのエントリが古くなったと判断された後に
342 最初に探索を行うまでの遅延時間。デフォルトは 5 秒。
344 .\"O .IR gc_interval " (since Linux 2.2)"
345 .IR gc_interval " (Linux 2.2 以降)"
346 .\" Precisely: 2.1.79
347 .\"O How frequently the garbage collector for neighbor entries
348 .\"O should attempt to run.
349 .\"O Defaults to 30 seconds.
350 ガベージ・コレクタを近傍ホストエントリに対して実行させる頻度。
353 .\"O .IR gc_stale_time " (since Linux 2.2)"
354 .IR gc_stale_time " (Linux 2.2 以降)"
355 .\" Precisely: 2.1.79
356 .\"O Determines how often to check for stale neighbor entries.
357 .\"O When a neighbor entry is considered stale, it is resolved again before
358 .\"O sending data to it.
359 .\"O Defaults to 60 seconds.
360 古くなった近傍ホストエントリに対してチェックを行う頻度。
361 近傍ホストエントリが古くなったとみなされると、そのエントリに
365 .\"O .IR gc_thresh1 " (since Linux 2.2)"
366 .IR gc_thresh1 " (Linux 2.2 以降)"
367 .\" Precisely: 2.1.79
368 .\"O The minimum number of entries to keep in the ARP cache.
369 .\"O The garbage collector will not run if there are fewer than
370 .\"O this number of entries in the cache.
371 .\"O Defaults to 128.
372 ARP キャッシュに保存するエントリ数の最小値。
373 この数より少ないエントリしかキャッシュになければ、
377 .\"O .IR gc_thresh2 " (since Linux 2.2)"
378 .IR gc_thresh2 " (Linux 2.2 以降)"
379 .\" Precisely: 2.1.79
380 .\"O The soft maximum number of entries to keep in the ARP cache.
381 .\"O The garbage collector will allow the number of entries to exceed
382 .\"O this for 5 seconds before collection will be performed.
383 .\"O Defaults to 512.
384 ARP キャッシュに保存されるエントリ数のソフトな最大値。
385 キャッシュのエントリがこの数を 5 秒間越えつづけると、
389 .\"O .IR gc_thresh3 " (since Linux 2.2)"
390 .IR gc_thresh3 " (Linux 2.2 以降)"
391 .\" Precisely: 2.1.79
392 .\"O The hard maximum number of entries to keep in the ARP cache.
393 .\"O The garbage collector will always run if there are more than
394 .\"O this number of entries in the cache.
395 .\"O Defaults to 1024.
396 ARP キャッシュに保存されるエントリ数のハードな最大値。
401 .\"O .IR locktime " (since Linux 2.2)"
402 .IR locktime " (Linux 2.2 以降)"
403 .\" Precisely: 2.1.79
404 .\"O The minimum number of jiffies to keep an ARP entry in the cache.
405 .\"O This prevents ARP cache thrashing if there is more than one potential
406 .\"O mapping (generally due to network misconfiguration).
407 .\"O Defaults to 1 second.
408 ARP エントリをキャッシュに保存する時間の最小値 (jiffy 単位)。
409 可能性のあるマッピングが一つ以上ある (たいていはネットワーク設定のミス)
410 場合に、 ARP キャッシュのスラッシングが起きることを防ぐ。
413 .\"O .IR mcast_solicit " (since Linux 2.2)"
414 .IR mcast_solicit " (Linux 2.2 以降)"
415 .\" Precisely: 2.1.79
416 .\"O The maximum number of attempts to resolve an address by
417 .\"O multicast/broadcast before marking the entry as unreachable.
419 エントリを unreachable マークする前に、
420 アドレスをマルチキャスト/ブロードキャストで解決しようとする
424 .\"O .IR proxy_delay " (since Linux 2.2)"
425 .IR proxy_delay " (Linux 2.2 以降)"
426 .\" Precisely: 2.1.79
427 .\"O When an ARP request for a known proxy-ARP address is received, delay up to
429 .\"O jiffies before replying.
430 .\"O This is used to prevent network flooding in some cases.
431 .\"O Defaults to 0.8 seconds.
432 既知の代理 ARP アドレスに対して ARP リクエストを受信した場合に、
435 jiffy まで遅延する。これは場合によって生じる
436 ネットワーク・フラッディング (network flooding) を避けるために用いる。
439 .\"O .IR proxy_qlen " (since Linux 2.2)"
440 .IR proxy_qlen " (Linux 2.2 以降)"
441 .\" Precisely: 2.1.79
442 .\"O The maximum number of packets which may be queued to proxy-ARP addresses.
444 代理 ARP アドレスに対してキューイングできる最大のパケット数。
447 .\"O .IR retrans_time " (since Linux 2.2)"
448 .IR retrans_time " (Linux 2.2 以降)"
449 .\" Precisely: 2.1.79
450 .\"O The number of jiffies to delay before retransmitting a request.
451 .\"O Defaults to 1 second.
452 .\"O This file is now obsolete in favor of
453 .\"O .IR retrans_time_ms .
454 リクエストを再度送るまでの遅延時間 (jiffy 単位)。
456 このファイルは現在は非推奨であり、代わりに
460 .\"O .IR retrans_time_ms " (since Linux 2.6.12)"
461 .IR retrans_time_ms " (Linux 2.6.12 以降)"
462 .\"O The number of milliseconds to delay before retransmitting a request.
463 .\"O Defaults to 1000 milliseconds.
464 リクエストを再度送るまでの遅延時間 (ミリ秒単位)。
467 .\"O .IR ucast_solicit " (since Linux 2.2)"
468 .IR ucast_solicit " (Linux 2.2 以降)"
469 .\" Precisely: 2.1.79
470 .\"O The maximum number of attempts to send unicast probes before asking
471 .\"O the ARP daemon (see
472 .\"O .IR app_solicit ).
474 ARP デーモンへの問い合わせを行う前に行う unicast 探索の最大試行数
478 .\"O .IR unres_qlen " (since Linux 2.2)"
479 .IR unres_qlen " (Linux 2.2 以降)"
480 .\" Precisely: 2.1.79
481 .\"O The maximum number of packets which may be queued for each unresolved
482 .\"O address by other network layers.
485 他のネットワーク層からキューイングできる最大パケット数。
490 .\"O .I struct arpreq
491 .\"O changed in Linux 2.0 to include the
493 .\"O member and the ioctl numbers changed at the same time.
494 .\"O Support for the old ioctls was dropped in Linux 2.2.
499 メンバーが含まれるように変更があった。また同時に
500 ioctl 番号も変更された。古い ioctl は
501 Linux 2.2 で用いることができなくなった。
503 .\"O Support for proxy arp entries for networks (netmask not equal 0xffffffff)
504 .\"O was dropped in Linux 2.2.
505 .\"O It is replaced by automatic proxy arp setup by
506 .\"O the kernel for all reachable hosts on other interfaces (when
507 .\"O forwarding and proxy arp is enabled for the interface).
508 ネットワークに対する代理 arp エントリ (netmask が 0xffffffff でない)
509 は、 Linux 2.2 で用いることができなくなった。
510 これはカーネルによって設定される、別のインターフェースにおける
511 到達可能なすべてのホストに対する自動代理 arp によって置き換えられた
512 (そのインターフェースでフォワーディングと代理 arp が有効になっている場合)。
516 .\"O interfaces did not exist before Linux 2.2.
518 の各インタフェースは Linux 2.2 以前には存在しない。
521 .\"O Some timer settings are specified in jiffies, which is architecture-
522 .\"O and kernel version-dependent; see
524 いくつかのタイマー設定は jiffy で指定されるが、
525 jiffy はアーキテクチャやカーネルのバージョンに依存する。
529 .\"O There is no way to signal positive feedback from user space.
530 .\"O This means connection-oriented protocols implemented in user space
531 .\"O will generate excessive ARP traffic, because ndisc will regularly
532 .\"O reprobe the MAC address.
533 .\"O The same problem applies for some kernel protocols (e.g., NFS over UDP).
534 ユーザー空間からポジティブなフィードバックを送る方法が存在しない。
535 つまり接続指向 (connection-oriented) のプロトコルをユーザー空間で
536 実装すると、余計な ARP トラフィックの原因となる。
537 なぜなら ndisc は定期的に MAC アドレスを再探索するからである。
538 同様の問題はいくつかのカーネルプロトコル (NFS over UDP など) にも存在する。
540 .\"O This man page mashes IPv4 specific and shared between IPv4 and IPv6
541 .\"O functionality together.
542 この man ページでは IPv4 特有の機能と
543 IPv4・IPv6 で共有される機能とがごっちゃになっている。
546 .BR capabilities (7),
549 .\"O RFC\ 826 for a description of ARP.
553 .\"O RFC\ 2461 for a description of IPv6 neighbor discovery and the base
554 .\"O algorithms used.
556 IPv6 neighbor discovery に関する説明と、
559 .\"O Linux 2.2+ IPv4 ARP uses the IPv6 algorithms when applicable.
560 Linux 2.2 以降の IPv4 ARP は、
561 可能な場合は IPv6 のアルゴリズムを用いる。