{"id":275,"date":"2019-10-21T19:29:05","date_gmt":"2019-10-21T17:29:05","guid":{"rendered":"http:\/\/linuxboxen2.dk\/?p=275"},"modified":"2019-10-21T19:29:05","modified_gmt":"2019-10-21T17:29:05","slug":"275-2","status":"publish","type":"post","link":"https:\/\/www.linuxboxen.dk\/?p=275","title":{"rendered":"ARP"},"content":{"rendered":"<p>ARP(8)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Linux System Administrator&#8217;s Manual\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 ARP(8)<\/p>\n<p>NAME<\/p>\n<p>arp &#8211; manipulate the system ARP cache<\/p>\n<p>SYNOPSIS<\/p>\n<p>arp [-vn] [-H type] [-i if] [-ae] [hostname]<\/p>\n<p>arp [-v] [-i if] -d hostname [pub]<\/p>\n<p>arp [-v] [-H type] [-i if] -s hostname hw_addr [temp]<\/p>\n<p>arp [-v] [-H type] [-i if] -s hostname hw_addr [netmask nm] pub<\/p>\n<p>arp [-v] [-H type] [-i if] -Ds hostname ifname [netmask nm] pub<\/p>\n<p>arp [-vnD] [-H type] [-i if] -f [filename]<\/p>\n<p>DESCRIPTION<\/p>\n<p>Arp manipulates or displays the kernel&#8217;s IPv4 network neighbour<br \/>\ncache. It can add entries to the table, delete one or display the<br \/>\ncurrent content.<\/p>\n<p>ARP stands for Address Resolution Protocol, which is used to find the<br \/>\nmedia access control address of a network neighbour for a given IPv4<br \/>\nAddress.<\/p>\n<p>MODES<\/p>\n<p>arp with no mode specifier will print the current content of the<br \/>\ntable. It is possible to limit the number of entries printed, by<br \/>\nspecifying an hardware address type, interface name or host address.<\/p>\n<p>arp -d address will delete a ARP table entry. Root or netadmin<br \/>\nprivilege is required to do this. The entry is found by IP address.<br \/>\nIf a hostname is given, it will be resolved before looking up the<br \/>\nentry in the ARP table.<\/p>\n<p>arp -s address hw_addr is used to set up a new table entry. The<br \/>\nformat of the hw_addr parameter is dependent on the hardware class,<br \/>\nbut for most classes one can assume that the usual presentation can<br \/>\nbe used.\u00a0 For the Ethernet class, this is 6 bytes in hexadecimal,<br \/>\nseparated by colons. When adding proxy arp entries (that is those<br \/>\nwith the publish flag set) a netmask may be specified to proxy arp<br \/>\nfor entire subnets. This is not good practice, but is supported by<br \/>\nolder kernels because it can be useful. If the temp flag is not<br \/>\nsupplied entries will be permanent stored into the ARP cache. To<br \/>\nsimplify setting up entries for one of your own network interfaces,<br \/>\nyou can use the arp -Ds address ifname form. In that case the<br \/>\nhardware address is taken from the interface with the specified name.<\/p>\n<p>OPTIONS<\/p>\n<p>-v, &#8211;verbose<br \/>\nTell the user what is going on by being verbose.<\/p>\n<p>-n, &#8211;numeric<br \/>\nshows numerical addresses instead of trying to determine<br \/>\nsymbolic host, port or user names.<\/p>\n<p>-H type, &#8211;hw-type type, -t type<br \/>\nWhen setting or reading the ARP cache, this optional parameter<br \/>\ntells arp which class of entries it should check for.\u00a0 The<br \/>\ndefault value of this parameter is ether (i.e. hardware code<br \/>\n0x01 for IEEE 802.3 10Mbps Ethernet).\u00a0 Other values might<br \/>\ninclude network technologies such as ARCnet (arcnet) , PROnet<br \/>\n(pronet) , AX.25 (ax25) and NET\/ROM (netrom).<\/p>\n<p>-a\u00a0\u00a0\u00a0\u00a0 Use alternate BSD style output format (with no fixed columns).<\/p>\n<p>-e\u00a0\u00a0\u00a0\u00a0 Use default Linux style output format (with fixed columns).<\/p>\n<p>-D, &#8211;use-device<br \/>\nInstead of a hw_addr, the given argument is the name of an<br \/>\ninterface.\u00a0 arp will use the MAC address of that interface for<br \/>\nthe table entry. This is usually the best option to set up a<br \/>\nproxy ARP entry to yourself.<\/p>\n<p>-i If, &#8211;device If<br \/>\nSelect an interface. When dumping the ARP cache only entries<br \/>\nmatching the specified interface will be printed. When setting<br \/>\na permanent or temp ARP entry this interface will be<br \/>\nassociated with the entry; if this option is not used, the<br \/>\nkernel will guess based on the routing table. For pub entries<br \/>\nthe specified interface is the interface on which ARP requests<br \/>\nwill be answered.<br \/>\nNOTE: This has to be different from the interface to which the<br \/>\nIP datagrams will be routed.\u00a0 NOTE: As of kernel 2.2.0 it is<br \/>\nno longer possible to set an ARP entry for an entire subnet.<br \/>\nLinux instead does automagic proxy arp when a route exists and<br \/>\nit is forwarding. See arp(7) for details. Also the dontpub<br \/>\noption which is available for delete and set operations cannot<br \/>\nbe used with 2.4 and newer kernels.<\/p>\n<p>-f filename, &#8211;file filename<br \/>\nSimilar to the -s option, only this time the address info is<br \/>\ntaken from file filename.\u00a0 This can be used if ARP entries for<br \/>\na lot of hosts have to be set up.\u00a0 The name of the data file<br \/>\nis very often \/etc\/ethers, but this is not official. If no<br \/>\nfilename is specified \/etc\/ethers is used as default.<\/p>\n<p>The format of the file is simple; it only contains ASCII text<br \/>\nlines with a hostname, and a hardware address separated by<br \/>\nwhitespace. Additionally the pub, temp and netmask flags can<br \/>\nbe used.<\/p>\n<p>In all places where a hostname is expected, one can also enter an IP<br \/>\naddress in dotted-decimal notation.<\/p>\n<p>As a special case for compatibility the order of the hostname and the<br \/>\nhardware address can be exchanged.<\/p>\n<p>Each complete entry in the ARP cache will be marked with the C flag.<br \/>\nPermanent entries are marked with M and published entries have the P<br \/>\nflag.<\/p>\n<p>EXAMPLES<\/p>\n<p>\/usr\/sbin\/arp -i eth0 -Ds 10.0.0.2 eth1 pub<\/p>\n<p>This will answer ARP requests for 10.0.0.2 on eth0 with the MAC<br \/>\naddress for eth1.<\/p>\n<p>\/usr\/sbin\/arp -i eth1 -d 10.0.0.1<\/p>\n<p>Delete the ARP table entry for 10.0.0.1 on interface eth1. This will<br \/>\nmatch published proxy ARP entries and permanent entries.<\/p>\n<p>FILES<\/p>\n<p>\/proc\/net\/arp<br \/>\n\/etc\/networks<br \/>\n\/etc\/hosts<br \/>\n\/etc\/ethers<\/p>\n<p>SEE ALSO<\/p>\n<p>rarp(8), route(8), ifconfig(8), netstat(8)<\/p>\n<p>AUTHORS<\/p>\n<p>Fred N. van Kempen &lt;waltje@uwalt.nl.mugnet.org&gt;, Bernd Eckenfels<br \/>\n&lt;net-tools@lina.inka.de&gt;.<\/p>\n<p>COLOPHON<\/p>\n<p>This page is part of the net-tools (networking utilities) project.<br \/>\nInformation about the project can be found at<br \/>\n\u27e8http:\/\/net-tools.sourceforge.net\/\u27e9.\u00a0 If you have a bug report for<br \/>\nthis manual page, see \u27e8http:\/\/net-tools.sourceforge.net\/\u27e9.\u00a0 This page<br \/>\nwas obtained from the project&#8217;s upstream Git repository<br \/>\n(git:\/\/git.code.sf.net\/p\/net-tools\/code) on 2014-12-30.\u00a0 If you dis\u2010<br \/>\ncover any rendering problems in this HTML version of the page, or you<br \/>\nbelieve there is a better or more up-to-date source for the page, or<br \/>\nyou have corrections or improvements to the information in this<br \/>\nCOLOPHON (which is not part of the original manual page), send a mail<br \/>\nto\u00a0man-pages@man7.org<\/p>\n<p>net-tools\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 2008-10-03\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 ARP(8)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>ARP(8)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Linux System Administrator&#8217;s Manual\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 ARP(8) NAME arp &#8211; manipulate the system ARP cache SYNOPSIS arp [-vn] [-H type] [-i if] [-ae] [hostname] arp [-v] [-i if] -d hostname [pub] arp [-v] [-H type] [-i if] -s hostname hw_addr [temp] arp [-v] [-H type] [-i if] -s hostname hw_addr [netmask nm] pub arp [-v] [-H [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_sitemap_exclude":false,"_sitemap_priority":"","_sitemap_frequency":"","footnotes":""},"categories":[8],"tags":[],"class_list":["post-275","post","type-post","status-publish","format-standard","hentry","category-shell"],"a3_pvc":{"activated":false,"total_views":0,"today_views":0},"_links":{"self":[{"href":"https:\/\/www.linuxboxen.dk\/index.php?rest_route=\/wp\/v2\/posts\/275","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.linuxboxen.dk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxboxen.dk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxboxen.dk\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxboxen.dk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=275"}],"version-history":[{"count":0,"href":"https:\/\/www.linuxboxen.dk\/index.php?rest_route=\/wp\/v2\/posts\/275\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.linuxboxen.dk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=275"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxboxen.dk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=275"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxboxen.dk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=275"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}