Linux Command Directory
This directory of Linux commands is from Linux in a Nutshell, 5th Edition.
Click on any of the 687 commands below to get a description and list of available options. All links in the command summaries point to the online version of the book on Safari Bookshelf.
TCP/IP command. Clear, add to, or dump the kernel's Address Resolution Protocol (ARP) cache (/proc/net/arp). ARP is used to translate protocol addresses to hardware interface addresses. Modifying your ARP cache can change which interfaces handle specific requests. ARP cache entries may be marked with the following flags: C (complete), M (permanent), and P (publish). While arp can create a proxy for a single system, subnet proxies are now handled by the arp kernel module, arp(7). See the "Linux 2.4 or later Advanced Routing HOWTO" for details.
host option arguments may be given as either a hostname or an IP address. With the -D option, they may also be given as a hardware interface address (e.g., eth0, eth1).
Display entries for hosts or, if none are specified, all entries.
Remove the specified host's entry. To delete a proxy entry, add the pub argument and specify the interface associated with the proxy using -i.
Use the hardware address associated with the specified interface. This may be used with -s when creating a proxy entry.
Read entries from file and add them.
Search for type entries when examining the ARP cache. type is usually ether (Ethernet), which is the default, but may be ax25 (AX.25 packet radio), arcnet (ARCnet), pronet (PROnet), or netrom (NET/ROM).
Select an interface. If you are dumping the ARP cache, this option will cause the command to display only the entries using that interface. When setting entries, this will cause the interface to be associated with that entry. If you do not use this option when setting an entry, the kernel will guess.
Display host IP addresses instead of their domain names.
Add a permanent entry for host at hardware-address. A hardware-address for type ether hardware is 6 hexadecimal bytes, colon-separated. The pub argument can be used to set the publish flag, creating a proxy entry.
Display entry for host eris:
arp -a eris
Set a permanent cache entry for host illuminati, whose hardware address you know:
arp -s illuminati 00:05:23:73:e6:cf
Set an ARP proxy for host fnord using the eth0 interface's hardware address:
arp -Ds fnord eth0 pub
Remove the fnord ARP proxy:
arp -i eth0 -d fnord pub