Re: [netmod] Interface Extensions YANG draft

Qin Wu <bill.wu@huawei.com> Thu, 16 July 2015 12:29 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 CA7B31A8994 for <netmod@ietfa.amsl.com>; Thu, 16 Jul 2015 05:29:20 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.611
X-Spam-Level:
X-Spam-Status: No, score=-3.611 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, J_CHICKENPOX_29=0.6, 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 Q9dQ-J3BfXfE for <netmod@ietfa.amsl.com>; Thu, 16 Jul 2015 05:29:18 -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 1DE5B1A8993 for <netmod@ietf.org>; Thu, 16 Jul 2015 05:29:17 -0700 (PDT)
Received: from 172.18.7.190 (EHLO lhreml405-hub.china.huawei.com) ([172.18.7.190]) by lhrrg01-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id BYV65239; Thu, 16 Jul 2015 12:29:16 +0000 (GMT)
Received: from nkgeml405-hub.china.huawei.com (10.98.56.36) by lhreml405-hub.china.huawei.com (10.201.5.242) with Microsoft SMTP Server (TLS) id 14.3.158.1; Thu, 16 Jul 2015 13:29:15 +0100
Received: from NKGEML501-MBS.china.huawei.com ([169.254.2.10]) by nkgeml405-hub.china.huawei.com ([10.98.56.36]) with mapi id 14.03.0158.001; Thu, 16 Jul 2015 20:29:06 +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////74CAAIsMEP//wa4AgAHwIVA=
Date: Thu, 16 Jul 2015 12:29:06 +0000
Message-ID: <B8F9A780D330094D99AF023C5877DABA847CB221@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> <B8F9A780D330094D99AF023C5877DABA847C5BB9@nkgeml501-mbs.china.huawei.com> <55A66AE2.9070106@cisco.com>
In-Reply-To: <55A66AE2.9070106@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="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-CFilter-Loop: Reflected
Archived-At: <http://mailarchive.ietf.org/arch/msg/netmod/GYSOzz0qOgTCgVxeS1H07HD00Z8>
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: Thu, 16 Jul 2015 12:29:21 -0000

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

Hi Qin,

Please see inline ...

On 15/07/2015 12:21, Qin Wu wrote:
> -----邮件原件-----
> 发件人: 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,
>
> <snip>
>
> 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.
Yes, there is some overlap here, and I agree that there is a question of direction.  It is the requirement to use XML namespaces that made me think that defining a given property in single place that spans across interfaces is easier to use.

[Qin]: If there is any overlap, it is better to fix this in the first place. 

If you take the MTU lead as an example - this has been defined by both models.

If you follow the way that I have proposed then the path "/if:interfaces/if:interface[if:name = XXX]/if-cmn:l2-mtu" is valid for any interface (that implements the interfaces-common YANG module).  E.g. 
a YANG client has a well defined path to access the MTU item for any interface.

[Qin]: I am not convincing that l2-mtu is common to any interface. 

An alternative approach, is for each type of interface to define an mtu leaf for that given interface type.  With a bit of effort you could get the MTU node to have the same name and semantics for all interface types, but it would always have a different namespace for each interface type.  Hence, to write a client function that generically gets/sets the MTU on an interface you need to know the interface type to be able to map it to the appropriate namespace that the MTU leaf has been defined in.  I thought that this would be awkward and hence better to just define it in a single place.

So if an approach like draft-wilton-netmod-intf-ext-yang-00 is agreed then I think that it might somewhat change the structure of
draft-wwz-netmod-yang-tunnel-cfg-00 in the following way:

  - ip-address would be defined by the ip-cfg YANG module.

[Qin]: This is what draft-wwz-netmod-yang-tunnel-cfg proposed, I believe.

  - encapsulation method could potentially augment from the encapsulation choice node that has been defined in
draft-wilton-netmod-intf-ext-yang-00

[Qin]: I think encapsulation method is one property that is common to all tunnel interface, is encapsulation method common to both VLAN interface and Tunnel interface?

  - MTU would be defined by l2-mtu in draft-wilton-netmod-intf-ext-yang-00

[Qin]: what about IP MTU, suppose tunnel interface is defined as Layer 3 interface, IP MTU should be used.

  - QoS I would suggest would be defined by DiffServ or other QoS feature implementation.

[Qin]: Agree with you.

I.e. in essence I would think that perhaps gen-tunnel should only define properties that are strictly common to all tunnel interfaces, but that are not more widely common across all/most interfaces.

[Qin]: Agree, I think at first we should understand the clear relation between subinterface, VLAN interface and Tunnel interface, Loopback interface and then we can decide what kind of model structure is more fit for tunnel interface.

Thanks,
Rob