The ARP protocol is responsible for mapping IP addresses to MAC addresses. MAC address is a physical address that works in the data link layer in the
Note: To read more about MAC addresses, refer here.
One of the significant protocols of the network layer in the OSI model is the Address Resolution Protocol (ARP), which assists in determining the MAC address provided by the IP address of the device present on the network. The primary function of the ARP is to convert the
Address Resolution Protocol (ARP) is a request-response or request-reply protocol in which one device requests information, and the other replies by providing the requested information. ARP packets are distributed solely within a specific network and are encapsulated by the link layer. Therefore, ARP is referred to as a link layer protocol.
Note: ARP request is generally referred as
, and ARP response is broadcast Request sent to all the nodes present on the network . unicast Response sent to the only corresponding device which requested it
MAC addresses rather than IP addresses are used for communication by the underlying ethernet devices or LAN. For this purpose, ARP protocol comes into the picture.
The following steps will help to understand the role of ARP protocol in addressing:
When a source wants to determine the MAC address of a destination device at the network layer, it first checks the
The source device will produce an
ARP request is illustrated as:
The source device will broadcast the ARP request message to the local network.
Every other device in the LAN network receives the broadcast message.
Each device will now check the destination's IP address against its IP address.
The device whose IP address matches the destination IP address in the packet sends an ARP reply message. The destination device modifies its ARP table and saves the source's MAC address because it will need to get in touch with the source shortly. For this device, the source is now the destination, and the ARP reply message is sent.
ARP reply is visualized as:
The source updates its ARP cache and learns the destination MAC address when it receives the ARP reply. Now that the source knows the destination MAC address, the packets are exchanged smoothly.
Free Resources