What is ARP protocol? Resolves an IP address to the MAC address.


The full form of ARP is Address Resolution Protocol. From full form says that the protocol is to resolve an address of a network packet. To understand the purpose of the ARP protocol, we need to know how a packet routes over the internet or IP network.

For example, using a computer connected to the LAN over the wifi router. The router assigns a LAN IP address  (e.g., 192.168.1.4) to the computer connected to LAN via DHCP (maybe a static IP). Similarly, other devices on the LAN get addresses.

You can consider a connection between the computer and the wifi router as a communication link. So there may be multiple links. The number of links depends on the connected devices to the router. Suppose you browse a website from the web browser. The request is sent to the router, and in response, the router sends the request to the public server, which hosts the website.

Upon response, the router knows the IP address of your LAN computer but does not know which physical device to send. Here comes the ARP protocol. From ARP, the router gets the physical address of the device. The router sends the response to the device to which the message needs to deliver.

From the above example, it is clear what ARP’s role in computer networks is.  Now how the translation is done, we will discuss it. When the sending device needs to send a message, it broadcasts the ARP request with the destination IP address. All devices over LAN get the request. But the device/computer whose IP address matches the address in the ARP request. Only se ds an AR response back to the sending device with its own MAC address.

In computer networks, there are various layers of protocols.  Each l er has an address for communication over the network.  ARP is the protocol that works as layer 2 of the OSI model.  This M ns ARP works on the data link layer. It has an interface with the network layer, which initiates the ARP request.