Paul Staniforth
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majo...@vger.kernel.org
# egrep . /proc/sys/net/ipv4/neigh/eth0/*
/proc/sys/net/ipv4/neigh/eth0/anycast_delay:100
/proc/sys/net/ipv4/neigh/eth0/app_solicit:0
/proc/sys/net/ipv4/neigh/eth0/base_reachable_time:30
/proc/sys/net/ipv4/neigh/eth0/delay_first_probe_time:5
/proc/sys/net/ipv4/neigh/eth0/gc_stale_time:60
/proc/sys/net/ipv4/neigh/eth0/locktime:100
/proc/sys/net/ipv4/neigh/eth0/mcast_solicit:3
/proc/sys/net/ipv4/neigh/eth0/proxy_delay:80
/proc/sys/net/ipv4/neigh/eth0/proxy_qlen:64
/proc/sys/net/ipv4/neigh/eth0/retrans_time:100
/proc/sys/net/ipv4/neigh/eth0/ucast_solicit:3
/proc/sys/net/ipv4/neigh/eth0/unres_qlen:3
Greetings
Bernd
% man 7 arp
ARP(7) Linux Programmer's Manual ARP(7)
NAME
arp - Linux ARP kernel module.
...
SYSCTLS
ARP supports a sysctl interface to configure parameters on
a global or per-interface basis. The sysctls can be
accessed by reading or writing the
/proc/sys/net/ipv4/neigh/*/* files or with the sysctl(2)
interface. Each interface in the system has its own
directory in /proc/sys/net/ipv4/neigh/. The setting in
the `default' directory is used for all newly created
devices. Unless otherwise specified time related sysctls
are specified in seconds.
....
base_reachable_time
Once a neighbour has been found, the entry is con
sidered to be valid for at least a random value
between base_reachable_time/2 and 3*base_reach
able_time/2. An entry's validity will be extended
if it receives positive feedback from higher level
protocols. Defaults to 30 seconds.
delay_first_probe_time
Delay before first probe after it has been decided
that a neighbour is stale. Defaults to 5 seconds.
-Andi (who sometimes wonders why he writes man pages when nobody reads them)
> ARP cache entries for which there has been no traffic timeout in
> several minutes.
It is gc_stale_time, set to 1 minute by default.
Alexey
I've since "discovered" the useful -s option to "ip neigh list". This
helped me understand a little better. Here's my attempt to answer
my own question. Is this accurate?
An ARP entry is a candidate to be removed gc_stale_time seconds
after last used.
Garbage collection runs every gc_interval seconds which is when
the entry can be deleted.
However, an ARP cache entry will not be removed while there is a
reference to it such as route cache entry. The ARP cache entry will
move from reachable to stale state in the normal time but stays
stale until the route cache entry is removed.
The route cache may keep an entry for several minutes even
with no traffic or sessions to that address. So after the route cache
entry is removed, the reference to the ARP cache entry goes away.
Then next time ARP cache garbage collection runs the entry will be
removed.
Paul Staniforth
> helped me understand a little better. Here's my attempt to answer
> my own question. Is this accurate?
Yes, absolutely.
> The route cache may keep an entry for several minutes even
> with no traffic or sessions to that address.
Namely, approximately for /proc/sys/net/ipv4/route/gc_timeout (5 minutes)
on completely idle machine.