This module contains a collection of YANG definitions for Cisco IOS-XR l2-ethernet package configuration. This YANG module augm...
Version: 2021-02-19
module Cisco-IOS-XR-um-l2-ethernet-cfg { yang-version 1; namespace "http://cisco.com/ns/yang/Cisco-IOS-XR-um-l2-ethernet-cfg"; prefix um-l2-ethernet-cfg; import Cisco-IOS-XR-types { prefix xr; } import ietf-yang-types { prefix yang; } import Cisco-IOS-XR-um-interface-cfg { prefix a1; } import Cisco-IOS-XR-um-if-l2transport-cfg { prefix a2; } import tailf-common { prefix tailf; } import cisco-semver { prefix semver; } organization "Cisco Systems, Inc."; contact "Cisco Systems, Inc. Customer Service Postal: 170 West Tasman Drive San Jose, CA 95134 Tel: +1 800 553-NETS E-mail: cs-yang@cisco.com"; description "This module contains a collection of YANG definitions for Cisco IOS-XR l2-ethernet package configuration. This YANG module augments the modules with configuration data. Copyright (c) 2020-2021 by Cisco Systems, Inc. All rights reserved."; revision "2021-02-19" { description "Updated when/must statement under carrier-delay, l2transport-encapsulation, encapsulation, l2protocol container. 2020-08-01 Added when/must statement under encapsulation container. Added feature/if-feature for global ethernet config."; } revision "2020-03-05" { description "Initial draft"; } semver:module-version "2.0.0"; semver:module-version "1.0.0"; feature global-ethernet { description "Global ethernet configuration"; } grouping IF-BODY { container carrier-delay { tailf:dependency "../a1:interface-name"; when "(../a1:interface-name[starts-with(text(),'FastEthernet')] or ../a1:interface-name[starts-with(text(),'GigabitEthernet')] or ../a1:interface-name[starts-with(text(),'TenGigE')] or ../a1:interface-name[starts-with(text(),'FortyGigE')] or ../a1:interface-name[starts-with(text(),'HundredGigE')] or ../a1:interface-name[starts-with(text(),'TwoHundredGigE')] or ../a1:interface-name[starts-with(text(),'FourHundredGigE')] or ../a1:interface-name[starts-with(text(),'TwentyFiveGigE')] or ../a1:interface-name[starts-with(text(),'FiftyGigE')] or ../a1:interface-name[starts-with(text(),'Bundle-Ether')] or ../a1:interface-name[starts-with(text(),'PW-Ether')])and ../a1:interface-name[contains(text(),'.')]"; description "Set the carrier delay on an interface"; leaf up { type uint32 { range "1..65535"; } description "Set the carrier delay up value"; } } // container carrier-delay container encapsulation { tailf:dependency "../a1:interface-name"; when "(../a1:interface-name[starts-with(text(),'FastEthernet')] or ../a1:interface-name[starts-with(text(),'GigabitEthernet')] or ../a1:interface-name[starts-with(text(),'TenGigE')] or ../a1:interface-name[starts-with(text(),'FortyGigE')] or ../a1:interface-name[starts-with(text(),'HundredGigE')] or ../a1:interface-name[starts-with(text(),'TwoHundredGigE')] or ../a1:interface-name[starts-with(text(),'FourHundredGigE')] or ../a1:interface-name[starts-with(text(),'TwentyFiveGigE')] or ../a1:interface-name[starts-with(text(),'FiftyGigE')] or ../a1:interface-name[starts-with(text(),'Bundle-Ether')] or ../a1:interface-name[starts-with(text(),'PW-Ether')])and ../a1:interface-name[contains(text(),'.')]and not(../a1:sub-interface-type/a1:l2transport)"; description "Specify which packets will be matched by this sub-interface"; container dot1q { description "IEEE 802.1Q VLAN-tagged packets"; leaf vlan-id { type uint32 { range "1..4094"; } description "Configure first (outer) VLAN ID on the subinterface"; } leaf second-dot1q { type uint32 { range "1..4094"; } must "../vlan-id"; description "Configure second (inner 802.1Q) VLAN ID on the subinterface"; } } // container dot1q container dot1ad { description "IEEE 802.1ad VLAN-tagged packets"; leaf vlan-id { type uint32 { range "1..4094"; } description "Configure first (outer) VLAN ID on the subinterface"; } leaf dot1q { type uint32 { range "1..4094"; } must "../vlan-id"; description "Configure second (inner 802.1Q) VLAN ID on the subinterface"; } } // container dot1ad } // container encapsulation container l2transport-encapsulation { tailf:dependency "../a1:interface-name"; when "(../a1:interface-name[starts-with(text(),'FastEthernet')] or ../a1:interface-name[starts-with(text(),'GigabitEthernet')] or ../a1:interface-name[starts-with(text(),'TenGigE')] or ../a1:interface-name[starts-with(text(),'FortyGigE')] or ../a1:interface-name[starts-with(text(),'HundredGigE')] or ../a1:interface-name[starts-with(text(),'TwoHundredGigE')] or ../a1:interface-name[starts-with(text(),'FourHundredGigE')] or ../a1:interface-name[starts-with(text(),'TwentyFiveGigE')] or ../a1:interface-name[starts-with(text(),'FiftyGigE')] or ../a1:interface-name[starts-with(text(),'Bundle-Ether')] or ../a1:interface-name[starts-with(text(),'PW-Ether')])and ../a1:interface-name[contains(text(),'.')]and ../a1:sub-interface-type/a1:l2transport"; description "Specify which packets will be matched by this sub-interface"; container dot1q { description "IEEE 802.1Q VLAN-tagged packets"; leaf vlan-id { type union { type uint32 { range "1..4094"; } type enumeration { enum "any" { value 4096; description "Match any VLAN id"; } } } must "not(../priority-tagged)"; description "Single VLAN id or start of VLAN range"; } leaf end-vlan-id { type union { type uint32 { range "1..4094"; } type enumeration { enum "not-set" { value 4097; description "Need to set this when configuring additional vlan-id with a single VLAN id"; } } } must "../vlan-id and ../vlan-id != 'any'"; description "End of VLAN range"; } leaf vlan-id-2 { type union { type uint32 { range "1..4094"; } type enumeration { enum "untagged" { value 65534; description "Packets with no explicit VLAN tag"; } } } must "../vlan-id and ../vlan-id != 'any' and ../end-vlan-id"; description "Single VLAN id or start of VLAN range"; } leaf end-vlan-id-2 { type uint32 { range "1..4094"; } must "../vlan-id-2"; description "End of VLAN range"; } leaf vlan-id-3 { type union { type uint32 { range "1..4094"; } type enumeration { enum "untagged" { value 65534; description "Packets with no explicit VLAN tag"; } } } must "../vlan-id-2"; description "Single VLAN id or start of VLAN range"; } leaf end-vlan-id-3 { type uint32 { range "1..4094"; } must "../vlan-id-3"; description "End of VLAN range"; } leaf vlan-id-4 { type union { type uint32 { range "1..4094"; } type enumeration { enum "untagged" { value 65534; description "Packets with no explicit VLAN tag"; } } } must "../vlan-id-3"; description "Single VLAN id or start of VLAN range"; } leaf end-vlan-id-4 { type uint32 { range "1..4094"; } must "../vlan-id-4"; description "End of VLAN range"; } leaf vlan-id-5 { type union { type uint32 { range "1..4094"; } type enumeration { enum "untagged" { value 65534; description "Packets with no explicit VLAN tag"; } } } must "../vlan-id-4"; description "Single VLAN id or start of VLAN range"; } leaf end-vlan-id-5 { type uint32 { range "1..4094"; } must "../vlan-id-5"; description "End of VLAN range"; } leaf vlan-id-6 { type union { type uint32 { range "1..4094"; } type enumeration { enum "untagged" { value 65534; description "Packets with no explicit VLAN tag"; } } } must "../vlan-id-5"; description "Single VLAN id or start of VLAN range"; } leaf end-vlan-id-6 { type uint32 { range "1..4094"; } must "../vlan-id-6"; description "End of VLAN range"; } leaf vlan-id-7 { type union { type uint32 { range "1..4094"; } type enumeration { enum "untagged" { value 65534; description "Packets with no explicit VLAN tag"; } } } must "../vlan-id-6"; description "Single VLAN id or start of VLAN range"; } leaf end-vlan-id-7 { type uint32 { range "1..4094"; } must "../vlan-id-7"; description "End of VLAN range"; } leaf vlan-id-8 { type union { type uint32 { range "1..4094"; } type enumeration { enum "untagged" { value 65534; description "Packets with no explicit VLAN tag"; } } } must "../vlan-id-7"; description "Single VLAN id or start of VLAN range"; } leaf end-vlan-id-8 { type uint32 { range "1..4094"; } must "../vlan-id-8"; description "End of VLAN range"; } leaf vlan-id-9 { type union { type uint32 { range "1..4094"; } type enumeration { enum "untagged" { value 65534; description "Packets with no explicit VLAN tag"; } } } must "../vlan-id-8"; description "Single VLAN id or start of VLAN range"; } leaf end-vlan-id-9 { type uint32 { range "1..4094"; } must "../vlan-id-9"; description "End of VLAN range"; } leaf second-dot1q { type union { type uint32 { range "1..4094"; } type enumeration { enum "any" { value 4096; description "Match any VLAN id"; } } } must "../vlan-id"; description "End of VLAN range"; } container exact { presence "Indicates this node is configured."; description "Do not allow further inner tags"; } // container exact container ingress { description "Perform MAC-based matching"; leaf source-mac { type yang:mac-address; description "Perform source MAC-based matching"; } } // container ingress container priority-tagged { must "not(../vlan-id)"; presence "Indicates a priority-tagged node is configured."; description "IEEE 802.1ad priority-tagged packets"; container dot1q { presence "Indicates a dot1q node is configured."; description "IEEE 802.1Q VLAN-tagged packets"; leaf vlan-id { type union { type uint32 { range "1..4094"; } type enumeration { enum "any" { value 4096; description "Match any VLAN id"; } } } mandatory true; description "Single VLAN id or start of VLAN range"; } leaf end-vlan-id { type uint32 { range "1..4094"; } must "../vlan-id != 'any'"; description "End of VLAN range"; } leaf vlan-id-2 { type uint32 { range "1..4094"; } must "../vlan-id != 'any'"; description "Single VLAN id or start of VLAN range"; } leaf end-vlan-id-2 { type uint32 { range "1..4094"; } must "../vlan-id-2"; description "End of VLAN range"; } leaf vlan-id-3 { type uint32 { range "1..4094"; } must "../vlan-id-2"; description "Single VLAN id or start of VLAN range"; } leaf end-vlan-id-3 { type uint32 { range "1..4094"; } must "../vlan-id-3"; description "End of VLAN range"; } leaf vlan-id-4 { type uint32 { range "1..4094"; } must "../vlan-id-3"; description "Single VLAN id or start of VLAN range"; } leaf end-vlan-id-4 { type uint32 { range "1..4094"; } must "../vlan-id-4"; description "End of VLAN range"; } leaf vlan-id-5 { type uint32 { range "1..4094"; } must "../vlan-id-4"; description "Single VLAN id or start of VLAN range"; } leaf end-vlan-id-5 { type uint32 { range "1..4094"; } must "../vlan-id-5"; description "End of VLAN range"; } leaf vlan-id-6 { type uint32 { range "1..4094"; } must "../vlan-id-5"; description "Single VLAN id or start of VLAN range"; } leaf end-vlan-id-6 { type uint32 { range "1..4094"; } must "../vlan-id-6"; description "End of VLAN range"; } leaf vlan-id-7 { type uint32 { range "1..4094"; } must "../vlan-id-6"; description "Single VLAN id or start of VLAN range"; } leaf end-vlan-id-7 { type uint32 { range "1..4094"; } must "../vlan-id-7"; description "End of VLAN range"; } leaf vlan-id-8 { type uint32 { range "1..4094"; } must "../vlan-id-7"; description "Single VLAN id or start of VLAN range"; } leaf end-vlan-id-8 { type uint32 { range "1..4094"; } must "../vlan-id-8"; description "End of VLAN range"; } leaf vlan-id-9 { type uint32 { range "1..4094"; } must "../vlan-id-8"; description "Single VLAN id or start of VLAN range"; } leaf end-vlan-id-9 { type uint32 { range "1..4094"; } must "../vlan-id-9"; description "End of VLAN range"; } } // container dot1q container exact { presence "Indicates this node is configured."; description "Do not allow further inner tags"; } // container exact container ingress { description "Perform MAC-based matching"; leaf source-mac { type yang:mac-address; description "Perform source MAC-based matching"; } } // container ingress } // container priority-tagged } // container dot1q container dot1ad { description "IEEE 802.1ad VLAN-tagged packets"; leaf vlan-id { type union { type uint32 { range "1..4094"; } type enumeration { enum "any" { value 4096; description "Match any VLAN id"; } } } must "not(../priority-tagged)"; description "Single VLAN id or start of VLAN range"; } leaf end-vlan-id { type union { type uint32 { range "1..4094"; } type enumeration { enum "not-set" { value 4097; description "Need to set this when configuring additional vlan-id with a single VLAN id"; } } } must "../vlan-id and ../vlan-id != 'any'"; description "End of VLAN range"; } leaf vlan-id-2 { type uint32 { range "1..4094"; } must "../vlan-id and ../vlan-id != 'any' and ../end-vlan-id"; description "Single VLAN id or start of VLAN range"; } leaf end-vlan-id-2 { type uint32 { range "1..4094"; } must "../vlan-id-2"; description "End of VLAN range"; } leaf vlan-id-3 { type uint32 { range "1..4094"; } must "../vlan-id-2"; description "Single VLAN id or start of VLAN range"; } leaf end-vlan-id-3 { type uint32 { range "1..4094"; } must "../vlan-id-3"; description "End of VLAN range"; } leaf vlan-id-4 { type uint32 { range "1..4094"; } must "../vlan-id-3"; description "Single VLAN id or start of VLAN range"; } leaf end-vlan-id-4 { type uint32 { range "1..4094"; } must "../vlan-id-4"; description "End of VLAN range"; } leaf vlan-id-5 { type uint32 { range "1..4094"; } must "../vlan-id-4"; description "Single VLAN id or start of VLAN range"; } leaf end-vlan-id-5 { type uint32 { range "1..4094"; } must "../vlan-id-5"; description "End of VLAN range"; } leaf vlan-id-6 { type uint32 { range "1..4094"; } must "../vlan-id-5"; description "Single VLAN id or start of VLAN range"; } leaf end-vlan-id-6 { type uint32 { range "1..4094"; } must "../vlan-id-6"; description "End of VLAN range"; } leaf vlan-id-7 { type uint32 { range "1..4094"; } must "../vlan-id-6"; description "Single VLAN id or start of VLAN range"; } leaf end-vlan-id-7 { type uint32 { range "1..4094"; } must "../vlan-id-7"; description "End of VLAN range"; } leaf vlan-id-8 { type uint32 { range "1..4094"; } must "../vlan-id-7"; description "Single VLAN id or start of VLAN range"; } leaf end-vlan-id-8 { type uint32 { range "1..4094"; } must "../vlan-id-8"; description "End of VLAN range"; } leaf vlan-id-9 { type uint32 { range "1..4094"; } must "../vlan-id-8"; description "Single VLAN id or start of VLAN range"; } leaf end-vlan-id-9 { type uint32 { range "1..4094"; } must "../vlan-id-9"; description "End of VLAN range"; } leaf dot1q { type union { type uint32 { range "1..4094"; } type enumeration { enum "any" { value 4096; description "Match any VLAN id"; } } } must "../vlan-id"; description "End of VLAN range"; } container exact { presence "Indicates this node is configured."; description "Do not allow further inner tags"; } // container exact container ingress { description "Perform MAC-based matching"; leaf source-mac { type yang:mac-address; description "Perform source MAC-based matching"; } } // container ingress container priority-tagged { must "not(../vlan-id)"; presence "Indicates a priority-tagged node is configured."; description "IEEE 802.1ad priority-tagged packets"; container dot1q { presence "Indicates a dot1q node is configured."; description "IEEE 802.1Q VLAN-tagged packets"; leaf vlan-id { type union { type uint32 { range "1..4094"; } type enumeration { enum "any" { value 4096; description "Match any VLAN id"; } } } mandatory true; description "Single VLAN id or start of VLAN range"; } leaf end-vlan-id { type uint32 { range "1..4094"; } must "../vlan-id != 'any'"; description "End of VLAN range"; } leaf vlan-id-2 { type uint32 { range "1..4094"; } must "../vlan-id != 'any'"; description "Single VLAN id or start of VLAN range"; } leaf end-vlan-id-2 { type uint32 { range "1..4094"; } must "../vlan-id-2"; description "End of VLAN range"; } leaf vlan-id-3 { type uint32 { range "1..4094"; } must "../vlan-id-2"; description "Single VLAN id or start of VLAN range"; } leaf end-vlan-id-3 { type uint32 { range "1..4094"; } must "../vlan-id-3"; description "End of VLAN range"; } leaf vlan-id-4 { type uint32 { range "1..4094"; } must "../vlan-id-3"; description "Single VLAN id or start of VLAN range"; } leaf end-vlan-id-4 { type uint32 { range "1..4094"; } must "../vlan-id-4"; description "End of VLAN range"; } leaf vlan-id-5 { type uint32 { range "1..4094"; } must "../vlan-id-4"; description "Single VLAN id or start of VLAN range"; } leaf end-vlan-id-5 { type uint32 { range "1..4094"; } must "../vlan-id-5"; description "End of VLAN range"; } leaf vlan-id-6 { type uint32 { range "1..4094"; } must "../vlan-id-5"; description "Single VLAN id or start of VLAN range"; } leaf end-vlan-id-6 { type uint32 { range "1..4094"; } must "../vlan-id-6"; description "End of VLAN range"; } leaf vlan-id-7 { type uint32 { range "1..4094"; } must "../vlan-id-6"; description "Single VLAN id or start of VLAN range"; } leaf end-vlan-id-7 { type uint32 { range "1..4094"; } must "../vlan-id-7"; description "End of VLAN range"; } leaf vlan-id-8 { type uint32 { range "1..4094"; } must "../vlan-id-7"; description "Single VLAN id or start of VLAN range"; } leaf end-vlan-id-8 { type uint32 { range "1..4094"; } must "../vlan-id-8"; description "End of VLAN range"; } leaf vlan-id-9 { type uint32 { range "1..4094"; } must "../vlan-id-8"; description "Single VLAN id or start of VLAN range"; } leaf end-vlan-id-9 { type uint32 { range "1..4094"; } must "../vlan-id-9"; description "End of VLAN range"; } } // container dot1q container exact { presence "Indicates this node is configured."; description "Do not allow further inner tags"; } // container exact container ingress { description "Perform MAC-based matching"; leaf source-mac { type yang:mac-address; description "Perform source MAC-based matching"; } } // container ingress } // container priority-tagged } // container dot1ad container untagged { presence "Indicates untagged node is configured."; description "Packets with no explicit VLAN tag"; container dot1q { presence "Indicates a dot1q node is configured."; description "IEEE 802.1Q VLAN-tagged packets"; leaf vlan-id { type union { type uint32 { range "1..4094"; } type enumeration { enum "any" { value 4096; description "Match any VLAN id"; } } } mandatory true; description "Single VLAN id or start of VLAN range"; } leaf end-vlan-id { type uint32 { range "1..4094"; } must "../vlan-id != 'any'"; description "End of VLAN range"; } leaf vlan-id-2 { type uint32 { range "1..4094"; } must "../vlan-id != 'any'"; description "Single VLAN id or start of VLAN range"; } leaf end-vlan-id-2 { type uint32 { range "1..4094"; } must "../vlan-id-2"; description "End of VLAN range"; } leaf vlan-id-3 { type uint32 { range "1..4094"; } must "../vlan-id-2"; description "Single VLAN id or start of VLAN range"; } leaf end-vlan-id-3 { type uint32 { range "1..4094"; } must "../vlan-id-3"; description "End of VLAN range"; } leaf vlan-id-4 { type uint32 { range "1..4094"; } must "../vlan-id-3"; description "Single VLAN id or start of VLAN range"; } leaf end-vlan-id-4 { type uint32 { range "1..4094"; } must "../vlan-id-4"; description "End of VLAN range"; } leaf vlan-id-5 { type uint32 { range "1..4094"; } must "../vlan-id-4"; description "Single VLAN id or start of VLAN range"; } leaf end-vlan-id-5 { type uint32 { range "1..4094"; } must "../vlan-id-5"; description "End of VLAN range"; } leaf vlan-id-6 { type uint32 { range "1..4094"; } must "../vlan-id-5"; description "Single VLAN id or start of VLAN range"; } leaf end-vlan-id-6 { type uint32 { range "1..4094"; } must "../vlan-id-6"; description "End of VLAN range"; } leaf vlan-id-7 { type uint32 { range "1..4094"; } must "../vlan-id-6"; description "Single VLAN id or start of VLAN range"; } leaf end-vlan-id-7 { type uint32 { range "1..4094"; } must "../vlan-id-7"; description "End of VLAN range"; } leaf vlan-id-8 { type uint32 { range "1..4094"; } must "../vlan-id-7"; description "Single VLAN id or start of VLAN range"; } leaf end-vlan-id-8 { type uint32 { range "1..4094"; } must "../vlan-id-8"; description "End of VLAN range"; } leaf vlan-id-9 { type uint32 { range "1..4094"; } must "../vlan-id-8"; description "Single VLAN id or start of VLAN range"; } leaf end-vlan-id-9 { type uint32 { range "1..4094"; } must "../vlan-id-9"; description "End of VLAN range"; } } // container dot1q container ingress { description "Perform MAC-based matching"; leaf source-mac { type yang:mac-address; description "Perform source MAC-based matching"; } } // container ingress } // container untagged container default { presence "Indicates default node is configured."; description "Packets unmatched by other service instances"; } // container default } // container l2transport-encapsulation container rewrite { description "Set the tag rewriting policy for this EFP"; container ingress { description "Set the tag rewriting policy for this EFP"; container tag { description "Set the tag rewriting policy for this EFP"; container push { description "Push one or more tags"; container dot1q { must "not(../dot1ad or ../../pop/one or ../../pop/two or ../../translate/one-to-one/dot1q or ../../translate/one-to-one/dot1ad or ../../translate/one-to-two/dot1q or ../../translate/one-to-two/dot1ad or ../../translate/two-to-one/dot1q or ../../translate/two-to-one/dot1ad or ../../translate/two-to-two/dot1q or ../../translate/two-to-two/dot1ad)"; presence "Indicates dot1q node is configured."; description "Push a Dot1Q tag"; leaf vlan-id { type uint32 { range "1..4094"; } mandatory true; description "Push a Dot1Q tag"; } leaf second-dot1q { type uint32 { range "1..4094"; } description "Push another Dot1Q tag"; } } // container dot1q container dot1ad { must "not(../dot1q or ../../pop/one or ../../pop/two or ../../translate/one-to-one/dot1q or ../../translate/one-to-one/dot1ad or ../../translate/one-to-two/dot1q or ../../translate/one-to-two/dot1ad or ../../translate/two-to-one/dot1q or ../../translate/two-to-one/dot1ad or ../../translate/two-to-two/dot1q or ../../translate/two-to-two/dot1ad)"; presence "Indicates dot1ad node is configured."; description "Push a Dot1ad tag"; leaf vlan-id { type uint32 { range "1..4094"; } mandatory true; description "Push a Dot1Q tag"; } leaf dot1q { type uint32 { range "1..4094"; } description "Push an inner Dot1Q tag"; } } // container dot1ad } // container push container pop { description "Remove one or more tags"; container one { must "not(../../push/dot1q or ../../push/dot1ad or ../two or ../../translate/one-to-one/dot1q or ../../translate/one-to-one/dot1ad or ../../translate/one-to-two/dot1q or ../../translate/one-to-two/dot1ad or ../../translate/two-to-one/dot1q or ../../translate/two-to-one/dot1ad or ../../translate/two-to-two/dot1q or ../../translate/two-to-two/dot1ad)"; presence "Indicates this node is configured."; description "Remove outer tag only"; } // container one container two { must "not(../../push/dot1q or ../../push/dot1ad or ../one or ../../translate/one-to-one/dot1q or ../../translate/one-to-one/dot1ad or ../../translate/one-to-two/dot1q or ../../translate/one-to-two/dot1ad or ../../translate/two-to-one/dot1q or ../../translate/two-to-one/dot1ad or ../../translate/two-to-two/dot1q or ../../translate/two-to-two/dot1ad)"; presence "Indicates this node is configured."; description "Remove two outermost tags"; } // container two } // container pop container translate { description "Replace tags with other tags"; container one-to-one { description "Replace the outermost tag with another tag"; container dot1q { must "not(../../../push/dot1q or ../../../push/dot1ad or ../../../pop/one or ../../../pop/two or ../dot1ad or ../../one-to-two/dot1q or ../../one-to-two/dot1ad or ../../two-to-one/dot1q or ../../two-to-one/dot1ad or ../../two-to-two/dot1q or ../../two-to-two/dot1ad)"; presence "Indicates dot1q node is configured."; description "Push a Dot1Q tag"; leaf vlan-id { type uint32 { range "1..4094"; } mandatory true; description "Push a Dot1Q tag"; } } // container dot1q container dot1ad { must "not(../../../push/dot1q or ../../../push/dot1ad or ../../../pop/one or ../../../pop/two or ../dot1q or ../../one-to-two/dot1q or ../../one-to-two/dot1ad or ../../two-to-one/dot1q or ../../two-to-one/dot1ad or ../../two-to-two/dot1q or ../../two-to-two/dot1ad)"; presence "Indicates dot1ad node is configured."; description "Push a Dot1ad tag"; leaf vlan-id { type uint32 { range "1..4094"; } mandatory true; description "Push a Dot1Q tag"; } } // container dot1ad } // container one-to-one container one-to-two { description "Replace the outermost tag with two tags"; container dot1q { must "not(../../../push/dot1q or ../../../push/dot1ad or ../../../pop/one or ../../../pop/two or ../../one-to-one/dot1q or ../../one-to-one/dot1ad or ../dot1ad or ../../two-to-one/dot1q or ../../two-to-one/dot1ad or ../../two-to-two/dot1q or ../../two-to-two/dot1ad)"; presence "Indicates a dot1q node is configured."; description "Push a Dot1Q tag"; leaf vlan-id { type uint32 { range "1..4094"; } mandatory true; description "Push a Dot1Q tag"; } leaf second-dot1q { type uint32 { range "1..4094"; } mandatory true; description "Push an inner Dot1Q tag"; } } // container dot1q container dot1ad { must "not(../../../push/dot1q or ../../../push/dot1ad or ../../../pop/one or ../../../pop/two or ../../one-to-one/dot1q or ../../one-to-one/dot1ad or ../dot1q or ../../two-to-one/dot1q or ../../two-to-one/dot1ad or ../../two-to-two/dot1q or ../../two-to-two/dot1ad)"; presence "Indicates a dot1ad node is configured."; description "Push a Dot1ad tag"; leaf vlan-id { type uint32 { range "1..4094"; } mandatory true; description "Push a Dot1Q tag"; } leaf dot1q { type uint32 { range "1..4094"; } mandatory true; description "Push an inner Dot1Q tag"; } } // container dot1ad } // container one-to-two container two-to-one { description "Replace the outermost two tags with one tag"; container dot1q { must "not(../../../push/dot1q or ../../../push/dot1ad or ../../../pop/one or ../../../pop/two or ../../one-to-one/dot1q or ../../one-to-one/dot1ad or ../../one-to-two/dot1q or ../../one-to-two/dot1ad or ../dot1ad or ../../two-to-two/dot1q or ../../two-to-two/dot1ad)"; presence "Indicates dot1q node is configured."; description "Push a Dot1Q tag"; leaf vlan-id { type uint32 { range "1..4094"; } mandatory true; description "Push a Dot1Q tag"; } } // container dot1q container dot1ad { must "not(../../../push/dot1q or ../../../push/dot1ad or ../../../pop/one or ../../../pop/two or ../../one-to-one/dot1q or ../../one-to-one/dot1ad or ../../one-to-two/dot1q or ../../one-to-two/dot1ad or ../dot1q or ../../two-to-two/dot1q or ../../two-to-two/dot1ad)"; presence "Indicates dot1ad node is configured."; description "Push a Dot1ad tag"; leaf vlan-id { type uint32 { range "1..4094"; } mandatory true; description "Push a Dot1Q tag"; } } // container dot1ad } // container two-to-one container two-to-two { description "Replace the outermost two tags with two other tags"; container dot1q { must "not(../../../push/dot1q or ../../../push/dot1ad or ../../../pop/one or ../../../pop/two or ../../one-to-one/dot1q or ../../one-to-one/dot1ad or ../../one-to-two/dot1q or ../../one-to-two/dot1ad or ../dot1ad or ../../two-to-one/dot1q or ../../two-to-one/dot1ad)"; presence "Indicates a dot1q node is configured."; description "Push a Dot1Q tag"; leaf vlan-id { type uint32 { range "1..4094"; } mandatory true; description "Push a Dot1Q tag"; } leaf second-dot1q { type uint32 { range "1..4094"; } mandatory true; description "Push an inner Dot1Q tag"; } } // container dot1q container dot1ad { must "not(../../../push/dot1q or ../../../push/dot1ad or ../../../pop/one or ../../../pop/two or ../../one-to-one/dot1q or ../../one-to-one/dot1ad or ../../one-to-two/dot1q or ../../one-to-two/dot1ad or ../dot1q or ../../two-to-one/dot1q or ../../two-to-one/dot1ad)"; presence "Indicates a dot1ad node is configured."; description "Push a Dot1ad tag"; leaf vlan-id { type uint32 { range "1..4094"; } mandatory true; description "Push a Dot1Q tag"; } leaf dot1q { type uint32 { range "1..4094"; } mandatory true; description "Push an inner Dot1Q tag"; } } // container dot1ad } // container two-to-two } // container translate } // container tag } // container ingress } // container rewrite container local-traffic { description "Set the default encapsulation for this EFP"; container default { description "Set the default encapsulation for this EFP"; container encapsulation { description "Set the default encapsulation for this EFP"; container dot1q { presence "Indicates a dot1q node is configured."; description "Default Dot1Q tag"; leaf vlan-id { type uint32 { range "1..4094"; } mandatory true; description "Default Dot1Q tag"; } leaf second-dot1q { type uint32 { range "1..4094"; } description "Default second Dot1Q tag"; } } // container dot1q container dot1ad { presence "Indicates a dot1ad node is configured."; description "Default Dot1ad tag"; leaf vlan-id { type uint32 { range "1..4094"; } mandatory true; description "Default Dot1ad tag"; } leaf dot1q { type uint32 { range "1..4094"; } description "Default inner Dot1Q tag"; } } // container dot1ad } // container encapsulation } // container default } // container local-traffic container dot1q { description "802.1Q VLAN configuration"; container native { description "802.1Q Native VLAN configuration"; leaf vlan { type uint32 { range "1..4094"; } description "Configure the Native VLAN ID for the trunk"; } } // container native container tunneling { description "Q-in-Q configuration"; leaf ethertype { type enumeration { enum "0x9100" { value 37120; description "The outer Ethertype uses value 0x9100 (default is 0x8100)"; } enum "0x9200" { value 37376; description "The outer Ethertype uses value 0x9200 (default is 0x8100)"; } } description "Configure the outer Ethertype used for Q-in-Q frames"; } } // container tunneling } // container dot1q container mac-accounting { description "Start per MAC address accounting on the interface"; container ingress { presence "Indicates a ingress node is configured."; description "Enable accounting on ingress direction"; } // container ingress container egress { presence "Indicates a egress node is configured."; description "Enable accounting on egress direction"; } // container egress } // container mac-accounting container vlan-switched { description "Enable vlan-switched on this interface"; container trunk { description "Enable vlan-switched on trunk port"; container dot1q { description "IEEE 802.1Q VLAN-tagged packets"; leaf vlan-ranges { type xr:Cisco-ios-xr-string { length "1..1024"; } must "not(../../dot1ad/vlan-ranges) and not(../../../access)"; description "List of VLAN Ranges in the form a-b,c,d,e-f,g"; } } // container dot1q container dot1ad { description "IEEE 802.1ad VLAN-tagged packets"; leaf vlan-ranges { type xr:Cisco-ios-xr-string { length "1..1024"; } must "not(../../dot1q/vlan-ranges) and not(../../../access)"; description "List of VLAN Ranges in the form a-b,c,d,e-f,g"; } } // container dot1ad } // container trunk leaf access { type uint32 { range "1..4094"; } must "not(../trunk/dot1q/vlan-ranges) and not(../trunk/dot1ad/vlan-ranges)"; description "Enable vlan-switched on access port"; } } // container vlan-switched } // grouping IF-BODY grouping L2TRANS-BODY { container l2protocol { tailf:dependency "../../a1:interface-name"; when "(../../a1:interface-name[starts-with(text(),'FastEthernet')] or ../../a1:interface-name[starts-with(text(),'GigabitEthernet')] or ../../a1:interface-name[starts-with(text(),'TenGigE')] or ../../a1:interface-name[starts-with(text(),'FortyGigE')] or ../../a1:interface-name[starts-with(text(),'HundredGigE')] or ../../a1:interface-name[starts-with(text(),'TwentyFiveGigE')] or ../../a1:interface-name[starts-with(text(),'Ethernet')] or ../../a1:interface-name[starts-with(text(),'Bundle-Ether')] or ../../a1:interface-name[starts-with(text(),'PW-Ether')] or ../../a1:interface-name[starts-with(text(),'Interflex')]) and (../../a1:interface-name[not(contains(text(),'.'))] or ../../a1:sub-interface-type/a1:l2transport)"; description "Layer 2 protocol handling"; container cpsv { description "CDP, PVST+, STP, and VTP protocols"; container tunnel { must "not(../reverse-tunnel) and not(../drop)"; presence "Indicates a tunnel node is configured."; description "Tunnel at ingress"; } // container tunnel container reverse-tunnel { must "not(../tunnel) and not(../drop)"; presence "Indicates a reverse-tunnel node is configured."; description "Tunnel at egress"; } // container reverse-tunnel container drop { must "not(../tunnel) and not(../reverse-tunnel)"; presence "Indicates a drop node is configured."; description "Drop these protocol packets"; } // container drop } // container cpsv container cdp { description "Cisco Discovery Protocol"; container drop { must "not(../tunnel) and not(../forward)"; presence "Indicates a drop node is configured."; description "Drop this protocol's packets"; } // container drop container forward { must "not(../drop) and not(../tunnel)"; presence "Indicates a forward node is configured."; description "Forward this protocol's packets"; } // container forward container tunnel { must "not(../drop) and not(../forward)"; presence "Indicates a tunnel node is configured."; description "Tunnel this protocol's packets"; } // container tunnel container experimental { description "Modify the MPLS Experimental bits"; leaf mpls-experimental-bits { type uint32 { range "0..7"; } must "../../forward or ../../tunnel"; description "Set the MPLS experimental bits for this interface"; } } // container experimental } // container cdp container stp { description "Spanning Tree Protocol"; container drop { must "not(../tunnel) and not(../forward)"; presence "Indicates a drop node is configured."; description "Drop this protocol's packets"; } // container drop container forward { must "not(../drop) and not(../tunnel)"; presence "Indicates a forward node is configured."; description "Forward this protocol's packets"; } // container forward container tunnel { must "not(../drop) and not(../forward)"; presence "Indicates a tunnel node is configured."; description "Tunnel this protocol's packets"; } // container tunnel container experimental { description "Modify the MPLS Experimental bits"; leaf mpls-experimental-bits { type uint32 { range "0..7"; } must "../../forward or ../../tunnel"; description "Set the MPLS experimental bits for this interface"; } } // container experimental } // container stp container vtp { description "VLAN Trunk Protocol"; container drop { must "not(../tunnel) and not(../forward)"; presence "Indicates a drop node is configured."; description "Drop this protocol's packets"; } // container drop container forward { must "not(../drop) and not(../tunnel)"; presence "Indicates a forward node is configured."; description "Forward this protocol's packets"; } // container forward container tunnel { must "not(../drop) and not(../forward)"; presence "Indicates a tunnel node is configured."; description "Tunnel this protocol's packets"; } // container tunnel container experimental { description "Modify the MPLS Experimental bits"; leaf mpls-experimental-bits { type uint32 { range "0..7"; } must "../../forward or ../../tunnel"; description "Set the MPLS experimental bits for this interface"; } } // container experimental } // container vtp container pvst { description "Per VLAN Spanning Tree"; container drop { must "not(../tunnel) and not(../forward)"; presence "Indicates a drop node is configured."; description "Drop this protocol's packets"; } // container drop container forward { must "not(../drop) and not(../tunnel)"; presence "Indicates a forward node is configured."; description "Forward this protocol's packets"; } // container forward container tunnel { must "not(../drop) and not(../forward)"; presence "Indicates a tunnel node is configured."; description "Tunnel this protocol's packets"; } // container tunnel container experimental { description "Modify the MPLS Experimental bits"; leaf mpls-experimental-bits { type uint32 { range "0..7"; } must "../../forward or ../../tunnel"; description "Set the MPLS experimental bits for this interface"; } } // container experimental } // container pvst } // container l2protocol container propagate { description "Select events to propagate"; container remote-status { presence "Indicates a remote-status node is configured."; description "Propagate remote link status changes"; } // container remote-status } // container propagate } // grouping L2TRANS-BODY augment /a1:interfaces/a1:interface { uses IF-BODY; } augment /a1:interfaces/a1:interface-preconfigure { uses IF-BODY; } augment /a1:interfaces/a1:interface/a2:l2transport { uses L2TRANS-BODY; } augment /a1:interfaces/a1:interface-preconfigure/a2:l2transport { uses L2TRANS-BODY; } container ethernet { description "Ethernet configuration"; container egress-filter { description "Egress-filter commands"; container strict { if-feature global-ethernet; presence "Indicates a strict node is configured."; description "Strict egress-filtering on by default"; } // container strict } // container egress-filter } // container ethernet } // module Cisco-IOS-XR-um-l2-ethernet-cfg
© 2023 YumaWorks, Inc. All rights reserved.