netconfcentral logo

ieee802-dot1q-types@2017-07-20



  module ieee802-dot1q-types {

    yang-version 1;

    namespace
      "urn:ieee:std:802.1Q:yang:ieee802-dot1q-types";

    prefix dot1q-types;

    import ietf-yang-types {
      prefix yang;
    }
    import ieee802-types {
      prefix ieee;
    }

    organization
      "Institute of Electrical and Electronics Engineers";

    contact
      "WG-URL: http://grouper.ieee.org/groups/802/1/
    WG-EMail: stds-802-1@ieee.org

    Contact: IEEE 802.1 Working Group Chair
    Postal: C/O IEEE 802.1 Working Group
            IEEE Standards Association
            445 Hoes Lane
            P.O. Box 1331
            Piscataway
            NJ 08855-1331
            USA
 	
    E-mail: STDS-802-1-L@LISTSERV.IEEE.ORG";

    description
      "Common types used within dot1Q-bridge modules.";

    revision "2017-07-20" {
      description
        "Updates based upon comment resolution on draft
      D1.1 of P802.1Qcp.";
      reference
        "IEEE 802.1Q-2017, Media Access Control (MAC) Bridges and
        Virtual Bridged Local Area Networks.";

    }


    identity dot1q-vlan-type {
      base 
      description
        "Base identity from which all 802.1Q VLAN tag types are
      derived from.";
    }

    identity c-vlan {
      base dot1q-vlan-type;
      description
        "An 802.1Q Customer VLAN, normally using the 0x8100
       Ethertype";
      reference
        "IEEE 802.1Q-2017, Clause 5.5";

    }

    identity s-vlan {
      base dot1q-vlan-type;
      description
        "An 802.1Q Service VLAN, using the 0x88a8 Ethertype
       originally introduced in 802.1ad, and incorporated into
       802.1Q (2011)";
      reference
        "IEEE 802.1Q-2017, Clause 5.6";

    }

    typedef name-type {
      type string {
        length "0..32";
      }
      description
        "A text string of up to 32 characters, of locally determined
      significance.";
    }

    typedef port-number-type {
      type uint32 {
        range "1..65535";
      }
      description
        "The port number of the Bridge port for which this entry
    	contains Bridge management information.";
    }

    typedef priority-type {
      type uint8 {
        range "0..7";
      }
      description
        "A range of priorities from 0 to 7 (inclusive). The Priority
    	Code Point (PCP) is a 3-bit field that refers to the
      class of service associated with an 802.1Q VLAN tagged frame.
      The field specifies a priority value between 0 and 7, these
      values can be used by quality of service (QoS) to prioritize
      different classes of traffic.";
    }

    typedef vid-range-type {
      type string {
        pattern
          "([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?"
            + "(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)";
      }
      description
        "A list of VLAN Ids, or non overlapping VLAN ranges, in
      ascending order, between 1 and 4094.
    	
    	This type is used to match an ordered list of VLAN Ids, or
    	contiguous ranges of VLAN Ids. Valid VLAN Ids must be in the 
    	range 1 to 4094, and included in the list in non overlapping
    	ascending order.
    	
    	For example: 1,10-100,50,500-1000";
    }

    typedef vlan-index-type {
      type uint32 {
        range "1..4094 | 4096..4294967295";
      }
      description
        "A value used to index per-VLAN tables. Values of 0 and 4095
      are not permitted. The range of valid VLAN indices. If the
      value is greater than 4095, then it represents a VLAN with
      scope local to the particular agent, i.e., one without a
      global VLAN-ID assigned to it. Such VLANs are outside the
      scope of IEEE 802.1Q, but it is convenient to be able to
      manage them in the same way using this YANG module.";
      reference
        "IEEE Std 802.1Q-2017: Virtual Bridged Local Area Networks.";

    }

    typedef mstid-type {
      type uint32 {
        range "1..4094";
      }
      description
        "In an MSTP Bridge, an MSTID, i.e., a value used to identify
  		a spanning tree (or MST) instance";
      reference
        "IEEE Std 802.1Q-2017: Virtual Bridged Local Area Networks.";

    }

    typedef pcp-selection-type {
      type enumeration {
        enum "8P0D" {
          value 0;
          description
            "8 priorities, 0 discard";
        }
        enum "7P1D" {
          value 1;
          description
            "7 priorities, 1 discard";
        }
        enum "6P2D" {
          value 2;
          description
            "6 priorities, 2 discards";
        }
        enum "5P3D" {
          value 3;
          description
            "5 priorities, 3 discards";
        }
      }
      description
        "Priority Code Point selection types.";
      reference
        "IEEE 802.1Q-2017 Clause 12.6.2.5.3, 6.9.3";

    }

    typedef protocol-frame-format-type {
      type enumeration {
        enum "Ethernet" {
          value 0;
          description
            "Ethernet frame format";
        }
        enum "rfc1042" {
          value 1;
          description
            "RFC 1042 frame format";
        }
        enum "snap8021H" {
          value 2;
          description
            "SNAP 802.1H frame format";
        }
        enum "snapOther" {
          value 3;
          description
            "Other SNAP frame format";
        }
        enum "llcOther" {
          value 4;
          description
            "Other LLC frame format";
        }
      }
      description
        "A value representing the frame format to be matched.";
      reference
        "IEEE 802.1Q-2017 Clause 12.10.1.7.1";

    }

    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";

    }

    typedef dot1q-tag-type {
      type identityref {
        base dot1q-vlan-type;
      }
      description
        "Identifies a specific 802.1Q tag type";
      reference
        "IEEE 802.1Q (2014)";

    }

    typedef traffic-class-type {
      type uint8 {
        range "0..7";
      }
      description
        "This is the numerical value associated with a traffic
      class in a Bridge. Larger values are associated with
      higher priority traffic classes.";
      reference
        "IEEE Std 802.1Q-2014, Clause 3.239";

    }
  }  // module ieee802-dot1q-types