Re: [dhcwg] Prefix-length of an assigned address, in a DHCPv6 message

Alexandru Petrescu <alexandru.petrescu@gmail.com> Fri, 05 September 2014 17:05 UTC

Return-Path: <alexandru.petrescu@gmail.com>
X-Original-To: dhcwg@ietfa.amsl.com
Delivered-To: dhcwg@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 9CC291A0AE2 for <dhcwg@ietfa.amsl.com>; Fri, 5 Sep 2014 10:05:49 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.983
X-Spam-Level:
X-Spam-Status: No, score=-4.983 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001, HELO_EQ_FR=0.35, NML_ADSP_CUSTOM_MED=0.9, RCVD_IN_DNSWL_HI=-5, SPF_SOFTFAIL=0.665] autolearn=ham
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 1D0NuYOU83o4 for <dhcwg@ietfa.amsl.com>; Fri, 5 Sep 2014 10:05:46 -0700 (PDT)
Received: from cirse-out.extra.cea.fr (cirse-out.extra.cea.fr [132.167.192.142]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 008B01A0AE9 for <dhcwg@ietf.org>; Fri, 5 Sep 2014 10:05:42 -0700 (PDT)
Received: from pisaure.intra.cea.fr (pisaure.intra.cea.fr [132.166.88.21]) by cirse.extra.cea.fr (8.14.2/8.14.2/CEAnet-Internet-out-2.3) with ESMTP id s85H5e6S032116; Fri, 5 Sep 2014 19:05:40 +0200
Received: from pisaure.intra.cea.fr (localhost [127.0.0.1]) by localhost (Postfix) with SMTP id B7B47203715; Fri, 5 Sep 2014 19:05:56 +0200 (CEST)
Received: from muguet1.intra.cea.fr (muguet1.intra.cea.fr [132.166.192.6]) by pisaure.intra.cea.fr (Postfix) with ESMTP id A94B6203706; Fri, 5 Sep 2014 19:05:56 +0200 (CEST)
Received: from [127.0.0.1] (is010446-4.intra.cea.fr [10.8.33.116]) by muguet1.intra.cea.fr (8.13.8/8.13.8/CEAnet-Intranet-out-1.2) with ESMTP id s85H5RmK010276; Fri, 5 Sep 2014 19:05:40 +0200
Message-ID: <5409ED57.30600@gmail.com>
Date: Fri, 05 Sep 2014 19:05:27 +0200
From: Alexandru Petrescu <alexandru.petrescu@gmail.com>
User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:31.0) Gecko/20100101 Thunderbird/31.1.0
MIME-Version: 1.0
To: Ralph Droms <rdroms.ietf@gmail.com>
References: <20140519150302.3625.29866.idtracker@ietfa.amsl.com> <489D13FBFA9B3E41812EA89F188F018E1B03125B@xmb-rcd-x04.cisco.com> <53E3872A.30204@gmail.com> <53E38954.1030206@gmail.com> <AD6668B4-834A-4777-B667-006BA06A2C4F@gmail.com> <53E39157.8060708@gmail.com> <CAJE_bqcr5ytrgrUWwPLvZ=vHNPe=C4OZcah0529suOLOgM6odA@mail.gmail.com> <53E39635.60608@gmail.com> <CAJE_bqcv6PavTP_-EM-FMwD1hVrsqnfmWaCceZQshsxXNVr=4w@mail.gmail.com> <5409C1B8.3000101@gmail.com> <EC3A32FA-CE3F-41DC-A7CF-109F87980DE9@gmail.com> <5409D1A0.4040407@gmail.com> <F23B845B-5409-4D05-92A3-EF57505D9C64@gmail.com>
In-Reply-To: <F23B845B-5409-4D05-92A3-EF57505D9C64@gmail.com>
Content-Type: text/plain; charset="utf-8"; format="flowed"
Content-Transfer-Encoding: 8bit
Archived-At: http://mailarchive.ietf.org/arch/msg/dhcwg/GpGgR9aI-tQLGN5PxKO2HxTBjMM
Cc: dhcwg <dhcwg@ietf.org>, 神明達哉 <jinmei@wide.ad.jp>
Subject: Re: [dhcwg] Prefix-length of an assigned address, in a DHCPv6 message
X-BeenThere: dhcwg@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <dhcwg.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/dhcwg>, <mailto:dhcwg-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/dhcwg/>
List-Post: <mailto:dhcwg@ietf.org>
List-Help: <mailto:dhcwg-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/dhcwg>, <mailto:dhcwg-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 05 Sep 2014 17:05:49 -0000

