Operating System - HP-UX
1837516 Members
3738 Online
110117 Solutions
New Discussion

Re: How to flush whole entries of arp in one shot

 
network_4
Advisor

How to flush whole entries of arp in one shot

Hi please let me know how to delete whole entries of arp in one shot as there are around 1000 entries and it's difficult to delete it one by one
3 REPLIES 3
Hemmetter
Esteemed Contributor

Re: How to flush whole entries of arp in one shot

Hi

Since there is no "flush" parameter to arp
you need to delete entries one by one:

Try:
$ for E in $(arp -a | sed "s/ .*//"); do
arp -d $E
done



rgds
HGH
Sumit Ghosal
Frequent Advisor

Re: How to flush whole entries of arp in one shot

Hi,

Use the below script to clear all arp cache entries in one shot -

#!/usr/bin/sh

for i in $(arp -a | awk '{print $1}')
do
arp -d $i
done

cheers!!
network_4
Advisor

Re: How to flush whole entries of arp in one shot

Thanks