Log in Go to the main page Page Discussion History Go to the file list Go to the site toolbox

Arp command, Linux

From NetworkCommands


Image:Tux_64x64.png

A command line program available on most Linux platforms; used to create, modify, display or delete ARP table entries on the device.

Contents

Image:Vm-power-on-medium.png 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)

Image:Vm-power-on-medium.png 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

Image:accessories-text-editor-v2-medium.png 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. Image:Help-browser-small.png Requires Confirmation


You cannot delete all ARP entries at once.

Image:utilities-terminal-medium.png 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

Image:Folder-medium.png Related Files

The arp executable is normally found here: /usr/sbin/arp

Image:icemon-medium.png Related Commands

The ifconfig command displays the MAC address(es) of network interfaces installed in the system

Image:object-flip-horizontal-medium.png 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

Image:icemon-medium.png Related Articles

The Windows getmac command displays the MAC address(es) of network interfaces installed in the system


Site Toolbox:

Personal tools
This page was last modified on 27 October 2008, at 20:57. - This page has been accessed 63 times. - Disclaimers - About NetworkCommands
Powered by MediaWiki