Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.
  • How to clear arp cache ?
  • How to refresh arp table ?
share|improve this question
1  
I assume you meant "arp cache" –  poige Feb 1 '11 at 5:23
    
@poige, thanks, corrected. –  Kumar Feb 1 '11 at 5:27
add comment

2 Answers

up vote 3 down vote accepted
arp -da

Then it's autorefreshing. :-)

share|improve this answer
add comment

How to refresh arp table ?

You can save ip from arp table:

arp -an | sed -s 's/.*(\([0-9.]*\)).*/\1/' > /tmp/ip_to_arp

And then ping all ip:

for ip in `cat /tmp/ip_to_arp`; do ping -c 1 ${ip}; done

or

for ip in `cat /tmp/ip_to_arp`; do arping -c 1 -I eth0 ${ip}; done
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.