ARP Message Header and Payload

An ARP message consists of a header and a payload. The header specifies the types of networks used at Layers 2 and 3 as well as the length of each address, while the payload consists of four addresses. The hardware and protocol addresses of the sender and receiver hosts.

ARP is most typically used with Ethernet and IPv4 where the MAC addresses of Ethernet are considered the hardware addresses (Layer 2), and IPv4 addresses are considered the protocol addresses (Layer 3).

The format of an ARP message looks like this:

OctetField Description
0Hardware Type (2 bytes)
2Protocol Type (2 bytes)
4HLEN (1 byte)
5PLEN (1 byte)
6Operation (2 bytes)
8Sender hardware address (SHA, varies)
14Sender protocol address (SPA, 4 octets for IPv4)
18Target hardware address (THA, varies, 0 in requests)
24Target protocol address (TPA, 4 octets for IPv4)

A description of each field follows:

Header fields

  • Hardware Type (HTYPE) - This 16-bit field is used to specify the network link (Layer 2) protocol type. A value of 1 indicates Ethernet.
  • Protocol Type (PTYPE) - This 16-bit field specifies the internetwork (Layer 3) protocol. IPv4 has a value of 0x0800. These values share the same numbering scheme as the EtherType values.
  • Hardware Length (HLEN) - This 8-bit field indicates the number of octets the hardware address is composed of. For Ethernet the value is 6 since a MAC Address has a length of 6 octets.
  • Protocol Address Length (PLEN) - This 8-bit field indicates the length of the internetwork address in octets. For IPv4, this is a value of 4 since an IPv4 address is composed of four octets.
  • Operation: Specifies the type of ARP message (request or reply).

Payload fields

  • Sender Hardware Address (SHA) - For Ethernet, this field is 6 octets, as per the HLEN field.
    • In an ARP request, this field contains the MAC address of the sender.
    • In an ARP reply, this field contains the MAC address of the sender of the reply (which is the host that the request was looking for).
  • Sender Protocol Address (SPA) - For IPv4, this field is 4 octets as per the PLEN field. This contains the IP address of the sender of the ARP message.
  • Target Hardware Address (THA) - For Ethernet, this field is 6 octets as per the HLEN field. It contains the MAC address of the intended receiver of the ARP message.
    • In an ARP request, this field is ignored since the MAC address of the intended recipient is unknown.
    • In an ARP reply, this field is used to indicate the address of the host that originated the ARP request.
  • Target Protocol Address (TPA) - For IPv4, this field is 4 octets as per the PLEN field and contains the IP address of the intended receiver of the ARP message.

https://networklessons.com/cisco/ccnp-encor/arp-address-resolution-protocol-explained

Links to this page: