This module contains a collection of YANG definitions for supporting the Broadband Forum requirements on the management of sub-i...
Version: 2023-03-07
module bbf-sub-interface-tagging { yang-version 1.1; namespace "urn:bbf:yang:bbf-sub-interface-tagging"; prefix bbf-subif-tag; import ietf-interfaces { prefix if; } import bbf-dot1q-types { prefix bbf-dot1qt; } import bbf-if-type { prefix bbfift; } import bbf-sub-interfaces { prefix bbf-subif; } import bbf-frame-classification { prefix bbf-classif; } import bbf-frame-editing { prefix bbf-fedit; } 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 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 the management of sub-interfaces 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 augments the frame processing configuration of a (sub-)interface with additional criteria and adds VLAN-specific ingress and egress rewrite actions. Copyright (c) 2017-2023, 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-383a6; see the TR itself for full legal notices."; revision "2023-03-07" { description "Amendment 6. * Approval Date: 2023-03-07. * Publication Date: 2023-03-07."; reference "TR-383a6: Common YANG Modules <https://www.broadband-forum.org/technical/download/ TR-383_Amendment-6.pdf>"; } revision "2022-03-01" { description "Amendment 5. * Approval Date: 2022-03-01. * Publication Date: 2022-03-01."; reference "TR-383a5: Common YANG Modules <https://www.broadband-forum.org/technical/download/ TR-383_Amendment-5.pdf>"; } 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>"; } feature copy-vlan-id-from-tag-index { description "Indicates support for copying the VLAN ID from a specified tag index."; } feature write-pbit-value-in-vlan-tag { description "Indicates support for writing a configurable value of the p-bits into a VLAN tag."; } feature exclude-criteria { description "This feature indicates whether the network element supports the exclude criteria for matching frames into a sub-interface."; } feature dscp-match-criteria { description "Indicates support for the use of DSCP values as match criteria."; } grouping pbit-marking { status deprecated; description "The Priority bits (3 bits) of a VLAN tag (p-bits). P-bits are part of the 16-bit VLAN tag along with the single bit Drop Eligible Indicator (DEI) and the 12-bit VLAN ID."; uses bbf-fedit:write-pbit; } // grouping pbit-marking grouping dei-marking { status deprecated; description "The DEI bit (1 bit) of a VLAN tag. The DEI bit is part of the 16-bit VLAN tag along with the 3-bit Priority bits (p-bits) and the 12-bit VLAN ID."; uses bbf-fedit:write-dei; } // grouping dei-marking grouping dot1q-tag { description "Grouping to allow configuration to identify a single 802.1Q VLAN tag."; container dot1q-tag { description "Identifies an 802.1Q VLAN tag with an explicit tag-type and a single VLAN ID."; leaf tag-type { type union { type bbf-dot1qt:dot1q-tag-type; type bbf-dot1qt:ether-type; type bbf-dot1qt:ether-type-hex; } mandatory true; description "VLAN tag type."; } leaf vlan-id { type union { type bbf-dot1qt:vlan-id-or-0; type enumeration { enum "vlan-id-from-tag-index" { value 0; description "The VLAN ID is derived from one of the ingress tags as specified by 'vlan-id-from-tag-index'."; } } } mandatory true; description "The VLAN ID, the value 0 (priority-tagged) or configure to derive from an existing tag."; } leaf vlan-id-from-tag-index-or-discard { when "../vlan-id = 'vlan-id-from-tag-index'" { description "Only applicable when the 'vlan-id' is configured to be derived from a tag index."; } if-feature bbf-subif-tag:copy-vlan-id-from-tag-index; type bbf-classif:tag-index; mandatory true; description "Specifies from which tag the VLAN ID is be copied. If the specified input tag does not exist, the frame is discarded."; } uses bbf-fedit:write-pbit { refine pbit/write-pbit-value { if-feature bbf-subif-tag:write-pbit-value-in-vlan-tag; } } uses bbf-fedit:write-dei; } // container dot1q-tag } // grouping dot1q-tag grouping flexible-rewrite { description "Tag manipulation actions."; leaf pop-tags { type uint8 { range "0..2"; } default "0"; description "The number of tags to pop (or translate if used in conjunction with push-tags)."; } list push-tag { key "index"; max-elements 2; description "The number of tags to push (or translate if used in conjunction with pop-tags)."; leaf index { type bbf-classif:tag-index; must '(count(../../push-tag[index = 0]) > 0)' { error-message "An inner tag can only be pushed if an outer tag is also " + "specified."; description "Only allow a push of an inner tag if an outer tag is also being pushed."; } description "The index into the tag stack."; } uses dot1q-tag; } // list push-tag } // grouping flexible-rewrite augment /if:interfaces/if:interface/bbf-subif:frame-processing/bbf-subif:inline-frame-processing/bbf-subif:inline-frame-processing/bbf-subif:ingress-rule/bbf-subif:rule/bbf-subif:flexible-match { when "derived-from-or-self(../../../../if:type," + "'bbfift:vlan-sub-interface')" { description "Augments the general flexible-match container with specific VLAN match criteria."; } description "Augments the general flexible-match container with specific VLAN match criteria."; container match-criteria { description "This container collects match criteria for various frame fields. The match criteria are unambiguous in case a frame field is unique. This is not the case for the match criteria defined via leaf 'ethernet-frame-type' included via the 'uses bbf-classif:ethertype-match'. The value provided by the leaf inside this grouping is to be compared with the first Ethertype of an untagged Ethernet frame; or for frames that contain one or more VLAN tags it is the value to be compared with the Ethertype that is the first after the VLAN tags for which a matching criteria is specified via the list 'tag'. For example, if matching criteria are specified for one outer VLAN tag, and a received IPoE frame is single tagged, then the leaf 'ethernet-frame-type' refers to the Ethertype 0x0800 being the Ethertype that identifies the frame as IPoE. While the same YANG configuration applied to a received IPoE frame that is double tagged, then the leaf 'ethernet-frame-type' refers to the Ethertype 0x8100 being the Ethertype that identifies the frame contains an inner VLAN tag."; uses bbf-classif:frame-destination-match; uses bbf-classif:multiple-vlan-tag-match { augment vlan-tag-match-type/vlan-tagged/tag { description "Defines match criteria for all the fields of VLAN tags, being the TPID, the VLAN ID, the p-bits, and the DEI bit."; uses bbf-classif:dot1q-tag-ranges-or-any; } } uses bbf-classif:ethertype-match; uses bbf-classif:protocol-match; uses bbf-classif:dscp-match; } // container match-criteria container exclude-criteria { if-feature exclude-criteria; description "Exclude criteria extend the match criteria defined within the container 'flexible-match'. I.e. a frame matches in the sub-interface if it matches the criteria defined in 'flexible-match' container AND if it does not match the criteria defined in the 'exclude-criteria' container. A non-existing exclude-criteria container means it does not provide additional criteria and all frames match that part of the classification."; uses bbf-classif:frame-destination-match-specific; uses bbf-classif:ethertype-match-no-default; uses bbf-classif:protocol-match-specific; uses bbf-classif:dscp-match-specific; } // container exclude-criteria } augment /if:interfaces/if:interface/bbf-subif:frame-processing/bbf-subif:inline-frame-processing/bbf-subif:inline-frame-processing/bbf-subif:ingress-rule/bbf-subif:rule/bbf-subif:ingress-rewrite { when "derived-from-or-self(../../../../if:type," + "'bbfift:vlan-sub-interface')" { description "Augments the general ingress-rewrite container with specific VLAN rewrite actions."; } description "Augments the general ingress-rewrite container with specific VLAN rewrite actions."; uses flexible-rewrite; } augment /if:interfaces/if:interface/bbf-subif:frame-processing/bbf-subif:inline-frame-processing/bbf-subif:inline-frame-processing/bbf-subif:egress-rewrite { when "derived-from-or-self(../../if:type," + "'bbfift:vlan-sub-interface')" { description "Augments the general egress-rewrite container with specific VLAN rewrite actions."; } description "Augments the general egress-rewrite container with specific VLAN rewrite actions."; uses flexible-rewrite; } } // module bbf-sub-interface-tagging
© 2023 YumaWorks, Inc. All rights reserved.