Re: SLAAC RFC4862 - appropriate length of fe80:: prefix

Brian E Carpenter <brian.e.carpenter@gmail.com> Fri, 14 September 2018 20:30 UTC

Return-Path: <brian.e.carpenter@gmail.com>
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 1AC51128D0C for <ipv6@ietfa.amsl.com>; Fri, 14 Sep 2018 13:30:23 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Level:
X-Spam-Status: No, score=-2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
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 TpFI1fH36A-h for <ipv6@ietfa.amsl.com>; Fri, 14 Sep 2018 13:30:20 -0700 (PDT)
Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 3D811128CF3 for <ipv6@ietf.org>; Fri, 14 Sep 2018 13:30:20 -0700 (PDT)
Received: by mail-pl1-x62a.google.com with SMTP id f6-v6so4700596plo.1 for <ipv6@ietf.org>; Fri, 14 Sep 2018 13:30:20 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=0Vvr2xzUU04tnUdt+Y53VTAmVjoSCx6YCFnzkDa2YmQ=; b=XsnKXs2NYkegFBTuOfYhb9f14QS7Ln/gmia6XjYUkmW9CfrQwd8aRTHqLuQv2X04PX 4JMXTtoSTB2JjZSRRpvv2bDy/4VRx/NAXXNu+iTHSEriHaCiKegSqBOvkKC50w8PemP5 KzDplT2fKKPQ7/D/PVegNJsYL8aYWTcpVJrfNGT1ILC8dXp3qauWM5uh2xy4pK6ja7cY s4jw7vvYYIUZPFRwUFkbfBJvk1SOAovrtL3wUOQlcOuzNEdT1cwWc4X21uztA89q19om qN++aa3NQxAZKO93Ri3Ex9w5HLsPoP4dVdLeuS9FzZ3ATab3N440olaCbmku6Rz2Tgyc 9iYQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=0Vvr2xzUU04tnUdt+Y53VTAmVjoSCx6YCFnzkDa2YmQ=; b=cwUoTdTA0jvrRjLfzTBWhBhWVGgGLYYJ/eRqWJQ077cTWv87HzLyHmPuvfjJrRQpCR 5101Deu2JDZHA0sMW+Kd4kejGtvwyrEUvJCn1PzHE7mfBrIDsg1C+Pofwuo7SVgnsaof vAnvEuiYmZ9cTHFi3RB9uou2xvvRW8HOBsNOIxLcX8R34l0WsxsbDGF0039kZ46kNayP XM2JLMKEySRsreiIAXdLG7ZwkoAbA5L/U+h/qTdP1Hdxq2wtoXhCrlBHMxxYaKF5ADH+ YoBQvHGbrG6GZQHR8P1fhfE5HZi7W3g7G7WvH/n7TaSyxdB2ezw1T4dGLUjb5LveZYnD kgxw==
X-Gm-Message-State: APzg51D1zB3vZ+5CnUXLAUzFYZKW5Tkh4L+5OvghsRFWwnAlVkTNbgyA 0IwbvzNXJB8WaA7AomjJSxD1HqOr
X-Google-Smtp-Source: ANB0Vdb9Ix+dDtWkZRxEcEqMTrnENcCOEf0JG+HJnBhP8qRmBlWFIs/DxfV+LWbTCcRGl3FbZdGAEg==
X-Received: by 2002:a17:902:e088:: with SMTP id cb8-v6mr13772653plb.189.1536957019051; Fri, 14 Sep 2018 13:30:19 -0700 (PDT)
Received: from [192.168.178.30] ([118.148.76.40]) by smtp.gmail.com with ESMTPSA id s27-v6sm13498799pfk.133.2018.09.14.13.30.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Sep 2018 13:30:18 -0700 (PDT)
Subject: Re: SLAAC RFC4862 - appropriate length of fe80:: prefix
To: 神明達哉 <jinmei@wide.ad.jp>, Alexandre Petrescu <alexandre.petrescu@gmail.com>
Cc: IPv6 IPv6 List <ipv6@ietf.org>
References: <6d9657d0-803c-fcb2-ddb9-13f707bdfd47@gmail.com> <CAJE_bqe2wiyOZT+JK9m=9EuTC3PWuO8bPrFGJ44XVFgSwv4zPQ@mail.gmail.com>
From: Brian E Carpenter <brian.e.carpenter@gmail.com>
Message-ID: <0c8dc6f6-43f7-e066-f497-66e9642bab0d@gmail.com>
Date: Sat, 15 Sep 2018 08:30:12 +1200
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1
MIME-Version: 1.0
In-Reply-To: <CAJE_bqe2wiyOZT+JK9m=9EuTC3PWuO8bPrFGJ44XVFgSwv4zPQ@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
Content-Language: en-US
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/ipv6/2gBe2CgJQX4Y1Vl17NG_I9sz6aw>
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: Fri, 14 Sep 2018 20:30:23 -0000

Incidentally, this matches the terminology of draft-carpenter-6man-lap-01.
The Shortest Acceptable Identifier Length (SAIL) is 64 because
of SLAAC, and the Longest Acceptable Prefix (LAP) is 10. This
is made very clear by the diagram in RFC4291 section 2.5.6.
The inequality LAP + SAIL <= 128 is satisfied, and the bits in
the middle are zero by definition.

Regards
   Brian

On 2018-09-15 04:41, 神明達哉 wrote:
> At Fri, 14 Sep 2018 15:57:04 +0200,
> Alexandre Petrescu <alexandre.petrescu@gmail.com> wrote:
> 
>> In RFC4862 'SLAAC' there is text about an 'appropriate length' of the
>> link-local prefix, and further pointing to RFC4291.
>>
>> What is the 'appropriate length'?
>>
>> Because otherwise it is hard to implement step 2, because it tells the
>> bits after the ll prefix are set to 0.
>>
>>>    A link-local address is formed by combining the well-known link-local
>>>     prefix FE80::0 [RFC4291 <https://tools.ietf.org/html/rfc4291>] (of
> appropriate length) with an interface
>>>     identifier as follows:
>>>
>>>     1.  The left-most 'prefix length' bits of the address are those of
>>>         the link-local prefix.
>>>
>>>     2.  The bits in the address to the right of the link-local prefix
> are
>>>         set to all zeroes.
>>
>> Which are those bits?
> 
> The short answer would be:
> - "the link-local prefix" is fe80::/10
> - "the bits" in bullet #2 are the rightmost 118 bits
> 
> Somewhat longer answer, or explanation:
> 
> I guess a background motivation of the question is that RFC4291
> doesn't explicitly define the term "link-local prefix".  While I
> personally believe the specifications are sufficiently clear for the
> vast majority of implementors, it would have been even more super
> perfect if the description of RFC4862 referred to Section 2.4 of
> RFC4291 and stated "the link-local prefix is the binary prefix shown
> in Section 2.4 of RFC4291 that identifies link-local unicast
> addresses".
> 
> In practice, if it were not fe80::/10, the only other possibility from
> RFC4291 would be fe80::/64 according to this diagram:
> 
>    |   10     |
>    |  bits    |         54 bits         |          64 bits           |
>    +----------+-------------------------+----------------------------+
>    |1111111010|           0             |       interface ID         |
>    +----------+-------------------------+----------------------------+
> 
> Again, personally, I wouldn't consider the intermediate 54 bits to be
> a part of the "link-local prefix", but since RFC4291 doesn't
> explicitly define this term, I can't deny the possibility that someone
> with extraordinary imagination could think that the 54 bits are part
> of "the prefix".
> 
> Even with this interpretation, however, that doesn't matter much in
> practice (at least today), since as of RFC4862 the length of the
> interface ID is supposed to be defined in link-type documents, and
> (AFAIK) all existing such documents say it's 64 bits.
> 
> So, either way, an implementation can auto-configure a link-local
> address, and the result is the same.
> 
> --
> JINMEI, Tatuya
> 
> 
> 
> --------------------------------------------------------------------
> IETF IPv6 working group mailing list
> ipv6@ietf.org
> Administrative Requests: https://www.ietf.org/mailman/listinfo/ipv6
> --------------------------------------------------------------------
>