ARP


The Address Resolution Protocol (ARP) is a communication protocol used for discovering the link layer address, such as a MAC address, associated with a given internet layer address, typically an IPv4 address.

ARP is the mechanism by which the network layer can discover the link address associated with a network address it’s directly connected to.

ARP is needed because each protocol layer has its own names and addresses.

ARP Packet Format

Untitled

Example

RFC 826 - An Ethernet Address Resolution Protocol: Or Converting Network Protocol Addresses to 48.bit Ethernet Address for Transmission on Ethernet Hardware

Let there exist machines X and Y that are on the same 10Mbit Ethernet cable.

They have Ethernet address EA(X) and EA(Y) and DOD Internet addresses IPA(X) and IPA(Y).

Let the Ethernet type of Internet be ET(IP).

  1. Machine X has just been started, and sooner or later wants to send an Internet packet to machine Y on the same cable.
  2. X knows that it wants to send to IPA(Y) and tells the hardware driver (here an Ethernet driver) IPA(Y).