Re: [netmod] 6021 ipv4-prefix

Mikael Abrahamsson <> Thu, 18 April 2019 07:16 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 32D911200B8 for <>; Thu, 18 Apr 2019 00:16:22 -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 fUlWhNGIe_Rz for <>; Thu, 18 Apr 2019 00:16:19 -0700 (PDT)
Received: from ( []) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id B9B381200F7 for <>; Thu, 18 Apr 2019 00:16:19 -0700 (PDT)
Received: by (Postfix, from userid 501) id 00C05AF; Thu, 18 Apr 2019 09:16:15 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple;; s=mail; t=1555571776; bh=lZxUT4oVchmVi72088MALFX/aPuKe2ARdkg6MA9Jj4A=; h=Date:From:To:Subject:In-Reply-To:References:From; b=iiYnfEiELLcHrz6D30XCebnt7ZiAiwuQKB45LDWOvXimv74xZNY2B2qR5IPO2+Hbo F7yszODHYeUQICnQ4Go90fSBt2rSurkUpBMwxY+gXYlxrJhYNYqsUb/0QXq4T4+jTz gDcJc4o8KFWwrYqtiu45yWR+5OhiGb4U/kUlU95A=
Received: from localhost (localhost []) by (Postfix) with ESMTP id F30089F for <>; Thu, 18 Apr 2019 09:16:15 +0200 (CEST)
Date: Thu, 18 Apr 2019 09:16:15 +0200 (CEST)
From: Mikael Abrahamsson <>
In-Reply-To: <003301d4f498$4f593640$ee0ba2c0$>
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 07:16:22 -0000

On Tue, 16 Apr 2019, wrote:

> We might need to clarify this with the libyang folk.

I see that Michal fixed the bug in libyang. Good.

There is another thing I am unsure about.

What is the netconf server supposed to do if a client tries to store in ipv4-prefix ? Or 2001:db8::1/64 in ipv6-prefix?

Reading the canonical format description in 6021 one might intepret that 
the netconf server should just truncate the host bits and store these as and 2001:db8::/64 ? This means the netconf server actually 
stored something else than the client tried to commit (the resulting 
uint32 and uint128 will have different information than was commited by 
the netconf client).

Or should the netconf server throw an error if the client tries to commit 
data that is not according to the bit pattern described in the canonical 

I guess I am getting confused by the "canonical format" term being used in 
IPv6 for describing the ascii representation of the value, but both in 
IPv4 and IPv6 it's also used to describe how the bits should be set (and 
not be set) depending on prefix/mask.

Also, the IPv4 canoncical format representation doesn't describe at all 
the ascii representation, so for instance would be valid 
according to 6021. I haven't seen this to be a problem in reality though, 
because IPv4 addresses are typically "compressed" the same way, all the 
time. If we're revving 6021, then perhaps some text about ascii 
representation format should be to use the format used by the posix 
function inet_ntoa() ?

Mikael Abrahamsson    email: