Re: [netmod] ACL draft defines ether-type as a string

"Acee Lindem (acee)" <acee@cisco.com> Wed, 19 July 2017 07:00 UTC

Return-Path: <acee@cisco.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 6C0ED131AD7 for <netmod@ietfa.amsl.com>; Wed, 19 Jul 2017 00:00:05 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -14.522
X-Spam-Level:
X-Spam-Status: No, score=-14.522 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, USER_IN_DEF_DKIM_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=cisco.com
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 EjmWBEfRpAnt for <netmod@ietfa.amsl.com>; Wed, 19 Jul 2017 00:00:03 -0700 (PDT)
Received: from rcdn-iport-8.cisco.com (rcdn-iport-8.cisco.com [173.37.86.79]) (using TLSv1.2 with cipher DHE-RSA-SEED-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 52A7412F4EA for <netmod@ietf.org>; Wed, 19 Jul 2017 00:00:03 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=7814; q=dns/txt; s=iport; t=1500447603; x=1501657203; h=from:to:subject:date:message-id:references:in-reply-to: content-id:content-transfer-encoding:mime-version; bh=FDbsyo177qsrauqSvs+fDIemg6O8zvX2fOaPx8vBF/c=; b=N/LjfuJd5YKH1nSig/1xW2I/9serF1fOL33BrTU/Rjq6feVZTk9s3ESG ceWGouxxpwF34CoCGCl+yRNuadDn1SuSrMQ7P4gjAuKt6ZYe3Bm9dKC/X e8Z3JKLOQ3mq5jUYSdxfaIi9rruUCXf6RiBQvSqSCc6wB5/caXbJZDlfe s=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0CdAADTAm9Z/4MNJK1cGQEBAQEBAQEBAQEBBwEBAQEBg1pkgRQHjgSRa4gujVaCESENhEpPAhqDPD8YAQIBAQEBAQEBayiFGAEBAQEDAQEhETobAgEIEQEDAQEBAgIjAwICAh8GCxQBAgYIAgQBEooXAxUQryWCJocyDYNGAQEBAQEBAQEBAQEBAQEBAQEBAQEBGAWBC4IdiFKCV4FvDgkNF4J8gmEFnns7AodJg0qEEoRwki+MColNAR84gQp1FUmHFnaGFAIkgQyBDQEBAQ
X-IronPort-AV: E=Sophos;i="5.40,380,1496102400"; d="scan'208";a="269924933"
Received: from alln-core-1.cisco.com ([173.36.13.131]) by rcdn-iport-8.cisco.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 19 Jul 2017 07:00:02 +0000
Received: from XCH-RTP-010.cisco.com (xch-rtp-010.cisco.com [64.101.220.150]) by alln-core-1.cisco.com (8.14.5/8.14.5) with ESMTP id v6J701s9004777 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=FAIL); Wed, 19 Jul 2017 07:00:02 GMT
Received: from xch-rtp-015.cisco.com (64.101.220.155) by XCH-RTP-010.cisco.com (64.101.220.150) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Wed, 19 Jul 2017 03:00:00 -0400
Received: from xch-rtp-015.cisco.com ([64.101.220.155]) by XCH-RTP-015.cisco.com ([64.101.220.155]) with mapi id 15.00.1210.000; Wed, 19 Jul 2017 03:00:00 -0400
From: "Acee Lindem (acee)" <acee@cisco.com>
To: "Robert Wilton -X (rwilton - ENSOFT LIMITED at Cisco)" <rwilton@cisco.com>, Alex Campbell <Alex.Campbell@Aviatnet.com>, Mahesh Jethanandani <mjethanandani@gmail.com>, NetMod WG <netmod@ietf.org>
Thread-Topic: [netmod] ACL draft defines ether-type as a string
Thread-Index: AQHS/44p8hHHD3EsJEWY6sXMAFAup6JabqIAgAB7NACAAAz8AP//w0+A
Date: Wed, 19 Jul 2017 07:00:00 +0000
Message-ID: <D5947B45.B9B83%acee@cisco.com>
References: <EC54089C-E8CD-4F7A-9B93-7FB228A66074@gmail.com> <1500416980342.21019@Aviatnet.com> <20170719055038.GA19325@elstar.local> <07ee9a53-bed7-00a2-9cfa-604eef5c0f7b@cisco.com>
In-Reply-To: <07ee9a53-bed7-00a2-9cfa-604eef5c0f7b@cisco.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-ms-exchange-messagesentrepresentingtype: 1
x-ms-exchange-transport-fromentityheader: Hosted
x-originating-ip: [10.24.84.79]
Content-Type: text/plain; charset="utf-8"
Content-ID: <88D54302D54E904B9B25704542E74F01@emea.cisco.com>
Content-Transfer-Encoding: base64
MIME-Version: 1.0
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/-Tf892fk47TrYcza-4APRvUBC2M>
Subject: Re: [netmod] ACL draft defines ether-type as a string
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: Wed, 19 Jul 2017 07:00:05 -0000

My thoughts exactly… A sparse enum is the rational approach.
Thanks,
Acee

On 7/19/17, 2:37 AM, "netmod on behalf of Robert Wilton -X (rwilton -
ENSOFT LIMITED at Cisco)" <netmod-bounces@ietf.org on behalf of
rwilton@cisco.com> wrote:

