How Address Resolution Protocol (ARP) Works?

When computer programs send or get messages, they usually use something called an IP address, which is like a virtual address. But underneath, the real talk happens using another type of address called a MAC address, which is like a device’s actual home address.

So, our goal is to find out the MAC address of where we want to talk to. That’s where ARP comes in handy. It helps by turning the IP address into the physical MAC address, so we can chat with other devices on the network

Most computer programs/applications use logical addresses (IP Addresses) to send/receive messages. However, the actual communication happens over the Physical Address (MAC Address) from layer 2 of the OSI model. So our mission is to get the destination MAC Address which helps communicate with other devices. This is where ARP comes into the picture; its functionality is to translate IP addresses into physical addresses.

ARP

What is Address Resolution Protocol (ARP)?

The acronym ARP stands for Address Resolution Protocol which is one of the most important protocols of the Data link layer in the OSI model . It is responsible to find the hardware address of a host from a known IP address. There are three basic ARP terms.

Note: ARP finds the hardware address, also known as the Media Access Control (MAC) address, of a host from its known IP address.

Address Resolution Protocol

Address Resolution Protocol

Important Terms Associated with ARP

Reverse ARP

Reverse Address Resolution Protocol is a protocol that is used in local area networks (LAN) by client machines for requesting IP Address (IPv4) from Router’s ARP Table. Whenever a new machine comes, which requires an IP Address for its use. In that case, the machine sends a RARP broadcast packet containing MAC Address in the sender and receiver hardware field.

Proxy ARP

Proxy Address Resolution Protocol work to enable devices that are separated into network segments connected through the router in the same IP to resolve IP Address to MAC Address. Proxy ARP is enabled so that the ‘proxy router’ resides with its MAC address in a local network as it is the desired router to which broadcast is addressed. In case, when the sender receives the MAC Address of the Proxy Router, it is going to send the datagram to Proxy Router, which will be sent to the destination device.

Inverse ARP

Inverse Address Resolution Protocol uses MAC Address to find the IP Address, it can be simply illustrated as Inverse ARP is just the inverse of ARP. In ATM (Asynchronous Transfer Mode) Networks, Inverse ARP is used by default. Inverse ARP helps in finding Layer-3 Addresses from Layer-2 Addresses.

How ARP Works?

Imagine a device that wants to communicate with others over the internet. What does ARP do? It broadcast a packet to all the devices of the source network. The devices of the network peel the header of the data link layer from the Protocol Data Unit (PDU) called frame and transfer the packet to the network layer (layer 3 of OSI) where the network ID of the packet is validated with the destination IP’s network ID of the packet and if it’s equal then it responds to the source with the MAC address of the destination, else the packet reaches the gateway of the network and broadcasts packet to the devices it is connected with and validates their network ID. The above process continues till the second last network device in the path reaches the destination where it gets validated and ARP, in turn, responds with the destination MAC address.

  1. ARP Cache: After resolving the MAC address, the ARP sends it to the source where it is stored in a table for future reference. The subsequent communications can use the MAC address from the table.
  2. ARP Cache Timeout: It indicates the time for which the MAC address in the ARP cache can reside.
  3. ARP request: This is nothing but broadcasting a packet over the network to validate whether we came across the destination MAC address or not.
  4. ARP response/reply: It is the MAC address response that the source receives from the destination which aids in further communication of the data.