Tuesday, 20 March 2018

networking - How does ARP handle a move of an IP address to another device?


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

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...