|
|
The Address Resolution Protocol (ARP) is a data link layer protocol. ARP dynamically translates IPv4 addresses into the corresponding unique MAC addresses on local area networks (LANs).
Within a LAN, nodes address each other using MAC addresses written into the frame headers of network packets. Nodes on the same segment of a LAN use ARP to determine the MAC addresses of other nodes. A node broadcasts an ARP request for the MAC address of another node. The request contains the IP address for which the corresponding MAC address is needed together with the IP address and MAC address of the local host. If the target host receives the request, it places an entry for the sending host in its ARP cache (which is used to map quickly between IP addresses and MAC addresses), and it then replies directly with an ARP response containing its own IP address and MAC address. When the local host receives the response, it updates its own ARP cache.
Once an ARP cache entry exists, the local host can send network packets directly to the other host. If the ARP cache entry is deleted or expires, the host must resort to using ARP again to contact the other system.
Unlike most protocols, the format of ARP packets is not fixed. It depends on the variety of network technology (such as Ethernet or Token-Ring) that is being used.
Entries in the ARP cache are deleted after 20 minutes,
and incomplete entries are deleted after 3 minutes.
To make a permanent entry in the ARP mapping tables,
specify the pub parameter to the
arp(1Mtcp)
command, for example:
arp -s 802.3 host2 0:dd:0:a:8s:0 pub