Debian Codegraph @

upstream/opensuse-tumbleweed/man8/arp.8

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