RE: Thinking differently about the site local problem (was: RE: site local addresses (was Re: Fw: Welcome to the InterNAT...))

"Jeroen Massar" <jeroen@unfix.org> Mon, 31 March 2003 18:13 UTC

Received: from ran.ietf.org (ran.ietf.org [10.27.6.60]) by ietf.org (8.9.1a/8.9.1a) with ESMTP id NAA17482; Mon, 31 Mar 2003 13:13:59 -0500 (EST)
Received: from majordomo by ran.ietf.org with local (Exim 4.10) id 1903yS-0002Hw-00 for ietf-list@ran.ietf.org; Mon, 31 Mar 2003 13:25:36 -0500
Received: from odin.ietf.org ([10.27.2.28] helo=ietf.org) by ran.ietf.org with esmtp (Exim 4.10) id 1903xM-0002Es-00 for ietf@ran.ietf.org; Mon, 31 Mar 2003 13:24:28 -0500
Received: from purgatory.unfix.org (ietf-mx.ietf.org [132.151.6.1]) by ietf.org (8.9.1a/8.9.1a) with ESMTP id NAA17282 for <ietf@ietf.org>; Mon, 31 Mar 2003 13:08:05 -0500 (EST)
Received: from localhost (localhost [127.0.0.1]) by purgatory.unfix.org (Postfix) with ESMTP id 39E978AB7; Mon, 31 Mar 2003 20:10:29 +0200 (CEST)
Received: from limbo (limbo.unfix.org [10.100.13.33]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by purgatory.unfix.org (Postfix) with ESMTP id B854589DF; Mon, 31 Mar 2003 20:10:23 +0200 (CEST)
From: Jeroen Massar <jeroen@unfix.org>
To: 'Christian Huitema' <huitema@windows.microsoft.com>, 'Keith Moore' <moore@cs.utk.edu>, alh-ietf@tndh.net
Cc: john-ietf@jck.com, ietf@ietf.org
Subject: RE: Thinking differently about the site local problem (was: RE: site local addresses (was Re: Fw: Welcome to the InterNAT...))
Date: Mon, 31 Mar 2003 20:11:29 +0200
Organization: Unfix
Message-ID: <004601c2f7b0$f478afd0$210d640a@unfix.org>
MIME-Version: 1.0
Content-Type: text/plain; charset="US-ASCII"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook, Build 10.0.3416
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
In-Reply-To: <DAC3FCB50E31C54987CD10797DA511BA027E0E26@WIN-MSG-10.wingroup.windeploy.ntdev.microsoft.com>
Importance: Normal
X-Virus-Scanned: by AMaViS @ purgatory.unfix.org
Content-Transfer-Encoding: 7bit
Sender: owner-ietf@ietf.org
Precedence: bulk
Content-Transfer-Encoding: 7bit

Christian Huitema wrote:

> Well, that is emphatically *NOT* what application developers 
> do. They do not just observe that it does not work, they try
> to work around, e.g. routing messages to a different address,
> at a different time, through a third party, or through a
> different protocol. 

Indeed, correctly coded applications will use a getaddrinfo()
and then a connect() in a loop until succesful. This will
also overcome filtering as all possibilities will be tried
on the remote side. Note that 'succesful' here means that
it was able to setup a tcp connection. UDP is totally out
of the question here. Some applications could also modify
'succesful' to include a 2xx smtp reply etc. and absolute
failure to be defined by a 5xx error.

The problem is that this doesn't account for the locally-bound
IP though. Thus if a host has a 'site-local' and a 'global'
IP how does it know how to use which one?
Also note that getaddrinfo() is only in use since a couple
of years and most programmers are not even aware of it.

I would suggest that the applications never bind() to a
local address, this is possible for most applications.
Then the stack can figure out which address to use for
the outgoing connection. Most stacks will currently base
this on longest prefix matching. Thus if there is a 'local'
scope and the destination address is also in the same
'local' prefix, this address will be used for the connection.

Greets,
 Jeroen