From owner-freebsd-net@FreeBSD.ORG Mon Aug 20 16:53:57 2007 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F347E16A418 for ; Mon, 20 Aug 2007 16:53:56 +0000 (UTC) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (gate.funkthat.com [69.17.45.168]) by mx1.freebsd.org (Postfix) with ESMTP id CF60013C4B0 for ; Mon, 20 Aug 2007 16:53:56 +0000 (UTC) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (hbf1xbqfrscx2yqe@localhost.funkthat.com [127.0.0.1]) by hydrogen.funkthat.com (8.13.6/8.13.3) with ESMTP id l7KGruXm069549; Mon, 20 Aug 2007 09:53:56 -0700 (PDT) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.13.6/8.13.3/Submit) id l7KGrtIi069547; Mon, 20 Aug 2007 09:53:55 -0700 (PDT) (envelope-from jmg) Date: Mon, 20 Aug 2007 09:53:55 -0700 From: John-Mark Gurney To: Igor Sysoev Message-ID: <20070820165354.GN99491@funkthat.com> Mail-Followup-To: Igor Sysoev , freebsd-net@freebsd.org References: <20070820151142.GA20183@rambler-co.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070820151142.GA20183@rambler-co.ru> User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD 5.4-RELEASE-p6 i386 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html Cc: freebsd-net@freebsd.org Subject: Re: maximum number of outgoing connections X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: John-Mark Gurney List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2007 16:53:57 -0000 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? -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."