netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* ipv6 hitting route max_size
@ 2011-06-06 21:37 Simon Kirby
  2011-06-06 22:01 ` David Miller
  0 siblings, 1 reply; 8+ messages in thread
From: Simon Kirby @ 2011-06-06 21:37 UTC (permalink / raw)
  To: netdev, YOSHIFUJI Hideaki

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-
 

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-06-24 21:59 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-06 21:37 ipv6 hitting route max_size Simon Kirby
2011-06-06 22:01 ` 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

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