arp(8) — Maintenance
NAME
arp − Displays and controls Address Resolution Protocol (ARP) tables
SYNOPSIS
/usr/sbin/arp [−u] [−n] hostname
arp [−a] [−u] [−n] [−i] system
arp [−D] hostname
arp [−d] hostname
arp [−E] hostname
arp [−f] filename
arp [−g] hostname
arp [−s] [−u] [hostname] [hardware_addr] [temp] [pub] [trail]
OPTIONS
−aDisplays all of the current ARP entries.
−D hostname
Disables ARP for hostname. The hostname can be a local host name, alias, or IP address. If you use this option, the system will no longer respond to ARP requests for this IP address. This might cause network connectivity problems with remote systems. Use of this option requires superuser privilege.
−d hostname
Deletes the entry for hostname if the user issuing the command has superuser authority.
−E hostname
Enables ARP for hostname. The hostname can be a local host name, alias, or IP address. By default, the system responds to ARP requests for all local IP addresses. You can use this option to enable ARP for a hostname that you previously disabled with the −D option. Use of this option requires superuser privilege.
−f filename
Reads entries from filename and adds those entries to the ARP tables. Use of this option requires superuser privilege. Entries in the file have the following format:
hostname hardware_addr [temp] [pub] [trail]
Fields in this format are as follows:
hostname
Specifies the remote host identified by the entry.
hardware_addr
Specifies the hardware address of the remote host. The address format is 6 hexadecimal bytes separated by colons; for example, xx:xx:xx:xx:xx:xx.
temp
Specifies that this ARP table entry is temporary. When this argument is not used, the table entry is permanent.
pubIndicates that the table entry will be published and that the current system will act as an ARP server, responding to requests for hostname even though the host address is not its own.
trail
Indicates that the trailer encapsulation may be sent to this host.
−g hostname
Sends a gratuitous ARP packet. The hostname can be a local host name, alias, or IP address.
−iDisplays the interface with which the ARP entry is associated.
−nDisplays numeric IP addresses and hardware addresses only. When this option is not specified, arp displays hostnames, numeric IP addresses, and hardware addresses.
−s hostname hardware_addr [temp] [pub] [trail]
Creates a single ARP entry for hostname. Use of this option requires superuser privilege. The arguments are explained in the discussion of the −f option.
[−u]
Displays the MAC address in noncanonical form with address bytes reversed and separated by a colon character (:). By default, all addresses are displayed in canonical form with address bytes separated by the hyphen character (-).
When used with the −s option, this indicates that the hardware_addr is in noncanonical form.
DESCRIPTION
The arp command displays or modifies the current ARP entry for the host specified by hostname. The host may be specified by name or number, using Internet dot notation.
With no options, the program displays the current ARP entry for hostname.
The ARP tables can be displayed by any user, but only the superuser can modify them.
EXAMPLES
1.To display the ARP address-mapping tables for the local host, enter:
arp -a
alpha1.dec.com (16.181.20.2) at 08-00-2b-2c-f5-31
alpha2.dec.com (16.100.21.20) at 08-00-2b-3c-2d-fd
2.To display the ARP address-mapping tables for the local host and the interface, enter:
arp -a -i
jupiter (192.45.20.2) at 08-00-2b-1a-f8-23 (tu0)
sigma (204.126.98.16) at 08-00-2b-5f-1d-33 (tu1)
3.To add a single entry for the remote host laszlo to the ARP mapping tables temporarily, enter:
arp -s laszlo 08:00:2b:0f:44:23 temp
The address is considered canonical even though the bytes are separated by colons. For input, the arp command does not use the colon (:) and hyphen (-) characters to indicate whether the address is canonical or noncanonical.
Note that you must have superuser authority to execute this command.
4.To add a single entry for the remote host laszlo to the ARP mapping tables temporarily, enter:
arp -u -s laszlo 10:00:d4:f0:22:c4 temp
The −u option indicates the address is noncanonical. Note that you must have superuser authority to execute this command.
5.To add multiple entries to the ARP mapping tables from the file newentries, enter:
arp -f newentries
Note that you must have superuser authority to execute this command.
FILES
/usr/sbin/arp
Specifies the command path.
SEE ALSO
Commands: netstat(1), ifconfig(8)
Protocols: arp(7)
Specifications: RFC 826