Open In App

ARP Protocol Packet Format

Last Updated : 16 Feb, 2023
Improve
Improve
Like Article
Like
Save
Share
Report

Pre-requisites: How Address Resolution Protocol (ARP) works?

ARP is a communication mechanism that is used to translate a network address, such as an IP address, to a physical (MAC) address on a local network. ARP packets are transmitted and received on a network to achieve this mapping. An ARP packet’s format, also known as an ARP packet header, has numerous fields required to describe the type of ARP message, the addresses being resolved, and other communication-related information. 

ARP Packet Format

The ARP packet format is used for ARP requests and replies and consists of multiple fields including hardware type, protocol type, hardware and protocol size, operation, sender and target hardware, and IP addresses. These fields work together to help devices on a network find and communicate with each other.

ARP Packet

 

Hardware type: This is 16 bits field defining the type of the network on which ARP is running. Ethernet is given type 1. 

Protocol type: This is 16 bits field defining the protocol. The value of this field for the IPv4 protocol is 0800H.

Hardware length: This is an 8 bits field defining the length of the physical address in bytes. Ethernet is the value 6.

Protocol length: This is an 8 bits field defining the length of the logical address in bytes. For the IPv4 protocol, the value is 4.

Operation (request or reply): This is a 16 bits field defining the type of packet. Packet types are ARP request (1), and ARP reply (2).

Sender hardware address: This is a variable length field defining the physical address of the sender. For example, for Ethernet, this field is 6 bytes long.

Sender protocol address: This is also a variable length field defining the logical address of the sender For the IP protocol, this field is 4 bytes long.

Target hardware address: This is a variable length field defining the physical address of the target. For Ethernet, this field is 6 bytes long. For the ARP request messages, this field is all Os because the sender does not know the physical address of the target.

Target protocol address: This is also a variable length field defining the logical address of the target. For the IPv4 protocol, this field is 4 bytes long.


Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads