* increase the number of routing tables [not found] <CANj2EbfR0cBaBd+t1yCZyErRpVzSC00DZohvtyazK8_9bv2aEQ@mail.gmail.com> @ 2012-01-29 2:23 ` Simon Chen 2012-01-29 11:50 ` Jan Engelhardt 0 siblings, 1 reply; 8+ messages in thread From: Simon Chen @ 2012-01-29 2:23 UTC (permalink / raw) To: netfilter 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... Thanks. -Simon ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: increase the number of routing tables 2012-01-29 2:23 ` increase the number of routing tables Simon Chen @ 2012-01-29 11:50 ` Jan Engelhardt 2012-01-29 23:24 ` Ed W 0 siblings, 1 reply; 8+ messages in thread From: Jan Engelhardt @ 2012-01-29 11:50 UTC (permalink / raw) To: Simon Chen; +Cc: netfilter On Sunday 2012-01-29 03:23, Simon Chen wrote: >Hey folks, > >To my limited knowledge, Linux currently supports 256 (255?) routing >tables defined in /etc/iproute2/rt_tables. There are 2147483647. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: increase the number of routing tables 2012-01-29 11:50 ` Jan Engelhardt @ 2012-01-29 23:24 ` Ed W 2012-01-30 0:31 ` Stephen Hemminger 0 siblings, 1 reply; 8+ messages in thread From: Ed W @ 2012-01-29 23:24 UTC (permalink / raw) To: Jan Engelhardt; +Cc: Simon Chen, netfilter On 29/01/2012 11:50, Jan Engelhardt wrote: > On Sunday 2012-01-29 03:23, Simon Chen wrote: > >> Hey folks, >> >> To my limited knowledge, Linux currently supports 256 (255?) routing >> tables defined in /etc/iproute2/rt_tables. > There are 2147483647. > Any reason why it's not an unsigned 32bit int? (surely there is a corner case where this is useful...) Ed W ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: increase the number of routing tables 2012-01-29 23:24 ` Ed W @ 2012-01-30 0:31 ` Stephen Hemminger 2012-01-30 2:02 ` Jan Engelhardt 0 siblings, 1 reply; 8+ messages in thread From: Stephen Hemminger @ 2012-01-30 0:31 UTC (permalink / raw) To: Ed W; +Cc: Jan Engelhardt, Simon Chen, netfilter On Sun, 29 Jan 2012 23:24:27 +0000 Ed W <lists@wildgooses.com> wrote: > On 29/01/2012 11:50, Jan Engelhardt wrote: > > On Sunday 2012-01-29 03:23, Simon Chen wrote: > > > >> Hey folks, > >> > >> To my limited knowledge, Linux currently supports 256 (255?) routing > >> tables defined in /etc/iproute2/rt_tables. > > There are 2147483647. > > > > Any reason why it's not an unsigned 32bit int? (surely there is a corner > case where this is useful...) > > Ed W The 8 bit value is enshrined in the API for 'struct rtmsg' and therefore increasing it would break existing applications. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: increase the number of routing tables 2012-01-30 0:31 ` Stephen Hemminger @ 2012-01-30 2:02 ` Jan Engelhardt 2012-01-30 16:14 ` Stephen Hemminger 0 siblings, 1 reply; 8+ messages in thread From: Jan Engelhardt @ 2012-01-30 2:02 UTC (permalink / raw) To: Stephen Hemminger; +Cc: Ed W, Simon Chen, netfilter On Monday 2012-01-30 01:31, Stephen Hemminger wrote: >On Sun, 29 Jan 2012 23:24:27 +0000 >Ed W <lists@wildgooses.com> wrote: > >> On 29/01/2012 11:50, Jan Engelhardt wrote: >> > On Sunday 2012-01-29 03:23, Simon Chen wrote: >> > >> >> Hey folks, >> >> >> >> To my limited knowledge, Linux currently supports 256 (255?) routing >> >> tables defined in /etc/iproute2/rt_tables. >> > There are 2147483647. >> > >> >> Any reason why it's not an unsigned 32bit int? (surely there is a corner >> case where this is useful...) >> >> Ed W > >The 8 bit value is enshrined in the API for 'struct rtmsg' and therefore >increasing it would break existing applications. Actually, what Ed (and me too) was wondering about was: why does `ip route show table $[0x80000000]` not print an empty table, i.e. where is it that some code uses int/s32 during parsing of the argument and/or the RTA_TABLE attribute? ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: increase the number of routing tables 2012-01-30 2:02 ` Jan Engelhardt @ 2012-01-30 16:14 ` Stephen Hemminger 2012-01-30 18:57 ` Jan Engelhardt 0 siblings, 1 reply; 8+ messages in thread From: Stephen Hemminger @ 2012-01-30 16:14 UTC (permalink / raw) To: Jan Engelhardt; +Cc: Ed W, Simon Chen, netfilter On Mon, 30 Jan 2012 03:02:35 +0100 (CET) Jan Engelhardt <jengelh@medozas.de> wrote: > On Monday 2012-01-30 01:31, Stephen Hemminger wrote: > > >On Sun, 29 Jan 2012 23:24:27 +0000 > >Ed W <lists@wildgooses.com> wrote: > > > >> On 29/01/2012 11:50, Jan Engelhardt wrote: > >> > On Sunday 2012-01-29 03:23, Simon Chen wrote: > >> > > >> >> Hey folks, > >> >> > >> >> To my limited knowledge, Linux currently supports 256 (255?) routing > >> >> tables defined in /etc/iproute2/rt_tables. > >> > There are 2147483647. > >> > > >> > >> Any reason why it's not an unsigned 32bit int? (surely there is a corner > >> case where this is useful...) > >> > >> Ed W > > > >The 8 bit value is enshrined in the API for 'struct rtmsg' and therefore > >increasing it would break existing applications. > > Actually, what Ed (and me too) was wondering about was: > > why does `ip route show table $[0x80000000]` not print an empty table, > i.e. where is it that some code uses int/s32 during parsing of > the argument and/or the RTA_TABLE attribute? There are lots of places internally in ip utilities that use u32 for route table. But the route input/output message format is still limited to 8 bits. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: increase the number of routing tables 2012-01-30 16:14 ` Stephen Hemminger @ 2012-01-30 18:57 ` Jan Engelhardt 2012-01-30 19:21 ` Stephen Hemminger 0 siblings, 1 reply; 8+ messages in thread From: Jan Engelhardt @ 2012-01-30 18:57 UTC (permalink / raw) To: Stephen Hemminger; +Cc: Ed W, Simon Chen, netfilter On Monday 2012-01-30 17:14, Stephen Hemminger wrote: >> >> > There are 2147483647. >> >> >> >> Any reason why it's not an unsigned 32bit int? (surely there is a corner >> >> case where this is useful...) >> > >> >The 8 bit value is enshrined in the API for 'struct rtmsg' and therefore >> >increasing it would break existing applications. >> >> Actually, what Ed (and me too) was wondering about was: >> >> why does `ip route show table $[0x80000000]` not print an empty table, >> i.e. where is it that some code uses int/s32 during parsing of >> the argument and/or the RTA_TABLE attribute? > >There are lots of places internally in ip utilities that use u32 >for route table. But the route input/output message format is still limited >to 8 bits. But then, adding a rule to table 258 would make it show up in table 2 as well, which is not the case. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: increase the number of routing tables 2012-01-30 18:57 ` Jan Engelhardt @ 2012-01-30 19:21 ` Stephen Hemminger 0 siblings, 0 replies; 8+ messages in thread From: Stephen Hemminger @ 2012-01-30 19:21 UTC (permalink / raw) To: Jan Engelhardt; +Cc: Ed W, Simon Chen, netfilter On Mon, 30 Jan 2012 19:57:20 +0100 (CET) Jan Engelhardt <jengelh@medozas.de> wrote: > On Monday 2012-01-30 17:14, Stephen Hemminger wrote: > > >> >> > There are 2147483647. > >> >> > >> >> Any reason why it's not an unsigned 32bit int? (surely there is a corner > >> >> case where this is useful...) > >> > > >> >The 8 bit value is enshrined in the API for 'struct rtmsg' and therefore > >> >increasing it would break existing applications. > >> > >> Actually, what Ed (and me too) was wondering about was: > >> > >> why does `ip route show table $[0x80000000]` not print an empty table, > >> i.e. where is it that some code uses int/s32 during parsing of > >> the argument and/or the RTA_TABLE attribute? > > > >There are lots of places internally in ip utilities that use u32 > >for route table. But the route input/output message format is still limited > >to 8 bits. > > But then, adding a rule to table 258 would make it show up in table 2 as > well, which is not the case. Ok, drilling deeper, overlooked the extended table support. Tables >= 256 are handled by setting rtm_table to RT_TABLE_UNSPEC and sending a RTA_TABLE attribute. Therefore it has worked for quite a while. But, I also see code in other utilities (like net-snmp and quagga) which don't know about how to handle tables other than main. But that is a different issue. ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2012-01-30 19:21 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CANj2EbfR0cBaBd+t1yCZyErRpVzSC00DZohvtyazK8_9bv2aEQ@mail.gmail.com>
2012-01-29 2:23 ` increase the number of routing tables Simon Chen
2012-01-29 11:50 ` Jan Engelhardt
2012-01-29 23:24 ` Ed W
2012-01-30 0:31 ` Stephen Hemminger
2012-01-30 2:02 ` Jan Engelhardt
2012-01-30 16:14 ` Stephen Hemminger
2012-01-30 18:57 ` Jan Engelhardt
2012-01-30 19:21 ` Stephen Hemminger
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox