Arp command, Linux
From NetworkCommands
A command line program 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;
- Brief help can be displayed using the option/keyword: -h or --help, 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 be display using the option/keyword: -v or --version, for example: chmod --version
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
[host-one] ~ # arp -e Address HWtype HWaddress Flags Mask Iface 1.1.1.10 ether 00:00:0C:07:AC:44 C eth0 1.1.1.20 (incomplete) vlan802
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
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
The Windows getmac command displays the MAC address(es) of network interfaces installed in the system







