Possible? eth0:1 ... eth0:50000

This is a discussion on Possible? eth0:1 ... eth0:50000 within the Linux Networking forums, part of the Linux Forums category; Is it possible to have 50000 IP aliases on one interface in Linux? If so, what about 2 * 50000 sockets (...


Go Back   Usenet Forums > Linux Forums > Linux Networking

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-14-2005
Toni Erdmann
 
Posts: n/a
Default Possible? eth0:1 ... eth0:50000

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

Is there a kernel parameter (or #define, -D, ...)
to increase the value?

Thanks
Toni
Reply With Quote
  #2 (permalink)  
Old 01-14-2005
Vivek Gite
 
Posts: n/a
Default Re: Possible? eth0:1 ... eth0:50000

No it is not possible. Max limit is upto 256 aliases per ethX as far as
i knew it.

Toni Erdmann wrote:
> 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
>
> Is there a kernel parameter (or #define, -D, ...)
> to increase the value?
>
> Thanks
> Toni


--
www.nixCraft.com
__________________________________
Who am I? What am I doing? Why this happened to me? Are you stuck in
life? Then read the most age old "Bhagwat gita" to solve all mysteries
of life.

Reply With Quote
  #3 (permalink)  
Old 01-14-2005
prg
 
Posts: n/a
Default Re: Possible? eth0:1 ... eth0:50000


Toni Erdmann wrote:
> Is it possible to have 50000 IP aliases on one
> interface in Linux?


Can't remember the limit offhand -- came across it one time -- and it
was larger than any sensible person would _ever_ need, so forgot about
it. 256?

> If so, what about 2 * 50000 sockets (TCP+UDP)?


See above.

> If possible, what about up to 10000 processes,
> each using 2 * 5 sockets (or 1000 processes with
> 2 * 50, ...)?


See above

> I know, that there are limits in
>
> - Red Hat Linux : 256 IP aliases
> - SuSE Linux : 512 (or was it 1024) IP aliases
>
> Is there a kernel parameter (or #define, -D, ...)
> to increase the value?


That or a source code constant -- else how did Suse ramp it up to a two
byte value?

Even if there were, what Earthly -- or unearthly -- use would you have
for such a beast?

Sounds like maintenance hemorrhoids to me ;-) And only one poor nic to
handle all that traffic :-(

Surely there is a better way to scratch your itch.
regards,
prg
email above disabled

Reply With Quote
  #4 (permalink)  
Old 01-14-2005
Toni Erdmann
 
Posts: n/a
Default Re: Possible? eth0:1 ... eth0:50000

prg wrote:
> Toni Erdmann wrote:
>
>>Is it possible to have 50000 IP aliases on one
>>interface in Linux?

....
>
> Even if there were, what Earthly -- or unearthly -- use would you have
> for such a beast?


Simulating 50000 users who must have (unfortunatelly) each it's
own IP address.

>
> Sounds like maintenance hemorrhoids to me ;-) And only one poor nic to
> handle all that traffic :-(
>


'maintenance' - surely a horror

Thanks
Toni
Reply With Quote
  #5 (permalink)  
Old 01-14-2005
Michael Heiming
 
Posts: n/a
Default Re: Possible? eth0:1 ... eth0:50000

In comp.os.linux.networking Toni Erdmann <for-spammers-only@web.de>:
> 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 Heiming (X-PGP-Sig > GPG-Key ID: EDD27B94)
mail: echo zvpunry@urvzvat.qr | perl -pe 'y/a-z/n-za-m/'
#bofh excuse 222: I'm not sure. Try calling the Internet's
head office -- it's in the book.
Reply With Quote
  #6 (permalink)  
Old 01-14-2005
Andy Furniss
 
Posts: n/a
Default Re: Possible? eth0:1 ... eth0:50000

Toni Erdmann wrote:

> Is it possible to have 50000 IP aliases on one
> interface in Linux?


Don't know but you could also try the ip way

ip adress add .....

Andy.


>
> 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
>
> Is there a kernel parameter (or #define, -D, ...)
> to increase the value?
>
> Thanks
> Toni


Reply With Quote
  #7 (permalink)  
Old 01-14-2005
Alex_Yung/id=alyung
 
Posts: n/a
Default Re: Possible? eth0:1 ... eth0:50000

Michael Heiming <michael+USENET@www.heiming.de> wrote:
> In comp.os.linux.networking Toni Erdmann <for-spammers-only@web.de>:
>> 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.
Reply With Quote
  #8 (permalink)  
Old 01-14-2005
Toni Erdmann
 
Posts: n/a
Default Re: Possible? eth0:1 ... eth0:50000

Andy Furniss schrieb:
> Toni Erdmann wrote:
>
>
>>Is it possible to have 50000 IP aliases on one
>>interface in Linux?

>
>
> Don't know but you could also try the ip way
>
> ip adress add .....
>
> Andy.
>


Did it and it seems to work. Tried 4000 adresses.

next step will be:

Perl script:

for-loop oder 64000
{
$IP_address = ... some code ...
$resp = `ip addr add $IP_address.....`;

socket(.....)
bind(..., $IP_address, ...)
...
}

to see the limits with
- IP addresses
- sockets
- file descriptors
- ...

Thanks
Toni
Reply With Quote
  #9 (permalink)  
Old 01-14-2005
Toni Erdmann
 
Posts: n/a
Default Re: Possible? eth0:1 ... eth0:50000

Alex_Yung/id=alyung schrieb:
> Michael Heiming <michael+USENET@www.heiming.de> wrote:
>
>>In comp.os.linux.networking Toni Erdmann <for-spammers-only@web.de>:
>>

....
> You just need a better "ifconfig" command so that it does not truncate
> the alias.


I tried "ip addr add ..."

see other posting in same group.

Toni
Reply With Quote
  #10 (permalink)  
Old 01-14-2005
Toni Erdmann
 
Posts: n/a
Default Re: Possible? eth0:1 ... eth0:50000

Michael Heiming wrote
> In comp.os.linux.networking Toni Erdmann <for-spammers-only@web.de>:
>

....
> 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.;)
>


Yes, will do that. See other posting in same thread.

Toni
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 02:33 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0