Flush ARP Cache:
Stewart Thompson
stewart.thompson@shaw.ca
Tue, 30 Jul 2002 03:25:58 -0700
Hi Antony:
Thanks. Perhaps I was misunderstanding the issue. I have done what
you have suggested before, but it was unsuccessful. Another list suggestion
was to power down all the other machines to force them to get a new IP. .
I think your suggestion is a little more practical though. Thank you again.
Regards,
Stu.........
-----Original Message-----
From: netfilter-admin@lists.netfilter.org
[mailto:netfilter-admin@lists.netfilter.org]On Behalf Of Antony Stone
Sent: July 30, 2002 3:11 AM
To: netfilter@lists.netfilter.org
Subject: Re: Flush ARP Cache:
On Monday 29 July 2002 12:17 pm, Stewart Thompson wrote:
> I have been led to believe it is possible to flush all the addresses
> and start fresh. However, the suggestions I have tried have varied from
> unsuccessful, to minor disasters.
> I am using Redhat 7.2 with DHCPD. Due to a number of
> test setups and equipment changes, my DHCP addresses are all over the
> place. I would like to start them over at .10 again and get things back to
> something fairly logical. These are mostly various flavors of Windows
> machines with the odd Linux machine thrown in.
I don't think you really mean to ask how to flush the ARP cache - I think
you
want to clear out the DHCP assignment cache ?
In which case, the way to do it is to find the file dhcpd.leases on your
machine (on my system it's in /var/state/dhcp but I don't use RedHat), stop
the DHCPD daemon, clear out the file with "echo -n >dhcpd.leases" (and also
delete any dhcpd.leases~ file you might also find in the same directory),
then restart your DHCPD daemon.
The potential spanner in the works here is that remote clients which have
got
IP addresses they're perfectly happy with will typically ask for the same
addresses again next time, and unless there's a good reason not to
reallocate
them, your server will simply say "yup, okay - you can take that address".
Therefore you might need to fudge things a bit by changing your DHCPD config
file to give out a completely different range of IP addresses before you
restart the daemon, and then either continue to live with the new addresses
the clients will get given, or wait until they've all got new ones, change
the config file back again, and then they'll all get 'sensible' ones back in
the old range once more.
If you really did want to flush out the ARP cache I'm afraid I don't know
short of a reboot.
Antony.