Le 05/09/2014 18:42, Ralph Droms a écrit :
>
>
>> On Sep 5, 2014, at 8:07 AM, Alexandru Petrescu
>> <alexandru.petrescu@gmail.com> wrote:
>>
>> Le 05/09/2014 16:24, Ralph Droms a écrit :
>>>
>>> On Sep 5, 2014, at 6:59 AM 9/5/14, Alexandru Petrescu
>>> <alexandru.petrescu@gmail.com> wrote:
>>>
>>>> Le 07/08/2014 18:24, 神明達哉 a écrit :
>>>>> At Thu, 07 Aug 2014 17:07:33 +0200, Alexandru Petrescu
>>>>> <alexandru.petrescu@gmail.com> wrote:
>>>>>
>>>>>> That aside, I wonder why programmers have set that 64 in
>>>>>> the kernel data absent a prefix length field in DHCP/RA, if
>>>>>> not because of the fact that specifications are lacking.
>>>>>> Were it for DHCPv6 to have a prefix length field for
>>>>>> assigned address A, then programmer would be clearer of
>>>>>> what to put on that field, I think.
>>>>>
>>>>> I guess you're basically re-raising a long standing
>>>>> discussion of whether to provide an on-link prefix via
>>>>> DHCPv6.
>>>>>
>>>>> My understanding is that we have never reached a consensus
>>>>> on this at IETF (consider, for example, how
>>>>> http://tools.ietf.org/html/draft-droms-dhc-dhcpv6-default-router-00
>>>>>
>>>>>
>>
>>>>>
was discussed and we still don't have any published outcome), so a
>>>>> simple rehash of it won't bring us anywhere.  At the very
>>>>> least it's safer to discuss it outside the scope of
>>>>> rfc3315bis (because otherwise we'll never be able to publish
>>>>> the bis).
>>>>
>>>> Jinmei, thanks for the pointer.
>>>>
>>>> But I wonder whether there is any draft that talks about how
>>>> DHCPv6 sends a prefix-length of the assigned IPv6 address, to
>>>> the Client? (not Prefix Delegation, but the equivalent of the
>>>> Prefix Length field of a PIO of a Router Advertisement)?
>>>
>>> According to current published IPv6 standards, there is no
>>> prefix length associated with an IPv6 address.  An IPv6 address
>>> assigned to an interface in a host is a 128-bit value.   There is
>>> no implication that any leftmost bits of an IPv6 address assigned
>>> to an interface correspond to any prefixes assigned to a link.
>>
>> But in practice if I say "ifconfig add eth0 1::1" it will result in
>> "1::1/128".  That '128' is put in 'prefix length' fields.
>>
>> There is a difference between the address being a 128bit value and
>> a prefix length of that value.
>
> I seem to recall having a similar discussion several years ago, in
> which I argued that the ifconfig syntax and semantics are wrong and
> that ifconfig should omit the prefix length entirely.  The consensus
> was that it was too late to fix ifconfig.
>
> I'm hoping someone else might also recall that conversation and
> confirm or correct my memory...

WEll, your discussion was maybe at a time when ifconfig required a 
prefix-len parameter.  It no longer does.  But ifconfig introduces a 
'128' when the user does not specify that parameter.  BEcause that 
prefix-length is mandatory in the structure.

>>> An IPv6 host is made aware of prefix(es) on a link, which it
>>> then uses for forwarding decisions, through ND PIOs.
>>
>> Also for on-link determination.
>
> Right (I sort of included on-link determination under forwarding)...
>
>>
>>> DHCPv4 includes a subnet mask with the assigned address as a way
>>> for a host to infer a prefix assigned to the associated link.
>>>
>>> Can you describe how the prefix length associated with an
>>> assigned address is used in the kernel code from which you
>>> extracted the snippet below?
>>
>> The snippet is from DHCPv6 client code, not from kernel code.  It
>> is that line which makes subsequently that the address assigned on
>> the interface has a prefix-length 64.
>
> Ok, but there is still the question of why the API in the code
> snippet includes a prefix length and...
>>
>> For the kernel part, I would go as far as to say that this
>> highly-used kernel code is not in line with the standards:
>> linux/.../if_inet6.h:
>>> struct inet6_ifaddr { 43    struct in6_addr    addr; 44    __u32
>>> prefix_len;
>>
>> This is the structure which defines addresses on interfaces.  The
>> very fact that the prefix-len is an integer (and not a pointer,
>> which could be nil) means that every address assigned on an
>> interface must have a prefix length.
>
> ... how is the prefix_len component of the struct used in the
> kernel?

Good question, let's see.

Alex

>
>>
>> This concept is very different than saying that an address may have
>> no prefix length.
>>
>> Alex
>>
>>>
>>>>
>>>> Alex
>>>>
>>>>> } else { /* Current practice is that all subnets are /64's,
>>>>> but * some suspect this may not be permanent. */
>>>>> client_envadd(client, prefix, "ip6_prefixlen", "%d", 64);
>>>> ^ make this variable.
>>>>
>>>>>
>>>>> -- JINMEI, Tatuya
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>>
>>
>>
>
>