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

Mark Andrews <marka@isc.org> Thu, 25 April 2019 21:47 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 CAF05120338 for <ipv6@ietfa.amsl.com>; Thu, 25 Apr 2019 14:47:19 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.899
X-Spam-Level:
X-Spam-Status: No, score=-6.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, MIME_QP_LONG_LINE=0.001, RCVD_IN_DNSWL_HI=-5, SPF_PASS=-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 oduB3J918A0h for <ipv6@ietfa.amsl.com>; Thu, 25 Apr 2019 14:47:16 -0700 (PDT)
Received: from mx.pao1.isc.org (mx.pao1.isc.org [IPv6:2001:4f8:0:2::2b]) (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 E661F120330 for <ipv6@ietf.org>; Thu, 25 Apr 2019 14:47:13 -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 5B6473AB03B; Thu, 25 Apr 2019 21:47:13 +0000 (UTC)
Received: from zmx1.isc.org (localhost [127.0.0.1]) by zmx1.isc.org (Postfix) with ESMTPS id 2F9F816006A; Thu, 25 Apr 2019 21:47:13 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1]) by zmx1.isc.org (Postfix) with ESMTP id 0BDB4160071; Thu, 25 Apr 2019 21:47:13 +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 RcPrmQaiPKGx; Thu, 25 Apr 2019 21:47:12 +0000 (UTC)
Received: from [192.168.0.3] (c27-253-115-14.carlnfd2.nsw.optusnet.com.au [27.253.115.14]) by zmx1.isc.org (Postfix) with ESMTPSA id 2FA7916006A; Thu, 25 Apr 2019 21:47:12 +0000 (UTC)
Content-Type: multipart/alternative; boundary="Apple-Mail-C040AC3C-CB67-4500-BE21-751B9EC3B9D8"
Mime-Version: 1.0 (1.0)
Subject: Re: Globally Unique Link Local Addresses (Re: about violation of standards)
From: Mark Andrews <marka@isc.org>
X-Mailer: iPhone Mail (16E227)
In-Reply-To: <CAO42Z2ywLQawBsW9pT-=SX98QyVWsU3pdCHWzgmWwGVTSwNdcw@mail.gmail.com>
Date: Fri, 26 Apr 2019 07:47:08 +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: 7bit
Message-Id: <396C6299-6980-49B7-83B5-8BA839CC6675@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> <887AC8E6-2955-4AB0-9F9E-A20BC93E098C@isc.org> <CAO42Z2ywLQawBsW9pT-=SX98QyVWsU3pdCHWzgmWwGVTSwNdcw@mail.gmail.com>
To: Mark Smith <markzzzsmith@gmail.com>
Archived-At: <https://mailarchive.ietf.org/arch/msg/ipv6/Vdfgw3KJ17vGcmSbneKRaYQ2LuI>
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: Thu, 25 Apr 2019 21:47:20 -0000

Which mythical application only takes IP addresses then connects to them?  I’ve yet to see one written.

Yes, scoped addresses are a small pain.

Yes, storing scoped addresses in the DNS is not currently supported.  It wouldn’t be that hard to add support with a new type that provided a globally unique name for the link and that name gets locally mapped to a scope id.   The A6 record format repurposed would work. Add a RA option to publish the globally unique link name to each link.  Getaddinfo could filter out non local link local addresses. 

Getaddrinfo doesn’t just optionally look stuff up in the DNS. It also does transformations like converting to mapped addresses when the node is IPv6 only.  It could potentially apply DNS64 translations as well.

Using getaddrinfo for address literals has been advised for years.
-- 
Mark Andrews

> On 24 Apr 2019, at 20:29, Mark Smith <markzzzsmith@gmail.com> wrote:
> 
> 
> 
>> On Wed., 24 Apr. 2019, 16:04 Mark Andrews, <marka@isc.org> wrote:
>> 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.
> 
> 
> 
> I was more thinking about scenarios where only an address is expected to be supplied, so there would not be a need for a DNS lookup.
> 
> So it wouldn't and didn't occur to me to use getaddrinfo() just for the purpose of converting an LL address % string into a sockaddr_in6 structure. 
> 
> LL addresses not being useful to applications if stored in unicast DNS, because of the absent necessary zone info in a AAAA response, also means getaddrinfo() doesn't sound like the right thing to use.
> 
> 
>> 
>> 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
>>