Networking Forums  

Go Back   Networking Forums > Networking Newsgroups > Linux Networking

Possible? eth0:1 ... eth0:50000

Reply
 
Thread Tools Display Modes
  #1  
Old 01-14-2005, 12:26 PM
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


Toni Erdmann
Reply With Quote
  #2  
Old 01-14-2005, 02:28 PM
Vivek Gite
Guest
 
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  
Old 01-14-2005, 02:38 PM
prg
Guest
 
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  
Old 01-14-2005, 05:04 PM
Toni Erdmann
Guest
 
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  
Old 01-14-2005, 06:39 PM
Michael Heiming
Guest
 
Posts: n/a
Default Re: Possible? eth0:1 ... eth0:50000

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 Heiming (X-PGP-Sig > GPG-Key ID: EDD27B94)
mail: echo (E-Mail Removed) | 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  
Old 01-14-2005, 07:59 PM
Andy Furniss
Guest
 
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  
Old 01-14-2005, 08:04 PM
Alex_Yung/id=alyung
Guest
 
Posts: n/a
Default Re: Possible? eth0:1 ... eth0:50000

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.
Reply With Quote
  #8  
Old 01-14-2005, 08:26 PM
Toni Erdmann
Guest
 
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  
Old 01-14-2005, 08:27 PM
Toni Erdmann
Guest
 
Posts: n/a
Default Re: Possible? eth0:1 ... eth0:50000

Alex_Yung/id=alyung schrieb:
> Michael Heiming <michael+(E-Mail Removed)> wrote:
>
>>In comp.os.linux.networking Toni Erdmann <for-spammers-(E-Mail Removed)>:
>>

....
> 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  
Old 01-14-2005, 08:29 PM
Toni Erdmann
Guest
 
Posts: n/a
Default Re: Possible? eth0:1 ... eth0:50000

Michael Heiming wrote
> In comp.os.linux.networking Toni Erdmann <for-spammers-(E-Mail Removed)>:
>

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

Tags
eth, eth01

Thread Tools
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 On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 12:54 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.