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

Arp command, Linux

From RZWiki


Image:linux-logo-large.png

A CLI command 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;

  • 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. Image:Help-browser-small.png Requires Confirmation


You cannot delete all ARP entries at once.

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

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

The Windows getmac 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

Information on other Linux commands Image:linux-logo-small.png

Information on F5 BigIP commands Image:F5-logo-small.png

Information on Cisco commands Image:Cisco-logo-small.png

Information on Cisco ADE commands Image:Cisco-logo-small.png

Information on Vyatta commands Image:Vyatta-logo-small.png

Information on Extreme commands Image:Extreme-logo-small.png

Information on Nortel commands Image:Nortel-logo-small.png

Information on Zebra commands

Information on Windows commands Image:Preferences-system-windows-small.png

Information on Secure Platform commands

Information on Blue Coat SGOS commands

Information on Nokia IPSO commands


Image:internet-group-chat-small.png We really do appreciate all feedback so please do send your comments, suggestions or corrections to sjiveson#routerzone.eu
(replacing the # with an @)


Site Toolbox:

Personal tools
This page was last modified on 23 December 2009, at 11:29. - This page has been accessed 128 times. - Disclaimers - About RZWiki
Powered by MediaWiki