65535 outbound connections

Niklaus niklaus at gmail.com
Fri Mar 9 11:22:30 UTC 2007


Hi

I could be wrong in the below description or might have misunderstood
many of the concepts , please correct appropriately.

 65535 ports can allowed . So on a  machine namely C you can have max
65535 outbound connections


What i was thinking was to send to another machines A and B from the
same port [X] and then when we get data from it to [X] we can the send
it to the correct application using stateful mapping or storing some
information . The machines A and B are unaware of this mapping from
the C  machine.

Can we increase it by anymeans in the kernel. Does we have patches for the above

 i read on the web that terry lambert has got 1.6 million simultaneous
connection ? how is the way it is done.

http://kerneltrap.org/node/277




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


More information about the freebsd-questions mailing list