Where can I find out how long ARP table entries are cached? I'm running 13.10. Can I get this on the command line?

  • My experience has been about 20 minutes. – mdpc Aug 27 '14 at 5:32
  • That's what I've been reading about most implementations. But, when I look in the documentation, I don't see anything about letting them timeout. What I do see is /proc/sys/net/ipv4/neigh/default/gc_stale_time as described here. Is it possible they don't timeout with ubuntu? – Tanner Aug 27 '14 at 5:36

You can get the default arp cache timeout by:

cat /proc/sys/net/ipv4/neigh/default/gc_stale_time

In my case it's 60. That means 60 seconds until the entry is removed. Every time the entry is used in the table, the timer for this entry resets to 60 seconds.

Additionally you can set it by:

echo 3600 >/proc/sys/net/ipv4/neigh/default/gc_stale_time

Or permantent in the config file /etc/sysctl.conf.

| improve this answer | |
  • This is part of why I asked the question. It seems Ubuntu doesn't actually remove entries, instead an entry "... is resolved again before sending data to it." I wonder if that means another request broadcast or something like a ping to the machine. – Tanner Aug 27 '14 at 5:50
  • 1
    The entry is used when you connect to the remote machine and the IP protocol is involved. A ping (ICMP) also uses IP for example. – chaos Aug 27 '14 at 6:03
  • This is part of the story. The route cache also affect the observed arp cache time. reference: groups.google.com/forum/#!topic/mlist.linux.net/-9l_kA8u6hc – Gong Pengjun Apr 30 at 3:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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