{"id":3716,"date":"2022-12-20T17:19:51","date_gmt":"2022-12-20T20:19:51","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/arp-man8\/"},"modified":"2022-12-20T17:19:51","modified_gmt":"2022-12-20T20:19:51","slug":"arp-man8","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/arp-man8\/","title":{"rendered":"ARP (man8)"},"content":{"rendered":"<h1 align=\"center\">ARP<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#NOTE\">NOTE<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#MODES\">MODES<\/a><br \/> <a href=\"#OPTIONS\">OPTIONS<\/a><br \/> <a href=\"#EXAMPLES\">EXAMPLES<\/a><br \/> <a href=\"#FILES\">FILES<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a><br \/> <a href=\"#AUTHORS\">AUTHORS<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">arp \u2212 manipulate the system ARP cache<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>arp<\/b> [<b>\u2212vn<\/b>] [<b>\u2212H<\/b> <i>type<\/i>] [<b>\u2212i<\/b> <i>if<\/i>] [<b>\u2212ae<\/b>] [<i>hostname<\/i>]<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>arp<\/b> [<b>\u2212v<\/b>] [<b>\u2212i<\/b> <i>if<\/i>] <b>\u2212d<\/b> <i>hostname<\/i> [<b>pub<\/b>]<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>arp<\/b> [<b>\u2212v<\/b>] [<b>\u2212H<\/b> <i>type<\/i>] [<b>\u2212i<\/b> <i>if<\/i>] <b>\u2212s<\/b> <i>hostname hw_addr<\/i> [<b>temp<\/b>]<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>arp<\/b> [<b>\u2212v<\/b>] [<b>\u2212H<\/b> <i>type<\/i>] [<b>\u2212i<\/b> <i>if<\/i>] <b>\u2212s<\/b> <i>hostname hw_addr<\/i> [<b>netmask<\/b> <i>nm<\/i>] <b>pub<\/b><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>arp<\/b> [<b>\u2212v<\/b>] [<b>\u2212H<\/b> <i>type<\/i>] [<b>\u2212i<\/b> <i>if<\/i>] <b>\u2212Ds<\/b> <i>hostname ifname<\/i> [<b>netmask<\/b> <i>nm<\/i>] <b>pub<\/b><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>arp<\/b> [<b>\u2212vnD<\/b>] [<b>\u2212H<\/b> <i>type<\/i>] [<b>\u2212i<\/b> <i>if<\/i>] <b>\u2212f<\/b> [<i>filename<\/i>]<\/p>\n<h2>NOTE <a name=\"NOTE\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">This program is obsolete. For replacement check <b>ip neigh<\/b>.<\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Arp<\/b> manipulates or displays the kernel\u2019s IPv4 network neighbour cache. It can add entries to the table, delete one or display the current content.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>ARP<\/b> stands for Address Resolution Protocol, which is used to find the media access control address of a network neighbour for a given IPv4 Address.<\/p>\n<h2>MODES <a name=\"MODES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>arp<\/b> with no mode specifier will print the current content of the table. It is possible to limit the number of entries printed, by specifying an hardware address type, interface name or host address.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>arp -d<\/b> <i>address<\/i> will delete a ARP table entry. Root or netadmin privilege is required to do this. The entry is found by IP address. If a hostname is given, it will be resolved before looking up the entry in the ARP table.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>arp -s<\/b> <i>address hw_addr<\/i> is used to set up a new table entry. The format of the <i>hw_addr<\/i> parameter is dependent on the hardware class, but for most classes one can assume that the usual presentation can be used. For the Ethernet class, this is 6 bytes in hexadecimal, separated by colons. When adding proxy arp entries (that is those with the <b>pub<\/b>lish flag set) a <b>netmask<\/b> may be specified to proxy arp for entire subnets. This is not good practice, but is supported by older kernels because it can be useful. If the <b>temp<\/b> flag is not supplied entries will be permanent stored into the ARP cache. To simplify setting up entries for one of your own network interfaces, you can use the <b>arp \u2212Ds<\/b> <i>address ifname<\/i> form. In that case the hardware address is taken from the interface with the specified name.<\/p>\n<h2>OPTIONS <a name=\"OPTIONS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>\u2212v, \u2212\u2212verbose<\/b><\/p>\n<p style=\"margin-left:22%;\">Tell the user what is going on by being verbose.<\/p>\n<p style=\"margin-left:11%;\"><b>\u2212n, \u2212\u2212numeric<\/b><\/p>\n<p style=\"margin-left:22%;\">shows numerical addresses instead of trying to determine symbolic host, port or user names.<\/p>\n<p style=\"margin-left:11%;\"><b>\u2212H<\/b> <i>type<\/i>, <b>\u2212\u2212hw\u2212type<\/b> <i>type<\/i>, <b>\u2212t<\/b> <i>type<\/i><\/p>\n<p style=\"margin-left:22%;\">When setting or reading the ARP cache, this optional parameter tells <b>arp<\/b> which class of entries it should check for. The default value of this parameter is <b>ether<\/b> (i.e. hardware code 0x01 for IEEE 802.3 10Mbps Ethernet). Other values might include network technologies such as ARCnet (<b>arcnet<\/b>) , PROnet (<b>pronet<\/b>) , AX.25 (<b>ax25<\/b>) and NET\/ROM (<b>netrom<\/b>).<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"3%\">\n<p><b>\u2212a<\/b><\/p>\n<\/td>\n<td width=\"8%\"><\/td>\n<td width=\"78%\">\n<p>Use alternate BSD style output format (with no fixed columns).<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"3%\">\n<p><b>\u2212e<\/b><\/p>\n<\/td>\n<td width=\"8%\"><\/td>\n<td width=\"78%\">\n<p>Use default Linux style output format (with fixed columns).<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:11%;\"><b>\u2212D, \u2212\u2212use-device<\/b><\/p>\n<p style=\"margin-left:22%;\">Instead of a hw_addr, the given argument is the name of an interface. <b>arp<\/b> 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.<\/p>\n<p style=\"margin-left:11%;\"><b>\u2212i<\/b> <i>If<\/i>, <b>\u2212\u2212device<\/b> <i>If<\/i><\/p>\n<p style=\"margin-left:22%;\">Select an interface. When dumping the ARP cache only entries matching the specified interface will be printed. When setting a permanent or <b>temp<\/b> ARP entry this interface will be associated with the entry; if this option is not used, the kernel will guess based on the routing table. For <b>pub<\/b> entries the specified interface is the interface on which ARP requests will be answered. <b><br \/> NOTE:<\/b> This has to be different from the interface to which the IP datagrams will be routed. <b>NOTE:<\/b> As of kernel 2.2.0 it is no longer possible to set an ARP entry for an entire subnet. Linux instead does automagic proxy arp when a route exists and it is forwarding. See <b>arp<\/b>(7) for details. Also the <b>dontpub<\/b> option which is available for delete and set operations cannot be used with 2.4 and newer kernels.<\/p>\n<p style=\"margin-left:11%;\"><b>\u2212f<\/b> <i>filename<\/i>, <b>\u2212\u2212file<\/b> <i>filename<\/i><\/p>\n<p style=\"margin-left:22%;\">Similar to the <b>\u2212s<\/b> option, only this time the address info is taken from file <i>filename<\/i>. This can be used if ARP entries for a lot of hosts have to be set up. The name of the data file is very often <i>\/etc\/ethers<\/i>, but this is not official. If no filename is specified <i>\/etc\/ethers<\/i> is used as default.<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">The format of the file is simple; it only contains ASCII text lines with a hostname, and a hardware address separated by whitespace. Additionally the <b>pub<\/b>, <b>temp<\/b> and <b>netmask<\/b> flags can be used.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">In all places where a <b>hostname<\/b> is expected, one can also enter an <b>IP address<\/b> in dotted-decimal notation.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">As a special case for compatibility the order of the hostname and the hardware address can be exchanged.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Each complete entry in the ARP cache will be marked with the <b>C<\/b> flag. Permanent entries are marked with <b>M<\/b> and published entries have the <b>P<\/b> flag.<\/p>\n<h2>EXAMPLES <a name=\"EXAMPLES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>\/usr\/sbin\/arp -i eth0 -Ds 10.0.0.2 eth1 pub<\/b><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">This will answer ARP requests for 10.0.0.2 on eth0 with the MAC address for eth1.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>\/usr\/sbin\/arp -i eth1 -d 10.0.0.1<\/b><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Delete the ARP table entry for 10.0.0.1 on interface eth1. This will match published proxy ARP entries and permanent entries.<\/p>\n<h2>FILES <a name=\"FILES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>\/proc\/net\/arp <br \/> \/etc\/networks <br \/> \/etc\/hosts <br \/> \/etc\/ethers<\/i><\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><i><b>ip(8)<\/b><\/i><\/p>\n<h2>AUTHORS <a name=\"AUTHORS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Fred N. van Kempen <waltje@uwalt.nl.mugnet.org>, Bernd Eckenfels <net\u2212tools@lina.inka.de>.<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  arp \u2212 manipulate the system ARP cache <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[5,52,825,4],"class_list":["post-3716","post","type-post","status-publish","format-standard","hentry","category-8-administracion-del-sistema","tag-5","tag-administracion","tag-arp","tag-man8"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/3716","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=3716"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/3716\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=3716"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=3716"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=3716"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}