Re: Globally Unique Link Local Addresses (Re: about violation of standards)

Mark Andrews <marka@isc.org> Wed, 24 April 2019 06:04 UTC

Return-Path: <marka@isc.org>
X-Original-To: ipv6@ietfa.amsl.com
Delivered-To: ipv6@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 544AD12004C for <ipv6@ietfa.amsl.com>; Tue, 23 Apr 2019 23:04:56 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.9
X-Spam-Level:
X-Spam-Status: No, score=-6.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Ghq-exhmO9Y6 for <ipv6@ietfa.amsl.com>; Tue, 23 Apr 2019 23:04:54 -0700 (PDT)
Received: from mx.pao1.isc.org (mx.pao1.isc.org [149.20.64.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 45646120150 for <ipv6@ietf.org>; Tue, 23 Apr 2019 23:04:52 -0700 (PDT)
Received: from zmx1.isc.org (zmx1.isc.org [149.20.0.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx.pao1.isc.org (Postfix) with ESMTPS id A0B433AB041; Wed, 24 Apr 2019 06:04:51 +0000 (UTC)
Received: from zmx1.isc.org (localhost [127.0.0.1]) by zmx1.isc.org (Postfix) with ESMTPS id 6CFE3160053; Wed, 24 Apr 2019 06:04:51 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1]) by zmx1.isc.org (Postfix) with ESMTP id 3A52416006A; Wed, 24 Apr 2019 06:04:51 +0000 (UTC)
Received: from zmx1.isc.org ([127.0.0.1]) by localhost (zmx1.isc.org [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id ObSgvZ2Xt9A9; Wed, 24 Apr 2019 06:04:51 +0000 (UTC)
Received: from [172.30.42.67] (c27-253-115-14.carlnfd2.nsw.optusnet.com.au [27.253.115.14]) by zmx1.isc.org (Postfix) with ESMTPSA id 6F799160053; Wed, 24 Apr 2019 06:04:49 +0000 (UTC)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\))
Subject: Re: Globally Unique Link Local Addresses (Re: about violation of standards)
From: Mark Andrews <marka@isc.org>
In-Reply-To: <CAO42Z2wimfJexfUfs+mfo6Cs8simv9XyTqCaU49VDaSqBG-BxQ@mail.gmail.com>
Date: Wed, 24 Apr 2019 16:04:46 +1000
Cc: 神明達哉 <jinmei@wide.ad.jp>, Fernando Gont <fgont@si6networks.com>, "Pascal Thubert (pthubert)" <pthubert@cisco.com>, 6man WG <ipv6@ietf.org>, Alexandre Petrescu <alexandre.petrescu@gmail.com>
Content-Transfer-Encoding: quoted-printable
Message-Id: <887AC8E6-2955-4AB0-9F9E-A20BC93E098C@isc.org>
References: <bb7f7606-2adf-e669-8bcd-e41f17800782@gmail.com> <CAJE_bqd9frqX5-yeVPj8MYXpZ4737HqK1gmfD9cQV3A-Ea5HrQ@mail.gmail.com> <6bd5db47-408a-727e-5c13-f34a3465f986@si6networks.com> <CAJE_bqfTLqRbLp4fLu2ASZuZ+4G5c2G+RXkO92kXfLgPTqBnng@mail.gmail.com> <EEF00EA7-2AAF-403F-99AD-1D53ED18E8B3@cisco.com> <47631828-121F-402D-8165-969684C1101B@employees.org> <CAO42Z2wbq=8f6FfR7DoOOFrY7B5puxS26Dk+SsM71Pk7y03ipQ@mail.gmail.com> <afa6e0e2-0a31-53f0-0f41-5e24c81405da@gmail.com> <CAO42Z2zoQtAqzT+v2XYequuWysrLo+WOG8Ou=asRMakQHuS-Pg@mail.gmail.com> <CAJE_bqcJZxWd1ZH8u0rqK5PfwNK9qqmw9O-7=u6Tpu_UTF7-Aw@mail.gmail.com> <CAO42Z2wimfJexfUfs+mfo6Cs8simv9XyTqCaU49VDaSqBG-BxQ@mail.gmail.com>
To: Mark Smith <markzzzsmith@gmail.com>
X-Mailer: Apple Mail (2.3445.9.1)
Archived-At: <https://mailarchive.ietf.org/arch/msg/ipv6/5t7i8uM20A09d_Ose3PHWWrtDAY>
X-BeenThere: ipv6@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "IPv6 Maintenance Working Group \(6man\)" <ipv6.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ipv6>, <mailto:ipv6-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/ipv6/>
List-Post: <mailto:ipv6@ietf.org>
List-Help: <mailto:ipv6-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ipv6>, <mailto:ipv6-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 24 Apr 2019 06:04:56 -0000

getaddrinfo() does in most implementations as it returns a pointer to a
struct sockaddr_in6 which have a sin6_scope_id field.  inet_pton() deals
with the part to the left of the % symbol.

From various getaddrinfo man pages.

MacOS:

     This implementation of getaddrinfo() allows numeric IPv6 address notation
     with scope identifier, as documented in section 11 of RFC 4007.  By
     appending the percent character and scope identifier to addresses, one
     can fill the sin6_scope_id field for addresses.  This would make manage-
     ment of scoped addresses easier and allows cut-and-paste input of scoped
     addresses.

     At this moment the code supports only link-local addresses with the for-
     mat.  The scope identifier is hardcoded to the name of the hardware
     interface associated with the link (such as ne0).  An example is
     ``fe80::1%ne0'', which means ``fe80::1 on the link associated with the
     ne0 interface''.

     The current implementation assumes a one-to-one relationship between the
     interface and link, which is not necessarily true from the specification.

Linux:
     Notes

     getaddrinfo() supports the address%scope-id notation for specifying the IPv6
     scope-ID.


Mark

> On 24 Apr 2019, at 3:12 pm, Mark Smith <markzzzsmith@gmail.com> wrote:
> 
> 
> 
> On Wed., 24 Apr. 2019, 14:01 神明達哉, <jinmei@wide.ad.jp> wrote:
> At Wed, 24 Apr 2019 13:28:48 +1000,
> Mark Smith <markzzzsmith@gmail.com> wrote:
> 
> > However, the drawback of using LL addresses is that each application
> > has to be written to specifically handle them viasin6_scope_id.
> 
> This is not entirely accurate.  Section 11 of RFC 4007 exists exactly
> for this purpose.  And, in fact, applications like ssh can perfectly
> work for a link-local destination even on a multi-link host even if
> the application (ssh client) doesn't do anything special for
> link-local address:
> 
> % ssh fe80::1%lo0 'echo ok'  
> ok
> 
> 
> So what Sockets API function converts "fe80::1%lo0" into a populated sockaddr_in6 structure including sin6_scope_id?
> 
> inet_pton() only deals with and returns addresses, so it seems you have to write additional special case code that handles the % zone suffix.
> 
> 
> It's true that *some* applications may still need to handle link-local
> addresses as a special case, though.
> 
> > I understand that one of the motivations for Link-Local addressing was
> > the "dentist's office" scenario i.e. non-technical, plug and play, "it
> > just works" networking. Having to have specially adapted applications
> > to suit that that scenario is pretty contradictory to that goal.
> 
> I wouldn't expect a dentist to type in a textual link-local address
> (or for that matter, perhaps any textual IPv6 address) anyway.
> 
> So my thoughts have been that things like MDNS would also return the zone information for a LL address to the resolver, although I haven't looked into whether it does or not.
> 
> I still see that it would be simpler if interface or zone information was effectively embedded in the LL address, as it is in GUA and ULA addresses, using the, transparent to the application, node's route table to resolve and determine the ingress/egress network link interface.
> 
> 
>   In
> this context it's more about a higher level problem than
> scope-awareness of the application.  It would have to use some kind of
> zero-config service discovery library with sophisticated user
> interface.  That "library" may have to be aware of the concept of
> scoped addresses more explicitly, but the application would be more
> likely to be agnostic about it.
> 
> --
> JINMEI, Tatuya
> --------------------------------------------------------------------
> IETF IPv6 working group mailing list
> ipv6@ietf.org
> Administrative Requests: https://www.ietf.org/mailman/listinfo/ipv6
> --------------------------------------------------------------------

-- 
Mark Andrews, ISC
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: +61 2 9871 4742              INTERNET: marka@isc.org