这些 ARP 用于重复地址检测 (DAD)。
当 DHCP 客户端收到来自 DHCP 服务器的报价时,这很常见。
来自 DHCP RFC:RFC 2131 第 4.4.1 节
The client SHOULD perform a check on the suggested address to ensure
that the address is not already in use. For example, if the client is
on a network that supports ARP, the client may issue an ARP request for
the suggested request. When broadcasting an ARP request for the
suggested address, the client must fill in its own hardware address as
the sender's hardware address, and 0 as the sender's IP address, to
avoid confusing ARP caches in other hosts on the same subnet.
某些操作系统还会发送这些免费 ARP 以在静态配置时检测重复地址。该操作取决于操作系统。这篇文章已有几年的历史,但讨论了多个版本的 Windows 上的行为。
In address conflict detection, we use what is known as a Gratuitous ARP.
When a system is configured with an IP address either manually or by
DHCP it will send a Gratuitous ARP to insure that another node on the
network is not already configured with this IP address.
文章继续描述在旧版本操作系统中的操作:
In Windows XP and Windows Server 2003 the Gratuitous ARP request is sent
with the Senders MAC filled in with the MAC of the sending system and
the Target MAC set to 0’s, but the Senders and Target IP address are
both set to the address of the sending system. If a conflict is detected
then the defending system replies with its IP and MAC address.
该文章随后指出该行为在更高版本的 Windows 中发生了变化。
Additionally, when a gratuitous ARP is sent by a Windows Vista or
Windows Server 2008, the following change has been made – the SPA field
in the initial request is set to 0.0.0.0. This way the ARP or neighbor
caches of systems receiving this request are not updated. So, if there
is a duplicate IP address, the receivers do not need to have their cache
corrected.