The ARP Protocol
Address Resolution Protocol (ARP) allows the mapping of a network layer protocol (OSI layer 3) address to a data link layer hardware address (OSI layer 2). In data networks it is used to resolve an IPv4 address into its corresponding Ethernet MAC address. ARP operates at the OSI layer 2, data link layer, and is encapsulated by Ethernet headers for transmission.IP Addressing Over Ethernet
A host in an Ethernet network can communicate with another host only if it knows the MAC address of that host. Higher level protocols such as IP make use of IPv4 addresses which are fundamentally different from a lower level hardware addressing scheme like the MAC address. ARP is used to retrieve the Ethernet MAC address of a host by using its IP address.ARP Resolution
When a host needs to resolve an IPv4 address to the corresponding Ethernet address, it broadcasts an ARP request packet. The ARP request packet contains the source MAC address, the source IPv4 address and the destination IPv4 address. Each host in the local network receives this packet. The host with the specified destination address, sends an ARP reply packet to the originating host with its MAC address.