lkml.org 
[lkml]   [1996]   [Sep]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: IP Alias Limit
On Fri, 20 Sep 1996, James L. McGill wrote:

> What is the limit to the number of IPALIASes?
> I need to install 506 IP Addresses on a box and
> make Apache HTTPD answer to them.
net devices aliases are limited to 256.
You can raise it by editing linux/include/net_alias.h:

--- linux/include/linux/net_alias.h Thu Sep 19 21:33:14 1996
+++ linux_alias+/include/linux/net_alias.h Mon Sep 23 11:14:58 1996
@@ -25,7 +25,7 @@
* max. alias slot number allowed
*/

-#define NET_ALIAS_MAX_SLOT 256
+#define NET_ALIAS_MAX_SLOT 1024

struct net_alias;
struct net_alias_info;

There is no "side-effect" in editing this value (maybe 256 was a poor
choice).

Anyway there is 16-entry hash table ( 16*sizeof(void*) ) created for each
aliasED device (struct net_alias_info) . This hash_tab is mainly used for
incoming pkts [ip_input.c:ip_rcv()] lookup to select alias device whose
address is iph->daddr (thus allowing references to alias devices:
firewalling, proxy arp, etc).

We could make this stuff configurable:
- At config-time:
Something like "CONFIG_NET_ALIAS_LOT"
. NET_ALIAS_MAX_SLOT=<really_high>
. NET_ALIAS_HASH_SIZE=256 (256*4=1Kb for each aliasED device)
Making this option "boolean" allows a 'compile-time-selection'
of faster hash function code.

- At runtime:
Via sysctl interface so one can select max_slot (and set proper
hash_size) before creating device aliasing structures. This nicer
approach has one main drawback: hash function will depend on a
*runtime* value stored in net_alias_info structure.

Suggestions?

2
-- Juanjo, J C <jjciarla@raiz.uncu.edu.ar>

\
 
 \ /
  Last update: 2005-03-22 13:38    [W:0.307 / U:0.324 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site