ARP which stands for Address Resolution Protocol is used to map an IP address (network layer address) to a MAC address (data link layer). It's crucial to discover the MAC address of a device in order for data to be transmitted. I'll be talking about something ARP does in order to find and match the IP address to the MAC address known as an ARP request in this article.
ARP operates at the data link layer (layer 2 in the OSI model). Because of that an ARP request is only done in a shared network. Devices use IP addresses to identify each other at the network layer (layer 3) but for data to be transmitted at the data link layer the device has to know the corresponding MAC address. This is where the ARP request comes in handy.
An ARP request is a message sent by a device to inquire about the MAC address on the local network. The source device constructs an ARP request packet containing its own MAC and IP addresses and the IP address it wants to find. After that it sends out a broadcast frame, a broadcast frame goes to every device and looks like this:
FF:FF:FF:FF:FF:FF
All the devices receive the broadcast frame but only the one with the corresponding IP address will reply. Sending it's MAC address to the source device. After that the source address writes down the MAC address and it's IP address in it's MAC address if it needs to send data once more to that device. ARP only happens when the MAC address is unknown to the source device.
ARP requests are the cornerstone of local network communication, it connects the IP address and the MAC address and allows communication to happen in the local network. It's important for oneself who's on the journey to becoming a networking engineer or even for someone who's refreshing themselves in the networking field to fully understand what ARP is and get a firm grasp on how it works.