ARP (Address Resolution Protocol) in action

Suppose machine A wants to send its message packets to B which has the IP address 1B. A only knows B’s IP address and thus as a first step, sends an ARP request to B to get machine B’S hardware address. Now, before sending the ARP request, A checks up in its ARP cache whether an IP address to hardware address binding of B have previously being recorded. If so, it send the packets to B by inserting the appropriate hardware address. If not, it sends the ARP request as a broadcast message. All the machines in the network receives it and checks the message for the corresponding IP address of each machine. Only B identifies a match to its IP address and this processes the message and adds up its hardware address to the ARP request and send it back to A.

While A sends the ARP request, it also sends its IP address and hardware address along ARP request so that it makes it easier for B to communicate with A. B stores the network address of A in its cache. Once A receives the ARP reply, it update the hardware address of B in its cache corresponding to B’s IP address. Once A makes an ARP request for IP-hardware address binding, any other request for the same operation by other applications are queued and when ARP request is received, the queued requests are removed and the necessary address binding is supplied to the requesting applications. Now, ARP software in machine A will refresh its ARO bindings in its cache periodically since the hardware addresses of the machine B may change.

At the receiving side, machine B’s ARP software accepts the ARP request, extracts A’s IP address + hardware address and add it / update it to its ARP cache for later use. B adds up its hardware address to the ARP request and sends the request back to A as ARP reply. In essence, ARP allows a host to find physical address of a target host on the same physical network given only the target’s IP address.