[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1327804887.2805.20.camel@edumazet-laptop>
Date: Sun, 29 Jan 2012 03:41:27 +0100
From: Eric Dumazet <eric.dumazet@...il.com>
To: Simon Chen <simonchennj@...il.com>
Cc: netdev@...r.kernel.org
Subject: Re: increase the number of routing tables
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
# cat /etc/iproute2/rt_tables
#
# reserved values
#
255 local
254 main
253 default
0 unspec
#
# local
#
#1 inr.ruhep
3000 test3000
# ip route list table 3000
1.2.3.4 dev eth0 scope link
--
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