Javatpoint Logo
Javatpoint Logo

ARP Packet Format

The address resolution protocol (ARP) uses a basic message format that contains either address resolution request or address resolution response. The ARP message size depends on the address size of the link layer and the network layer. The message header describes the network type used at each layer and the address size of each layer. The message header is complete with the help of the operation code, which is 1 for request and 2 for the response. The payload of the packet has four addresses, these are:

  • Hardware address of the sender hosts
  • Hardware address of the receiver hosts
  • Protocol address of the sender hosts
  • Protocol address of the receiver hosts

The Packet format of the Address Resolution Protocol is shown in the figure:

ARP Packet Format

HTYPE (Hardware Type) - The size of the hardware type field is 16 bit. This field defines the network type that the local network needs to transmit the ARP message. There are some typical values for this field, which are given below:

Hardware Type (HTYPE) Value
Ethernet 1
IEEE 802 Networks 6
ARCNET 7
Frame Relay 15
Asynchronous Transfer Mode (ATM) 16
HDLC 17
Fibre Channel 18
Asynchronous Transfer Mode (ATM) 19
Serial Line 20

PTYPE (Protocol Type) - The protocol type is a 16-bit field used to specify the type of protocol.

Note: ARP can be used with any higher-level protocol such as IPv4, IPv6, etc.

HLEN (Hardware Length) - The size of the hardware length field is 8-bit. This field specifies the length of the physical address in bytes.

Example: For this, the address length of Ethernet is 6.

PLEN (Protocol Length) - The size of the protocol length field is 8-bit long. It defines the length of the IP address in bytes.

OPER (Operation) - It is a 16-bit field that determines the type of ARP packet. There are two types of ARP packets, i.e., ARP request and ARP Reply. In the given table, the first two values are used for the ARP request and reply. The values for the other ARP frame format such as RARP, DRARP, etc. are also specified in this table.

ARP Message Type Opcode (Operation Code)
ARP Request 1
ARP Reply 2
RARP Request 3
RARP Reply 4
DRARP Request 5
DRARP Reply 6
DRARP Error 7
InARP Request 8
InARP Reply 9

SHA (Sender Hardware Address) - This field specifies the physical address of the sender, and the length of this field is not fixed.

SPA (Sender Protocol Address) - This field is used to determine the logical address of the sender, and the length of this field is not fixed.

THA (Target Hardware Address) - The target hardware address specifies the physical address of the target. It is a variable-length field. For the ARP request packet, this field contains all zeros because the sender does not know the physical address of the receiver.

Note: The default target hardware address is zero.

TPA (Target Protocol Address) - This field determines the logical address of the target. TPA is a variable-length field.


Next TopicARP Table




Youtube For Videos Join Our Youtube Channel: Join Now

Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA