1ARP(8) Linux System Administrator's Manual ARP(8)
2
3
4
6 arp - manipulate the system ARP cache
7
9 arp [-vn] [-H type] [-i if] [-ae] [hostname]
10
11 arp [-v] [-i if] -d hostname [pub]
12
13 arp [-v] [-H type] [-i if] -s hostname hw_addr [temp]
14
15 arp [-v] [-H type] [-i if] -s hostname hw_addr [netmask nm] pub
16
17 arp [-v] [-H type] [-i if] -Ds hostname ifname [netmask nm] pub
18
19 arp [-vnD] [-H type] [-i if] -f [filename]
20
21
23 This program is obsolete. For replacement check ip neigh.
24
25
27 Arp manipulates or displays the kernel's IPv4 network neighbour cache.
28 It can add entries to the table, delete one or display the current con‐
29 tent.
30
31 ARP stands for Address Resolution Protocol, which is used to find the
32 media access control address of a network neighbour for a given IPv4
33 Address.
34
36 arp with no mode specifier will print the current content of the table.
37 It is possible to limit the number of entries printed, by specifying an
38 hardware address type, interface name or host address.
39
40 arp -d address will delete a ARP table entry. Root or netadmin privi‐
41 lege is required to do this. The entry is found by IP address. If a
42 hostname is given, it will be resolved before looking up the entry in
43 the ARP table.
44
45 arp -s address hw_addr is used to set up a new table entry. The format
46 of the hw_addr parameter is dependent on the hardware class, but for
47 most classes one can assume that the usual presentation can be used.
48 For the Ethernet class, this is 6 bytes in hexadecimal, separated by
49 colons. When adding proxy arp entries (that is those with the publish
50 flag set) a netmask may be specified to proxy arp for entire subnets.
51 This is not good practice, but is supported by older kernels because it
52 can be useful. If the temp flag is not supplied entries will be perma‐
53 nent stored into the ARP cache. To simplify setting up entries for one
54 of your own network interfaces, you can use the arp -Ds address ifname
55 form. In that case the hardware address is taken from the interface
56 with the specified name.
57
58
60 -v, --verbose
61 Tell the user what is going on by being verbose.
62
63 -n, --numeric
64 shows numerical addresses instead of trying to determine sym‐
65 bolic host, port or user names.
66
67 -H type, --hw-type type, -t type
68 When setting or reading the ARP cache, this optional parameter
69 tells arp which class of entries it should check for. The
70 default value of this parameter is ether (i.e. hardware code
71 0x01 for IEEE 802.3 10Mbps Ethernet). Other values might
72 include network technologies such as ARCnet (arcnet) , PROnet
73 (pronet) , AX.25 (ax25) and NET/ROM (netrom).
74
75 -a Use alternate BSD style output format (with no fixed columns).
76
77 -e Use default Linux style output format (with fixed columns).
78
79 -D, --use-device
80 Instead of a hw_addr, the given argument is the name of an
81 interface. arp will use the MAC address of that interface for
82 the table entry. This is usually the best option to set up a
83 proxy ARP entry to yourself.
84
85 -i If, --device If
86 Select an interface. When dumping the ARP cache only entries
87 matching the specified interface will be printed. When setting a
88 permanent or temp ARP entry this interface will be associated
89 with the entry; if this option is not used, the kernel will
90 guess based on the routing table. For pub entries the specified
91 interface is the interface on which ARP requests will be
92 answered.
93 NOTE: This has to be different from the interface to which the
94 IP datagrams will be routed. NOTE: As of kernel 2.2.0 it is no
95 longer possible to set an ARP entry for an entire subnet. Linux
96 instead does automagic proxy arp when a route exists and it is
97 forwarding. See arp(7) for details. Also the dontpub option
98 which is available for delete and set operations cannot be used
99 with 2.4 and newer kernels.
100
101 -f filename, --file filename
102 Similar to the -s option, only this time the address info is
103 taken from file filename. This can be used if ARP entries for a
104 lot of hosts have to be set up. The name of the data file is
105 very often /etc/ethers, but this is not official. If no filename
106 is specified /etc/ethers is used as default.
107
108 The format of the file is simple; it only contains ASCII text
109 lines with a hostname, and a hardware address separated by
110 whitespace. Additionally the pub, temp and netmask flags can be
111 used.
112
113 In all places where a hostname is expected, one can also enter an IP
114 address in dotted-decimal notation.
115
116 As a special case for compatibility the order of the hostname and the
117 hardware address can be exchanged.
118
119 Each complete entry in the ARP cache will be marked with the C flag.
120 Permanent entries are marked with M and published entries have the P
121 flag.
122
124 /usr/sbin/arp -i eth0 -Ds 10.0.0.2 eth1 pub
125
126 This will answer ARP requests for 10.0.0.2 on eth0 with the MAC address
127 for eth1.
128
129 /usr/sbin/arp -i eth1 -d 10.0.0.1
130
131 Delete the ARP table entry for 10.0.0.1 on interface eth1. This will
132 match published proxy ARP entries and permanent entries.
133
135 /proc/net/arp
136 /etc/networks
137 /etc/hosts
138 /etc/ethers
139
141 ip(8)
142
144 Fred N. van Kempen <waltje@uwalt.nl.mugnet.org>, Bernd Eckenfels
145 <net-tools@lina.inka.de>.
146
147
148
149net-tools 2008-10-03 ARP(8)