Monday, May 17, 2010

Router ARP Cache not releasing Server IP Address

I moved all IP address from old to a new server. However, I can't ping those servers as those IP addresses are not get updated due to arp cache issues ( IPs are cached on the router). How to solve this issue?

As ARP stands Address Resolution Protocol, it is used to resolve IP address to the corresponding Ethernet address. ARP maintains the mapping betweeen IP address and MAC address in a table in a memory called ARP cache. The entries in this table are dynamicaly added and removed. This is common and well known issue as most network admin configure their routers with a long ARP cache timeout. As a result my requests are going to the old server. If I move IP address, it may take hours before server can communicate. To get rid of this problem, we need to request the MAC address for it's own IP which will cause routers and other hardware update ARP cache. This is called a 'unsolicited ARP' or 'gratuitous ARP'

We can use 'arping command' to send an ARP request to resolve its won IP address.

#arping -U -I [Interface Name] [IP Address]

e.g
#arping -U -I eth1 192.168.1.2

where,
-U : Unsolicited ARP mode to update neighbours ARP cache. No replies are expected
-I eth1: Name of network device where to send ARP request packets.

No comments:

Post a Comment