arp -- address resolution display and control


arp hostname

arp [ -n ] -a

arp [ -n ] -d hostname

arp [ -n ] -f filename

arp -i interface_name target_ipaddr

arp [ -n ] -s hostname hardware_addr [ temp] [ pub ]

arp -S


The arp program displays and modifies the IPv4-to-hardware address translation table, which is normally maintained by the address resolution protocol (see arp(7tcp)).

When hostname is the only argument, arp displays the current ARP entry for hostname. The host may be specified by name or by number, using Internet dot notation (see hosts(4tcp) and inet(7tcp)).

Options are interpreted as follows:

Display all of the current ARP entries by reading the table from the kernel.

-d hostname
Delete an entry for the host whose name is hostname. (This can only be performed by root.)

-f filename
Read the file filename and set multiple entries in the ARP tables. Entries in the file should be of the form

hostname hardware_addr [ temp ] [ pub ]

with argument meanings as defined under the -s option.

-i interface_name target_ipaddr
Send an ARP request, avoiding the cache, on the specified interface interface_name (for example, net0). In the broadcast request, the sender's IP address is that of the interface, the sender's hardware address (MAC address) is that of the interface, and the target IP address is that specified by target_ipaddr.

On interfaces with aliased IP addresses (see ifconfig(1Mtcp)), a separate ARP request is broadcast for each alias address with the sender's IP address set to the alias address.

As generally used, the sender expects the host with the target IP address to respond with an ARP reply containing its hardware address.

If the sender and target IP addresses are identical, a gratuitous ARP request is broadcast. This allows other hosts on the network to update their cache entries for the sender's IP address with the hardware address contained in the request. No reply is expected. If an interface has been configured with several alias IP addresses, a separate gratuitous ARP request must be issued for each IP address which needs to notify its corresponding hardware address to the network.

-s hostname hardware_addr [ temp ] [ pub ]
Create an ARP entry for the host whose name is hostname with the hardware address hardware_addr. The hardware address is given as six colon-separated, two-digit hexadecimal numbers. The entry will be permanent unless the argument temp is specified on the command line. If pub is specified, the entry will be ``published'': that is, this system will act as an ARP server, responding to requests for hostname even though the host address is not an address of the local host.

Displays the ARP statistics that the kernel maintains; these may be useful for debugging network problems.
If the -n flag is specified, arp will not display symbolic names, but instead will display numeric Internet addresses.


See arp(7tcp) for a list of messages that can come from the arp driver.


arp(7tcp), ifconfig(1Mtcp), inet(3N), netstat(1Mtcp), route(1Mtcp)

RFC 826

© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004