Fwd: more than 65535 outbound connections

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---------- Forwarded message ----------
From: Niklaus <niklaus@xxxxxxxxx>
Date: Mar 9, 2007 2:52 PM
Subject: Re: more than 65535 outbound connections
To: David Lang <david.lang@xxxxxxxxxxxxxxxxxx>
Cc: Florian Weimer <fweimer@xxxxxx>


On 3/9/07, David Lang <david.lang@xxxxxxxxxxxxxxxxxx> wrote:
On Fri, 9 Mar 2007, Florian Weimer wrote:

>> i read on the web that terry lambert has got 1.6 million simultaneous
>> connection ? how is the way it is done.
>
> Multiple IP addresses, I guess.

what must be unique is the four-parts of a connection
source IP, source port, destination IP, destination port


what must be unique is the four-parts of a connection
source IP, source port, destination IP, destination port


yes now lets take 2 dest machines , source ip is fixed , source port (2^16 - 1)
destip is fixed (a.a.a.a and b.b.b.b) ,dest port(2^16 -1) each ,

for a connection we have one port used , say connection 1 is

source ip,port 1 , a.a.a.a port 1
source ip,port 2 , a.a.a.a port 2
.
.
.
source ip,port 65535 , a.a.a.a port 65535

so total of 65535 connections (assume traffic is still going on, a
movie on a slow line dialup or 1kbps )

now if i try to open another connection (assume lots of file
descriptors are present) to a.a.a.a what happens

to b.b.b.b what happens

i think both will not get established as the OS doesn't have any free
source ports or am i wrong



as long as the set is unique any element can be re-used (a big webserver has one
IP and port on the server side, but many IPs and ports on the client side)

when you make a connection you have the option of not specifying the source IP
and port (letting the OS/library pick ones for you). some libraries will not
re-use the same source port for multiple connections, others will (with the
appropriate options)

if you want to have your program assign the source IPs and port itself you can
do so (you may have to also give the library/os a flag that tells it you know
what you're doing, and it's ok to let you re-use ports)

David Lang


--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux