Re: [netmod] I-D Action: draft-ietf-netmod-sub-intf-vlan-model-01.txt

Vladimir Vassilev <vladimir@transpacket.com> Fri, 16 June 2017 11:42 UTC

Return-Path: <vladimir@transpacket.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 AD3C9129B57 for <netmod@ietfa.amsl.com>; Fri, 16 Jun 2017 04:42:50 -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 gZXi-XcUXnpu for <netmod@ietfa.amsl.com>; Fri, 16 Jun 2017 04:42:48 -0700 (PDT)
Received: from mail.transpacket.com (s91205186171.blix.com [91.205.186.171]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 09196129B21 for <netmod@ietf.org>; Fri, 16 Jun 2017 04:42:47 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1]) by mail.transpacket.com (Postfix) with ESMTP id A609E154097B; Fri, 16 Jun 2017 13:42:45 +0200 (CEST)
Received: from mail.transpacket.com ([127.0.0.1]) by localhost (mail.transpacket.com [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id KsZG2K0EZX-T; Fri, 16 Jun 2017 13:42:45 +0200 (CEST)
Received: from localhost (localhost [127.0.0.1]) by mail.transpacket.com (Postfix) with ESMTP id 772B81540BFE; Fri, 16 Jun 2017 13:42:45 +0200 (CEST)
Received: from mail.transpacket.com ([127.0.0.1]) by localhost (mail.transpacket.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id Wr92KhQYmhvc; Fri, 16 Jun 2017 13:42:45 +0200 (CEST)
Received: from [192.168.209.116] (s1853520235.blix.com [185.35.202.35]) by mail.transpacket.com (Postfix) with ESMTPSA id 55888154097B; Fri, 16 Jun 2017 13:42:45 +0200 (CEST)
To: Robert Wilton <rwilton@cisco.com>, netmod@ietf.org
References: <148943391240.20421.7015046968650807465@ietfa.amsl.com> <d8118ca7-92f7-ce53-50a0-fd1a15181e4b@transpacket.com> <fa2f21bb-e23f-d0a2-1b95-64419e177419@cisco.com>
From: Vladimir Vassilev <vladimir@transpacket.com>
Message-ID: <d5a325d0-7b4b-ee31-d82c-818368c70776@transpacket.com>
Date: Fri, 16 Jun 2017 13:42:45 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.6.0
MIME-Version: 1.0
In-Reply-To: <fa2f21bb-e23f-d0a2-1b95-64419e177419@cisco.com>
Content-Type: text/plain; charset="windows-1252"; format="flowed"
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/8YJ39lgP5aLZRO5Z_qkhoZBYoVw>
Subject: Re: [netmod] I-D Action: draft-ietf-netmod-sub-intf-vlan-model-01.txt
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.22
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, 16 Jun 2017 11:42:51 -0000

On 06/15/2017 06:18 PM, Robert Wilton wrote:

> Hi Vladimir,
>
> Thanks for raising this.
>
>
> On 15/06/2017 12:59, Vladimir Vassilev wrote:
>> Hello,
>>
>> There is a problem with a mutually exclusive 'when' statements for 
>> the /interfaces/inteface/encapsulation container in 
>> ietf-interfaces-common@2017-03-13.yang 
>> (draft-ietf-netmod-intf-ext-yang-04) and 
>> ietf-if-l3-vlan@2017-03-13.yang  models causing error with our 
>> validation tools.
>>
>> As defined in ietf-interfaces-common@2017-03-13.yang:
>>
>> ...
>>
>>     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')" {
>>
>> ...
>>
>> and here augmented in ietf-if-l3-vlan@2017-03-13.yang:
>>
>>   augment "/if:interfaces/if:interface/if-cmn:encapsulation/" +
>>           "if-cmn:encaps-type" {
>>     when "../if:type = 'ianaift:l2vlan' and
>>           derived-from-or-self(../if-cmn:forwarding-mode,
>>                                'if-cmn:network-layer')" {
>>
>> Short term fix I use is to add "or derived-from-or-self(../if:type, 
>> 'ianaift:l2vlan')" to the ietf-interfaces-common definition.
> I suspect that probably the reverse fix is probably better.
>
> I.e. add derived-from-or-self(../if:type, 'ethSubInterface' to the 
> encapsulation when statement replacing the l2vlan, since 
> ethSubInterface derived from l2vlan anyway.
>
> Thanks,
> Rob
The "TODO" text you have placed in 
ietf-interfaces-common@2017-03-13.yang under the when statement "TODO - 
Should we introduce an abstract type to make this extensible to new 
interface types, or vendor specific interface types?" for me is a hint 
that a better long term solution is under consideration (replacing the 
list of technology specific references).

My understanding is that only the subset of all sub-interfaces based on 
encapsulation will have encapsulation container. Identity derived from 
sub-interface -> encapsulation-sub-interface could be the abstract type, 
right?

Examples of practical use of the sub-interface abstraction and 
/interfaces/interface/encapsulation for the most common cases (e.g. 
l2vlan bridge configuration) is something that should be presented. If 
not as part of the draft on the mailing list as proof of concept.

IMO ietf-flexible-encapsulation@2017-03-13.yang and 
ietf-if-l3-vlan@2017-03-13.yang along with the 
/interfaces/interface/encapsulation container definition can be merged 
into single module called ietf-sub-intf-vlan.yang where the 
encapsulation-sub-interface identity and the encapsulation container are 
defined.

Vladimir