Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Oct 2002 16:40:40 +0200
From:      Erik Trulsson <ertr1013@student.uu.se>
To:        "Marc G. Fournier" <scrappy@hub.org>
Cc:        freebsd-net@freebsd.org
Subject:   Re: dest vs source ports ...
Message-ID:  <20021022144040.GA68774@falcon.midgard.homeip.net>
In-Reply-To: <20021022113147.X47756-100000@hub.org>
References:  <20021022113147.X47756-100000@hub.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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.



-- 
<Insert your favourite quote here.>
Erik Trulsson
ertr1013@student.uu.se

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021022144040.GA68774>