请帮助我理解我的一个网络设备的这种行为。它以源IP:0.0.0.0发送ARP请求广播。我只知道在"ARP探测“中使用0.0.0.0,其中设备应该发送:-
“谁有我的-IP请告诉0.0.0.0”
由于设备希望确保子网中没有其他设备具有相同的IP,因此可以避免IP冲突。
但是在我的例子中,设备发送ARP请求广播(而不是ARP探测,因为ARP探测应该请求它自己的IP)
“谁有DeviceX的IP,请告诉0.0.0.0”。
的请求
谁有DeviceX的IP请告诉10.192.34.4。
因此,设备X应该回答其中的10.192.34.4将得到它的MAC地址,基本的arp内容,但这个"0.0.0.0“是我所不理解的。
谢谢
发布于 2018-05-10 06:37:18
这是一个标准的ARP探针(RFC 5227) --一个节点请求一个ARP解析来表示它想要使用的地址(并且不期望回复)。
ARP工作在第二层(以太网)之上,不使用标准IP数据包。因此,响应ARP请求的任何节点都不会响应发件人协议地址(SPA),而是响应发件人硬件地址(SHA)。
ARP探测器使用全零发送者的地址0.0.0.0来避免破坏其他节点的ARP缓存。
发布于 2018-05-11 06:19:33
这些ARPs用于重复地址检测(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.
https://networkengineering.stackexchange.com/questions/50416
复制相似问题