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:

Octet16 bits
0Hardware Type (HTYPE)
2Protocol Type (PTYPE)
4Hardware address length (HLEN) | Protocol Address Length (PLEN)
6Operation (OPER)
8Sender hardware address (SHA)
10SHA
12SHA
14Sender Protocol Address (SPA)
16SPA
18SPA
20Target hardware address (THA)
22THA
24Target Protocol Address (TPA)
26TPA

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.

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 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.

Links:

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

https://en.wikipedia.org/wiki/Address_Resolution_Protocol

Links to this page: