Re: [netmod] Interface Extensions YANG draft

Qin Wu <bill.wu@huawei.com> Wed, 15 July 2015 11:21 UTC

Return-Path: <bill.wu@huawei.com>
X-Original-To: netmod@ietfa.amsl.com
Delivered-To: netmod@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 5D5451A8857 for <netmod@ietfa.amsl.com>; Wed, 15 Jul 2015 04:21:54 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.822
X-Spam-Level:
X-Spam-Status: No, score=-0.822 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, CN_BODY_35=0.339, J_CHICKENPOX_29=0.6, MIME_CHARSET_FARAWAY=2.45, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=ham
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 hhRAX-wglZ2g for <netmod@ietfa.amsl.com>; Wed, 15 Jul 2015 04:21:52 -0700 (PDT)
Received: from lhrrgout.huawei.com (lhrrgout.huawei.com [194.213.3.17]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id A5AC31A8874 for <netmod@ietf.org>; Wed, 15 Jul 2015 04:21:51 -0700 (PDT)
Received: from 172.18.7.190 (EHLO lhreml401-hub.china.huawei.com) ([172.18.7.190]) by lhrrg02-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id BVF49956; Wed, 15 Jul 2015 11:21:50 +0000 (GMT)
Received: from nkgeml407-hub.china.huawei.com (10.98.56.38) by lhreml401-hub.china.huawei.com (10.201.5.240) with Microsoft SMTP Server (TLS) id 14.3.158.1; Wed, 15 Jul 2015 12:21:47 +0100
Received: from NKGEML501-MBS.china.huawei.com ([169.254.2.10]) by nkgeml407-hub.china.huawei.com ([10.98.56.38]) with mapi id 14.03.0158.001; Wed, 15 Jul 2015 19:21:36 +0800
From: Qin Wu <bill.wu@huawei.com>
To: Robert Wilton <rwilton@cisco.com>, wangzitao <wangzitao@huawei.com>, "netmod@ietf.org" <netmod@ietf.org>
Thread-Topic: [netmod] Interface Extensions YANG draft
Thread-Index: AQHQuZjA2JPLlJ1PpUGHzt5SYGcGf53YlmAAgAAtRwCAAAGTAIAANiyAgAACYICAACRGgIACqT8A////74CAAIsMEA==
Date: Wed, 15 Jul 2015 11:21:35 +0000
Message-ID: <B8F9A780D330094D99AF023C5877DABA847C5BB9@nkgeml501-mbs.china.huawei.com>
References: <559D4BA1.30605@cisco.com> <E6BC9BBCBCACC246846FC685F9FF41EAC2BB4A@szxeml501-mbx.china.huawei.com> <55A39FEC.4090406@cisco.com> <20150713113006.GA6797@elstar.local> <55A3CEAF.7090800@cisco.com> <20150713145229.GA237@elstar.local> <55A3EF1B.4050907@cisco.com> <B8F9A780D330094D99AF023C5877DABA847C3527@nkgeml501-mbs.china.huawei.com> <55A62A85.2050602@cisco.com>
In-Reply-To: <55A62A85.2050602@cisco.com>
Accept-Language: zh-CN, en-US
Content-Language: zh-CN
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [10.138.41.180]
Content-Type: text/plain; charset="gb2312"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-CFilter-Loop: Reflected
Archived-At: <http://mailarchive.ietf.org/arch/msg/netmod/Ty8PjuDPpOMfzvgkphmFq_XrMBU>
Subject: Re: [netmod] Interface Extensions YANG draft
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.15
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: Wed, 15 Jul 2015 11:21:54 -0000

-----邮件原件-----
发件人: Robert Wilton [mailto:rwilton@cisco.com] 
发送时间: 2015年7月15日 17:40
收件人: Qin Wu; wangzitao; netmod@ietf.org
主题: Re: [netmod] Interface Extensions YANG draft

Hi Qin,

On 15/07/2015 02:57, Qin Wu wrote:
>>> More naturally it feels that the interface layering is more useful 
>>> to represent LAG interfaces or VLAN sub-interfaces, which can be 
>>> done,
> [Qin]: Is your proposal about interface extension for L2 sub-interface?
Not just L2 sub-interfaces.

draft-wilton-netmod-intf-ext-yang-00 covers general interface properties that are common to many interface types on network devices.
I.e. (from the draft) it provides the following augmentations to
if:interfaces:

    o  A bandwidth configuration leaf to specify the bandwidth available
       on an interface to control routing metrics.

    o  A carrier delay feature used to provide control over short lived
       link state flaps.

    o  An interface link state dampening feature that is used to provide
       control over longer lived link state flaps.

    o  An encapsulation container and extensible choice statement for use
       by any interface types that allow for configurable L2
       encapsulations.

    o  A loopback configuration leaf that is primarily aimed at loopback
       at the physical layer.

    o  MTU configuration leaves applicable to all packet/frame based
       interfaces.

    o  A transport layer leaf to indicate whether the interface handles
       traffic at L1, L2 or L3.

    o  A parent interface leaf useable for all types of sub-interface
       that are children of parent interfaces.


The parent interface leaf is just one of the augmentations and is effectively the minimal information that you need to have a logical sub-interface.

[Qin]: I see, sounds like tunnel interface defined in the draft-wwz-netmod-yang-tunnel-cfg-00 also intends to support several similar properties which make me believe you guys has some same goal. Both augment if:interface with interface specific, I am wondering which one draft has better model design, one is to place all common properties in one place while the other is distribute common properties in several places within if:interface.

I have also posted a separate draft
(draft-wilton-netmod-intf-vlan-yang-00) that augments the encapsulation container described above, and uses the parent interface leaf to define how traffic is matched and classified to layer-2 and layer-3 sub-interfaces.

[Qin]: I will take a look at it and thanks for the pointer.

>>> but section 3.3 Interface Layering from YANG Interface Management 
>>> indicates that the layering attributes are read only, so you still 
>>> need separate configuration leaves to set up the parent<->child relationship.
> [Qin]: Based on RFC7223, only state leaves are required to represent 
> interface layering hierarchy, if my understanding is correct.
My interpretation of RFC7223 is a bit different, it states:
"

    There is no generic mechanism for how an interface is configured to
    be layered on top of some other interface.  It is expected that
    interface-type-specific models define their own data nodes for
    interface layering by using "interface-ref" types to reference
    lower layers.
"


I.e. you need a model specific way to specify the relationship between the nodes.

[Qin]: that's my misunderstanding on RFC7223, sorry about that, by reading appendix C of RFC7223,
I believe what RFc7223 propose is to define parent interface or base interface in the interface extension model to specify relationship between interfaces in two different layers.

E.g. parent-interface is a such configuration item.  This leaf is needed/useful for several reasons:
(1) To cleanly specify the relationship between the two interfaces. If you don't have this leaf then you would have no way of specifying the relationship between a child sub-interface and its parent is unless it is possible to infer that from the name of the child sub-interface.  
Whilst this is possible on the sub-interface naming scheme for some network devices, I don't think that this is universally true, and probably shouldn't be relied on.

[Qin]:Yes, parent-interface is needed just like why base interface is needed in the interface extension example described in Appendix C of RFC7223.

(2) If you want to define 'must' statements on the model , e.g. to ensure that a particular VLAN Id is only used on a single child sub-interface of a given parent, then having the parent leaf defined in the config namespace makes this easier.  I don't think that a must statement is allowed to check against operational leaves, so it either needs a node in the config namespace, or again would have to extract it from the sub-interface name (if that is even possible).

>> See Appendix C in RFC 7223 how this was envisioned to be done.
> Yes, I believe that the approach that we have proposed is broadly consistent with that, but defined in a slightly more generic way and without the need for the vlan-tagging leaf on the parent.
>
> However, in the model that we have proposed, it is likely that the "parent-interface" interface-ref that we define on a sub-interface has to be an optional leaf because you are not allowed to augment with a mandatory node.  So, this would come down to implementations being expected to reject sub-interface configurations if the parent-interface hasn't been correctly populated.  In some ways this is not ideal - but I can appreciate why the YANG rules are how they are.
>
> [Qin]: How is "parent-interface" define in the interface extensions different from base-interface defined in the example of Appendix C in RFC7223? It looks you both using "interface-ref" types to reference lower layers.
They are pretty much equivalent.  The main difference is that the Appendix C requires a "vlan-tagging" leaf to be configured on the parent interface, whereas the "parent-interface" leaf that I have defined does not, but has the restriction that it cannot be marked as being mandatory.

[Qin]: I can see this subtle difference between two but can't weigh one is better than the other.

Thanks,
Rob