A Digital Garden - frequent growth but a bit weedy in the back corner
“Gratuitous” is defined two ways, and they don’t pick out quite the same packets.
By its fields:
- A gratuitous ARP is widely considered a packet defined by Sender IP = Target IP
- RFC 5944 and Wireshark define it this way, either opcode, Wireshark without excluding 0.0.0.0 @ref
- These notes use that definition, adding the exclusion of 0.0.0.0, because it’s the only definition that can be read off a single packet
By its purpose: - A gratuitous ARP is unsolicited: one nobody asked for, sent to make other hosts update their caches. - RFC5944 defines it as a packet “sent by a node in order to spontaneously cause other nodes to update an entry in their ARP cache” @ref=l/457-459 - Whether a packet was asked for can’t be seen in the packet itself, only in what came before it.
An unsolicited reply with different IPs is gratuitous by purpose but not by its fields (since sender and target IPs are not equal). For example, an unsolicited reply telling one host that the gateway’s IP is at the sender’s MAC, as in ARPSpoofing, has the gateway’s IP as Sender IP and the victim’s as Target IP, so it falls in StandardARPMessages as a StandardARPReply
A solicited reply with equal IPs is gratuitous by its fields but not by purpose. A host already owning an address that answers a gratuitous request for it the RFC826 way puts its own address in Sender IP and the asker’s Sender IP, the same address, in Target IP. That makes it a UnicastGratuitousARPReply, though it was asked for