Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ARP Cache Timeout question

2,813 views
Skip to first unread message

Paul Staniforth

unread,
Dec 20, 2000, 6:04:37 PM12/20/00
to
ARP cache entries for which there has been no traffic timeout in
several minutes. However, I have not found any documentation for Linux
(e.g. arp(7)) on
what the value for this timeout is and whether it is configurable. All the
timeouts in the documentation appear to be in the region of seconds rather
than minutes that I'd expect in this case
Can somebody tell me how to determine this timeout.

Paul Staniforth

-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majo...@vger.kernel.org

Bernd Eckenfels

unread,
Dec 20, 2000, 6:42:36 PM12/20/00
to
In article <3A413B05...@vill.com> you wrote:
> ARP cache entries for which there has been no traffic timeout in
> several minutes. However, I have not found any documentation for Linux
> (e.g. arp(7)) on
> what the value for this timeout is and whether it is configurable. All the
> timeouts in the documentation appear to be in the region of seconds rather
> than minutes that I'd expect in this case
> Can somebody tell me how to determine this timeout.

# 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

Andi Kleen

unread,
Dec 20, 2000, 6:54:27 PM12/20/00
to
On Wed, Dec 20, 2000 at 06:04:37PM -0500, Paul Staniforth wrote:
> ARP cache entries for which there has been no traffic timeout in
> several minutes. However, I have not found any documentation for Linux
> (e.g. arp(7)) on

% 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)

kuz...@ms2.inr.ac.ru

unread,
Dec 21, 2000, 1:29:04 PM12/21/00
to
Hello!

> 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

Paul Staniforth

unread,
Dec 21, 2000, 4:28:50 PM12/21/00
to
My original reason for asking this question was that entries
appeared to stay in the ARP cache (up to 10 minutes) for much longer
than the ARP cache timers seemed to indicate.

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

kuz...@ms2.inr.ac.ru

unread,
Dec 22, 2000, 11:46:49 AM12/22/00
to
Hello!

> 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.

0 new messages