Re: [netmod] 6021 ipv4-prefix

Mikael Abrahamsson <> Thu, 18 April 2019 09:43 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 6E4F8120309 for <>; Thu, 18 Apr 2019 02:43:11 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -4.301
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: (amavisd-new); dkim=pass (1024-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id 56dqtgTFq2lr for <>; Thu, 18 Apr 2019 02:43:08 -0700 (PDT)
Received: from ( [IPv6:2a00:801::f]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 74EC31202F1 for <>; Thu, 18 Apr 2019 02:43:08 -0700 (PDT)
Received: by (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;; 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 []) by (Postfix) with ESMTP id 007349F; Thu, 18 Apr 2019 11:43:05 +0200 (CEST)
Date: Thu, 18 Apr 2019 11:43:05 +0200
From: Mikael Abrahamsson <>
To: Juergen Schoenwaelder <>
In-Reply-To: <>
Message-ID: <>
References: <003301d4f498$4f593640$ee0ba2c0$> <> <>
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: <>
Subject: Re: [netmod] 6021 ipv4-prefix
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: NETMOD WG list <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-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.

"   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: