2 namespace "urn:ieee:params:xml:ns:yang:dot1q-types";
9 Postal: 170 W Tasman Drive
14 E-mail: cs-yang@cisco.com";
17 "Robert Wilton - rwilton@cisco.com";
20 "This module contains a collection of generally useful YANG types
21 that are specific to 802.1Q VLANs that can be usefully shared
22 between multiple models.
26 802.1Q: IEEE 802.1Q VLANs
28 VLAN (vlan): Virtual Local Area Network
32 description "Latest revision, changed namespace";
34 reference "Intended to be standardized IEEE 802.1";
42 "Priority Code Point. PCP is a 3-bit field that refers to the
43 class of service applied to an 802.1Q VLAN tagged frame. The
44 field specifies a priority value between 0 and 7, these values
45 can be used by quality of service (QoS) to prioritize
46 different classes of traffic.";
47 reference "IEEE 802.1Q (2014)";
51 * Defines what it means to be an 802.1Q VLAN Id, where values 0
52 * and 4095 are reserved.
54 typedef dot1q-vlan-id {
58 description "An 802.1Q VLAN Identifier";
59 reference "IEEE 802.1Q (2014)";
63 * Defines the supported IEEE 802.1Q types that can be used for
66 identity dot1q-tag-vlan-type {
67 description "Base identity from which all 802.1Q VLAN tag types
72 base dot1q-tag-vlan-type;
74 "An 802.1Q Customer-VLAN tag, normally using the 0x8100
79 base dot1q-tag-vlan-type;
81 "An 802.1Q Service-VLAN tag, using the 0x88a8 Ethertype
82 originally introduced in 802.1ad, and incorporated into
86 typedef dot1q-tag-type {
88 base "dot1q-tag-vlan-type";
90 description "Identifies a specific 802.1Q tag type";
91 reference "IEEE 802.1Q (2014)";
95 * Defines the type used to represent ranges of VLAN Ids.
97 * Ideally we would model that as a list of VLAN Ids in YANG, but
98 * the model is easier to use if this is just represented as a
101 * This type is used to match an ordered list of VLAN Ids, or
102 * contiguous ranges of VLAN Ids. Valid VLAN Ids must be in the
103 * range 1 to 4094, and included in the list in non overlapping
106 * E.g. "1, 10-100, 50, 500-1000"
108 typedef dot1q-vlan-id-ranges {
110 pattern "([0-9]{1,4}(-[0-9]{1,4})?(,[0-9]{1,4}" +
113 description "A list of VLAN Ids, or non overlapping VLAN ranges,
114 in ascending order, between 1 and 4094";
118 * A grouping which represents an 802.1Q VLAN tag, matching both
119 * the tag Ethertype and a single VLAN Id. The PCP and DEI fields
120 * in the 802.1Q tag are ignored for tag matching purposes.
123 description "Grouping to allow configuration to identify a single
125 container dot1q-tag {
126 description "Identifies an 802.1Q VLAN tag with an explicit
127 tag-type and a single VLAN Id";
131 description "VLAN tag type";
136 description "VLAN Id";
142 * A grouping which represents an 802.1Q VLAN tag, matching both
143 * the tag Ethertype and a single VLAN Id or "any" to match on any
144 * VLAN Id. The PCP and DEI fields in the 802.1Q tag are ignored
145 * for tag matching purposes.
147 grouping dot1q-tag-or-any {
148 description "Grouping to allow configuration to identify a single
149 802.1Q VLAN tag or the 'any' value to match any VLAN
150 Id not matched by a more specific VLAN Id match";
151 container dot1q-tag {
152 description "Identifies an 802.1Q VLAN tag with an explicit
153 tag-type and a single VLAN Id, or 'any' VLAN Id";
157 description "VLAN tag type";
166 "Matches 'any' VLAN tag in the range 1 to 4094 that
167 is not matched by a more specific VLAN Id match";
172 description "VLAN Id or any";
178 * A grouping which represents an 802.1Q tag that matches a range
179 * of VLAN Ids. The PCP and DEI fields in the 802.1Q tag are
180 * ignored for tag matching purposes.
182 grouping dot1q-tag-ranges {
183 description "Grouping to allow configuration to identify an
184 802.1Q VLAN tag that matches any VLAN Id within a
185 set of non overlapping VLAN Id ranges";
186 container dot1q-tag {
187 description "Identifies an 802.1Q VLAN tag with an explicit
188 tag-type and and a range of VLAN Ids";
192 description "VLAN tag type";
195 type dot1q-vlan-id-ranges;
197 description "VLAN Ids";
203 * A grouping which represents an 802.1Q VLAN tag, matching both
204 * the tag Ethertype and a single VLAN Id, ordered list of ranges,
205 * or "any" to match on any VLAN Id. The PCP and DEI fields in the
206 * 802.1Q tag are ignored for tag matching purposes.
208 grouping dot1q-tag-ranges-or-any {
209 description "Grouping to allow configuration to identify an
210 802.1Q VLAN tag that matches any specific VLAN Id
211 within a set of non overlapping VLAN Id ranges, or
212 the 'any' value to match any VLAN Id";
213 container dot1q-tag {
214 description "Identifies an 802.1Q VLAN tag with an explicit
215 tag-type, an ordered list of VLAN Id ranges, or
220 description "VLAN tag type";
224 type dot1q-vlan-id-ranges;
227 description "Matches 'any' VLAN tag in the range 1 to
233 description "VLAN Ids or any";