How long is an ARP entry cached for?
Solution 1:
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
.