blob: e934c435d21d9c295cbe12a9e919b100d5d83fdf [file] [log] [blame]
module bbf-dot1q-types {
yang-version 1.1;
namespace "urn:bbf:yang:bbf-dot1q-types";
prefix bbf-dot1qt;
organization
"Broadband Forum <https://www.broadband-forum.org>
Common YANG Work Area";
contact
"Comments or questions about this Broadband Forum YANG module
should be directed to <mailto:help@broadband-forum.org>.
Editor: Nick Hancock, ADTRAN
Editor: Ludwig Pauwels, Nokia
PS Leader: Joey Boyd, ADTRAN
PS Leader: Sowrirajan Padmanabhan, Nokia
WA Director: Joey Boyd, ADTRAN
WA Director: Sven Ooghe, Nokia";
description
"This module contains a collection of YANG definitions for
supporting the Broadband Forum requirements on reusable data
types as applicable to access network equipment. As such, this
module is specific to access network equipment (e.g.,
BBF-specified Access Nodes and FTTdp DPUs).
Specifically, this module defines common types for support of
IEEE 802.1Q.
Copyright (c) 2017-2021, Broadband Forum
Redistribution and use in source and binary forms, with or
without modification, are permitted provided that the following
conditions are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials
provided with the distribution.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products
derived from this software without specific prior written
permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
The above license is used as a license under copyright only.
Please reference the Forum IPR Policy for patent licensing terms
<https://www.broadband-forum.org/ipr-policy>.
Any moral rights which are necessary to exercise under the above
license grant are also deemed granted under this license.
This version of this YANG module is part of TR-383a4; see
the TR itself for full legal notices.";
revision 2021-06-02 {
description
"Amendment 4.
* Approval Date: 2021-06-02.
* Publication Date: 2021-06-02.";
reference
"TR-383a4: Common YANG Modules
<https://www.broadband-forum.org/technical/download/
TR-383_Amendment-4.pdf>";
}
revision 2020-10-13 {
description
"Amendment 3.
* Approval Date: 2020-10-13.
* Publication Date: 2020-10-13.";
reference
"TR-383a3: Common YANG Modules
<https://www.broadband-forum.org/technical/download/
TR-383_Amendment-3.pdf>";
}
revision 2018-07-13 {
description
"Amendment 1.
* Approval Date: 2018-06-04.
* Publication Date: see revision date above.";
reference
"TR-383: Common YANG Modules
<https://www.broadband-forum.org/technical/download/
TR-383_Amendment-1.pdf>";
}
revision 2017-05-08 {
description
"Initial revision.
* Approval Date: see revision date above.
* Publication Date: 2017-06-02.";
reference
"TR-383: Common YANG Modules
<https://www.broadband-forum.org/technical/download/
TR-383.pdf>";
}
identity dot1q-tag-vlan-type {
description
"Base identity from which all IEEE 802.1Q VLAN tag types are
derived.";
}
identity c-vlan {
base dot1q-tag-vlan-type;
description
"An IEEE 802.1Q Customer VLAN tag, using the 0x8100
Ethertype.";
}
identity s-vlan {
base dot1q-tag-vlan-type;
description
"An IEEE 802.1Q Service VLAN tag, using a the 0x88a8 Ethertype,
originally introduced in IEEE 802.1ad, and incorporated into
IEEE 802.1Q-2014.";
}
typedef dot1q-tag-type {
type identityref {
base dot1q-tag-vlan-type;
}
description
"Identifies a specific IEEE 802.1Q tag type.";
reference
"IEEE 802.1Q-2014: Virtual Bridged Local Area Networks";
}
typedef vlan-id {
type uint16 {
range "1..4094";
}
description
"The type uniquely identifies a VLAN. This is the
12-bit VLAN ID used in the VLAN tag header.
The range 1..4094 is defined by the referenced
specification.";
reference
"IEEE 802.1Q-2014: Virtual Bridged Local Area Networks";
}
typedef vlan-id-or-0 {
type uint16 {
range "0..4094";
}
description
"The type uniquely identifies a VLAN. This is the
12-bit VLAN ID used in the VLAN tag header.
The range 1..4094 is defined by the referenced specification.
The value 0 allows support of priority-tagged frames.";
reference
"IEEE 802.1Q-2014: Virtual Bridged Local Area Networks";
}
typedef vlan-id-range {
type string {
pattern '(([1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-3][0-9][0-9]['
+ '0-9]|40[0-8][0-9]|409[0-4])([,-]([1-9]|[1-9][0-9]|['
+ '1-9][0-9][0-9]|[1-3][0-9][0-9][0-9]|40[0-8][0-9]|'
+ '409[0-4]))*)?';
}
description
"A list of VLAN IDs, or non overlapping VLAN ranges, in
ascending order, between 1 and 4094.
The format of this string can be any of the following:
single value
Example: '23'
comma separated list of values
Example: '1,2,100'
range of values
Example: '1-1000'
comma separated list of ranges
Example: '1-1000,2001-2999'
comma separated list of values and ranges
Example: '1-1000,1500,2001-2999'";
}
typedef pbit {
type uint8 {
range "0..7";
}
description
"Priority Code Point. PCP is a 3-bit field that refers to the
class of service applied to a 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.";
reference
"IEEE 802.1Q-2014: Virtual Bridged Local Area Networks";
}
typedef pbit-list {
type string {
pattern '([0-7](-[0-7])?(,[0-7](-[0-7])?)*)';
}
description
"A list of p-bits values, or non overlapping p-bits value
ranges, in ascending order. Each p-bits value shall be between
0 and 7.
Example: 0,2-4,7
";
}
typedef dei {
type uint8 {
range "0..1";
}
description
"Drop Eligible Indicator. DEI is a 1-bit field in the VLAN tag.
May be used separately or in conjunction with PCP to indicate
frames eligible to be dropped in the presence of congestion.";
reference
"IEEE 802.1Q-2014: Virtual Bridged Local Area Networks";
}
typedef ether-type {
type uint16;
description
"The Ethernet Type (or Length) value.";
reference
"IEEE 802.3-2012: IEEE Standard for Ethernet, clause 3.2.6";
}
typedef ether-type-hex {
type string {
pattern '0x[A-Fa-f0-9]{4}';
}
description
"The Ethernet Type (or Length) value expressed as a 4 hex digits
in the form 0xABCD.";
reference
"IEEE 802.3-2012: IEEE Standard for Ethernet, clause 3.2.6";
}
typedef ether-type-or-acronym {
type union {
type ether-type;
type enumeration {
enum any {
description
"Matches any Ethertype value.";
}
enum ipv4 {
description
"Matches the Ethertype value 0x0800 or 0x0806 or
0x8035.";
}
enum pppoe {
description
"Matches the Ethertype value 0x8863 or 0x8864.";
}
enum ipv6 {
description
"Matches the Ethertype value 0x86DD.";
}
}
type ether-type-hex;
}
description
"This type allows to specify
- a specific integer value identifying a particular Ethertype
value of frames,
- a 'pre-defined' enumeration value identifying one or more
specific Ethertype values,
- the enumeration value 'any' that identifies all frames.";
}
}