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 ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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 |
|
|||
|
"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. ??? |
|
|||
|
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 |
|
|||
|
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 |
|
|||
|
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 |
|
|||
|
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 |