Re: limit on max # of connections from a machine?

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

 



On Mon, 12 Dec 2005, Zubin Dittia wrote:

I'm trying to find out what kind of bounds the ephemeral ports
allocation method in the kernel imposes on the maximum number of
connections out of a given machine.  Specifically, if there are 32K
ephemeral ports configured, then does that mean:

(a) I can have 32K connections open total, regardless of server
(b) I can have 32K connections open per server (to which we connect)
or
(c) I can have 32K connections open per <server,port> (to which we
connect)?

(a) including connections in TIME_WAIT.

I know that theoretically a connection is identified by its 4-tuple
<SA,SP,DA,DP>, so in theory I should be able to establish a very large
number of outgoing connections, much higher than the ephemeral port
range would suggest, but I'm not sure how this has been implemented in
practice.

Correct, but the simplest possible path is currently taken and all ephemeral port assignments works the same way (looks for a completely unused port in the range).

I did try to look into making a patch for improving this on connect() to look for a free tuple rather than just port, but got a bit tangled up in the different layers where port and IP is assigned. It is defenitely technically doable, it's just that the kernel won't do it for you automatically yet..

Regards
Henrik
-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux