For definitions and background, this is a great post: My specific question: Exactly what factors does Wireshark look for to label a Gratuitous ARP as Gratuitous? This is a PCAP which includes 3 gratuitous ARPs pulled from various capture sessions. All three are definitely Gratuitous, but Wireshark is only marking the first two as Gratuitous. The third packet conforms to the RFC 5227 Probe, used to preemptively detect duplicate addresses before putting an IP address to use. The probe is, by definition, gratuitous, as it wasn't prompted by an ARP Request. But Wireshark does not label it as such. Why? asked 13 Jan '17, 20:40 erh |
One Answer:
To quote the comment in the Wireshark ARP dissector:
See also the Wireshark Wiki page on gratuitous ARPs. RFC 5227 says, in section 1.1 "Conventions and Terminology Used in This Document":
and says in section 4 "Historical Note" that:
The first two packets are capital-G Gratuitous ARPs/ARP Announcements, as the source and target protocol (IP) addresses are the same. The third packet isn't a capital-G Gratuitous ARP. Perhaps Wireshark should drop the term "Gratuitous ARP" and, instead, detect and report "ARP Announcement" and "ARP Probe" packets. answered 14 Jan '17, 01:25 Guy Harris ♦♦ |
I think the 3. packet is an ARP Probe in accordance to the RFC 5227, too.
In Section 2.1.1 we can read, that an ARP Probe may fillthe IP_Sender filed with all zeros:
Even if ARP Probe/Anouncement may be more correct, the terms Gratiuos ARP Request/Response are more known I think.
Yes, that's why I mentioned ARP Probes in my comment.
Is there any place that defines an ARP Probe, rather than an ARP Announcement, as a "Gratuitous ARP"? Richard Stevens' book defines it as "a host [sending] an ARP request looking for its own address.”, which is what RFC 5227 called an "ARP Announcement":
RFC 2002 section 4.6 "ARP, Proxy ARP, and Gratuitous ARP" and RFC 5944 section 4.6 "ARP, Proxy ARP, and Gratuitous ARP" say:
@Guy Harris It seems that I have missunderstood you answer a liitel bit.
So I would not change the term GRAP into ARP Anouncement. But it might be helpful to name the ARP Probe as an ARP Probe.
Thanks for the run down, Guy. Maybe getting Wireshark to label the 3rd packet as an ARP Probe or Announcement would be beneficial. Because (as you pointed out) it isn't exactly a Gratuitous ARP, but it is closer to a Gratuitous ARP than a regular ARP Request/Response conversation. It would be more accurate to call it Gratuitous, but most accurate to call it an ARP Probe.
To go a step further. There is a distinction between a ARP Probe and an ARP Announcement. I went ahead and captured the ARP packets after setting a new IP address on Win10 (but I believe this is the same process on Win8 and beyond, per this). I updated the original packet capture to include four additional ARP packets.
Of the last 4 packets, the first 3 (packet#4/5/6) are ARP Probes, they include a Sender MAC and Target IP address for the IP address/mapping they are trying to validate (192.168.0.254). They include a Sender IP and Target MAC of all zeros, in order to not accidentally update an ARP cache on the network with information that is not yet determined to be conflict free. These are ARP Probes.
The last packet (packet#7) is an ARP Announcement -- the host, having successfully determined that the IP address is not in use, "claims" it by sending out this final ARP Announcement. Wireshark currently labels this as Gratuitous ARP, which I believe is accurate enough. The only difference between this ARP Announcement and a true gratuitous arp is maybe that the ARP Announcement is still an ARP Request packet, where as the true Gratuitous ARP packets I've seen have all been ARP Replies.
That said, the RFC's do not specify that a Gratuitous ARP must be a Reply, it in fact leaves it up to the vendor to implement as a Reply or Response. So given that, I'm not sure there is enough of a way to distinguish a true Gratuitous ARP from an ARP Announcement. But it very well may be sufficient to continue to label the ARP Announcement as a Gratuitous ARP.
(But the ARP Probe should definitely be labeled as such, as it is neither an Gratuitous ARP or a regular ARP Request/Reply).