Michael Heiming <michael+(E-Mail Removed)> wrote:
> In comp.os.linux.networking Toni Erdmann <for-spammers-(E-Mail Removed)>:
>> Is it possible to have 50000 IP aliases on one
>> interface in Linux?
>> If so, what about 2 * 50000 sockets (TCP+UDP)?
>> If possible, what about up to 10000 processes,
>> each using 2 * 5 sockets (or 1000 processes with
>> 2 * 50, ...)?
>> I know, that there are limits in
>> - Red Hat Linux : 256 IP aliases
>> - SuSE Linux : 512 (or was it 1024) IP aliases
> Did you try this out with recent version and it made sense (not
> class C subnet)?
>> Is there a kernel parameter (or #define, -D, ...)
>> to increase the value?
> There have been limits in 2.0/2.2. AFAIK those have gone, a
> recent kernel should allow "virtually" unlimited aliases.
> Anyway you could write a short script and simply try it or
> read up the source, I'd prefer the first, for the fun of it.
Michael is correct as you can see 2**32=4294967296
# uname -a
Linux test 2.4.26 #1 Sat Nov 27 08:38:10 CST 2004 sparc unknown
# ifconfig eth0:4294967296 10.0.2.15 up
# ifconfig -a
eth0 Link encap:Ethernet HWaddr 08:00:20:79:89:46
inet addr:192.168.0.254 Bcast:192.168.0.255
Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:5899251 errors:0 dropped:0 overruns:0 frame:0
TX packets:6293965 errors:1 dropped:0 overruns:0 carrier:1
collisions:23782 txqueuelen:1000
RX bytes:1128214406 (1.0 GiB) TX bytes:2027006570 (1.8 GiB)
Interrupt:38
eth0:4294 Link encap:Ethernet HWaddr 08:00:20:79:89:46
inet addr:10.0.2.15 Bcast:10.255.255.255 Mask:255.0.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:38
# ifconfig eth0:4294 down
SIOCSIFFLAGS: Cannot assign requested address
# ifconfig eth0:4294967296 down
#
You just need a better "ifconfig" command so that it does not truncate
the alias.