Re: [netmod] 6991bis: address-with-prefix-length

Martin Bjorklund <mbj@tail-f.com> Thu, 18 April 2019 16:25 UTC

Return-Path: <mbj@tail-f.com>
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 D78C71200B9 for <netmod@ietfa.amsl.com>; Thu, 18 Apr 2019 09:25:36 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.901
X-Spam-Level:
X-Spam-Status: No, score=-1.901 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
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 qzTJeDQaRLpk for <netmod@ietfa.amsl.com>; Thu, 18 Apr 2019 09:25:34 -0700 (PDT)
Received: from mail.tail-f.com (mail.tail-f.com [46.21.102.45]) by ietfa.amsl.com (Postfix) with ESMTP id 76ACE120178 for <netmod@ietf.org>; Thu, 18 Apr 2019 09:25:34 -0700 (PDT)
Received: from localhost (h-4-215.A165.priv.bahnhof.se [158.174.4.215]) by mail.tail-f.com (Postfix) with ESMTPSA id 674321AE0451; Thu, 18 Apr 2019 18:25:32 +0200 (CEST)
Date: Thu, 18 Apr 2019 18:25:32 +0200
Message-Id: <20190418.182532.1575056916244172007.mbj@tail-f.com>
To: j.schoenwaelder@jacobs-university.de
Cc: per@hedeland.org, netmod@ietf.org
From: Martin Bjorklund <mbj@tail-f.com>
In-Reply-To: <20190418160228.6ggya5ay6vvil5wl@anna.jacobs.jacobs-university.de>
References: <9ffbaa76105f00cc57bf071d432299e55f024544.camel@nic.cz> <ff7ac95a-3544-5485-c9d6-ff2b57ecf5cd@hedeland.org> <20190418160228.6ggya5ay6vvil5wl@anna.jacobs.jacobs-university.de>
X-Mailer: Mew version 6.7 on Emacs 25.2 / Mule 6.0 (HANACHIRUSATO)
Mime-Version: 1.0
Content-Type: Text/Plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/xcUdvcb-P8IEW_FYJ5FinbfIMFs>
Subject: Re: [netmod] 6991bis: address-with-prefix-length
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 16:25:37 -0000

Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de> wrote:
> On Thu, Apr 18, 2019 at 03:14:20PM +0200, Per Hedeland wrote:
> 
> > Agreed - except the not entirely minor nit that the thing after the
> > "/" is not a prefix but a *prefix-length*. Another way of putting it
> > is that the IP address is a property of an interface, while the
> > prefix-length or subnet mask is a property of the network that an
> > interface is connected to.
> 
> The property relevant for the network is the _prefix_, not the
> prefix-length. The prefix-length 12 does not tell the system the
> network prefix that is valid on the link, the prefix tells it. In
> other words, you have a single value that gives you an address and a
> prefix, hence ip-address-and-prefix. The question is whether we name
> it according to the pieces that go into the combined value or whether
> we name it according to the meaning of the combined value. What goes
> in is "address + prefix length" and the meaning is "address + prefix".
> 
> > From a data modelling perspective, having separate leafs for separate
> > values should be the natural choice, and I don't think anyone is
> > suggesting that the "bundled" type, if added, should be used in e.g.
> > RFC 7277. A grouping could be nice, but it is still two separate
> > leafs.
> > 
> > This is no solution to Kristian's problem, which as far as I
> > understand is about having a YANG model for existing devices that
> > already *use* the "bundled" type, i.e. it "needs" to be a single leaf
> > in the YANG module.
> > 
> > Whether this need is enough motivation to actually add these types to
> > ietf-inet-types I don't really know. There is no real cost in doing it
> > per se, but it could have the negative consequence that it is taken as
> > an encouragement/"blessing" to use these types when writing new
> > modules that *don't* "need" to use them. Bad from a data modelling
> > perspectve, and bad for the operational reasons that Martin gave an
> > example of while I was writing this. But maybe the 'description'
> > statement could warn against this.
> 
> Some bundled types are widely used and practically useful. See the uri
> type, which is a big complicated combination of many different pieces.

A uri represents a single entity; a resource.   From RFC 3986:

   A Uniform Resource Identifier (URI) is a compact sequence of
   characters that identifies an abstract or physical resource.

> Yes, filtering for a port number in a uri is likely not easy.

Right, but the port is just one part of the uri syntax for a resource
(for some schemes).  The uri type doesn't represent multiple "things"
(scheme, host, port, etc).  If you use a URI to model a port you have
likely a bad model.  Whereas for the proposed ip-address-and-prefix,
it is clear that you're suppose to use it when you need to model an
ip-address and an ip-prefix.


/martin


> These
> are tradeoffs. The notion that "bundles types" are generally bad is I
> think not true. I am not saying we should make it an art to create
> "bundled types", I am just challenging the idea that they are
> generally bad.
> 
> /js
> 
> -- 
> Juergen Schoenwaelder           Jacobs University Bremen gGmbH
> Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
> Fax:   +49 421 200 3103         <https://www.jacobs-university.de/>
> 
> _______________________________________________
> netmod mailing list
> netmod@ietf.org
> https://www.ietf.org/mailman/listinfo/netmod
>