Re: [netmod] LL review of draft-ietf-netmod-intf-ext-yang-03

Ladislav Lhotka <lhotka@nic.cz> Fri, 10 March 2017 14:09 UTC

Return-Path: <lhotka@nic.cz>
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 7011B12945F for <netmod@ietfa.amsl.com>; Fri, 10 Mar 2017 06:09:45 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9] 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 GYBQieTydh0X for <netmod@ietfa.amsl.com>; Fri, 10 Mar 2017 06:09:43 -0800 (PST)
Received: from trail.lhotka.name (trail.lhotka.name [77.48.224.143]) by ietfa.amsl.com (Postfix) with ESMTP id E77CD12941A for <netmod@ietf.org>; Fri, 10 Mar 2017 06:09:42 -0800 (PST)
Received: from localhost (unknown [195.113.220.110]) by trail.lhotka.name (Postfix) with ESMTPSA id 5E95A1820044; Fri, 10 Mar 2017 15:10:01 +0100 (CET)
From: Ladislav Lhotka <lhotka@nic.cz>
To: Robert Wilton <rwilton@cisco.com>, netmod@ietf.org
In-Reply-To: <0400d1cb-30ce-e074-b707-202026161ebb@cisco.com>
References: <m2h95xxwee.fsf@birdie.labs.nic.cz> <33d0132e-750b-97ed-8bdb-0befeb1b81c3@cisco.com> <0400d1cb-30ce-e074-b707-202026161ebb@cisco.com>
Date: Fri, 10 Mar 2017 15:09:37 +0100
Message-ID: <m24lz1z0im.fsf@birdie.labs.nic.cz>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/O6rg_pF8NuCptyhh-wMoErH4KE0>
Subject: Re: [netmod] LL review of draft-ietf-netmod-intf-ext-yang-03
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.17
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: Fri, 10 Mar 2017 14:09:45 -0000

Hi Rob,

please see inline.

Robert Wilton <rwilton@cisco.com> writes:

> Hi Lada,
>
> To pick up an old thread, I'm updating the interface model per your 
> comments below, and I had a few questions that you might have an opinion on.
>
> On 22/12/2016 14:32, Robert Wilton wrote:
>> Hi Lada,
>>
>> Thanks for the review and comments.
>>
>>
>> On 21/12/2016 13:08, Ladislav Lhotka wrote:
>>> Hi,
>>>
>>> I think this is a very useful addition to ietf-interfaces. In general,
>>> the document is clearly written and YANG modules nicely designed. Here
>>> are my comments:
>>>
>>> *** Sec. 1
>>>      - "This document defines two YANG RFC 7950 [RFC7950] modules …"
>>>        looks weird. I'd suggest "… YANG 1.1 [RFC7950] …" instead.
>> OK.
> Fixed.
>>> *** Sec. 2
>>>      - first line: s/of of/of/
> Fixed.
>
>>> *** Sec. 3.1
>>>      - If the "bandwidth" parameter is only used for tuning routing
>>>        algorithms and has nothing to do with real bandwidth on the
>>>        interface, I would suggest to use a different name
>>>        (metric?). Perhaps it may indeed be better to leave this to
>>>        routing protocol modules because they can also specify how
>>>        exactly such a parameter is used.
>> Yes, possibility it would be better to define this as part of the 
>> routing models.  The idea here is that the bandwidth would span across 
>> the routing protocols rather than be tied to a specific protocol.
>
> I think that we need a better name than just "bandwidth" since this leaf 
> doesn't affect the actual bandwidth on the of the link, just the 
> bandwidth that is reported to routing protocols to implicitly adjust 
> their link metrics.  Hence, I was considering renaming this to 
> "reported-bandwidth"?

This looks like something for routing people to decide.

>
> I also think that it would be good to follow up with the routing folks 
> to see if this leaf would be better covered in a general routing model.  
> Where do you think is the best place that I raise this, the routing area 
> yang design team?

Maybe, or RTGWG?

>
>
>>
>>> *** Sec. 3.6
>>>      - The "l3-mtu" parameter is probably the same as "mtu" defined in
>>>        ietf-ip. Again, I would suggest to leave the definition of MTU
>>>        to each L3 protocol because there may be specific aspects and
>>>        constraints.
>> The MTU being defined here is an "l2-mtu" parameter.  I.e. the maximum 
>> size of the L2 frames that can be sent/received.  For some devices 
>> this value is independent of a protocol specific L3 MTU that only 
>> affects that particular protocol instance.
> I've updated the text to make it clear that it is only a L2 MTU 
> configuration leaf, and if not configured, the system will automatically 
> decide on the L2 MTU.

Shouldn't it have a "when" substatement to make it available only for
"layer-2" interfaces?

>
>>
>>
>>> *** Sec. 3.8
>>>      - I think that "transport-layer" is not a good name because in the
>>>        ISO OSI model it denotes a particular layer (L4). How about
>>>        "iso-osi-layer"?
> I agree that "transport-layer" is somewhat ambiguous.
>
> I was wondering whether "service-layer" or "service-type" would work?

