netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Graf <tgraf@infradead.org>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Simon Chen <simonchennj@gmail.com>, netdev@vger.kernel.org
Subject: Re: increase the number of routing tables
Date: Mon, 30 Jan 2012 07:25:46 -0500	[thread overview]
Message-ID: <20120130122546.GE8376@canuck.infradead.org> (raw)
In-Reply-To: <1327804887.2805.20.camel@edumazet-laptop>

On Sun, Jan 29, 2012 at 03:41:27AM +0100, Eric Dumazet wrote:
> Le samedi 28 janvier 2012 à 21:20 -0500, Simon Chen a écrit :
> > Hey folks,
> > 
> > To my limited knowledge, Linux currently supports 256 (255?) routing
> > tables defined in /etc/iproute2/rt_tables.
> > 
> > Is there a way to increase this number to something much larger? Are
> > there performance/scalability concerns there? I am trying to have
> > customized routing table for each IP address (using "ip rule add from
> > xxx table yyy"). I am not sure exactly how many IPs I'll handle, but
> > certainly more than 255...
> > 
> 
> Its is possible, but probably not scalable.
> 
> You really should not have too many "ip rule" entries, since they are
> evaluated linearly.
> 
> The limit being ~32768 rules
> 
> # ip rule
> 0:	from all lookup local 
> 32763:	from all to 1.2.3.7 lookup test3000 
> 32766:	from all lookup main 
> 32767:	from all lookup default 

I've run into these scalability issues a while ago which is
why I've added the goto action allowing to build a tree like
structures:

0:	from all lookup local 
10:     from eth0 goto 4000
[possibly thousands of rules]
3999:   from all goto 32763
4000:   from all to 1.1.1.1 lookup foo
[...]
32763:	from all to 1.2.3.7 lookup test3000 
32766:	from all lookup main 
32767:	from all lookup default 

  parent reply	other threads:[~2012-01-30 12:25 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-29  2:20 increase the number of routing tables Simon Chen
2012-01-29  2:41 ` Eric Dumazet
2012-01-29  2:46   ` Ben Greear
2012-01-29  4:20     ` Simon Chen
2012-01-29 19:26       ` Ben Greear
2012-01-31  3:06         ` Simon Chen
2012-01-29 21:02       ` David Miller
2012-01-29 21:01     ` David Miller
2012-01-30 17:26       ` Ben Greear
2012-01-30 17:36         ` David Miller
2012-01-30 12:25   ` Thomas Graf [this message]
2012-01-30 12:44     ` Eric Dumazet

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=20120130122546.GE8376@canuck.infradead.org \
    --to=tgraf@infradead.org \
    --cc=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=simonchennj@gmail.com \
    /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).