Arp command, Linux
From RZWiki
A CLI command available on most Linux platforms; used to create, modify, display or delete ARP table entries on the device.
Contents |
Usage Syntax
arp [options]
Common options (which can be combined) include;
- -h - display help text
- -e - display all ARP table entries (-a does the same thing but in BSD style)
- -n - do not resolve IP addresses to host names (in other words display IP addresses, not host names)
- -i interface - display ARP table entries for the network interface specified (such as eth0 or vlan101)
- ip-address - display the ARP table entry for the specified IP address
- hostname - display the ARP table entry for the specified hostname
- -d [ip-address | hostname] - delete a specific ARP table entry
- -s ([ip-address | hostname] mac-address) - create a static ARP table entry, associating the specified IP address with the specified MAC address (and optionally an interface)
- -H [hw-type] - specify a entry hardware type, the default is ether (Ethernet)
Usage Examples
arp -e - Display all ARP table entries (for all interfaces)
arp -en - Display all ARP table entries (for all interfaces) but do not resolve IP addresses to host names
arp -d 1.1.1.1 - Delete the ARP table entry for host 1.1.1.1
arp -i eth0 -s 1.1.1.1 A123.ABCF.321A - Create a static ARP table entry associating IP address 1.1.1.1 with MAC address A123.ABCF.321A available through the eth0 interface
Linux Usage Notes
With most Linux or Unix commands;
- Non root users may need to prefix commands with the sudo command, for example: sudo chmod 644 *
- Brief help can be displayed using the -h or --help parameter, for example: chmod --help
- A full command manual can be displayed using the man command followed by the command name, for example: man chmod
- Sometimes 'info' pages are used instead of or to provide more information than man pages; for example: info chmod
- Version information can normally be display using the -v, -V or --version parameter, for example: chmod --version. However, this paramater is also frequently used to display verbose output.
noinclude/noinclude
You can also add static ARP entries, to be loaded by the system at startup, to the /etc/ethers file
Static ARP entries persist with system reboots.
Requires Confirmation
You cannot delete all ARP entries at once.
Typical Output
noinclude/noinclude
[host-one] ~ # arp -e font color=blueAddress HWtype HWaddress Flags Mask Iface 1.1.1.10 ether 00:00:0C:07:AC:44 C eth0 1.1.1.20 (incomplete) vlan802/font
Related Files
The arp executable is normally found here: /usr/sbin/arp
Related Commands
The ifconfig command displays the MAC address(es) of network interfaces installed in the system
The Windows getmac command displays the MAC address(es) of network interfaces installed in the system
Command Equivalents
The Windows command equivalent has the same name: arp command, Windows
The Cisco command equivalents are the show arp command and arp command, Cisco
The Extreme command equivalents are the show iparp command and configure iparp command
Related Articles
Information on other Linux commands
Information on F5 BigIP commands
Information on Cisco commands
Information on Cisco ADE commands
Information on Vyatta commands
Information on Extreme commands
Information on Nortel commands
Information on Zebra commands
Information on Windows commands
Information on Secure Platform commands
Information on Blue Coat SGOS commands
Information on Nokia IPSO commands
(replacing the # with an @) |






