Debian Codegraph @

upstream/fedora-44/man8/arp.8

raw
1 .TH ARP 8 "2008\-10\-03" "net\-tools" "Linux System Administrator's Manual"
2 .SH NAME
3 arp \- manipulate the system ARP cache
4 .SH SYNOPSIS
5 .B arp
6 .RB [ \-vn ]
7 .RB [ \-H
8 .IR type ]
9 .RB [ \-i
10 .IR if ]
11 .RB [ \-ae ]
12 .RI [ hostname ]
13 .PP
14 .B arp
15 .RB [ \-v ]
16 .RB [ \-i
17 .IR if ]
18 .B \-d
19 .I hostname
20 .RB [ pub ]
21 .PP
22 .B arp
23 .RB [ \-v ]
24 .RB [ \-H
25 .IR type ]
26 .RB [ \-i
27 .IR if ]
28 .B \-s
29 .I hostname hw_addr
30 .RB [ temp ]
31 .PP
32 .B arp
33 .RB [ \-v ]
34 .RB [ \-H
35 .IR type ]
36 .RB [ \-i
37 .IR if ]
38 .B \-s
39 .I hostname hw_addr
40 .RB [ netmask
41 .IR nm ]
42 .B pub
43 .PP
44 .B arp
45 .RB [ \-v ]
46 .RB [ \-H
47 .IR type ]
48 .RB [ \-i
49 .IR if ]
50 .B \-Ds
51 .I hostname
52 .I ifname
53 .RB [ netmask
54 .IR nm ]
55 .B pub
56 .PP
57 .B arp
58 .RB [ \-vnD ]
59 .RB [ \-H
60 .IR type ]
61 .RB [ \-i
62 .IR if ]
63 .B \-f
64 .RI [ filename ]
65
66 .SH NOTE
67 .P
68 This program is obsolete. For replacement check \fBip neigh\fR.
69
70 .SH DESCRIPTION
71 .B Arp
72 manipulates or displays the kernel's IPv4 network neighbour cache. It can add
73 entries to the table, delete one or display the current content.
74
75 .B ARP
76 stands for Address Resolution Protocol, which is used to find the media
77 access control address of a network neighbour for a given IPv4 Address.
78 .SH MODES
79 .B arp
80 with no mode specifier will print the current content of the table. It is
81 possible to limit the number of entries printed, by specifying an hardware
82 address type, interface name or host address.
83
84 .B arp -d
85 .I address
86 will delete a ARP table entry. Root or netadmin privilege is required to do
87 this. The entry is found by IP address. If a hostname is given, it will be
88 resolved before looking up the entry in the ARP table.
89
90 .B arp -s
91 .I address hw_addr
92 is used to set up a new table entry. The format of the
93 .I hw_addr
94 parameter is dependent on the hardware class, but for most classes one can
95 assume that the usual presentation can be used. For the Ethernet class,
96 this is 6 bytes in hexadecimal, separated by colons. When adding proxy arp
97 entries (that is those with the
98 .BR pub lish
99 flag set) a
100 .B netmask
101 may be specified to proxy arp for entire subnets. This is not good
102 practice, but is supported by older kernels because it can be
103 useful. If the
104 .B temp
105 flag is not supplied entries will be permanent stored into the ARP
106 cache. To simplify setting up entries for one of your own network interfaces, you can use the
107 .B "arp \-Ds"
108 .I address ifname
109 form. In that case the hardware address is taken from the interface with the
110 specified name.
111
112 .br
113 .SH OPTIONS
114 .TP
115 .B "\-v, \-\-verbose"
116 Tell the user what is going on by being verbose.
117 .TP
118 .B "\-n, \-\-numeric"
119 shows numerical addresses instead of trying to determine symbolic host, port
120 or user names.
121 .TP
122 \fB\-H\fI type\fR, \fB\-\-hw\-type\fI type\fR, \fB\-t\fI type\fR
123 When setting or reading the ARP cache, this optional parameter tells
124 .B arp
125 which class of entries it should check for. The default value of
126 this parameter is
127 .B ether
128 (i.e. hardware code 0x01 for IEEE 802.3 10Mbps Ethernet).
129 Other values might include network technologies such as
130 .RB "ARCnet (" arcnet ")"
131 ,
132 .RB "PROnet (" pronet ")"
133 ,
134 .RB "AX.25 (" ax25 ")"
135 and
136 .RB "NET/ROM (" netrom ")."
137 .TP
138 .B \-a
139 Use alternate BSD style output format (with no fixed columns).
140 .TP
141 .B \-e
142 Use default Linux style output format (with fixed columns).
143 .TP
144 .B "\-D, \-\-use-device"
145 Instead of a hw_addr, the given argument is the name of an interface.
146 .B arp
147 will use the MAC address of that interface for the table entry. This is usually the best option to set up a proxy ARP entry to yourself.
148 .TP
149 \fB\-i\fI If\fR, \fB\-\-device\fI If\fR
150 Select an interface. When dumping the ARP cache only entries matching
151 the specified interface will be printed. When setting a permanent or
152 .B temp
153 ARP entry this interface will be associated with the entry; if this
154 option is not used, the kernel will guess based on the routing
155 table. For
156 .B pub
157 entries the specified interface is the interface on which ARP requests will
158 be answered.
159 .br
160 .B NOTE:
161 This has to be different from the interface to which the IP
162 datagrams will be routed.
163 .B NOTE:
164 As of kernel 2.2.0 it is no longer possible to set an ARP entry for an
165 entire subnet. Linux instead does automagic proxy arp when a route
166 exists and it is forwarding. See
167 .BR arp (7)
168 for details. Also the
169 .B dontpub
170 option which is available for delete and set operations cannot be
171 used with 2.4 and newer kernels.
172 .TP
173 \fB\-f\fI filename\fR, \fB\-\-file\fI filename\fR
174 Similar to the
175 .B \-s
176 option, only this time the address info is taken from file
177 .IR filename .
178 This can be used if ARP entries for a lot of hosts have to be
179 set up. The name of the data file is very often
180 .IR /etc/ethers ,
181 but this is not official. If no filename is specified
182 .I /etc/ethers
183 is used as default.
184 .sp 1
185 The format of the file is simple; it
186 only contains ASCII text lines with a hostname, and a hardware
187 address separated by whitespace. Additionally the
188 .BR "pub" , " temp" " and" " netmask"
189 flags can be used.
190 .LP
191 In all places where a
192 .B hostname
193 is expected, one can also enter an
194 .B "IP address"
195 in dotted-decimal notation.
196 .P
197 As a special case for compatibility the order of the hostname and
198 the hardware address can be exchanged.
199 .LP
200 Each complete entry in the ARP cache will be marked with the
201 .B C
202 flag. Permanent entries are marked with
203 .B M
204 and published entries have the
205 .B P
206 flag.
207 .SH EXAMPLES
208 .B /usr/sbin/arp -i eth0 -Ds 10.0.0.2 eth1 pub
209
210 This will answer ARP requests for 10.0.0.2 on eth0 with the MAC address for
211 eth1.
212
213 .B /usr/sbin/arp -i eth1 -d 10.0.0.1
214
215 Delete the ARP table entry for 10.0.0.1 on interface eth1. This will match
216 published proxy ARP entries and permanent entries.
217 .SH FILES
218 .I /proc/net/arp
219 .br
220 .I /etc/networks
221 .br
222 .I /etc/hosts
223 .br
224 .I /etc/ethers
225 .SH SEE ALSO
226 .BR ip(8)
227 .SH AUTHORS
228 Fred N. van Kempen <[email protected]>, Bernd Eckenfels <net\[email protected]>.