Date: Fri, 9 Mar 2007 07:49:22 -0500 From: Bill Moran <wmoran@potentialtech.com> To: Atis <atisss@gmail.com> Cc: questions@freebsd.org Subject: Re: 65535 outbound connections Message-ID: <20070309074922.48f3909c.wmoran@potentialtech.com> In-Reply-To: <945196e0703090343r347e31d1i4b1d85c65eb8033@mail.gmail.com> References: <85e0e3140703090253y262681aoca14fb522d18a076@mail.gmail.com> <945196e0703090343r347e31d1i4b1d85c65eb8033@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
In response to Atis <atisss@gmail.com>: > On 3/9/07, Niklaus <niklaus@gmail.com> wrote: > > 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 > > There can be simultaneous connections to one port. For example > apache's httpd - it listens port 80, does that mean, it can serve only > one connection? nope. Once connection is established, it's forwarded > to another thread, that have connection id, and processes it. > > Don't know about outgoing connections, but i think, they also can be > simultaneous. No. Outgoing connections must always grab a unique port. The upshot is that the "socket pair", which is the IP:port of one end of the connection, plus the IP:port of the other end, must always be unique. Since a listening socket (server) will frequently have many connections to the same port, client side apps _must_ pick a unique port each time, to protect from network failure. This is enforce by the operating system. So, the total number of (theoretical) connections is limited by the product of IP space * port range. But the total number of available outgoing connections is limited by the port range, and that's where that 65536 comes from. -- Bill Moran http://www.potentialtech.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070309074922.48f3909c.wmoran>