ARP (Address Resolution Protocol) is a Layer2 protocol that is used to translate IP addresses (layer 3 in OSI model ) to MAC addresses (layer 2 in OSI model ), and is used when two hosts on a Local Area Ethernet Network want to communicate with each other. Of course ARP is used in other Layer 2 networks such as ATM for example, but the main usage of ARP is on Ethernet Networks.
The first time Host A wants to contact Host B, Host A sends an ARP Request (using a broadcast packet) on the LAN. The ARP packet basically asks the following “I have the IP address for Host B and I want to know the MAC address of Host B”.
Host B sees this broadcast packet and replies to Host A with an ARP Reply packet containing host B’s MAC address. Host A now saves this MAC address/IP address combination in its ARP cache and begins to communicate with host B. This communication happens with Layer2 MAC Addresses because the two hosts are on the same Layer 2 network.
To display the contents of a host’s ARP cache (table), use “arp-a” on a Windows platform, “arp” on a UNIX platform, and “show arp” on a Cisco IOS platform.