I understand that the Address Resolution Protocol (ARP) has a cache table, which stores the MAC addresses to the according IP addresses until the entry gets removed if it gets not used anymore for some time (timeout).
This timeout depends on the operating system and varies between a few seconds and a couple hours.
I have a router as gateway for a subnet and if that router gets faulty then I plug another router in with the same IP address. The most devices recognize within a few seconds that the IP address is now on another MAC address available, but I have one device which still tries to communicate via the old MAC address which is not available anymore.
I don't think you have to wait up to a few hours (until the timeout) to get the communication working with another device at the same IP address, so I guess there is some mechanism to get that working faster.
How does the ARP protocol handle this situation, when I move an IP address from one device to another?
Answer
The operating system should send a Gratuitous ARP message when it detects an IP address change or (usually) when the interface is brought up.
On Linux systems, you can also send one yourself using the arping
utility.
No comments:
Post a Comment