This is an introductory article on what ARP is, what it's used for and how the ARP Tables work.
Table of Contents
What is ARP?
Network Hosts use the Address Resolution Protocol, or ARP for short, to discover and map the hardware address of a local peer, to the destination IP address being reached.
In other words, ARP enables Hosts to insert the correct Destination MAC Address in the Layer-2 Frame, in order to reach the more universally recognized Destination IP Address in the Layer-3 Packet.
Before sending a Packet, a Host consults its ARP Cache, a Table containing a mapping of all known IP addresses, and the MAC Address to which they must be sent in order to reach the IP.
If the Layer-3 Destination IP Address belongs to the same Local Network as the Source IP Address, then the Host sends out a Layer-2 broadcast packet, destined to FF:FF:FF:FF:FF:FF, asking all Local Peers: “if your IP Address matches the Destination IP address in this Packet, please send me your MAC Address”.
If the Host exists on the Local Network, then the ARP Reply will contain the Source MAC Address in the Layer-2 Frame Header.
|Overview of ARP Discovery, Reply & Caching prior to sending unicast message to local host.|
Layer-3 Packet Forwarding
If the Destination IP Address belongs to a different Network than the Host’s Local Network, then the Packet is forwarded to the Local Gateway, complete with the Destination MAC Address of the Gateway, but the Destination IP Address of the Intended Layer-3 Host.
Also known as ANDing, this process of checking the Destination IP Address against the Network ID of the Sender is vitally important to moving internetwork traffic across Local Segments, from Gateway to Gateway, until the final hop reaches a Gateway who can locally reach the intended, original Layer-3 IP Recipient.
|After a few ARP discovery packets, Host A maps some host IP addresses on 10.0.0.0/24 & 10.0.1/0/24 networks.|
Read our other introductory networking articles in the Intro to Networking section.