The format of an ARP packet is relatively simple. Because ARP messages are created at the Internet layer, they only include IP information and framing for the underlying technology such as Ethernet. The structure of an ARP message is shown in the figure below. Note that fields can be different sizes based on the technologies or protocols with which ARP is used.
The ARP message fields are described below:
- Hardware Type. Specifies the hardware interface type, for example Ethernet.
- Protocol Type. Specifies the upper-layer protocol in use, usually IP.
- Hardware Address Length (HLEN). Specifies the length of the hardware address is use. This allows for flexibility with different network technologies.
- Protocol Address Length (PLEN). Specifies the length of the address of the upper-layer protocol in use.
- Operation. Specifies the type of request, such as ARP or RARP.
- Sender Hardware Address. The MAC address of the sending system.
- Sender IP Address. The IP address of the sending system.
- Target Hardware Address. The MAC address of the target.
- Target IP Address. The IP address of the system whose MAC address is being sought.
You should also be aware of another protocol related to ARP, referred to as a Reverse ARP (RARP). RARP is used by diskless workstations to obtain an IP address when they boot, based on their MAC address. These requests are heard by a RARP server, who will allocate an IP address based on the sender MAC address contained in the request.
Tip: For more information on Address Resolution Protocol, see RFC 826.