mii-tool: fixed warning: "initialization discards qualifiers from pointer target"
[oss-qm-packages.git] / man / en_US / arp.8
blob3709cf67eb5beeba719d72023a5451c8bf2489f8
1 .TH ARP 8 "2005-05-16" "net-tools" "Linux Programmer's Manual"
2 .SH NAME
3 arp \- manipulate the system ARP cache
4 .SH SYNOPSIS
5 .B arp 
6 .RB [ \-vn ] 
7 .RB [ "\-H type" ] 
8 .RB [ "-i if" ] 
9 .B -a 
10 .RB [ hostname ]
11 .PP
12 .B arp 
13 .RB [ \-v ]
14 .RB [ "\-i if" ] 
15 .B "\-d hostname"
16 .RB [ pub ]
17 .PP
18 .B arp 
19 .RB [ \-v ] 
20 .RB [ "\-H type" ] 
21 .RB [ "\-i if" ] 
22 .B -s hostname hw_addr
23 .RB [ temp ] 
24 .PP
25 .B arp 
26 .RB [ \-v ] 
27 .RB [ "\-H type" ] 
28 .RB [ "\-i if" ] 
29 .B -s hostname hw_addr
30 .RB [ "netmask nm" ] 
31 .B pub
32 .PP
33 .B arp 
34 .RB [ \-v ] 
35 .RB [ "\-H type" ] 
36 .RB [ "\-i if" ] 
37 .B -Ds hostname ifa
38 .RB [ "netmask nm" ] 
39 .B pub
40 .PP
41 .B arp 
42 .RB [ \-vnD ]
43 .RB [ "\-H type" ] 
44 .RB [ "-i if" ]
45 .B -f [filename]
47 .SH DESCRIPTION
48 .B Arp
49 manipulates the kernel's ARP cache in various ways.  The primary options
50 are clearing an address mapping entry and manually setting up one.  For
51 debugging purposes, the
52 .B arp
53 program also allows a complete dump of the ARP cache.
54 .SH OPTIONS
55 .TP
56 .B "\-v, \-\-verbose"
57 Tell the user what is going on by being verbose.
58 .TP
59 .B "\-n, \-\-numeric"
60 shows numerical addresses instead of trying to determine symbolic host, port
61 or user names.
62 .TP
63 .B "\-H type, \-\-hw-type type"
64 When setting or reading the ARP cache, this optional parameter tells
65 .B arp
66 which class of entries it should check for.  The default value of
67 this parameter is
68 .B ether
69 (i.e. hardware code 0x01 for IEEE 802.3 10Mbps Ethernet).
70 Other values might include network technologies such as
71 .RB "ARCnet (" arcnet ")"
73 .RB "PROnet (" pronet ")"
75 .RB "AX.25 (" ax25 ")"
76 and
77 .RB "NET/ROM (" netrom ")."
78 .TP
79 .B "\-a [hostname], \-\-display [hostname]"
80 Shows the entries of the specified hosts.  If the
81 .B hostname
82 parameter is not used,
83 .B all
84 entries will be displayed.
85 .TP
86 .B "\-d hostname, \-\-delete hostname"
87 Remove any entry for the specified host.  This can be used if the
88 indicated host is brought down, for example.
89 .TP
90 .B "\-D, \-\-use-device"
91 Use the interface
92 .BR ifa "'s"
93 hardware address.
94 .TP
95 .B "\-i If, \-\-device If"
96 Select an interface. When dumping the ARP cache only entries matching
97 the specified interface will be printed. When setting a permanent or
98 .B temp
99 ARP entry this interface will be associated with the entry; if this
100 option is not used, the kernel will guess based on the routing
101 table. For
102 .B pub
103 entries the specified interface is the interface on which ARP requests will
104 be answered. 
106 .B NOTE:
107 This has to be different from the interface to which the IP
108 datagrams will be routed.
110 .B "\-s hostname hw_addr, \-\-set hostname"
111 Manually create an ARP address mapping entry for host
112 .B hostname
113 with hardware address set to
114 .B hw_addr
115 .  The format of the hardware address is dependent on the hardware
116 class, but for most classes one can assume that the usual presentation
117 can be used.  For the Ethernet class, this is 6 bytes in hexadecimal,
118 separated by colons. When adding proxy arp entries (that is those with
119 the 
120 .BR pub lish 
121 flag set a 
122 .B netmask 
123 may be specified to proxy arp for entire subnets. This is not good
124 practice, but is supported by older kernels because it can be
125 useful. If the
126 .B temp
127 flag is not supplied entries will be permanent stored into the ARP
128 cache.
130 .B NOTE:
131 As of kernel 2.2.0 it is no longer possible to set an ARP entry for an 
132 entire subnet. Linux instead does automagic proxy arp when a route
133 exists and it is forwarding. See 
134 .BR arp (7)
135 for details. Also the
136 .B dontpub
137 option which is available for delete and set operations cannot be 
138 used with 2.4 and newer kernels.
140 .B "\-f filename, \-\-file filename"
141 Similar to the
142 .B \-s
143 option, only this time the address info is taken from file
144 .B filename
145 .  This can be used if ARP entries for a lot of hosts have to be
146 set up.  The name of the data file is very often
147 .IR /etc/ethers , 
148 but this is not official. If no filename is specified /etc/ethers
149 is used as default.
150 .sp 1
151 The format of the file is simple; it
152 only contains ASCII text lines with a hostname, and a hardware
153 address separated by whitespace. Additionally the 
154 .BR "pub" , " temp" " and" " netmask"
155 flags can be used.
157 In all places where a
158 .B hostname
159 is expected, one can also enter an
160 .B "IP address"
161 in dotted-decimal notation.
163 As a special case for compatibility the order of the hostname and 
164 the hardware address can be exchanged.
165 .LP 
166 Each complete entry in the ARP cache will be marked with the
167 .B C
168 flag. Permanent entries are marked with
169 .B M
170 and published entries have the
171 .B P
172 flag.
173 .SH FILES
174 .I /proc/net/arp,
176 .I /etc/networks
178 .I /etc/hosts
180 .I /etc/ethers
181 .SH SEE ALSO
182 rarp(8), route(8), ifconfig(8), netstat(8)
183 .SH AUTHORS
184 Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org> with a lot of improvements
185 from net-tools Maintainer Bernd Eckenfels <net-tools@lina.inka.de>.