From: Simon Kirby <sim@hostway.ca>
To: netdev <netdev@vger.kernel.org>,
YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Subject: ipv6 hitting route max_size
Date: Mon, 6 Jun 2011 14:37:27 -0700 [thread overview]
Message-ID: <20110606213727.GB11757@hostway.ca> (raw)
Hello,
/proc/sys/net/ipv4/route/max_size is the maximum size of the ipv4 route
_cache_, which is based on hash table size which is based on ram size.
The route _cache_ (eg: ip -4 route show cache) is not allowed to grow
beyond this size. gc_min_interval_ms was added to allow garbage
collection to happen often enough that this would not be reached even
under spoofed-address attacks (which we used to see happen before).
/proc/sys/net/ipv6/route/max_size and a number of similar GC knobs exist,
but max_size seems to limit the size of the v6 route table, not the v6
route cache. net/ipv6/route.c:2829 just sets this to 4096:
net->ipv6.sysctl.ip6_rt_max_size = 4096;
If I set up quagga and ipv6 bgp peering to the Internets, I get about
6075 routes today, exceeding this limit. This cases zebra to log errors
such as this when it tries to add the routes to the kernel:
netlink-cmd error: Cannot allocate memory, type=RTM_NEWROUTE(24), seq=27089196, pid=0
This goes away if I increase /proc/sys/net/ipv6/route/max_size.
Is this cache limit somehow tied to route entries by some (un)intentional
IPv6 feature?
Reproduce with something like this (bash, 2.6.32 or 2.6.39 or similar):
for ((i = 0;i < 4200;i++)); do ip route add unreachable 2000::$i; done
Note that 4100 succeeds on my box, so something else is also happening.
Simon-
next reply other threads:[~2011-06-06 21:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-06 21:37 Simon Kirby [this message]
2011-06-06 22:01 ` ipv6 hitting route max_size David Miller
2011-06-06 23:15 ` Simon Kirby
2011-06-06 23:28 ` David Miller
2011-06-07 7:56 ` David Miller
2011-06-09 4:40 ` Simon Kirby
2011-06-24 21:35 ` David Miller
2011-06-24 21:57 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110606213727.GB11757@hostway.ca \
--to=sim@hostway.ca \
--cc=netdev@vger.kernel.org \
--cc=yoshfuji@linux-ipv6.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).