module dot1Q { namespace "ieee:ns:yang:ieee-dot1Q-bridge"; prefix "dot1Q"; import ieee-types { prefix "ieee"; } import yang-types { prefix "yang"; } import ietf-interfaces { prefix "if"; } import iana-if-type { prefix "ianaif"; } include dot1Q-types; organization "Institute of Electrical and Electronics Engineers"; contact "Web URL: http://ieee.org/ E-mail: corporate-communications@ieee.org Postal: U.S.A. Phone: +1 732-563-6820 Fax: +1 732-981-9511"; description "TBD."; revision "2015-07-07" { description "Initial Version."; reference "IEEE 802.1Q-2011, Media Access Control (MAC) Bridges and Virtual Bridged Local Area Networks."; } feature IngressFiltering { description "Each Port may support an Enable Ingress Filtering parameter. A frame received on a Port that is not in the member set (8.8.10) associated with the frame’s VID shall be discarded if this parameter is set. The default value for this parameter is reset, i.e., Disable Ingress Filtering, for all Ports. Any Port that supports setting this parameter shall also support resetting it. The parameter may be configured by the management operations defined in Clause 12."; } feature ExtendedFilteringServices { description "Extended Filtering Services support the filtering behavior required for regions of a network in which potential recipients of multicast frames exist, and where both the potential recipients of frames and the Bridges are able to support dynamic configuration of filtering information for group MAC addresses. In order to integrate this extended filtering behavior with the needs of regions of the network that support only Basic Filtering Services, Bridges that support Extended Filtering Services can be statically and dynamically configured to modify their filtering behavior on a per-group MAC address basis, and also on the basis of the overall filtering service provided by each outbound Port with regard to multicast frames. The latter capability permits configuration of the Port’s default forwarding or filtering behavior with regard to group MAC addresses for which no specific static or dynamic filtering information has been configured."; } feature PortAndProtocolBasedVLANClassification { description "A VLAN-aware bridge component implementation in conformance to the provisions of this standard for Port-and-Protocol-based VLAN classification (5.4.1) shall 1) Support one or more of the following Protocol Classifications and Protocol Template formats: Ethernet, RFC_1042, SNAP_8021H, SNAP_Other, or LLC_Other (6.12); and may 2) Support configuration of the contents of the Protocol Group Database."; } container bridge { leaf address { type ieee:mac-address; } leaf name { type nameType; } leaf num-ports { type portNumberType; } list port-list { config false; key "port-number"; leaf port-number { type portNumberType; } leaf port-address { type ieee:mac-address; } } leaf up-time { config false; type yang:counter32; units seconds; } leaf bridge-type { type enumeration { enum customer-vlan-bridge; enum provider-bridge; enum provider-edge-bridge; enum backbone-edge-bridge; enum backbone-core-bridge; enum two-port-mac-relay-bridge; } } list component { min-elements 1; max-elements 4094; key "component-id"; leaf component-id { type uint32; } leaf component-type { config false; type enumeration { enum iComponent; enum bComponent; enum cVlanComponent; enum sVlanComponent; enum dBridgeComponent; enum edgeRelayComponent; } } leaf address { config false; type ieee:mac-address; } leaf num-ports { config false; type portNumberType; } leaf capabilities { config false; type componentCapabilityType; } leaf traffic-class-enabled { type boolean; } leaf mmrp-enabled-status { type boolean; } container filtering-database { leaf size { config false; type uint16; } leaf static-entries { config false; type uint16; } leaf dynamic-entries { config false; type uint16; } leaf static-vlan-registration-entries { config false; type uint16; } leaf dynamic-vlan-registration-entries { config false; type uint16; } leaf aging-time { type yang:timeticks; units seconds; default 300; } leaf mac-address-registration-entries { config false; if-feature ExtendedFilteringServices; type uint16; } list filtering-entries { key "database-id vid address"; leaf database-id { type uint16; } leaf address { type ieee:mac-address; } leaf vid { type ieee:vlanid; } leaf entry-type { type enumeration { enum static; enum dynamic; } } uses portMap; } list vlan-registration-entries { key "database-id vid"; leaf database-id { type uint16; } leaf vid { type ieee:vlanid; } leaf entry-type { type enumeration { enum static; enum dynamic; } } uses portMap; } } container permanent-database { leaf size { config false; type uint16; } leaf static-entries { config false; type uint16; } leaf static-vlan-registration-entries { config false; type uint16; } list filtering-entries { key "database-id vid address"; leaf database-id { type uint16; } leaf address { type ieee:mac-address; } leaf vid { type ieee:vlanid; } uses portMap; } } list bridge-port { min-elements 2; max-elements 4096; when "/if:interfaces/if:interface/if:type = 'ianaif:iso88023Csmacd' or /if:interfaces/if:interface/if:type = 'ianaif:ieee8023adLag' or /if:interfaces/if:interface/if:type = 'ianaif:ilan'"; key "name"; leaf name { type leafref { path "/if:interfaces/if:interface/if:name"; } } leaf protocol-based-vlan-classification { if-feature PortAndProtocolBasedVLANClassification; when "dot1Q:bridge/dot1Q:bridge-type != 'two-port-mac-relay-bridge'"; type boolean; } leaf max-vid-set-entries { if-feature PortAndProtocolBasedVLANClassification; when "dot1Q:bridge/dot1Q:bridge-type != 'two-port-mac-relay-bridge'"; type uint16; } leaf pvid { when "dot1Q:bridge/dot1Q:bridge-type != 'two-port-mac-relay-bridge'"; type ieee:vlanid; } leaf default-priority { type priorityType; } container priority-regeneration-table { uses priorityRegenerationTable; } leaf pcp-selection { type pcpSelectionType; } container pcp-decoding-table { leaf selection-type { type pcpSelectionType; } container table { uses pcpDecodingTable; } } container pcp-encoding-table { leaf selection-type { type pcpSelectionType; } container encoding-table { uses pcpEncodingTable; } } leaf use-dei { type boolean; } leaf drop-encoding { type boolean; } leaf service-access-priority-selection { type serviceAccessPrioritySelectionType; } container service-access-priority-table { uses serviceAccessPriorityTable; } container traffic-class-table { uses trafficClassTable; } leaf acceptable-frame { when "dot1Q:bridge/dot1Q:bridge-type != 'two-port-mac-relay-bridge'"; description "To configure the Acceptable Frame Types parameter associated with one or more Ports"; type enumeration { enum admit-only-VLAN-tagged-frames; enum admit-only-untagged-and-priority-tagged-frames; enum admit-all-frames; } } leaf enable-ingress-filtering { when "dot1Q:bridge/dot1Q:bridge-type != 'two-port-mac-relay-bridge'"; description "To configure the Enabled Ingress Filtering parameter(s) associated with one or more Ports"; type boolean; } leaf restricted-vlan-registration { when "dot1Q:bridge/dot1Q:bridge-type != 'two-port-mac-relay-bridge'"; description "To configure the Restricted_VLAN_Registration parameter associated with one or more Ports."; type boolean; } leaf vid-translation-table { when "dot1Q:bridge/dot1Q:bridge-type != 'two-port-mac-relay-bridge'"; type boolean; } leaf egress-vid-translation-table { when "dot1Q:bridge/dot1Q:bridge-type != 'two-port-mac-relay-bridge'"; type boolean; } leaf protocol-group-id { when "dot1Q:bridge/dot1Q:bridge-type != 'two-port-mac-relay-bridge'"; if-feature PortAndProtocolBasedVLANClassification; type uint16; } container protocol-group-database-contents { when "dot1Q:bridge/dot1Q:bridge-type != 'two-port-mac-relay-bridge'"; if-feature PortAndProtocolBasedVLANClassification; leaf template { type protocolTemplateFormatType; } leaf group-id { type uint16; } } leaf admin-point-to-point { type uint16; } list vid-translations { when "dot1Q:bridge/dot1Q:bridge-type != 'two-port-mac-relay-bridge'"; key "local-vid"; leaf local-vid { type ieee:vlanid; } leaf relay-vid { type ieee:vlanid; } } list egress-vid-translations { when "dot1Q:bridge/dot1Q:bridge-type != 'two-port-mac-relay-bridge'"; key "relay-vid"; leaf relay-vid { type ieee:vlanid; } leaf local-vid { type ieee:vlanid; } } } list bridge-port-state { min-elements 2; max-elements 4096; when "/if:interfaces/if:interface/if:type = 'ianaif:iso88023Csmacd' or /if:interfaces/if:interface/if:type = 'ianaif:ieee8023adLag' or /if:interfaces/if:interface/if:type = 'ianaif:ilan'"; key "name"; leaf name { type leafref { path "/if:interfaces-state/if:interface/if:name"; } } config false; leaf port-number { type portNumberType; } leaf component-id { type uint32; } leaf port-type { type enumeration { enum cvlan-bridge-port; enum provider-network-port; enum customer-network-port; enum customer-edge-port; enum customer-backbone-port; enum virtual-instance-port; enum d-bridge-port; enum remote-customer-access-port; enum station-facing-bridge-port; enum uplink-access-port; enum uplink-relay-port; } } leaf address { type ieee:mac-address; } leaf capabilities { type uint16; } leaf type-capabilties { type uint16; } leaf external { type boolean; } leaf oper-point-to-point { type boolean; } container bridge-port-statistics { leaf delay-exceeded-discards { type yang:counter32; } leaf mtu-exceeded-discards { type yang:counter32; } leaf frame-rx { type yang:counter32; } leaf octets-rx { type yang:counter64; } leaf discard-inbound { type yang:counter32; } leaf forward-outbound { type yang:counter32; } leaf discard-lack-of-buffers { type yang:counter32; } leaf discard-transit-delay-exceeded { type yang:counter32; } leaf discard-on-error { type yang:counter32; } leaf discard-on-ingress-filtering { when "dot1Q:bridge/dot1Q:bridge-type != 'two-port-mac-relay-bridge'"; if-feature IngressFiltering; type yang:counter32; } leaf discard-ttl-expired { when "dot1Q:bridge/dot1Q:bridge-type != 'two-port-mac-relay-bridge'"; type yang:counter32; } } list vlan-statistics { when "dot1Q:bridge/dot1Q:bridge-type != 'two-port-mac-relay-bridge'"; key "vid"; leaf vid { type ieee:vlanid; } leaf frame-rx { type yang:counter32; } leaf octets-rx { type yang:counter64; } leaf discard-inbound { type yang:counter32; } leaf forward-outbound { type yang:counter32; } leaf discard-lack-of-buffers { type yang:counter32; } leaf discard-transit-delay-exceeded { type yang:counter32; } leaf discard-on-error { type yang:counter32; } leaf discard-on-ingress-filtering { if-feature IngressFiltering; type yang:counter32; } leaf discard-ttl-expired { type yang:counter32; } } } } container bridge-vlan { when "dot1Q:bridge/dot1Q:bridge-type != 'two-port-mac-relay-bridge'"; leaf version { config false; type uint16; } leaf max { config false; type uint16; } leaf override-default-pvid { config false; type boolean; } leaf protocol-template { config false; type protocolTemplateFormatType; } leaf max-msti { config false; type uint16; } list vlan-id { key "vid"; leaf vid { type ieee:vlanid; } leaf name { type nameType; } list egress-ports { config false; key "port-number"; leaf port-number { type portNumberType; } leaf name { when "/if:interfaces/if:interface/if:type = 'ianaif:iso88023Csmacd' or /if:interfaces/if:interface/if:type = 'ianaif:ieee8023adLag'"; type leafref { path "/if:interfaces/if:interface/if:name"; } } } list untagged-ports { config false; key "port-number"; leaf port-number { type portNumberType; } leaf name { when "/if:interfaces/if:interface/if:type = 'ianaif:iso88023Csmacd' or /if:interfaces/if:interface/if:type = 'ianaif:ieee8023adLag'"; type leafref { path "/if:interfaces/if:interface/if:name"; } } } } container protocol-group-database { if-feature PortAndProtocolBasedVLANClassification; leaf frame-format { type protocolTemplateFormatType; } choice type { leaf ether-type { type etherType; } leaf protocol-id { type uint16; } container dsap-ssap-pairs { leaf dsap-address { type uint8; } leaf ssap-address { type uint8; } } } leaf protocol-group-id { type uint16; } } container vid-to-fid-allocation { //leaf-list vid { // type ieee:vlanid; //} leaf vids { type vid-range; } leaf fid { type uint16; } leaf type { config false; type enumeration { enum undefined; enum fixed; enum dynamic; } } } } } }