Clear complete arp-table

From RADION OpenLab

If you want to setup and test a new DNS server, you have to clear the arp-table of the machine,
that is going to test your new DNS-server in order to get reliable test results.

But the linux arp command has NO option to clear the complete cache.

There is only the possibillity to modify the entries one by one.

So here is a pretty hack that makes it possible:

for i in `awk -F ' ' '{ if ( $1 ~ /[0-9{1,3}].[0-9{1,3}].[0-9{1,3}].[0-9{1,3}]/ ) \
print $1 }' /proc/net/arp` ; do arp -d $i ; done

You can copy & paste this into a root-shell :-)

RADION OpenLAB