This looks more like a business term, "iso-osi-layer" or just
"osi-layer" seems better to me, even if you include only layers
1-3. Actually, the OSI model calls these three "media layers", but this
term isn't commonly used.

>
> Or perhaps it could be called "forwarding-mode"?

IMO, the layers are not only about forwarding.

>
>>>      - The type of "transport-layer" has three enums, namely
>>>        "layer-[123]". I would suggest to use descriptive names
>>>        ("physical-layer" etc.), include the remaining layers of the ISO
>>>        OSI model, and maybe also define it as a typedef - or does this
>>>        belong to ietf-inet-types?
> I'm not sure that defining the higher layers of the OSI model helps.  
> Perhaps using identities would be a better choice?
>
> Perhaps:
>   "physical-layer"
>   "data-link-layer"
>   "network-layer"
>
> But I prefer "layer-2" over "data-link-layer" since I think that term
> is much more widespread.  I'm also not quite sure whether

OK.

> "physical-layer" is actually the right term, I think that is probably
> really "below-layer-2"
>

In terms of the OSI model, there is only layer 1 (physical) below layer
2. Or do you mean things like Ethernet-over-MPLS? I don't know how the
layer classification works in such convoluted cases.

>
>>>      - Is a leaf sufficient? I think some interfaces can be in multiple
>>>        layers at the same time (e.g. an ATM interface is L3 but can
>>>        also be L2 for Classical IP over ATM). Or is the idea that such
>>>        an interface will be split into two entries of the "interface"
>>>        list?
>> This needs some further thought/work.
> I think that using sub-interfaces is the cleanest way of doing this, so 
> each sub-interface can be offering a service at a different layer.
>
>
>>
>> The main idea here was to be able to label sub-interfaces as 
>> supporting only L2 services or L3 services, since on some platforms 
>> different types of interfaces get instantiated internally.

OK, I don't dare to give any suggestions here.

>>
>>> *** YANG modules
>>>      - Descriptions are not consistently formatted. I think that the
>>>        current BCP is to start description text on the same line as the
>>>        "description" keyword only if it all fits on one line.
>>>      - I don't have a strong opinion on this but it might increase
>>>        readability if the number of augments is reduced. Perhaps at
>>>        least augments that contain only one node could be made into one
>>>        (and the "feature" and "when" statements moved to the nodes'
>>>        definitions.
>> Yes, I'll fix these, probably using Martin's suggested approach.
> I've fixed the descriptions, and merged all the augments except for the 
> sub-interface one (which is an if-feature conditional augment of a 
> mandatory node).

Good.

>
> I also have a question about the "encapsulation" container that is 
> currently defined as:
>
>      /*
>       * Various types of interfaces support a configurable layer 2
>       * encapsulation, any that are supported by YANG should be
>       * listed here.
>       *
>       * Different encapsulations can hook into the common encaps-type
>       * choice statement.
>       */
>      container encapsulation {
>        when
>          "derived-from-or-self(if:type, 'ianaift:ethernetCsmacd') or
>           derived-from-or-self(if:type, 'ianaift:ieee8023adLag') or
>           derived-from-or-self(if:type, 'ianaift:pos') or
>           derived-from-or-self(if:type, 'ianaift:atmSubInterface') or
>           derived-from-or-self(if:type, 'ethSubInterface')" {
>
>          description
>            "All interface types that can have a configurable L2
>             encapsulation";
>          /*
>           * TODO - Should we introduce an abstract type to make this
>           *        extensible to new interface types, or vendor
>           *        specific interface types?
>           */
>        }
>
>        description
>          "Holds the OSI layer 2 encapsulation associated with an
>           interface";
>        choice encaps-type {
>          description "Extensible choice of L2 encapsulations";
>        }
>      }
>
> I was considering removing the when statement to generalize this, since 
> the case statements can be constricted to suitable interface types using 
> when statements anyway.  E.g. I'm proposing to changing it to something 
> like this:
>
>      /*
>       * Various types of interfaces support a configurable
>       * encapsulation.
>       *
>       * Different encapsulations (often layer 2) can hook into the
>       * common encaps-type choice statement.
>       */
>      container encapsulation {
>        description
>          "Holds the encapsulation (often layer 2) associated with an
>           interface";
>        choice encaps-type {
>          description
>            "Extensible choice of encapsulations";
>        }
>      }
>
> Do you have a view on this?

This demonstrates that the IANA interface types are not very useful for
restricting the data model. As you indicate, multiple levels of the
interface hierarchy (abstract interface types) might be better, perhaps
you could also make use of multiple inheritance of identities, hence
allowing for arbitrary mixes of interface properties encoded in the type. 

Cheers, Lada

>
> Thanks,
> Rob
>
>
>>
>> Thanks again,
>> Rob
>>
>>>
>>> Lada
>>>
>>
>

-- 
Ladislav Lhotka, CZ.NIC Labs
PGP Key ID: 0xB8F92B08A9F76C67