Possible? eth0:1 ... eth0:50000

Possible? eth0:1 ... eth0:50000

Post by Toni Erdman » Sat, 15 Jan 2005 21:26:48



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

 
 
 

Possible? eth0:1 ... eth0:50000

Post by Vivek Git » Sat, 15 Jan 2005 23:28:12


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


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

 
 
 

Possible? eth0:1 ... eth0:50000

Post by prg » Sat, 15 Jan 2005 23:38:08



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

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

See above.

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

See above

Quote:> 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

 
 
 

Possible? eth0:1 ... eth0:50000

Post by Toni Erdman » Sun, 16 Jan 2005 02:04:45




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

Quote:

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

'maintenance' - surely a horror

Thanks
Toni

 
 
 

Possible? eth0:1 ... eth0:50000

Post by Michael Heimin » Sun, 16 Jan 2005 03:39:05



Quote:> 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)?

Quote:> 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)

#bofh excuse 222: I'm not sure. Try calling the Internet's
head office -- it's in the book.

 
 
 

Possible? eth0:1 ... eth0:50000

Post by Andy Furnis » Sun, 16 Jan 2005 04:59:08



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

Quote:

> 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

 
 
 

Possible? eth0:1 ... eth0:50000

Post by Alex_Yung/id=alyun » Sun, 16 Jan 2005 05:04:18




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

 
 
 

Possible? eth0:1 ... eth0:50000

Post by Toni Erdman » Sun, 16 Jan 2005 05:26:22


Andy Furniss schrieb:


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

Quote:}

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

Thanks
Toni

 
 
 

Possible? eth0:1 ... eth0:50000

Post by Toni Erdman » Sun, 16 Jan 2005 05:27:50


Alex_Yung/id=alyung schrieb:



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

 
 
 

Possible? eth0:1 ... eth0:50000

Post by Toni Erdman » Sun, 16 Jan 2005 05:29:22


Michael Heiming wrote


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

 
 
 

Possible? eth0:1 ... eth0:50000

Post by prg » Sun, 16 Jan 2005 12:14:35





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

Just curious -- no need to respond if you're busy simulating 50000
customers.  Email must be a b***h.

What are you simulating/testing so that putting that many IPs on a
single nic would give you useful info?  Just a routable bit bucket in
order to test some front end setup?
good luck,
prg
email above disabled

 
 
 

Possible? eth0:1 ... eth0:50000

Post by Bill Unr » Sun, 16 Jan 2005 15:16:46






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

Where would you get those addresses from? Noone is going to allow you to
have 50000 addresses to waste in this silly fashion (you cannot arbitrarily
grab addresses for yourself.)
Of course you could use the 10.x.x.x range, but that would be unroutable.

I think you have confused yourself.

Quote:>> ...

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

???
 
 
 

Possible? eth0:1 ... eth0:50000

Post by Toni Erdman » Sun, 16 Jan 2005 19:57:56


prg wrote


...

> What are you simulating/testing so that putting that many IPs on a
> single nic would give you useful info?  Just a routable bit bucket in
> order to test some front end setup?
> good luck,

SIP subscribers in a 3GPP environment.

Toni

 
 
 

Possible? eth0:1 ... eth0:50000

Post by Toni Erdman » Sun, 16 Jan 2005 19:59:46


Bill Unruh wrote


...

> Where would you get those addresses from? Noone is going to allow you to
> have 50000 addresses to waste in this silly fashion (you cannot arbitrarily
> grab addresses for yourself.)
> Of course you could use the 10.x.x.x range, but that would be unroutable.

Ther's no need for routing. On the other side, we configure the routers.

Quote:> I think you have confused yourself.

No, not me myself, but others me.

Toni

 
 
 

Possible? eth0:1 ... eth0:50000

Post by Toni Erdman » Wed, 23 Mar 2005 19:29:16



> Andy Furniss schrieb:


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

Did some more examination:

50,000 'ip addr add' worked fine with 192.168.1-200.1-250.
But it takes some time to perform 'ip addr' to show all these.

Used Perl's "Event" module to write a script that creates 1,000
UDP sockets and started this one 50 times. 1,024 is the limit for
a 'select()' call, that is used in "Event"!
Each UDP socket uses it's own IP address and port '7' == 'echo'.

Sent 1,024 byte UDP packet from another host to every 1,000st
IP address (192.168.4.250, 192.168.8.250, ...) every 20 msec,
to see whether and how it scales. I did all this for 50k, 40k,
30k, 20k, 10k and 1k IP addresses.

Evaluation of CPU-load measurements is still in progress.

Next measurements is to use
nmap --data_lenght 1024 -n -sU -P0 -p7 -T5 192.168.1-200.1-5
nmap --data_lenght 1024 -n -sU -P0 -p7 -T5 192.168.1-200.6-10
nmap --data_lenght 1024 -n -sU -P0 -p7 -T5 192.168.1-200.11-15
...
to scan the complete range of addresses with 50 nmap processes in
parallel (again with 50k, ..., 1k IP addresses). ARP requests could
be a problem. We'll see.

Toni

 
 
 

1. rh7.1: delaying eth0 initialization?? eth0 startup fail?

Hi

I've wiped out my rh7.2 and downgraded to rh7.1, the system works
fine, however after some messinag around with linuxconf, i can't start
up my eth0 anymore. When i try to start it up, it saids :

Starting eth0: delaying eth0 initialization     [failed]

I've checked my network configurations and network scripts and
couldn't see what the problem is. Anyone out there help me? I don't
want to reinstall it AGAIN. Thanks.

Cheers,
Nev
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Nevin Wong        | nevin at netvigator dot com
Nevolution        | http://nev.hello.to/
Model Making Ring | http://modelmakingring.hello.to

2. How to install SSH and use the telnet & Ftp services

3. eth0 shuts down with NETDEV WATCHDOG: eth0: transmit timed out error.

4. SCO 3.2v4.2 PPP/Bind difficulty

5. "eth0" vs. "eth0:1"

6. SoundBlaster 16 Not working under Debian

7. What does Bringingup eth0: Delaying eth0 initialization <Failed> mean?

8. System Administration for Sun/Solaris

9. Q: want to keep eth0 as eth0... really.

10. Newbie eth0 eth0:0

11. eth0 and eth1 "Delaying eth0 Initialization" and "Delaying eth1 Initialization" errors

12. eth0 and eth0:0

13. eth0 and eth1 interfaces using eth0 NIC