Bluehost.com Web Hosting $6.95

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; Toni Erdmann wrote: > prg wrote: > > Toni Erdmann wrote: > > > >>Is it possible to ...


Go Back   Usenet Forums > Linux Forums > Linux Networking

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


Toni Erdmann wrote:
> 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


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

Reply With Quote
  #12 (permalink)  
Old 01-15-2005
Bill Unruh
 
Posts: n/a
Default Re: Possible? eth0:1 ... eth0:50000

"prg" <rdgentry1@cablelynx.com> writes:


>Toni Erdmann wrote:
>> prg wrote:
>> > Toni Erdmann wrote:
>> >
>> >>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.


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


???


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

prg wrote
> Toni Erdmann 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
Reply With Quote
  #14 (permalink)  
Old 01-15-2005
Toni Erdmann
 
Posts: n/a
Default Re: Possible? eth0:1 ... eth0:50000

Bill Unruh wrote
> "prg" <rdgentry1@cablelynx.com> writes:
>

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

> I think you have confused yourself.
>


No, not me myself, but others me.

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

Toni Erdmann wrote:
> 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
> - ...


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
Reply With Quote
  #16 (permalink)  
Old 03-22-2005
Toni Erdmann
 
Posts: n/a
Default Re: Possible? eth0:1 ... eth0:50000

Toni Erdmann wrote:

> Toni Erdmann wrote:
>
>> 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
>> - ...

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

no of | sar | ps |
ip addresses | | |
-------------+-------+-------+-----------------------
50,000 | 9.1 | 2.5 | msec CPU-time per packet in/out
40,000 | 7.6 | 2.4 | msec CPU-time per packet in/out
30,000 | 6.3 | 2.3 | msec CPU-time per packet in/out
20,000 | 5.1 | 2.3 | msec CPU-time per packet in/out
10,000 | 3.8 | 2.3 | msec CPU-time per packet in/out
1,000 | 2.5 | 2.3 | msec CPU-time per packet in/out

measured with 1024 bytes UDP packets in/out to every
1,000st IP address. no of packets 10,000 for each.

Seems that a lot of the work is spent in the kernel and
can not be assigned to any process.
- sar cpu load calculated (sys and user)
- ps from /proc/PID/stat (sys and user)
and calculated from all PIDs
Perl-scripts used > 95% of the CPU time

I guess, not the number of IP addresses is the problem, but
the number of open sockets. When receiving a packet, the
UDP stack must find the right socket/application to deliver
the packet to. How can this be improved?
The number of open sockets is the same as the number of IP
addresses here.

Toni

--
System information:

uname -a
Linux speedy 2.6.5-7.147-default #1 Thu Jan 27 09:19:29 UTC 2005 i686
athlon i386 GNU/Linux

/proc/cpuinfo
processor : 0
vendor_id : AuthenticAMD
cpu family : 6
model : 10
model name : AMD Athlon(TM) XP 3000+
stepping : 0
cpu MHz : 2154.051
cache size : 512 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 1
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca cmov pat
pse36 mmx fxsr sse syscall mmxext 3dnowext 3dnow
bogomips : 4243.45

/proc/meminfo
MemTotal: 515664 kB
MemFree: 165688 kB
Buffers: 78100 kB
Cached: 148840 kB
SwapCached: 0 kB
Active: 261016 kB
Inactive: 48648 kB
HighTotal: 0 kB
HighFree: 0 kB
LowTotal: 515664 kB
LowFree: 165688 kB
SwapTotal: 1052216 kB
SwapFree: 1052216 kB
Dirty: 8 kB
Writeback: 0 kB
Mapped: 92264 kB
Slab: 23164 kB
Committed_AS: 131360 kB
PageTables: 1212 kB
VmallocTotal: 507896 kB
VmallocUsed: 173568 kB
VmallocChunk: 333332 kB
HugePages_Total: 0
HugePages_Free: 0
Hugepagesize: 4096 kB
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:01 PM.


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