Enhance your Career in Networking With IPinBits!!!​

ARP and its Header in detail

ARP (address resolution protocol) is used by IP protocol for resolution of MAC address wrt the IP address. Since we all know IP address are Layer 3 address while MAC addresses are Layer 2 address, so ARP helps to resolve the L2 address based on the L3 address.

Note: ARP finds the hardware address, also known as Media Access Control (MAC) address, of a host from its known IP address. When you try to ping an IP address on your local network, say 192.168.1.1, your system has to turn the IP address 192.168.1.1 into a MAC address. This involves using ARP to resolve the address, hence its name…

ARP header do not have fix size instead it depends on link layer address. ARP header basically consists of many fields, we will go through those fields one by one :-

ARP Header
  • Hardware type (HTYPE) – This field will tell us the data link layer information. Example: Ethernet is 1.
  • Protocol type (PTYPE) – This field tells us the upper layer information. For IPv4, it is value 0x0800. In other words it is ETHERTYPE field.
  • Hardware length (HLEN) – It is the length of a hardware address (MAC). Ethernet address length is 6 (in octets) as MAC is 48 bits.
  • Protocol length (PLEN) – It is length of upper layer addresses. The upper layer is specified in PTYPE field . Example: IPv4 Plength is 4.
  • Operation – This field tells us whether the packet is ARP REQUEST or ARP REPLY. Its value is 1 for request, 2 for reply.
  • Sender hardware address (SHA) – MAC address of the host machine which is sending the ARP request/reply.
  • Sender protocol address (SPA) – IP address of the host machine which is sending the ARP request/reply.
  • Target hardware address (THA) – MAC address of the remote machine. This field is intended for receiver.
    • In an ARP request this field is ignored as we do not know the remote MAC address, so it is set to all “0” in ARP REQUEST which is also known as ARP PROBE.
    • In an ARP reply this field is used to indicate the MAC address of the host that originated the ARP request.
  • Target protocol address (TPA)– IP address of the remote machine which is sending the ARP request/reply.

So this was all about the ARP and its header. For more information about the ARP TYPES, visit below link

Related blog posts