maximum number of outgoing connections

Igor Sysoev is at rambler-co.ru
Wed Aug 22 00:25:18 PDT 2007


On Mon, Aug 20, 2007 at 10:30:12PM +0400, Igor Sysoev wrote:

> On Mon, Aug 20, 2007 at 09:53:55AM -0700, John-Mark Gurney wrote:
> 
> > Igor Sysoev wrote this message on Mon, Aug 20, 2007 at 19:11 +0400:
> > > It seems that FreeBSD can not make more than
> > > 
> > > net.inet.ip.portrange.last - net.inet.ip.portrange.first
> > > 
> > > simultaneous outgoing connections, i.e., no more than about 64k.
> > > 
> > > If I made ~64000 connections 127.0.0.1:XXXX > 127.0.0.1:80, then
> > > connect() to an external address returns EADDRNOTAVAIL.
> > 
> > Isn't this more of a limitation of TCP/IP than FreeBSD?  because you
> > need to treat the srcip/srcport/dstip/dstport as a unique value, and
> > in your test, you are only changing one of the four...  Have you tried
> > running a second we server on port 8080, and see if you can connect
> > another ~64000 connections to that port too?
> 
> No, TCP/IP limitation is for XXXX in 127.0.0.1:XXXX <> 127.0.0.1:80,
> but FreeBSD limits all outgoing connections to the port range, i.e.
> 
>     local part      remote part
>   127.0.0.1:5000 <> 127.0.0.1:80
> 192.168.1.1:5000 <> 10.0.0.1:25
> 
> can not exist simultaneously, if both connections were started from
> local host.

To be exact - if connect() was called on unbound socket.


-- 
Igor Sysoev
http://sysoev.ru/en/


More information about the freebsd-net mailing list