ARP, as originally specified in RFC 826, had two message types: request and reply. The protocol can be "abused" in the sense that a host can send the reply message not in response to any preceding request; this has been formalized in RFC 5227. The two "other" messages are probe and announcement, the latter also called "gratuitous ARP". They can be used for detecting duplicate IP addresses on the same LAN.
One may find confusing that:
- The two "new" messages do not extend the protocol. In particular, they do not introduce new ARP message types. How can we speak about "new messages"?
- Source and destination MAC addresses are present in the MAC headers, but there are also "Source Hardware Address" and "Target Hardware Address" fields in the ARP body. How are the latter connected to the former?
These two questions are related. The table below shows the MAC headers and (relevant) ARP protocol fields for each of the four messages. The differences help to understand how each field is used.
|Message||Sent when the host...||MAC headers||ARP body|
|src MAC||dst MAC||message type||SHA||SPA||THA||TPA|
|request||wants to send an IP packet, but does not know the MAC address of the destination||own||broadcast||REQUEST||own||own||0||destination's|
|reply||receives an ARP request to an IP address this host owns||own||destination's, or broadcast1||REPLY||own||own||requestor's||requestor's|
|probe (RFC 5227, 2.1)||configures a new IP address for an interface||own||broadcast||REQUEST2||own||03||0||probed|
|announcement (RFC 5227, 2.3)||after a probe, concludes that it will use the probed address||own||broadcast||REQUEST2||own||new own||0||new own|
Notes to the table:
- RFC 5227, section 5.6 explains why "Broadcast replies are not universally recommended, but may be appropriate in some cases".
- RFC 5227, section 3 notes that the type here could be REPLY as well, then continues to give reasons why REQUEST is recommended.
- Zero is specified here in order not to pollute ARP caches of other hosts in case when the probed address is already taken by someone else.