How to query the age of an ARP-cache entry in Linux
Solution 1:
ip -statistics neighbour
gives some interesting information. When called with watch
one number seems to increment once per second, and resets to zero when a new arp exchange takes place.
Every 2.0s: ip -statistics neighbour Sat Oct 14 02:09:42 2017
fe80::XXXX:XXXX:XXXX:XX25 dev enp2s1 lladdr dc:XX:XX:XX:XX:25 router used >35</39/21 probes 0 STALE
10.0.0.1 dev enp2s1 lladdr dc:XX:XX:XX:XX:25 ref 1 used >5586</0/434 probes 1 REACHABLE
Marked with >< are the numbers that increment with time.