About Linux FAQ

Browse More FAQs:

Router ARP Cache is Not Releasing Linux / UNIX Server IP address

Posted by Vivek Gite [Last updated: January 25, 2008]

Q. Recently we made changes to our server hardware and swapped all IP address from old to a new server. However, 2 IP addresses are not get updated due to arp cache issues (IPs are cached on the router). They are going to other servers. How do I solve this problem under Redhat Enterprise Linux version 5.0 or any other Linux distribution?

A. ARP is used to resolve IP address to the corresponding Ethernet address. ARP maintains the mapping between IP address and MAC address in a table in memory called ARP cache. The entries in this table are dynamically added and removed.

This is common and well known problem. Most ISPs and network admin configure their routers with a long ARP cache timeout. As a result your requests are going to other server. If you move IP address it may take hours before server can communicate with the Internet (correct server). To get rid of this problem you need to request the MAC address for its own IP which will cause routers and other hardware update ARP cache. This is called as 'unsolicited ARP' or 'gratuitous ARP'.

arping command - To sends an ARP request to resolve its own IP address (gratuitous ARP)

There are two versions of arping, you need a version written by Alexey Kuznetsov. Both Debian and RHEL has Alexey arping command version. Type the following command to update arp cache:
# arping -U -I {Interface-Name} {IP-Address}
# arping -U -I eth1 72.2.1.2

Where,

  • -U : Unsolicited ARP mode to update neighbours’ ARP caches. No replies are expected.
  • -I eth1 : Name of network device where to send ARP REQUEST packets. This is required.
  • 72.2.1.2 : IP address

There is also another tool called send_arp from the High-Availability Linux Project for same purpose.

Subscribe to our free e-mail newsletter or RSS feed to get all updates. You can Email this page to a friend.

Related Other Helpful FAQs:

Discussion on This FAQ

  1. Emil Obermayr Says:

    You can use /sbin/arp with option -a to show the current arp table. And then use option -d to delete the old entry of your server. It will be learned again immediately when needed.

Leave a Reply

We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Thank you very much for stopping by our site!

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word

Tags: , , , , , , , , , , , , , , , , ,

Copyright © 2006-2008 nixCraft. All rights reserved - TOS/Disclaimer - Privacy policy - Sitemap - Powered by Open source software.