>I like the union approach.
>
>I'm not sure that we really want IEEE to have to define an enum entry
>for every possible Ethertype value.   This just means that
>implementations probably ends up with another large mapping table where
>99% of it is just noise.  So I would suggest that 'named ethertypes' are
>restricted to the set of current ones in standard use that people care
>about, and allow vendors to request that their specific ones be added if
>required.
>
>+1 to the description describing the canonical format.
>
>Thanks,
>Rob
>
>
>On 19/07/2017 07:50, Juergen Schoenwaelder wrote:
>> It may even mean that they plan to change ether-type-0xXXXX to foo
>> once 0xXXXX is allocated to foo, which would be a problem. It seems
>> a union of a uint16 and an enum can be more robust.
>>
>>   type union {
>>     type uint16;
>>     type enumeration {
>>       enum ipv4 {
>>         value 0x0800;
>>         description
>>           "Internet Protocol version 4 (IPv4)";
>>         reference
>>           "RFC 791: Internet Protocol"
>>       }
>>     }
>>   }
>>
>> A caveat is that the canonical representation of a uint16 is decimal
>> (and YANG today has no way to control that), which may be a bit
>> inconvenient here. Perhaps the description clause should overwrite
>> this. There is probably also a need to remember implementors that the
>> canonical representation of the union retains the notation, that is,
>> if I write a numeric value (i.e., if I write '0x800' I get back the
>> numeric value 2048 but if I write the enum value 'ipv4' I get back the
>> enum 'ipv4' and not a numeric value.
>>
>> I have also found a definition in [1] that uses a string with a
>> pattern to match a different notation for ether type numeric values.
>>
>>    typedef ethertype-type {
>>      type string {
>>        pattern '[0-9a-fA-F]{2}-[0-9a-fA-F]{2}';
>>      }
>>      description
>>        "The EtherType value represented in the canonical order defined
>>      	by IEEE 802. The canonical representation uses uppercase
>>      	characters.";
>>      reference
>>        "IEEE 802-2014 Clause 9.2";
>>    }
>>
>> While this may be more compliant to IEEE 802-2014 Clause 9.2, having
>> some type that easily resolves to a number may be more desirable in
>> practice.
>>
>> [1] 
>>https://github.com/YangModels/yang/blob/master/standard/ieee/802.1/draft/
>>ieee802-dot1q-types.yang
>>
>> /js
>>
>> PS: Writing definitions for seemingly simple types can be fun.
>>
>> On Tue, Jul 18, 2017 at 10:29:40PM +0000, Alex Campbell wrote:
>>> Doesn't this mean that if a new protocol is defined, then it won't be
>>>usable in ACLs until the server's data model is upgraded? (And with
>>>many devices, that is quite likely never)
>>>
>>>
>>> ________________________________
>>> From: netmod <netmod-bounces@ietf.org> on behalf of Mahesh
>>>Jethanandani <mjethanandani@gmail.com>
>>> Sent: Tuesday, 18 July 2017 6:21 p.m.
>>> To: NetMod WG
>>> Subject: [netmod] ACL draft defines ether-type as a string
>>>
>>> The issue of ether-type defined as a string was discussed with
>>>participants from IEEE in IETF. It was generally agreed that since
>>>ether-types are well known values, and centrally managed, that they be
>>>defined as enumerations. There was some clarification sought by IEEE on
>>>which values need to be published. It was suggested that ether-types
>>>that are either private or do not have a protocol identified would be
>>>named as ether-type-0xXXXX where 0xXXXX represents the value assigned.
>>>All the remaining ether-types will be defined as enums with the well
>>>known names.
>>>
>>> As far as the impact of that on the ACL draft is concerned, it will be
>>>to remove all local definitions for ether-type from the draft, such as
>>>the one below and instead use the definition from IEEE, whenever that
>>>is done. It does however put a dependency on the IEEE model.
>>>
>>>
>>>      leaf ether-type {
>>>        type string {
>>>          pattern '[0-9a-fA-F]{4}';
>>>        }
>>>        description
>>>          "The Ethernet Type (or Length) value represented
>>>           in the canonical order defined by IEEE 802.
>>>           The canonical representation uses lowercase
>>>           characters.
>>>
>>>           Note: This is not the most ideal way to define
>>>           ether-types. Ether-types are well known types
>>>           and are registered with RAC in IEEE. So they
>>>           should well defined types with values. For now
>>>           this model is defining it as a string.
>>>
>>>
>>>           There is a note out to IEEE that needs to be
>>>           turned into a liaison statement asking them to
>>>           define all ether-types for the industry to use.";
>>>        reference
>>>          "IEEE 802-2014 Clause 9.2";
>>>      }
>>>      reference
>>>        "IEEE 802: IEEE Standard for Local and Metropolitan
>>>         Area Networks: Overview and Architecture.";
>>>    }
>>>
>>> Mahesh Jethanandani
>>> mjethanandani@gmail.com<mailto:mjethanandani@gmail.com>
>>>
>>>
>>>
>>> _______________________________________________
>>> netmod mailing list
>>> netmod@ietf.org
>>> https://www.ietf.org/mailman/listinfo/netmod
>>
>
>_______________________________________________
>netmod mailing list
>netmod@ietf.org
>https://www.ietf.org/mailman/listinfo/netmod