[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120130122546.GE8376@canuck.infradead.org>
Date: Mon, 30 Jan 2012 07:25:46 -0500
From: Thomas Graf <tgraf@...radead.org>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: Simon Chen <simonchennj@...il.com>, netdev@...r.kernel.org
Subject: Re: increase the number of routing tables
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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists