ARP (Address Resolution Protocol) Request

ARP stands for address resolution protocol. This protocol is used to find the MAC address of the device corresponding to its IP address. This protocol aims to create communication between two devices on a local area network (Ethernet) by providing the other device's MAC address. To establish communication between two devices, the source device needs to generate the ARP request message.

ARP Request

  • When two devices (say, source and destination) want to communicate with each other in a local area network (Ethernet). The source device knows the IP address of the destination device but not the MAC address of the destination device. To know the MAC address, the source device looks up into the ARP cache (Table). If the MAC address of the device is stored in the ARP cache them the source will use that address and start communication.
  • The source device generates an ARP request message if the MAC address of the destination is not stored in the ARP cache. This ARP request consists of the IP and MAC addresses of both the device source and destination. The Mac address field of the destination device is kept empty.
  • The ARP request message is broadcast on the local area network (Ethernet). All the devices present on the network receive the ARP request message and compare their IP address with the source device's IP address. When the IP address of the source device matched with any of the devices on the local area network, then that device will generate an ARP reply message. If the IP address of the source device does not match with any of the devices present on the local area network, then the devices will automatically drop the packet.
  • The ARP reply message is then sent to the source device. The ARP reply message consists of the MAC address of the destination device.
  • When the source device receives the ARP reply message, the MAC address obtained by the ARP reply message will be updated in the ARP cache along with its IP address.
  • The reason behind the maintaining ARP table is that when the source device wants to communicate with the device to which the source had communicated before at that time, the source does not need to broadcast ARP request message again. The information is already stored in the ARP cache until the system reboot again. The source device has to look up the ARP cache and obtain the MAC address of the device from there.

There are some important points related to the ARP request are given below:

  • The ARP request is broadcast in nature, but the ARP reply is unicast.
  • The MAC address of the device is kept null because the source has requested for it.
  • The ARP cache has less memory storage. So it deletes its entries periodically to free up space.
  • If the device does not know its IP address, then it uses RARP (Reverse Address Resolution Protocol) instead of ARP and broadcast the RARP request.

The need for ARP request

The need for an ARP request arises when a device wants to know the MAC address of the device to which the source wants to communicate with. It is necessary for both the devices to know each other's both the IP and MAC address. Each device in a network knows the IP address of the other devices but not the MAC address. So, the ARP request is generated by the source device to obtain the destination device's MAC address.

Note: The ARP request is generated only for the device present in the same network in which the source device is present. If the destination device is present in another device, the ARP request will not generate.