Re: [netmod] 6021 ipv4-prefix

Mikael Abrahamsson <swmike@swm.pp.se> Thu, 18 April 2019 07:16 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 32D911200B8 for <netmod@ietfa.amsl.com>; Thu, 18 Apr 2019 00:16:22 -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 fUlWhNGIe_Rz for <netmod@ietfa.amsl.com>; Thu, 18 Apr 2019 00:16:19 -0700 (PDT)
Received: from uplift.swm.pp.se (swm.pp.se [212.247.200.143]) (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 B9B381200F7 for <netmod@ietf.org>; Thu, 18 Apr 2019 00:16:19 -0700 (PDT)
Received: by uplift.swm.pp.se (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; d=swm.pp.se; 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 [127.0.0.1]) by uplift.swm.pp.se (Postfix) with ESMTP id F30089F for <netmod@ietf.org>; Thu, 18 Apr 2019 09:16:15 +0200 (CEST)
Date: Thu, 18 Apr 2019 09:16:15 +0200 (CEST)
From: Mikael Abrahamsson <swmike@swm.pp.se>
To: netmod@ietf.org
In-Reply-To: <003301d4f498$4f593640$ee0ba2c0$@gmail.com>
Message-ID: <alpine.DEB.2.20.1904180906360.3490@uplift.swm.pp.se>
References: <003301d4f498$4f593640$ee0ba2c0$@gmail.com>
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/N3l3O3DwT_YO7-JJaNuJGxp_174>
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 07:16:22 -0000

On Tue, 16 Apr 2019, 7riw77@gmail.com 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 
192.168.1.1/24 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 
192.168.1.0/24 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 
format?

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 192.168.001.001 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: swmike@swm.pp.se