Re: [netmod] 6021 ipv4-prefix

Mikael Abrahamsson <swmike@swm.pp.se> Thu, 18 April 2019 09:43 UTC

Return-Path: <swmike@swm.pp.se>
X-Original-To: netmod@ietfa.amsl.com
Delivered-To: netmod@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 6E4F8120309 for <netmod@ietfa.amsl.com>; Thu, 18 Apr 2019 02:43:11 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.301
X-Spam-Level:
X-Spam-Status: No, score=-4.301 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=swm.pp.se
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 56dqtgTFq2lr for <netmod@ietfa.amsl.com>; Thu, 18 Apr 2019 02:43:08 -0700 (PDT)
Received: from uplift.swm.pp.se (ipv6.swm.pp.se [IPv6:2a00:801::f]) (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 74EC31202F1 for <netmod@ietf.org>; Thu, 18 Apr 2019 02:43:08 -0700 (PDT)
Received: by uplift.swm.pp.se (Postfix, from userid 501) id 04385AF; Thu, 18 Apr 2019 11:43:06 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=swm.pp.se; s=mail; t=1555580586; bh=4EqFfUXAjrQ86EKaOApx0Jq2qzDcro2HB6Sux2gnG+o=; h=Date:From:To:cc:Subject:In-Reply-To:References:From; b=OvOj13hljQbf9Q8/NjC1iVfTb2jHMg1EOZEAzlN3048osDOzJZWCKOhqLhEhHC5rY nhOlNDlhoADYdKGRhNp1xebKDRZas88o7RzJmhwyNIyrUgXxZYldFtdb4otywkJ53d EvA78r1EJcO9L3IqknMRQKd93/KaHft189X/y6m4=
Received: from localhost (localhost [127.0.0.1]) by uplift.swm.pp.se (Postfix) with ESMTP id 007349F; Thu, 18 Apr 2019 11:43:05 +0200 (CEST)
Date: Thu, 18 Apr 2019 11:43:05 +0200 (CEST)
From: Mikael Abrahamsson <swmike@swm.pp.se>
To: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
cc: netmod@ietf.org
In-Reply-To: <20190418080643.gcdi5x4dtn64adwc@anna.jacobs.jacobs-university.de>
Message-ID: <alpine.DEB.2.20.1904181128480.3490@uplift.swm.pp.se>
References: <003301d4f498$4f593640$ee0ba2c0$@gmail.com> <alpine.DEB.2.20.1904180906360.3490@uplift.swm.pp.se> <20190418080643.gcdi5x4dtn64adwc@anna.jacobs.jacobs-university.de>
User-Agent: Alpine 2.20 (DEB 67 2015-01-07)
Organization: People's Front Against WWW
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII; format=flowed
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/aaciw4CS-ObTSHgdQsSjlHGP2ng>
Subject: Re: [netmod] 6021 ipv4-prefix
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: NETMOD WG list <netmod.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netmod>, <mailto:netmod-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netmod/>
List-Post: <mailto:netmod@ietf.org>
List-Help: <mailto:netmod-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netmod>, <mailto:netmod-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 18 Apr 2019 09:43:18 -0000

On Thu, 18 Apr 2019, Juergen Schoenwaelder wrote:

> The values 2001:db8::1/64 and 2001:db8::/64 are both legal inputs but
> they result in the same value. In situations where multiple inputs
> resolve to the same value, we define a canonical representation. And
> in the case of ipv6-prefix, the canonical representation is
> 2001:db8::/64. Hence, if you configure 2001:db8::1/64, then the server
> will accept that input report the value back as 2001:db8::/64. The
> main reason for having canonical formats is to make comparisons easy
> and predictable. Think about xpath expressions - without a predictable
> canonical representations, they would become rather complex since they
> would have to deal with several different representations.

Yes, I perfectly understand the IPv6 compression canonical format, since 
it results in two bit fields expressed in ASCII can be string compared.

However, from a networking point of view 2001:db8::/64 and 2001:db8::1/64 
are NOT the same, and I believe all systems I have interacted with would 
throw an error if I tried to commect 2001:db8::1/64 when the system 
expected the last 64 bits to be zeroed.

2001:db8::/64 2001:db8:0::/64 is the same thing when you use ut fir 
configuration, after the configuration has been applied in the system. 
They're two different (correct) representations of the same configuration 
item. I fully understand why the canonical format is needed here and how 
it's supposed to be used.

2001:db8::/64 and 2001:db8::1/64 are NOT the same if you use them.

https://tools.ietf.org/html/rfc6020#section-9.1

"   For most types, there is a single canonical representation of the
    type's values.  Some types allow multiple lexical representations of
    the same value, for example, the positive integer "17" can be
    represented as "+17" or "17".  Implementations MUST support all
    lexical representations specified in this document."

I don't know what the word "lexical" representation means here. Let's take 
another example.

If I commit "+17.4" into an integer, should I expect the netconf server to 
round this down to 17 and commit that? This is effectively the same thing 
as the above example. When I tried this just now, I got that 17.4 is not a 
valid integer from the software I am using. Is this software doing the 
wrong thing?

-- 
Mikael Abrahamsson    email: swmike@swm.pp.se