From owner-freebsd-net@FreeBSD.ORG Tue Nov 13 21:48:20 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EDD349C0 for ; Tue, 13 Nov 2012 21:48:20 +0000 (UTC) (envelope-from dustinwenz@ebureau.com) Received: from internet02.ebureau.com (internet02.tru-signal.biz [65.127.24.21]) by mx1.freebsd.org (Postfix) with ESMTP id ACBAD8FC14 for ; Tue, 13 Nov 2012 21:48:20 +0000 (UTC) Received: from service02.office.ebureau.com (internet06.ebureau.com [65.127.24.25]) by internet02.ebureau.com (Postfix) with ESMTP id 746C8E0D307; Tue, 13 Nov 2012 15:48:14 -0600 (CST) Received: from localhost (localhost [127.0.0.1]) by service02.office.ebureau.com (Postfix) with ESMTP id 4D8C0DFE769; Tue, 13 Nov 2012 15:48:14 -0600 (CST) X-Virus-Scanned: amavisd-new at ebureau.com Received: from service02.office.ebureau.com ([127.0.0.1]) by localhost (internet06.ebureau.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pugrGhKL8RKp; Tue, 13 Nov 2012 15:48:13 -0600 (CST) Received: from square.office.ebureau.com (square.office.iscompanies.com [10.10.20.22]) by service02.office.ebureau.com (Postfix) with ESMTPSA id A11D1DFE74B; Tue, 13 Nov 2012 15:48:13 -0600 (CST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.1 \(1498\)) Subject: Re: Default ephemeral port range From: Dustin Wenz In-Reply-To: <95686CBD-5A11-48BD-A556-5133F537C82E@gmail.com> Date: Tue, 13 Nov 2012 15:48:13 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <2EEDF65D-C235-48A7-9464-82475C26E9DD@ebureau.com> References: <87A2D317-77BA-4641-979D-0AE43247D99E@ebureau.com> <95686CBD-5A11-48BD-A556-5133F537C82E@gmail.com> To: Colin O'Keeffe X-Mailer: Apple Mail (2.1498) Cc: freebsd-net@freebsd.org X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Nov 2012 21:48:21 -0000 Thanks for the information; It would seem that when I invoke the connect() system call, it picks a = client port in the portrange.first-last range and not necessarily in = portrange.hifirst-hilast. Is this expected behavior, or a bug in = connect()? - .Dustin On Nov 12, 2012, at 12:49 PM, Colin O'Keeffe wrote: > 8.1 through 9.1RC will use net.inet.ip.portrange.hifirst (49152) to = .hilast (65535) for ephemeral ports as far as I'm aware. = net.inet.ip.portrange.first to .last are just a reference to available = port numbers as per RFC6056 >=20 > Correct me if I'm wrong but netinet/in_pcb.c:490 indicates this is the = case. >=20 > -Colin >=20 > On 12 Nov 2012, at 17:57, Dustin Wenz wrote: >=20 >> I'm trying to determine why the default ephemeral port range appears = to be 10000 through 65535 in at least 8.1 through 9.1RC. Documentation = regarding the lower bound on the range seems inconsistent. The FreeBSD = website (http://wiki.freebsd.org/SystemTuning) suggests that = net.inet.ip.portrange.first defaults to 49152, which I don't believe is = accurate. >>=20 >> The IANA recommends the range be 49152 through 65535 = (http://tools.ietf.org/html/rfc6056). Is there any particular reason why = net.inet.ip.portrange.first defaults to 10000? >>=20 >> - .Dustin >>=20 >> _______________________________________________ >> freebsd-net@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-net >> To unsubscribe, send any mail to = "freebsd-net-unsubscribe@freebsd.org" >=20 > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"