From owner-freebsd-net Tue Oct 22 7:40:46 2002 Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 29FB537B401 for ; Tue, 22 Oct 2002 07:40:45 -0700 (PDT) Received: from mailb.telia.com (mailb.telia.com [194.22.194.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0E21643E6A for ; Tue, 22 Oct 2002 07:40:44 -0700 (PDT) (envelope-from erikt@midgard.homeip.net) Received: from d1o913.telia.com (d1o913.telia.com [195.252.44.241]) by mailb.telia.com (8.12.5/8.12.5) with ESMTP id g9MEeg15019217 for ; Tue, 22 Oct 2002 16:40:42 +0200 (CEST) X-Original-Recipient: Received: from falcon.midgard.homeip.net (h76n3fls20o913.telia.com [213.67.148.76]) by d1o913.telia.com (8.8.8/8.8.8) with SMTP id QAA09535 for ; Tue, 22 Oct 2002 16:40:41 +0200 (CEST) Received: (qmail 68786 invoked by uid 1001); 22 Oct 2002 14:40:40 -0000 Date: Tue, 22 Oct 2002 16:40:40 +0200 From: Erik Trulsson To: "Marc G. Fournier" Cc: freebsd-net@freebsd.org Subject: Re: dest vs source ports ... Message-ID: <20021022144040.GA68774@falcon.midgard.homeip.net> Mail-Followup-To: "Marc G. Fournier" , freebsd-net@freebsd.org References: <20021022113147.X47756-100000@hub.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20021022113147.X47756-100000@hub.org> User-Agent: Mutt/1.5.1i Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Tue, Oct 22, 2002 at 11:34:28AM -0300, Marc G. Fournier wrote: > > Just a quick question ... how does the OS determine the 'source port' when > connecting to a remote site? is it reasonably safe to assume that the > lower of the two ports is the dest port? for instance, if I try to telnet > to a remote site where the remote site is running a service on port 6667, > is it a pretty safe bet that FreeBSD will pick a port >6667 to go out on? > or is there an equal chance of it being lower? If one does not specify the source port that is to be used the OS just picks one at random from the set of available port numbers. (Alright, it's not quite random, but it could as well be.) There is normally no relationship between source and destination port numbers. -- Erik Trulsson ertr1013@student.uu.se To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message