From: Yar Tikhiy <yar@radio-msu.net>
Subject: Re: IP aliasing & telnet
Date: 1998/05/18 [thread overview]
Message-ID: <6jp30l$dg$1@alpha2.radio-msu.net> (raw)
In-Reply-To: eclu36rcyxc.fsf@ws025.dp.intel.com
In comp.unix.internals Bruce J. Keeler <bkeelerx@iwa.dp.intel.com> wrote:
> As I read the original question, he seems to be wondering how the system
> chooses the source IP address when initiating an outbound connection.
> The answer is that it will pick the one that corresponds to the subnet
> it's going to. The only times that's ambiguous is when there is more
> than one route to the destination, or when the aliased IP addresses are
> on the same subnet. I can't imagine a case when either situation would
> cause a problem.
AFAIK, the case of two routes to the same dst is not relevant here,
because the IP output routine (e.g. BSD ip_output() ) is always told
only about one specific route. It has never to choose between two routes.
And it is ip_output() which sets the src address if it's INADDR_ANY.
In case of two aliases on the same subnet the system seems to choose
'logicaly first' one, e.g. the address of le0 on Solaris and the first
element of the interface address list on BSD.
> If telnet provides no way to bind the client end of the connection, it's
> probably because there's no need.
Yes, I also think there is no need of letting lusers mess with
source addresses :-) However, sometimes it is desirable to make
non-user-end apps like innfeed or Squid which do outgoing connections
use some specific source address. Of course, the apps just call
bind() before connect() to achieve the effect. I think they usually
set the port number to zero when calling bind() and let the system
choose it itself.
SY, Yar
next prev parent reply other threads:[~1998-05-18 4:00 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-05-14 4:00 IP aliasing & telnet Srikanth Throvagunta
1998-05-15 4:00 ` Srikanth Throvagunta
1998-05-15 4:00 ` Yar Tikhiy
1998-05-15 4:00 ` Bruce J. Keeler
1998-05-18 4:00 ` Yar Tikhiy [this message]
1998-05-18 4:00 ` Srikanth Throvagunta
1998-05-18 4:00 ` Srikanth Throvagunta
1998-05-19 4:00 ` Jure Simsic
1998-05-19 4:00 ` Andrew Williams
1998-05-19 4:00 ` Kurt J. Lanza
1998-05-22 4:00 ` Srikanth Throv
1998-05-19 4:00 ` Barry Margolin
1998-05-20 4:00 ` Brian McCauley
1998-06-02 4:00 ` Mark Simon
1998-06-02 4:00 ` T. Srikanth
1998-06-03 4:00 ` Michael Mansour
1998-05-21 4:00 ` Bjorn Borud
1998-05-21 4:00 ` Barry Margolin
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox