From e102d8725dcbdc58ed331d46647aabed56dc4342 Mon Sep 17 00:00:00 2001 From: FRUCHARD Damien Date: Thu, 21 Sep 2023 11:07:20 +0200 Subject: [PATCH] initial realease --- LICENSE | 11 + README.md | 12 +- irt/irt-eden-usecases.yang | 60 + irt/irt-frer.yang | 58 + irt/irt-interface.yang | 66 + irt/irt-ptp.yang | 51 + irt/irt-topology.yang | 172 + irt/irt-traffic.yang | 398 ++ irt/irt-tsn.yang | 65 + irt/irt-types.yang | 159 + standard/iana/iana-if-type.yang | 1832 +++++++ standard/ieee/ieee1588-ptp.yang | 4291 +++++++++++++++++ standard/ieee/ieee802-dot1as-ptp.yang | 1380 ++++++ standard/ieee/ieee802-dot1cb-frer-types.yang | 86 + standard/ieee/ieee802-dot1cb-frer.yang | 1237 +++++ ...02-dot1cb-stream-identification-types.yang | 99 + .../ieee802-dot1cb-stream-identification.yang | 817 ++++ standard/ieee/ieee802-dot1q-ats.yang | 315 ++ standard/ieee/ieee802-dot1q-bridge.yang | 1777 +++++++ standard/ieee/ieee802-dot1q-preemption.yang | 151 + .../ieee802-dot1q-stream-filters-gates.yang | 385 ++ standard/ieee/ieee802-dot1q-tsn-types.yang | 1477 ++++++ standard/ieee/ieee802-dot1q-types.yang | 1007 ++++ standard/ieee/ieee802-types.yang | 89 + standard/ietf/ietf-inet-types.yang | 458 ++ standard/ietf/ietf-interfaces.yang | 1123 +++++ standard/ietf/ietf-ip@2018-02-22.yang | 876 ++++ standard/ietf/ietf-network-topology.yang | 293 ++ standard/ietf/ietf-network.yang | 192 + standard/ietf/ietf-yang-types.yang | 474 ++ standard_changed/ieee802-dot1q-psfp.yang | 676 +++ standard_changed/ieee802-dot1q-sched.yang | 440 ++ 32 files changed, 20526 insertions(+), 1 deletion(-) create mode 100644 LICENSE create mode 100644 irt/irt-eden-usecases.yang create mode 100644 irt/irt-frer.yang create mode 100644 irt/irt-interface.yang create mode 100644 irt/irt-ptp.yang create mode 100644 irt/irt-topology.yang create mode 100644 irt/irt-traffic.yang create mode 100644 irt/irt-tsn.yang create mode 100644 irt/irt-types.yang create mode 100644 standard/iana/iana-if-type.yang create mode 100644 standard/ieee/ieee1588-ptp.yang create mode 100644 standard/ieee/ieee802-dot1as-ptp.yang create mode 100644 standard/ieee/ieee802-dot1cb-frer-types.yang create mode 100644 standard/ieee/ieee802-dot1cb-frer.yang create mode 100644 standard/ieee/ieee802-dot1cb-stream-identification-types.yang create mode 100644 standard/ieee/ieee802-dot1cb-stream-identification.yang create mode 100644 standard/ieee/ieee802-dot1q-ats.yang create mode 100644 standard/ieee/ieee802-dot1q-bridge.yang create mode 100644 standard/ieee/ieee802-dot1q-preemption.yang create mode 100644 standard/ieee/ieee802-dot1q-stream-filters-gates.yang create mode 100644 standard/ieee/ieee802-dot1q-tsn-types.yang create mode 100644 standard/ieee/ieee802-dot1q-types.yang create mode 100644 standard/ieee/ieee802-types.yang create mode 100644 standard/ietf/ietf-inet-types.yang create mode 100644 standard/ietf/ietf-interfaces.yang create mode 100644 standard/ietf/ietf-ip@2018-02-22.yang create mode 100644 standard/ietf/ietf-network-topology.yang create mode 100644 standard/ietf/ietf-network.yang create mode 100644 standard/ietf/ietf-yang-types.yang create mode 100644 standard_changed/ieee802-dot1q-psfp.yang create mode 100644 standard_changed/ieee802-dot1q-sched.yang diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..838a1ed --- /dev/null +++ b/LICENSE @@ -0,0 +1,11 @@ +Copyright 2023 IRT Saint Exupery + +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. \ No newline at end of file diff --git a/README.md b/README.md index 6858610..cf1b69d 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,12 @@ -# eden-yang +A YANG Ethernet TSN network data model. +This model aims at interfacing between an Ethernet TSN network design tool (simulator, analysis) and hardware. +It relies on IANA, IEEE and IETF modules with some extensions/augmentations for the modeling of a an Ethernet TSN network including the configuration of each node, the traffic and associated behavior/constraints/requirements. + +The development of this model started in the frame of the [EDEN project] (https://www.irt-saintexupery.com/wp-content/uploads/2021/07/EDEN-Project.pdf) at the Instite of Reseach and Technology Saint-Exupéry [IRT] (https://www.irt-saintexupery.com). +It is still work in progress. + +Repository contents: +- standard: IANA, IEEE and IETF standard modules. +- standard_changed: standard modules that had to be modified. +- irt: IRT modules. diff --git a/irt/irt-eden-usecases.yang b/irt/irt-eden-usecases.yang new file mode 100644 index 0000000..d8efa24 --- /dev/null +++ b/irt/irt-eden-usecases.yang @@ -0,0 +1,60 @@ +module irt-eden-usecases { + yang-version 1.1; + namespace urn:fr:irt:eden:yang:irt-eden-usecases; + prefix irtuc; + + import ietf-network { + prefix nw; + } + + import irt-types { + prefix irtty; + } + + organization + "IRT Saint Exupéry - Toulouse"; + + contact + "IRT Saint Exupéry - Toulouse + EDEN project team + "; + + description + "TSN network use cases definition for IRT EDEN project"; + + revision 2023-04-28 { + description + "Initial revision."; + } + + container usecases { + description "Set of use cases"; + list usecase { + description + "A use case is composed of a network (topology, data flows, + TSN configuration of the equipments), a duration (the duration + of the test), etc..."; + + key "usecase-id"; + + leaf usecase-id { + type string { + length "1..max"; + } + description + "Identifies a usecase."; + } + + leaf network-ref { + type leafref { + path "/nw:networks/nw:network/nw:network-id"; + } + } + + leaf duration { + type irtty:tDuration; + description "Duration of the use case execution."; + } + } + } +} diff --git a/irt/irt-frer.yang b/irt/irt-frer.yang new file mode 100644 index 0000000..4097c8b --- /dev/null +++ b/irt/irt-frer.yang @@ -0,0 +1,58 @@ +module irt-frer { + yang-version 1.1; + namespace urn:fr:irt:eden:yang:irt-frer; + + prefix irtfrer; + + import ieee802-dot1cb-stream-identification + { + prefix dot1cb-sid; + revision-date + "2021-05-06"; + } + + import ieee802-dot1cb-frer + { + prefix dot1cb-frer; + revision-date + "2021-05-06"; + } + + import ietf-network { + prefix nw; + revision-date + "2018-02-26"; + } + + organization + "IRT Saint Exupéry - Toulouse"; + + contact + "IRT Saint Exupéry - Toulouse + EDEN project team + "; + + description + "This module is containing augments to adapt IEEE802.1CB model to a whole network."; + + augment "/dot1cb-sid:stream-identity" { + description + "Addtition a a node-ref, to associate a stream-identity to a node in the network."; + + uses nw:node-ref; + } + + augment "/dot1cb-frer:frer/dot1cb-frer:sequence-generation" { + description + "Addtition a a node-ref, to associate a sequence-generation to a node in the network."; + + uses nw:node-ref; + } + + augment "/dot1cb-frer:frer/dot1cb-frer:sequence-recovery" { + description + "Addtition a a node-ref, to associate a sequence-recovery to a node in the network."; + + uses nw:node-ref; + } +} diff --git a/irt/irt-interface.yang b/irt/irt-interface.yang new file mode 100644 index 0000000..92443dc --- /dev/null +++ b/irt/irt-interface.yang @@ -0,0 +1,66 @@ +module irt-interface { + yang-version 1.1; + namespace urn:fr:irt:eden:yang:irt-interface; + prefix irtif; + + import ietf-network-topology { + prefix nt; + revision-date + "2018-02-26"; + } + + import ietf-interfaces { + prefix if; + revision-date + "2018-02-20"; + } + + import ieee802-types { + prefix ieee; + revision-date + "2020-10-23"; + } + + import irt-types { + prefix irtty; + } + + organization + "IRT Saint Exupéry - Toulouse"; + + contact + "IRT Saint Exupéry - Toulouse + EDEN project team + "; + + description + "This module is containing augments to complete the standard IETF interface."; + + revision 2023-04-28 { + description + "Initial revision."; + } + + augment "/if:interfaces/if:interface" { + description + "Adds reference to the topology, and identifier for operating + system / management firmware."; + uses nt:tp-ref; + leaf bench-interface-id { + description + "Identifies the network interface as seen from inside the node. + For example eno0, eth0, enp1s0 are typical names for Linux"; + type string; + } + + leaf mac-address { + description "MAC address of the interface"; + type ieee:mac-address; + } + + leaf chipset { + description "The hardware chipset reference for this interface"; + type irtty:tIfChipset; + } + } +} diff --git a/irt/irt-ptp.yang b/irt/irt-ptp.yang new file mode 100644 index 0000000..c9629f9 --- /dev/null +++ b/irt/irt-ptp.yang @@ -0,0 +1,51 @@ +module irt-ptp { + yang-version 1.1; + namespace urn:fr:irt:eden:yang:irt-ptp; + prefix irtptp; + + import ieee1588-ptp { + prefix ptp; + revision-date + "2022-08-30"; + } + + import ietf-network { + prefix nw; + revision-date + "2018-02-26"; + } + import ietf-network-topology { + prefix nt; + revision-date + "2018-02-26"; + } + + organization + "IRT Saint Exupéry - Toulouse"; + + contact + "IRT Saint Exupéry - Toulouse + EDEN project team + "; + + description + "This module is containing augments to complete the standard + IEEE 1588 PTP model, for association with the ietf topology model."; + + revision 2023-05-04 { + description + "Initial revision."; + } + + augment "/ptp:ptp/ptp:instances/ptp:instance/ptp:ports/ptp:port" { + description + "Adds the reference the termination point in the topology."; + uses nt:tp-ref; + } + + augment "/ptp:ptp/ptp:instances/ptp:instance" { + description + "Adds the reference the termination point in the topology."; + uses nw:node-ref; + } +} diff --git a/irt/irt-topology.yang b/irt/irt-topology.yang new file mode 100644 index 0000000..89c488a --- /dev/null +++ b/irt/irt-topology.yang @@ -0,0 +1,172 @@ +module irt-topology { + yang-version 1.1; + namespace urn:fr:irt:eden:yang:irt-topology; + + prefix irtto; + + import ietf-inet-types { + prefix inet; + revision-date + "2013-07-15"; + } + + import ietf-network { + prefix nw; + revision-date + "2018-02-26"; + } + + import ietf-network-topology { + prefix nt; + revision-date + "2018-02-26"; + } + + import irt-types { + prefix irtty ; + } + + organization + "IRT Saint Exupéry - Toulouse"; + + contact + "IRT Saint Exupéry - Toulouse + EDEN project team + "; + + description + "This module is containing augments to complete the standard IETF topology."; + + augment "/nw:networks/nw:network" { + description + "Improvement of the network implementation"; + + leaf project-mode { + description + "Project mode like Automotive, Aeronautic or Spatial"; + type string; + } + } + + augment "/nw:networks/nw:network/nw:node" { + description + "Improvement of the node implementation"; + + leaf transmission-capacity { + description + "Data rate processing capacity for transmission"; + type irtty:tThroughputMbps ; + } + + leaf manufacturer-reference { + description + "Manufaturer reference of the equipment"; + type irtty:tManufacturerRefence; + } + + leaf node-type { + type irtty:tNodeType; + } + + leaf bench-node-id { + type string; + description + "Uniquely identifies a node within the IRT hardware test bench network."; + } + + leaf management-host { + type inet:host; + description + "IP address (as host name or in dotted notation) of the management + interface of the node."; + } + } + + augment "/nw:networks/nw:network/nw:node" { + description + "Improvement of the node implementation with behavioral properties"; + + leaf supports-preemption { + type boolean; + } + leaf supports-TAS { + type boolean; + } + leaf supports-QCF { + type boolean; + } + leaf supports-ATS { + type boolean; + } + leaf supports-CBS { + type boolean; + } + leaf supports-FRER { + type boolean; + } + } + + augment "/nw:networks/nw:network/nw:node" { + description + "Improvement of the node implementation with switches properties"; + + leaf memory { + type irtty:tDataByte; + } + leaf memory-management-policy { + type irtty:tMemoryManagementPolicy; + } + leaf storage-policy { + type irtty:tStoragePolicy; + } + leaf tech-latency-min { + type irtty:tDurationMicro; + } + leaf tech-latency-max { + type irtty:tDurationMicro; + } + } + + augment "/nw:networks/nw:network/nt:link" { + description + "Improvement of the link implementation"; + leaf transmission-capacity { + type irtty:tThroughputMbps ; + } + } + + augment "/nw:networks/nw:network" { + description + "Add of some network global configurations."; + leaf physical-overhead { + type irtty:tDataByte ; + description + "The phycical overhead in bytes. Shall be 20 bytes."; + } + + leaf mac-overhead { + type irtty:tDataByte ; + description + "The mac overhead in bytes. Shall be 22 bytes."; + } + + leaf protocol-overhead { + description + "The protocol overhead in bytes. This field is used if the + network uses a single protocol."; + type irtty:tDataByte ; + } + + leaf minimal-payload { + description + "The minimal payload of a frame"; + type irtty:tDataByte ; + } + + leaf maximal-payload { + description + "The maximal payload of a frame"; + type irtty:tDataByte ; + } + } +} diff --git a/irt/irt-traffic.yang b/irt/irt-traffic.yang new file mode 100644 index 0000000..b57728f --- /dev/null +++ b/irt/irt-traffic.yang @@ -0,0 +1,398 @@ +module irt-traffic { + yang-version 1.1; + namespace urn:fr:irt:eden:yang:irt-traffic; + prefix irttf; + + import ietf-network { + prefix nw; + revision-date + "2018-02-26"; + } + + import ietf-interfaces { + prefix if; + revision-date + "2018-02-20"; + } + + import irt-types { + prefix irtty; + } + + organization + "IRT Saint Exupéry - Toulouse"; + + contact + "IRT Saint Exupéry - Toulouse + EDEN project team + "; + + description + "This module is containing a whole set of artifacts in order to describe the traffic."; + + revision 2023-04-28 { + description + "Initial revision."; + } + + typedef tBenchGenerator { + type enumeration { + enum automatic { + description + "The traffic is to be automatically generated, + based on its characteristics (periodic, burst, protocol,...), + for example with trafgen. + No parameter is used in that case."; + } + enum manual { + description + "The traffic must not automatically generated: + the operator has to generate the traffic for this + flow manually. + No parameter is used in that case."; + } + enum command { + description + "One parameter is used, and is the command to execute + remotely on the emitter node."; + } + enum script { + description + "One parameter is used, and is the path to a shell script + to upload and execute remotely on the emitter node"; + } + enum mediaStream { + description + "Two parameter are used, both are a path to a shell script. + The first is to be uploaded and executed remotely on the talker node, + the second is to upload and executed remotely on the emitter node"; + } + enum pcapReplay { + description + "Two parameters are used. + The first is the path to a pcap file to upload and replay on + the emitter node. + The second contains the pcap replay utility parameters, if needed."; + } + } + } + + container traffics { + list Traffic { + key "name"; + leaf name { + type string; + } + + container flows { + list Flow { + key "name"; + leaf name { + type string; + } + + leaf vlan-id { + type uint16 { + range "0..4094"; + } + description "VLAN identifier. Special value 0 means no QTAG. + Note: the presence/absence of QTAG is accounted in protocol-overhead"; + } + + leaf payload-min { + type irtty:tDataByte; + description "Minimal number of bytes for the payload. + Note: it is the payload at system/functional level, not the Ethernet payload. As a consequence, + if this payload size is 0, the Ethernet payload will be padded up to minimal Ethernet + PDU size, 42 bytes"; + } + + leaf payload-max { + type irtty:tDataByte; + description "Maximal number of bytes for the payload. + Note: it is the payload at system/functional level, not the Ethernet payload. As a consequence, + if this payload size is 0, the Ethernet payload will be padded up to minimal Ethernet + PDU size, 42 bytes"; + } + + leaf protocol-id { + type leafref { + path "/traffics/Traffic/protocols/Protocol/name"; + } + } + + leaf protocol-overhead { + type irtty:tDataByte; + } + + leaf burst { + type irtty:tDataByte; + } + + leaf periodic { + type boolean; + } + + leaf minimal-inter-arrival-time { + type irtty:tDurationMilli; + } + + leaf interFrame { + type irtty:tDurationMilli; + } + + leaf offset { + type irtty:tDurationNano; + } + + leaf offset-type { + type irtty:tOffsetType; + } + + leaf source-jitter { + type irtty:tDurationMilli; + } + + leaf synchronization { + type boolean; + } + + leaf best-effort { + type boolean; + } + + leaf source-id { + type nw:node-id; + } + + leaf class-id { + type leafref { + path "/traffics/Traffic/classes/Class/name"; + } + } + + leaf maximal-latency { + type irtty:tDurationMilli; + } + + leaf maximal-jitter { + type irtty:tDurationMilli; + } + + list Cast { + description "One (unicast) or more (multicast) ways to reach different destinations."; + key "id"; + + leaf id { + type uint32; + description + "Uniquely identifies an entry in the list."; + } + + leaf label { + type string; + } + + leaf dest-id { + description "Destination of the cast"; + type nw:node-id; + } + + container path { + description "Definition of the sub-paths of the path, with or without + redundancy. + If there is no redundancy, a unique Segment + is used to define the the path of a cast, whereas multiple + segments are needed to describe the redondancy."; + list Sub-path { + key "id"; + leaf id { + description + "Uniquely identifies an entry in the list."; + type uint32; + } + list Segment { + description "The list of segments of the subpath. When there is a unique + segment, there is no FRER. + When there are at least two segments means FRER is used. The + first port gives the replication node. The elimination port is + given by the first segment of the next subpath."; + key "id"; + leaf id { + type uint32; + description + "Uniquely identifies an entry in the list."; + } + leaf-list egress-port { + type if:interface-ref; + } + } + } + } + } + + container bench-generator { + leaf type { + type tBenchGenerator; + } + + leaf-list parameters { + type string; + description + "Depends on the generator type: see tBenchGenerator descriptions."; + } + } + } + } + + container classes { + list Class { + key "name"; + leaf name { + type string; + } + + leaf priority { + type irtty:tPriority; + } + + leaf ATS { + type boolean; + } + + leaf CBS { + type boolean; + } + + leaf CQF { + type boolean; + } + + leaf TAS { + type boolean; + } + + leaf FRER { + type boolean; + } + + leaf synchronization { + type boolean; + } + + leaf preemptive { + type boolean; + } + + leaf iDSL { + type irtty:tCBSSlope; + } + } + } + + container protocols { + list Protocol { + key "name"; + leaf name { + type string; + } + + leaf overHead { + type int32; + units + "byte"; + } + + leaf supportsFragmentation { + type boolean; + } + } + } + + container cycles { + list CEW { + key "name"; + leaf name { + type string; + } + + leaf period { + type irtty:tDurationNano; + } + + leaf offset { + type irtty:tDurationNano; + } + + leaf duration { + type irtty:tDurationNano; + } + + } + + } + + list Constraint { + key "name"; + leaf name { + type string; + } + + leaf cycle-id { + type leafref { + path "/traffics/Traffic/cycles/CEW/name"; + } + } + + leaf maximal-delay { + type irtty:tDurationMicro; + } + leaf maximal-jitter { + type irtty:tDurationMicro; + } + leaf cycle-shift { + type uint16; + } + + choice ConstraintCategory{ + case ChainedConstraint { + list ChainItem { + key "id"; + leaf id { + type uint16; + } + leaf flow-id { + type leafref { + path "/traffics/Traffic/flows/Flow/name"; + } + } + leaf minimal-latency { + type irtty:tDurationMicro; + } + leaf maximal-latency { + type irtty:tDurationMicro; + } + leaf exclusive { + type boolean; + } + } + } + + case SingleFlowConstraint { + leaf flow-id { + type leafref { + path "/traffics/Traffic/flows/Flow/name"; + } + } + leaf from-id { + type nw:node-id; + } + leaf to-id { + type nw:node-id; + } + } + } + } + } + } +} diff --git a/irt/irt-tsn.yang b/irt/irt-tsn.yang new file mode 100644 index 0000000..ec33535 --- /dev/null +++ b/irt/irt-tsn.yang @@ -0,0 +1,65 @@ +module irt-tsn { + yang-version 1.1; + namespace urn:fr:irt:eden:yang:irt-tsn; + prefix irttsn; + + import ietf-interfaces { + prefix if; + revision-date + "2018-02-20"; + } + + import ieee802-dot1q-bridge { + prefix dot1q; + revision-date + "2020-11-06"; + } + + import irt-types { + prefix irtty; + } + + organization + "IRT Saint Exupéry - Toulouse"; + + contact + "IRT Saint Exupéry - Toulouse + EDEN project team + "; + + description + "This module is containing augments to complete the standard IETF interface for TSN purpose."; + + revision 2023-04-28 { + description + "Initial revision."; + } + + augment "/if:interfaces/if:interface/dot1q:bridge-port" { + description + "CBS configuration items an interface"; + + container cbs-configurations { + list cbs-configuration { + key "priority"; + description "CBS configuration for a priority queue"; + leaf priority { + description "The priority of the stream"; + type irtty:tPriority; + } + leaf slope { + description "The current idle slope value in Mbps"; + type irtty:tThroughputMbps; + } + leaf cbs-traffic { + description "The current CBS traffic on this port for this priority in Mbps"; + type irtty:tThroughputMbps; + } + leaf higher-traffic { + description "The higher priority non CBS traffic on this port in Mbps"; + type irtty:tThroughputMbps; + } + } + } + } +} diff --git a/irt/irt-types.yang b/irt/irt-types.yang new file mode 100644 index 0000000..a45b12b --- /dev/null +++ b/irt/irt-types.yang @@ -0,0 +1,159 @@ +module irt-types { + yang-version 1.1; + namespace urn:fr:irt:eden:yang:irt-types; + prefix irtty; + + organization + "IRT Saint Exupéry - Toulouse"; + + contact + "IRT Saint Exupéry - Toulouse + EDEN project team + "; + + description + "This module is containing a whole set of artifacts in order to describe the traffic."; + + revision 2023-04-28 { + description + "Initial revision."; + } + + typedef tDataByte { + type uint32 ; + units + "byte"; + } + + typedef tDuration { + type decimal64 { + fraction-digits 9; + } + description + "A duration in seconds"; + units + "s"; + } + + typedef tDurationMilli { + type decimal64 { + fraction-digits 6; + } + description + "A duration in milli seconds"; + units + "ms"; + } + + typedef tDurationMicro { + type decimal64 { + fraction-digits 3; + } + description + "A duration in micro seconds"; + units + "µs"; + } + + typedef tDurationNano { + type uint64 ; + description + "A duration in nano seconds"; + units + "ns"; + } + + typedef tThroughput { + type uint64 ; + description + "The throughput in bits per second"; + units + "bit/s"; + } + + typedef tThroughputMbps { + type decimal64 { + fraction-digits 6; + } + description + "Throughput in Mega Bits per second"; + units + "Mb/s"; + } + + typedef tPriority { + description + "The TSN priority"; + type uint8 { + range "0..7"; + } + } + + typedef tCBSSlope { + type decimal64 { + fraction-digits 6; + } + } + + typedef tOffsetType { + type enumeration { + enum "Not Defined"; + enum Computed ; + enum Manual ; + } + } + + typedef tData { + type uint32 ; + description + "The type for a data in bits"; + units + "bit"; + } + typedef tNodeType { + type enumeration { + enum bridge; + enum end-station; + } + } + + typedef tManufacturerRefence { + type enumeration { + enum SW_fraunhofer; + enum SW_nxp_sja1110_EVM; + enum SW_microchip_evb_LAN9668; + enum ES_linuxGeneric; + enum ES_linuxUbuntu; + enum ES_linuxRPI_4; + enum ES_linuxRPI_CM4; + enum ES_linuxRPI_1Bplus; + enum ES_Meinberg_microsync; + enum ES_custom; + enum SW_custom; + } + } + + typedef tIfChipset { + type enumeration { + enum IFCHIP_i210; + enum IFCHIP_i225; + enum IFCHIP_i350; + enum IFCHIP_generic; + } + description + "Network interface chipsets"; + } + + typedef tMemoryManagementPolicy { + type enumeration { + enum Shared_Memory ; + enum Dedicated_Memory ; + } + } + typedef tStoragePolicy { + type enumeration { + enum Store_And_Forward ; + enum Cut_Through ; + } + } +} diff --git a/standard/iana/iana-if-type.yang b/standard/iana/iana-if-type.yang new file mode 100644 index 0000000..e36ee38 --- /dev/null +++ b/standard/iana/iana-if-type.yang @@ -0,0 +1,1832 @@ +module iana-if-type { + namespace "urn:ietf:params:xml:ns:yang:iana-if-type"; + prefix ianaift; + + import ietf-interfaces { + prefix if; + } + + organization "IANA"; + contact + " Internet Assigned Numbers Authority + + Postal: ICANN + 12025 Waterfront Drive, Suite 300 + Los Angeles, CA 90094-2536 + United States + + Tel: +1 310 301 5800 + "; + description + "This YANG module defines YANG identities for IANA-registered + interface types. + + This YANG module is maintained by IANA and reflects the + 'ifType definitions' registry. + + The latest revision of this YANG module can be obtained from + the IANA web site. + + Requests for new values should be made to IANA via + email (iana@iana.org). + + Copyright (c) 2014 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + The initial version of this YANG module is part of RFC 7224; + see the RFC itself for full legal notices."; + reference + "IANA 'ifType definitions' registry. + "; + + revision 2021-06-21 { + description + "Corrected reference for ifType 303."; + } + revision 2021-05-17 { + description + "Registered ifType 303."; + } + revision 2021-04-22 { + description + "Registered ifType 302."; + } + revision 2021-04-01 { + description + "Updated reference for 301."; + } + revision 2021-02-18 { + description + "Registered ifType 301."; + } + + revision 2020-08-27 { + description + "Added missing references."; + } + + revision 2020-07-13 { + description + "Added identity cpri."; + } + + revision 2020-07-10 { + description + "Registered ifType 300."; + } + + revision 2020-01-10 { + description + "Registered ifType 299."; + } + + revision 2019-10-16 { + description + "Registered ifType 298."; + } + revision 2019-07-16 { + description + "Registered ifType 297."; + } + revision 2019-06-21 { + description + "Updated reference associated with ifTypes 295-296."; + } + + revision 2019-02-08 { + description + "Corrected formatting issue."; + } + + revision 2019-01-31 { + description + "Registered ifTypes 295-296."; + } + + revision 2018-07-03 { + description + "Corrected revision date."; + } + + revision 2018-06-29 { + description + "Corrected formatting issue."; + } + + revision 2018-06-28 { + description + "Registered ifType 294."; + } + + revision 2018-06-28 { + description + "Registered ifType 293."; + } + + revision 2018-06-22 { + description + "Registered ifType 292."; + } + + revision 2018-06-21 { + description + "Registered ifType 291."; + } + + revision 2017-03-30 { + description + "Registered ifType 290."; + } + + revision 2017-01-19 { + description + "Registered ifType 289."; + } + + revision 2016-11-23 { + description + "Registered ifTypes 283-288."; + } + + revision 2016-06-09 { + description + "Registered ifType 282."; + } + revision 2016-05-03 { + description + "Registered ifType 281."; + } + revision 2015-06-12 { + description + "Corrected formatting issue."; + } + revision 2014-09-24 { + description + "Registered ifType 280."; + } + revision 2014-09-19 { + description + "Registered ifType 279."; + } + revision 2014-07-03 { + description + "Registered ifTypes 277-278."; + } + revision 2014-05-19 { + description + "Updated the contact address."; + } + revision 2014-05-08 { + description + "Initial revision."; + reference + "RFC 7224: IANA Interface Type YANG Module"; + } + + identity iana-interface-type { + base if:interface-type; + description + "This identity is used as a base for all interface types + defined in the 'ifType definitions' registry."; + } + + identity other { + base iana-interface-type; + } + identity regular1822 { + base iana-interface-type; + } + identity hdh1822 { + base iana-interface-type; + } + identity ddnX25 { + base iana-interface-type; + } + identity rfc877x25 { + base iana-interface-type; + reference + "RFC 1382 - SNMP MIB Extension for the X.25 Packet Layer"; + } + identity ethernetCsmacd { + base iana-interface-type; + description + "For all Ethernet-like interfaces, regardless of speed, + as per RFC 3635."; + reference + "RFC 3635 - Definitions of Managed Objects for the + Ethernet-like Interface Types"; + } + identity iso88023Csmacd { + base iana-interface-type; + status deprecated; + description + "Deprecated via RFC 3635. + Use ethernetCsmacd(6) instead."; + reference + "RFC 3635 - Definitions of Managed Objects for the + Ethernet-like Interface Types"; + } + identity iso88024TokenBus { + base iana-interface-type; + } + identity iso88025TokenRing { + base iana-interface-type; + } + identity iso88026Man { + base iana-interface-type; + } + identity starLan { + base iana-interface-type; + status deprecated; + description + "Deprecated via RFC 3635. + Use ethernetCsmacd(6) instead."; + reference + "RFC 3635 - Definitions of Managed Objects for the + Ethernet-like Interface Types"; + } + identity proteon10Mbit { + base iana-interface-type; + } + identity proteon80Mbit { + base iana-interface-type; + } + identity hyperchannel { + base iana-interface-type; + } + identity fddi { + base iana-interface-type; + reference + "RFC 1512 - FDDI Management Information Base"; + } + identity lapb { + base iana-interface-type; + reference + "RFC 1381 - SNMP MIB Extension for X.25 LAPB"; + } + identity sdlc { + base iana-interface-type; + } + identity ds1 { + base iana-interface-type; + description + "DS1-MIB."; + reference + "RFC 4805 - Definitions of Managed Objects for the + DS1, J1, E1, DS2, and E2 Interface Types"; + } + identity e1 { + base iana-interface-type; + status obsolete; + description + "Obsolete; see DS1-MIB."; + reference + "RFC 4805 - Definitions of Managed Objects for the + DS1, J1, E1, DS2, and E2 Interface Types"; + } + identity basicISDN { + base iana-interface-type; + description + "No longer used. See also RFC 2127."; + } + identity primaryISDN { + base iana-interface-type; + description + "No longer used. See also RFC 2127."; + } + identity propPointToPointSerial { + base iana-interface-type; + description + "Proprietary serial."; + } + identity ppp { + base iana-interface-type; + } + identity softwareLoopback { + base iana-interface-type; + } + identity eon { + base iana-interface-type; + description + "CLNP over IP."; + } + identity ethernet3Mbit { + base iana-interface-type; + } + identity nsip { + base iana-interface-type; + description + "XNS over IP."; + } + identity slip { + base iana-interface-type; + description + "Generic SLIP."; + } + identity ultra { + base iana-interface-type; + description + "Ultra Technologies."; + } + identity ds3 { + base iana-interface-type; + description + "DS3-MIB."; + reference + "RFC 3896 - Definitions of Managed Objects for the + DS3/E3 Interface Type"; + } + identity sip { + base iana-interface-type; + description + "SMDS, coffee."; + reference + "RFC 1694 - Definitions of Managed Objects for SMDS + Interfaces using SMIv2"; + } + identity frameRelay { + base iana-interface-type; + description + "DTE only."; + reference + "RFC 2115 - Management Information Base for Frame Relay + DTEs Using SMIv2"; + } + identity rs232 { + base iana-interface-type; + reference + "RFC 1659 - Definitions of Managed Objects for RS-232-like + Hardware Devices using SMIv2"; + } + identity para { + base iana-interface-type; + description + "Parallel-port."; + reference + "RFC 1660 - Definitions of Managed Objects for + Parallel-printer-like Hardware Devices using + SMIv2"; + } + identity arcnet { + base iana-interface-type; + description + "ARCnet."; + } + identity arcnetPlus { + base iana-interface-type; + description + "ARCnet Plus."; + } + identity atm { + base iana-interface-type; + description + "ATM cells."; + } + identity miox25 { + base iana-interface-type; + reference + "RFC 1461 - SNMP MIB extension for Multiprotocol + Interconnect over X.25"; + } + identity sonet { + base iana-interface-type; + description + "SONET or SDH."; + } + identity x25ple { + base iana-interface-type; + reference + "RFC 2127 - ISDN Management Information Base using SMIv2"; + } + identity iso88022llc { + base iana-interface-type; + } + identity localTalk { + base iana-interface-type; + } + identity smdsDxi { + base iana-interface-type; + } + identity frameRelayService { + base iana-interface-type; + description + "FRNETSERV-MIB."; + reference + "RFC 2954 - Definitions of Managed Objects for Frame + Relay Service"; + } + identity v35 { + base iana-interface-type; + } + identity hssi { + base iana-interface-type; + } + identity hippi { + base iana-interface-type; + } + identity modem { + base iana-interface-type; + description + "Generic modem."; + } + identity aal5 { + base iana-interface-type; + description + "AAL5 over ATM."; + } + identity sonetPath { + base iana-interface-type; + } + identity sonetVT { + base iana-interface-type; + } + identity smdsIcip { + base iana-interface-type; + description + "SMDS InterCarrier Interface."; + } + identity propVirtual { + base iana-interface-type; + description + "Proprietary virtual/internal."; + reference + "RFC 2863 - The Interfaces Group MIB"; + } + identity propMultiplexor { + base iana-interface-type; + description + "Proprietary multiplexing."; + reference + "RFC 2863 - The Interfaces Group MIB"; + } + identity ieee80212 { + base iana-interface-type; + description + "100BaseVG."; + } + identity fibreChannel { + base iana-interface-type; + description + "Fibre Channel."; + } + identity hippiInterface { + base iana-interface-type; + description + "HIPPI interfaces."; + } + identity frameRelayInterconnect { + base iana-interface-type; + status obsolete; + description + "Obsolete; use either + frameRelay(32) or frameRelayService(44)."; + } + identity aflane8023 { + base iana-interface-type; + description + "ATM Emulated LAN for 802.3."; + } + identity aflane8025 { + base iana-interface-type; + description + "ATM Emulated LAN for 802.5."; + } + identity cctEmul { + base iana-interface-type; + description + "ATM Emulated circuit."; + } + identity fastEther { + base iana-interface-type; + status deprecated; + description + "Obsoleted via RFC 3635. + ethernetCsmacd(6) should be used instead."; + reference + "RFC 3635 - Definitions of Managed Objects for the + Ethernet-like Interface Types"; + } + identity isdn { + base iana-interface-type; + description + "ISDN and X.25."; + reference + "RFC 1356 - Multiprotocol Interconnect on X.25 and ISDN + in the Packet Mode"; + } + identity v11 { + base iana-interface-type; + description + "CCITT V.11/X.21."; + } + identity v36 { + base iana-interface-type; + description + "CCITT V.36."; + } + identity g703at64k { + base iana-interface-type; + description + "CCITT G703 at 64Kbps."; + } + identity g703at2mb { + base iana-interface-type; + status obsolete; + description + "Obsolete; see DS1-MIB."; + } + identity qllc { + base iana-interface-type; + description + "SNA QLLC."; + } + identity fastEtherFX { + base iana-interface-type; + status deprecated; + description + "Obsoleted via RFC 3635. + ethernetCsmacd(6) should be used instead."; + reference + "RFC 3635 - Definitions of Managed Objects for the + Ethernet-like Interface Types"; + } + identity channel { + base iana-interface-type; + description + "Channel."; + } + identity ieee80211 { + base iana-interface-type; + description + "Radio spread spectrum."; + } + identity ibm370parChan { + base iana-interface-type; + description + "IBM System 360/370 OEMI Channel."; + } + identity escon { + base iana-interface-type; + description + "IBM Enterprise Systems Connection."; + } + identity dlsw { + base iana-interface-type; + description + "Data Link Switching."; + } + identity isdns { + base iana-interface-type; + description + "ISDN S/T interface."; + } + identity isdnu { + base iana-interface-type; + description + "ISDN U interface."; + } + identity lapd { + base iana-interface-type; + description + "Link Access Protocol D."; + } + identity ipSwitch { + base iana-interface-type; + description + "IP Switching Objects."; + } + identity rsrb { + base iana-interface-type; + description + "Remote Source Route Bridging."; + } + identity atmLogical { + base iana-interface-type; + description + "ATM Logical Port."; + reference + "RFC 3606 - Definitions of Supplemental Managed Objects + for ATM Interface"; + } + identity ds0 { + base iana-interface-type; + description + "Digital Signal Level 0."; + reference + "RFC 2494 - Definitions of Managed Objects for the DS0 + and DS0 Bundle Interface Type"; + } + identity ds0Bundle { + base iana-interface-type; + description + "Group of ds0s on the same ds1."; + reference + "RFC 2494 - Definitions of Managed Objects for the DS0 + and DS0 Bundle Interface Type"; + } + identity bsc { + base iana-interface-type; + description + "Bisynchronous Protocol."; + } + identity async { + base iana-interface-type; + description + "Asynchronous Protocol."; + } + identity cnr { + base iana-interface-type; + description + "Combat Net Radio."; + } + identity iso88025Dtr { + base iana-interface-type; + description + "ISO 802.5r DTR."; + } + identity eplrs { + base iana-interface-type; + description + "Ext Pos Loc Report Sys."; + } + identity arap { + base iana-interface-type; + description + "Appletalk Remote Access Protocol."; + } + identity propCnls { + base iana-interface-type; + description + "Proprietary Connectionless Protocol."; + } + identity hostPad { + base iana-interface-type; + description + "CCITT-ITU X.29 PAD Protocol."; + } + identity termPad { + base iana-interface-type; + description + "CCITT-ITU X.3 PAD Facility."; + } + identity frameRelayMPI { + base iana-interface-type; + description + "Multiproto Interconnect over FR."; + } + identity x213 { + base iana-interface-type; + description + "CCITT-ITU X213."; + } + identity adsl { + base iana-interface-type; + description + "Asymmetric Digital Subscriber Loop."; + } + identity radsl { + base iana-interface-type; + description + "Rate-Adapt. Digital Subscriber Loop."; + } + identity sdsl { + base iana-interface-type; + description + "Symmetric Digital Subscriber Loop."; + } + identity vdsl { + base iana-interface-type; + description + "Very H-Speed Digital Subscrib. Loop."; + } + identity iso88025CRFPInt { + base iana-interface-type; + description + "ISO 802.5 CRFP."; + } + identity myrinet { + base iana-interface-type; + description + "Myricom Myrinet."; + } + identity voiceEM { + base iana-interface-type; + description + "Voice recEive and transMit."; + } + identity voiceFXO { + base iana-interface-type; + description + "Voice Foreign Exchange Office."; + } + identity voiceFXS { + base iana-interface-type; + description + "Voice Foreign Exchange Station."; + } + identity voiceEncap { + base iana-interface-type; + description + "Voice encapsulation."; + } + identity voiceOverIp { + base iana-interface-type; + description + "Voice over IP encapsulation."; + } + identity atmDxi { + base iana-interface-type; + description + "ATM DXI."; + } + identity atmFuni { + base iana-interface-type; + description + "ATM FUNI."; + } + identity atmIma { + base iana-interface-type; + description + "ATM IMA."; + } + identity pppMultilinkBundle { + base iana-interface-type; + description + "PPP Multilink Bundle."; + } + identity ipOverCdlc { + base iana-interface-type; + description + "IBM ipOverCdlc."; + } + identity ipOverClaw { + base iana-interface-type; + description + "IBM Common Link Access to Workstn."; + } + identity stackToStack { + base iana-interface-type; + description + "IBM stackToStack."; + } + identity virtualIpAddress { + base iana-interface-type; + description + "IBM VIPA."; + } + identity mpc { + base iana-interface-type; + description + "IBM multi-protocol channel support."; + } + identity ipOverAtm { + base iana-interface-type; + description + "IBM ipOverAtm."; + reference + "RFC 2320 - Definitions of Managed Objects for Classical IP + and ARP Over ATM Using SMIv2 (IPOA-MIB)"; + } + identity iso88025Fiber { + base iana-interface-type; + description + "ISO 802.5j Fiber Token Ring."; + } + identity tdlc { + base iana-interface-type; + description + "IBM twinaxial data link control."; + } + identity gigabitEthernet { + base iana-interface-type; + status deprecated; + description + "Obsoleted via RFC 3635. + ethernetCsmacd(6) should be used instead."; + reference + "RFC 3635 - Definitions of Managed Objects for the + Ethernet-like Interface Types"; + } + identity hdlc { + base iana-interface-type; + description + "HDLC."; + } + identity lapf { + base iana-interface-type; + description + "LAP F."; + } + identity v37 { + base iana-interface-type; + description + "V.37."; + } + identity x25mlp { + base iana-interface-type; + description + "Multi-Link Protocol."; + } + identity x25huntGroup { + base iana-interface-type; + description + "X25 Hunt Group."; + } + identity transpHdlc { + base iana-interface-type; + description + "Transp HDLC."; + } + identity interleave { + base iana-interface-type; + description + "Interleave channel."; + } + identity fast { + base iana-interface-type; + description + "Fast channel."; + } + identity ip { + base iana-interface-type; + description + "IP (for APPN HPR in IP networks)."; + } + identity docsCableMaclayer { + base iana-interface-type; + description + "CATV Mac Layer."; + } + identity docsCableDownstream { + base iana-interface-type; + description + "CATV Downstream interface."; + } + identity docsCableUpstream { + base iana-interface-type; + description + "CATV Upstream interface."; + } + identity a12MppSwitch { + base iana-interface-type; + description + "Avalon Parallel Processor."; + } + identity tunnel { + base iana-interface-type; + description + "Encapsulation interface."; + } + identity coffee { + base iana-interface-type; + description + "Coffee pot."; + reference + "RFC 2325 - Coffee MIB"; + } + identity ces { + base iana-interface-type; + description + "Circuit Emulation Service."; + } + identity atmSubInterface { + base iana-interface-type; + description + "ATM Sub Interface."; + } + identity l2vlan { + base iana-interface-type; + description + "Layer 2 Virtual LAN using 802.1Q."; + } + identity l3ipvlan { + base iana-interface-type; + description + "Layer 3 Virtual LAN using IP."; + } + identity l3ipxvlan { + base iana-interface-type; + description + "Layer 3 Virtual LAN using IPX."; + } + identity digitalPowerline { + base iana-interface-type; + description + "IP over Power Lines."; + } + identity mediaMailOverIp { + base iana-interface-type; + description + "Multimedia Mail over IP."; + } + identity dtm { + base iana-interface-type; + description + "Dynamic synchronous Transfer Mode."; + } + identity dcn { + base iana-interface-type; + description + "Data Communications Network."; + } + identity ipForward { + base iana-interface-type; + description + "IP Forwarding Interface."; + } + identity msdsl { + base iana-interface-type; + description + "Multi-rate Symmetric DSL."; + } + identity ieee1394 { + base iana-interface-type; + + description + "IEEE1394 High Performance Serial Bus."; + } + identity if-gsn { + base iana-interface-type; + description + "HIPPI-6400."; + } + identity dvbRccMacLayer { + base iana-interface-type; + description + "DVB-RCC MAC Layer."; + } + identity dvbRccDownstream { + base iana-interface-type; + description + "DVB-RCC Downstream Channel."; + } + identity dvbRccUpstream { + base iana-interface-type; + description + "DVB-RCC Upstream Channel."; + } + identity atmVirtual { + base iana-interface-type; + description + "ATM Virtual Interface."; + } + identity mplsTunnel { + base iana-interface-type; + description + "MPLS Tunnel Virtual Interface."; + } + identity srp { + base iana-interface-type; + description + "Spatial Reuse Protocol."; + } + identity voiceOverAtm { + base iana-interface-type; + description + "Voice over ATM."; + } + identity voiceOverFrameRelay { + base iana-interface-type; + description + "Voice Over Frame Relay."; + } + identity idsl { + base iana-interface-type; + description + "Digital Subscriber Loop over ISDN."; + } + identity compositeLink { + base iana-interface-type; + description + "Avici Composite Link Interface."; + } + identity ss7SigLink { + base iana-interface-type; + description + "SS7 Signaling Link."; + } + identity propWirelessP2P { + base iana-interface-type; + description + "Prop. P2P wireless interface."; + } + identity frForward { + base iana-interface-type; + description + "Frame Forward Interface."; + } + identity rfc1483 { + base iana-interface-type; + description + "Multiprotocol over ATM AAL5."; + reference + "RFC 1483 - Multiprotocol Encapsulation over ATM + Adaptation Layer 5"; + } + identity usb { + base iana-interface-type; + description + "USB Interface."; + } + identity ieee8023adLag { + base iana-interface-type; + description + "IEEE 802.3ad Link Aggregate."; + } + identity bgppolicyaccounting { + base iana-interface-type; + description + "BGP Policy Accounting."; + } + identity frf16MfrBundle { + base iana-interface-type; + description + "FRF.16 Multilink Frame Relay."; + } + identity h323Gatekeeper { + base iana-interface-type; + description + "H323 Gatekeeper."; + } + identity h323Proxy { + base iana-interface-type; + description + "H323 Voice and Video Proxy."; + } + identity mpls { + base iana-interface-type; + description + "MPLS."; + } + identity mfSigLink { + base iana-interface-type; + description + "Multi-frequency signaling link."; + } + identity hdsl2 { + base iana-interface-type; + description + "High Bit-Rate DSL - 2nd generation."; + } + identity shdsl { + base iana-interface-type; + description + "Multirate HDSL2."; + } + identity ds1FDL { + base iana-interface-type; + description + "Facility Data Link (4Kbps) on a DS1."; + } + identity pos { + base iana-interface-type; + description + "Packet over SONET/SDH Interface."; + } + identity dvbAsiIn { + base iana-interface-type; + description + "DVB-ASI Input."; + } + identity dvbAsiOut { + base iana-interface-type; + description + "DVB-ASI Output."; + } + identity plc { + base iana-interface-type; + description + "Power Line Communications."; + } + identity nfas { + base iana-interface-type; + description + "Non-Facility Associated Signaling."; + } + identity tr008 { + base iana-interface-type; + description + "TR008."; + } + identity gr303RDT { + base iana-interface-type; + description + "Remote Digital Terminal."; + } + identity gr303IDT { + base iana-interface-type; + description + "Integrated Digital Terminal."; + } + identity isup { + base iana-interface-type; + description + "ISUP."; + } + identity propDocsWirelessMaclayer { + base iana-interface-type; + description + "Cisco proprietary Maclayer."; + } + identity propDocsWirelessDownstream { + base iana-interface-type; + description + "Cisco proprietary Downstream."; + } + identity propDocsWirelessUpstream { + base iana-interface-type; + description + "Cisco proprietary Upstream."; + } + identity hiperlan2 { + base iana-interface-type; + description + "HIPERLAN Type 2 Radio Interface."; + } + identity propBWAp2Mp { + base iana-interface-type; + description + "PropBroadbandWirelessAccesspt2Multipt (use of this value + for IEEE 802.16 WMAN interfaces as per IEEE Std 802.16f + is deprecated, and ieee80216WMAN(237) should be used + instead)."; + } + identity sonetOverheadChannel { + base iana-interface-type; + description + "SONET Overhead Channel."; + } + identity digitalWrapperOverheadChannel { + base iana-interface-type; + description + "Digital Wrapper."; + } + identity aal2 { + base iana-interface-type; + description + "ATM adaptation layer 2."; + } + identity radioMAC { + base iana-interface-type; + description + "MAC layer over radio links."; + } + identity atmRadio { + base iana-interface-type; + description + "ATM over radio links."; + } + identity imt { + base iana-interface-type; + description + "Inter-Machine Trunks."; + } + identity mvl { + base iana-interface-type; + description + "Multiple Virtual Lines DSL."; + } + identity reachDSL { + base iana-interface-type; + description + "Long Reach DSL."; + } + identity frDlciEndPt { + base iana-interface-type; + description + "Frame Relay DLCI End Point."; + } + identity atmVciEndPt { + base iana-interface-type; + description + "ATM VCI End Point."; + } + identity opticalChannel { + base iana-interface-type; + description + "Optical Channel."; + } + identity opticalTransport { + base iana-interface-type; + description + "Optical Transport."; + } + identity propAtm { + base iana-interface-type; + description + "Proprietary ATM."; + } + identity voiceOverCable { + base iana-interface-type; + description + "Voice Over Cable Interface."; + } + identity infiniband { + base iana-interface-type; + description + "Infiniband."; + } + identity teLink { + base iana-interface-type; + description + "TE Link."; + } + identity q2931 { + base iana-interface-type; + description + "Q.2931."; + } + identity virtualTg { + base iana-interface-type; + description + "Virtual Trunk Group."; + } + identity sipTg { + base iana-interface-type; + description + "SIP Trunk Group."; + } + identity sipSig { + base iana-interface-type; + description + "SIP Signaling."; + } + identity docsCableUpstreamChannel { + base iana-interface-type; + description + "CATV Upstream Channel."; + } + identity econet { + base iana-interface-type; + description + "Acorn Econet."; + } + identity pon155 { + base iana-interface-type; + description + "FSAN 155Mb Symetrical PON interface."; + } + identity pon622 { + base iana-interface-type; + description + "FSAN 622Mb Symetrical PON interface."; + } + identity bridge { + base iana-interface-type; + description + "Transparent bridge interface."; + } + identity linegroup { + base iana-interface-type; + description + "Interface common to multiple lines."; + } + identity voiceEMFGD { + base iana-interface-type; + description + "Voice E&M Feature Group D."; + } + identity voiceFGDEANA { + base iana-interface-type; + description + "Voice FGD Exchange Access North American."; + } + identity voiceDID { + base iana-interface-type; + description + "Voice Direct Inward Dialing."; + } + identity mpegTransport { + base iana-interface-type; + description + "MPEG transport interface."; + } + identity sixToFour { + base iana-interface-type; + status deprecated; + description + "6to4 interface (DEPRECATED)."; + reference + "RFC 4087 - IP Tunnel MIB"; + } + identity gtp { + base iana-interface-type; + description + "GTP (GPRS Tunneling Protocol)."; + } + identity pdnEtherLoop1 { + base iana-interface-type; + description + "Paradyne EtherLoop 1."; + } + identity pdnEtherLoop2 { + base iana-interface-type; + description + "Paradyne EtherLoop 2."; + } + identity opticalChannelGroup { + base iana-interface-type; + description + "Optical Channel Group."; + } + identity homepna { + base iana-interface-type; + description + "HomePNA ITU-T G.989."; + } + identity gfp { + base iana-interface-type; + description + "Generic Framing Procedure (GFP)."; + } + identity ciscoISLvlan { + base iana-interface-type; + description + "Layer 2 Virtual LAN using Cisco ISL."; + } + identity actelisMetaLOOP { + base iana-interface-type; + description + "Acteleis proprietary MetaLOOP High Speed Link."; + } + identity fcipLink { + base iana-interface-type; + description + "FCIP Link."; + } + identity rpr { + base iana-interface-type; + description + "Resilient Packet Ring Interface Type."; + } + identity qam { + base iana-interface-type; + description + "RF Qam Interface."; + } + identity lmp { + base iana-interface-type; + description + "Link Management Protocol."; + reference + "RFC 4327 - Link Management Protocol (LMP) Management + Information Base (MIB)"; + } + identity cblVectaStar { + base iana-interface-type; + description + "Cambridge Broadband Networks Limited VectaStar."; + } + identity docsCableMCmtsDownstream { + base iana-interface-type; + description + "CATV Modular CMTS Downstream Interface."; + } + identity adsl2 { + base iana-interface-type; + status deprecated; + description + "Asymmetric Digital Subscriber Loop Version 2 + (DEPRECATED/OBSOLETED - please use adsl2plus(238) + instead)."; + reference + "RFC 4706 - Definitions of Managed Objects for Asymmetric + Digital Subscriber Line 2 (ADSL2)"; + } + identity macSecControlledIF { + base iana-interface-type; + description + "MACSecControlled."; + } + identity macSecUncontrolledIF { + base iana-interface-type; + description + "MACSecUncontrolled."; + } + identity aviciOpticalEther { + base iana-interface-type; + description + "Avici Optical Ethernet Aggregate."; + } + identity atmbond { + base iana-interface-type; + description + "atmbond."; + } + identity voiceFGDOS { + base iana-interface-type; + description + "Voice FGD Operator Services."; + } + identity mocaVersion1 { + base iana-interface-type; + description + "MultiMedia over Coax Alliance (MoCA) Interface + as documented in information provided privately to IANA."; + } + identity ieee80216WMAN { + base iana-interface-type; + description + "IEEE 802.16 WMAN interface."; + } + identity adsl2plus { + base iana-interface-type; + description + "Asymmetric Digital Subscriber Loop Version 2 - + Version 2 Plus and all variants."; + } + identity dvbRcsMacLayer { + base iana-interface-type; + description + "DVB-RCS MAC Layer."; + reference + "RFC 5728 - The SatLabs Group DVB-RCS MIB"; + } + identity dvbTdm { + base iana-interface-type; + description + "DVB Satellite TDM."; + reference + "RFC 5728 - The SatLabs Group DVB-RCS MIB"; + } + identity dvbRcsTdma { + base iana-interface-type; + description + "DVB-RCS TDMA."; + reference + "RFC 5728 - The SatLabs Group DVB-RCS MIB"; + } + identity x86Laps { + base iana-interface-type; + description + "LAPS based on ITU-T X.86/Y.1323."; + } + identity wwanPP { + base iana-interface-type; + description + "3GPP WWAN."; + } + identity wwanPP2 { + base iana-interface-type; + description + "3GPP2 WWAN."; + } + identity voiceEBS { + base iana-interface-type; + description + "Voice P-phone EBS physical interface."; + } + identity ifPwType { + base iana-interface-type; + description + "Pseudowire interface type."; + reference + "RFC 5601 - Pseudowire (PW) Management Information Base (MIB)"; + } + identity ilan { + base iana-interface-type; + description + "Internal LAN on a bridge per IEEE 802.1ap."; + } + identity pip { + base iana-interface-type; + description + "Provider Instance Port on a bridge per IEEE 802.1ah PBB."; + } + identity aluELP { + base iana-interface-type; + description + "Alcatel-Lucent Ethernet Link Protection."; + } + identity gpon { + base iana-interface-type; + description + "Gigabit-capable passive optical networks (G-PON) as per + ITU-T G.948."; + } + identity vdsl2 { + base iana-interface-type; + description + "Very high speed digital subscriber line Version 2 + (as per ITU-T Recommendation G.993.2)."; + reference + "RFC 5650 - Definitions of Managed Objects for Very High + Speed Digital Subscriber Line 2 (VDSL2)"; + } + identity capwapDot11Profile { + base iana-interface-type; + description + "WLAN Profile Interface."; + reference + "RFC 5834 - Control and Provisioning of Wireless Access + Points (CAPWAP) Protocol Binding MIB for + IEEE 802.11"; + } + identity capwapDot11Bss { + base iana-interface-type; + description + "WLAN BSS Interface."; + reference + "RFC 5834 - Control and Provisioning of Wireless Access + Points (CAPWAP) Protocol Binding MIB for + IEEE 802.11"; + } + identity capwapWtpVirtualRadio { + base iana-interface-type; + description + "WTP Virtual Radio Interface."; + reference + "RFC 5833 - Control and Provisioning of Wireless Access + Points (CAPWAP) Protocol Base MIB"; + } + identity bits { + base iana-interface-type; + description + "bitsport."; + } + identity docsCableUpstreamRfPort { + base iana-interface-type; + description + "DOCSIS CATV Upstream RF Port."; + } + identity cableDownstreamRfPort { + base iana-interface-type; + description + "CATV downstream RF Port."; + } + identity vmwareVirtualNic { + base iana-interface-type; + description + "VMware Virtual Network Interface."; + } + identity ieee802154 { + base iana-interface-type; + description + "IEEE 802.15.4 WPAN interface."; + reference + "IEEE 802.15.4-2006"; + } + identity otnOdu { + base iana-interface-type; + description + "OTN Optical Data Unit."; + } + identity otnOtu { + base iana-interface-type; + description + "OTN Optical channel Transport Unit."; + } + identity ifVfiType { + base iana-interface-type; + description + "VPLS Forwarding Instance Interface Type."; + } + identity g9981 { + base iana-interface-type; + description + "G.998.1 bonded interface."; + } + identity g9982 { + base iana-interface-type; + description + "G.998.2 bonded interface."; + } + identity g9983 { + base iana-interface-type; + description + "G.998.3 bonded interface."; + } + + identity aluEpon { + base iana-interface-type; + description + "Ethernet Passive Optical Networks (E-PON)."; + } + identity aluEponOnu { + base iana-interface-type; + description + "EPON Optical Network Unit."; + } + identity aluEponPhysicalUni { + base iana-interface-type; + description + "EPON physical User to Network interface."; + } + identity aluEponLogicalLink { + base iana-interface-type; + description + "The emulation of a point-to-point link over the EPON + layer."; + } + identity aluGponOnu { + base iana-interface-type; + description + "GPON Optical Network Unit."; + reference + "ITU-T G.984.2"; + } + identity aluGponPhysicalUni { + base iana-interface-type; + description + "GPON physical User to Network interface."; + reference + "ITU-T G.984.2"; + } + identity vmwareNicTeam { + base iana-interface-type; + description + "VMware NIC Team."; + } + identity docsOfdmDownstream { + base iana-interface-type; + description + "CATV Downstream OFDM interface."; + reference + "Cable Modem Operations Support System Interface + Specification"; + } + identity docsOfdmaUpstream { + base iana-interface-type; + description + "CATV Upstream OFDMA interface."; + reference + "Cable Modem Operations Support System Interface + Specification"; + } + identity gfast { + base iana-interface-type; + description + "G.fast port."; + reference + "ITU-T G.9701"; + } + identity sdci { + base iana-interface-type; + description + "SDCI (IO-Link)."; + reference + "IEC 61131-9 Edition 1.0 2013-09"; + } + identity xboxWireless { + base iana-interface-type; + description + "Xbox wireless."; + } + identity fastdsl { + base iana-interface-type; + description + "FastDSL."; + reference + "BBF TR-355"; + } + identity docsCableScte55d1FwdOob { + base iana-interface-type; + description + "Cable SCTE 55-1 OOB Forward Channel."; + reference + "ANSI/SCTE 55-1 2009"; + } + identity docsCableScte55d1RetOob { + base iana-interface-type; + description + "Cable SCTE 55-1 OOB Return Channel."; + reference + "ANSI/SCTE 55-1 2009"; + } + identity docsCableScte55d2DsOob { + base iana-interface-type; + description + "Cable SCTE 55-2 OOB Downstream Channel."; + reference + "ANSI/SCTE 55-2 2008"; + } + identity docsCableScte55d2UsOob { + base iana-interface-type; + description + "Cable SCTE 55-2 OOB Upstream Channel."; + reference + "ANSI/SCTE 55-2 2008"; + } + identity docsCableNdf { + base iana-interface-type; + description + "Cable Narrowband Digital Forward."; + } + identity docsCableNdr { + base iana-interface-type; + description + "Cable Narrowband Digital Return."; + } + identity ptm { + base iana-interface-type; + description + "Packet Transfer Mode."; + reference + "IEEE G.993.1, Annex H; IEEE G.993.2; IEEE G.9701"; + } + identity ghn { + base iana-interface-type; + description + "G.hn port."; + reference + "IEEE G.9961"; + } + identity otnOtsi { + base iana-interface-type; + description + "Optical Tributary Signal."; + reference + "ITU-T G.959.1"; + } + identity otnOtuc { + base iana-interface-type; + description + "OTN OTUCn."; + reference + "ITU-T G.709/Y.1331"; + } + identity otnOduc { + base iana-interface-type; + description + "OTN ODUC."; + reference + "ITU-T G.709"; + } + identity otnOtsig { + base iana-interface-type; + description + "OTN OTUC Signal."; + reference + "ITU-T G.709"; + } + identity microwaveCarrierTermination { + base iana-interface-type; + description + "air interface of a single microwave carrier."; + reference + "RFC 8561 - A YANG Data Model for Microwave Radio Link"; + } + identity microwaveRadioLinkTerminal { + base iana-interface-type; + description + "radio link interface for one or several aggregated microwave carriers."; + reference + "RFC 8561 - A YANG Data Model for Microwave Radio Link"; + } + identity ieee8021axDrni { + base iana-interface-type; + description + "IEEE 802.1AX Distributed Resilient Network Interface."; + reference + "IEEE 802.1AX-Rev-d2-0"; + } + identity ax25 { + base iana-interface-type; + description + "AX.25 network interfaces."; + reference + "AX.25 Link Access Protocol for Amateur Packet Radio version 2.2"; + } + identity ieee19061nanocom { + base iana-interface-type; + description + "Nanoscale and Molecular Communication."; + reference + "IEEE 1906.1-2015"; + } + identity cpri { + base iana-interface-type; + description + "Common Public Radio Interface."; + reference + "CPRI v7.0"; + } + identity omni { + base iana-interface-type; + description + "Overlay Multilink Network Interface (OMNI)."; + reference + "draft-templin-6man-omni-00"; + } + identity roe { + base iana-interface-type; + description + "Radio over Ethernet Interface."; + reference + "1914.3-2018 - IEEE Standard for Radio over Ethernet Encapsulations and Mappings"; + } + identity p2pOverLan { + base iana-interface-type; + description + "Point to Point over LAN interface."; + reference + "RFC 5309 - Point-to-Point Operation over LAN in Link State Routing Protocols"; + } +} diff --git a/standard/ieee/ieee1588-ptp.yang b/standard/ieee/ieee1588-ptp.yang new file mode 100644 index 0000000..01c63d6 --- /dev/null +++ b/standard/ieee/ieee1588-ptp.yang @@ -0,0 +1,4291 @@ +module ieee1588-ptp { + yang-version 1.1; + namespace urn:ieee:std:1588:yang:ieee1588-ptp; + prefix "ptp"; + + import ietf-yang-types { + prefix yang; + } + import ietf-interfaces { + prefix if; + } + + organization "IEEE 1588 Working Group"; + contact + "Web: https://sagroups.ieee.org/1588/ + E-mail: 1588officers@listserv.ieee.org + + Postal: C/O IEEE 1588 Working Group Chair + IEEE Standards Association + 445 Hoes Lane + Piscataway, NJ 08854 + USA"; + description + "This YANG module defines a data model for the configuration + and state of IEEE Std 1588 clocks. IEEE Std 1588 specifies the + Precision Time Protocol (PTP). + + The nodes in this YANG module are designed for compatibility + with ietf-ptp.yang, the YANG data model for IEEE Std 1588-2008, + as specified in IETF RFC 8575. + + NOTE regarding default value: + PTP's concept of 'initialization value' is analogous to YANG's + concept of a 'default value'. According to 8.1.3.4 of + IEEE Std 1588-2019, the initialization value for configuration + is specified in IEEE Std 1588, but that value can be overridden + by a PTP Profile specification, or by the product that + implements PTP. This makes it challenging to repeat the + specification of initialization value using a YANG 'default' + statement, because there is no straightforward mechanism for + a PTP Profile's (or product's) YANG module to import this + module and override its YANG default. Since a YANG management + client can read the default value from the operational + datastore, there is no need to re-specify the default in YANG. + The implementer of PTP refers to the relevant PTP + specifications for the default (not YANG modules). + Therefore, this YANG module avoids use of the YANG 'default' + statement. + + NOTE regarding IEEE Std 1588 classification: + 8.1.2 of IEEE Std 1588-2019 specifies a classification of + each data set member, which corresponds to a leaf in YANG. + The relationship between 1588 classification and + YANG 'config' (i.e., whether the leaf is read-write) is: + - 1588 static: The leaf is 'config false' (read-only). + - 1588 configurable: The leaf is 'config true', which is + the default value for a YANG leaf. + - 1588 dynamic: A judgement is made on a member-by-member + basis. If the member corresponds to the first item of + 8.1.2.1.2 of IEEE Std 1588-2019 (i.e., value from protocol + only, such as log of protocol behavior), the YANG leaf + is 'config false'. Otherwise, the member's value can be + provided by an entity outside PTP (e.g., NETCONF or + RESTCONF client), and therefore the YANG leaf is + 'config true'."; + + revision 2022-08-30 { + description + "Initial revision."; + reference + "IEEE Std 1588e-XXXX, IEEE Standard for a Precision Clock + Synchronization Protocol for Networked Measurement and + Control Systems - MIB and YANG Data Models."; + } + // The year (XXXX) will be replaced during publication. + // This is the third balloted draft D0.3 + // of the YANG module for amendment IEEE P1588e. + + feature fault-log { + description + "Logging of faults detected in the PTP Instance."; + reference + "8.2.6 of IEEE Std 1588-2019"; + } + + feature unicast-negotiation { + description + "Unicast negotiation conducted through use of TLVs."; + reference + "16.1 of IEEE Std 1588-2019"; + } + + feature path-trace { + description + "Use of the PATH_TRACE TLV for tracing the route of + a PTP Announce message through the PTP Network."; + reference + "16.2 of IEEE Std 1588-2019"; + } + + feature alternate-timescale { + description + "The transmission of an ALTERNATE_TIME_OFFSET_INDICATOR TLV + entity from the Grandmaster PTP Instance may indicate the + offset of an alternate timescale from the timescale in + use in the domain."; + reference + "16.3 of IEEE Std 1588-2019"; + } + + feature holdover-upgrade { + description + "A holdover-upgradable PTP Instance can potentially + become the Grandmaster PTP Instance in the event the + previous Grandmaster PTP Instance is disconnected + or its characteristics degrade."; + reference + "16.4 of IEEE Std 1588-2019"; + } + + feature cmlds { + description + "The Common Mean Link Delay Service (CMLDS) is an optional + service that enables any PTP Port that would normally obtain + the value of a link's and + using the peer-to-peer method to instead obtain these + values from this optional service. The CMLDS service is + available to all PTP Instances communicating with a specific + transport mechanism, over the physical link between two PTP + Nodes."; + reference + "16.6 of IEEE Std 1588-2019"; + } + + feature timestamp-correction { + description + "Correction of timestamps using configurable management data."; + reference + "16.7 of IEEE Std 1588-2019"; + } + + feature asymmetry-correction { + description + "Calculation of the on a Direct PTP Link + between two PTP Instances connected using an applicable + bidirectional medium."; + reference + "16.8 of IEEE Std 1588-2019"; + } + + feature slave-monitoring { + description + "Mechanism for monitoring timing information in a PTP Port + in the slave state. The slave-monitoring feature specifies + TLVs that the Slave PTP Instance transmits with this + information, typically in a Signaling message."; + reference + "16.11 of IEEE Std 1588-2019"; + } + + feature enhanced-metrics { + description + "Mechanism for propagating estimates of various + inaccuracy components affecting the overall expected + PTP Instance Time accuracy. The metrics will be updated + and available for utilization at the various points along + the PTP timing chain: from the Grandmaster Instance, up to + a leaf PTP Instance in the synchronization tree. Each + PTP Instance along the timing path updates the + relevant metrics based on its contribution to the expected + degradation in PTP Instance Time accuracy due to various + induced timing error components."; + reference + "16.12 of IEEE Std 1588-2019"; + } + + feature grandmaster-cluster { + description + "Mechanism for faster selection of the Grandmaster PTP Instance + from the set of PTP Instances for which this option is both + implemented and enabled."; + reference + "17.2 of IEEE Std 1588-2019"; + } + + feature alternate-master { + description + "Mechanism for PTP Ports on a PTP Communication Path that + are not currently the MASTER port of that PTP Communication + Path to exchange PTP timing information with other PTP Ports + on the same PTP Communication Path, and for each of the other + PTP Ports to acquire knowledge of the characteristics + of the transmission path between itself and each alternate + master PTP Port."; + reference + "17.3 of IEEE Std 1588-2019"; + } + + feature unicast-discovery { + description + "Mechanism for PTP to be used over a network that does not + provide multicast. A PTP Instance is configured with the + addresses of PTP Ports of other PTP Instances with which + it should attempt to establish unicast communication. + The PTP Instance may request that these PTP Ports transmit + unicast Announce, Sync, and Delay_Resp messages to it."; + reference + "17.4 of IEEE Std 1588-2019"; + } + + feature acceptable-master { + description + "Mechanism that allows PTP Ports in the SLAVE state to be + configured to refuse to synchronize to PTP Instances not + on the acceptable master list."; + reference + "17.5 of IEEE Std 1588-2019"; + } + + feature external-port-config { + description + "External port configuration allows an external entity + (such as YANG-based remote management) to disable the + IEEE Std 1588 state machines that control each port's + state, including the BMCA. Each port's state is + then configured by the external entity."; + reference + "17.6 of IEEE Std 1588-2019"; + } + + feature performance-monitoring { + description + "Collection of performance monitoring logs that can be + read using management."; + reference + "Annex J of IEEE Std 1588-2019"; + } + + feature l1-sync { + description + "Layer 1-based synchronization performance + enhancement."; + reference + "Annex L of IEEE Std 1588-2019"; + } + + identity network-protocol { + description + "Enumeration for the protocol used by a PTP Instance to + transport PTP messages. + YANG identity is used so that a PTP Profile's YANG augment + can assign values, using numeric range F000 to FFFD hex."; + reference + "7.4.1 of IEEE Std 1588-2019"; + } + identity udp-ipv4 { + base network-protocol; + description + "UDP on IPv4. Numeric value is 0001 hex."; + } + identity udp-ipv6 { + base network-protocol; + description + "UDP on IPv6. Numeric value is 0002 hex."; + } + identity ieee802-3 { + base network-protocol; + description + "IEEE Std 802.3 (Ethernet). Numeric value is 0003 hex."; + } + identity devicenet { + base network-protocol; + description + "DeviceNet. Numeric value is 0004 hex."; + } + identity controlnet { + base network-protocol; + description + "ControlNet. Numeric value is 0005 hex."; + } + identity profinet { + base network-protocol; + description + "PROFINET. Numeric value is 0006 hex."; + } + identity otn { + base network-protocol; + description + "Optical Transport Network (OTN). Numeric value + is 0007 hex."; + } + identity unknown { + base network-protocol; + description + "Unknown. Numeric value is FFFE hex."; + } + + identity clock-class { + description + "Enumeration that denotes the traceability, synchronization + state and expected performance of the time or frequency + distributed by the Grandmaster PTP Instance. + IEEE Std 1588 does not specify a name for each clock-class, + but the names below are intended to be as intuitive as possible. + YANG identity is used so that a PTP Profile's YANG augment + can assign values using a numeric range designated for use by + alternate PTP Profiles."; + reference + "7.6.2.5 of IEEE Std 1588-2019"; + } + identity cc-primary-sync { + base clock-class; + description + "A PTP Instance that is synchronized to a primary + reference time source. The timescale distributed shall be PTP. + Numeric value is 6 decimal."; + } + identity cc-primary-sync-lost { + base clock-class; + description + "A PTP Instance that has previously been designated + as clockClass 6, but that has lost the ability to + synchronize to a primary reference time source and is in + holdover mode and within holdover specifications. Or a PTP + Instance designated with clockClass 7 based on the Holdover + Upgrade option. The timescale distributed shall be PTP. + Numeric value is 7 decimal."; + } + identity cc-application-specific-sync { + base clock-class; + description + "A PTP Instance that is synchronized to an + application-specific source of time. The timescale + distributed shall be ARB. + Numeric value is 13 decimal."; + } + identity cc-application-specific-sync-lost { + base clock-class; + description + "A PTP Instance that has previously been designated as + clockClass 13, but that has lost the ability to synchronize + to an application-specific source of time and is in + holdover mode and within holdover specifications. Or a PTP + Instance designated with clockClass 14 based on the Holdover + Upgrade option. The timescale distributed shall be ARB. + Numeric value is 14 decimal."; + } + identity cc-primary-sync-alternative-a { + base clock-class; + description + "Degradation alternative A for a PTP Instance of + clockClass 7 that is not within holdover specification + or that is based on the specifications of the Holdover + Upgrade option. + Numeric value is 52 decimal."; + } + identity cc-application-specific-alternative-a { + base clock-class; + description + "Degradation alternative A for a PTP Instance of + clockClass 14 that is not within holdover specification or + that is based on the specifications of the Holdover Upgrade + option. + Numeric value is 58 decimal."; + } + identity cc-primary-sync-alternative-b { + base clock-class; + description + "Degradation alternative B for a PTP Instance of + clockClass 7 that is not within holdover specification + or that is based on the specifications of the Holdover + Upgrade option. + Numeric value is 187 decimal."; + } + identity cc-application-specific-alternative-b { + base clock-class; + description + "Degradation alternative B for a PTP Instance of + clockClass 14 that is not within holdover specification or + that is based on the specifications of the Holdover Upgrade + option. + Numeric value is 193 decimal."; + } + identity cc-default { + base clock-class; + description + "Default clockClass, used if none of the other + clockClass definitions apply. + Numeric value is 248 decimal."; + } + identity cc-slave-only { + base clock-class; + description + "A PTP Instance that is slave-only. + Numeric value is 255 decimal."; + } + + identity clock-accuracy { + description + "Enumeration that indicates the expected accuracy of a + PTP Instance when it is the Grandmaster PTP Instance, + or in the event it becomes the Grandmaster PTP Instance. + The value shall be conservatively estimated by the PTP + Instance to a precision consistent with the value of the + selected clock-accuracy and of the next lower enumerated + value, for example, for clockAccuracy = 23 hex, between + 250 ns and 1000 ns. + IEEE Std 1588 does not specify a name for each clock-accuracy, + but the names below are intended to be as intuitive as possible. + YANG identity is used so that a PTP Profile's YANG augment + can assign values, using numeric range 80 to FD hex."; + reference + "7.6.2.6 of IEEE Std 1588-2019"; + } + identity ca-time-accurate-to-1000-fs { + base clock-accuracy; + description + "The time is accurate to within 1 ps (1000 fs). + Numeric value is 17 hex."; + } + identity ca-time-accurate-to-2500-fs { + base clock-accuracy; + description + "The time is accurate to within 2.5 ps (2500 fs). + Numeric value is 18 hex."; + } + identity ca-time-accurate-to-10-ps { + base clock-accuracy; + description + "The time is accurate to within 10 ps. + Numeric value is 19 hex."; + } + identity ca-time-accurate-to-25ps { + base clock-accuracy; + description + "The time is accurate to within 25 ps. + Numeric value is 1A hex."; + } + identity ca-time-accurate-to-100-ps { + base clock-accuracy; + description + "The time is accurate to within 100 ps. + Numeric value is 1B hex."; + } + identity ca-time-accurate-to-250-ps { + base clock-accuracy; + description + "The time is accurate to within 250 ps. + Numeric value is 1C hex."; + } + identity ca-time-accurate-to-1000-ps { + base clock-accuracy; + description + "The time is accurate to within 1ns (1000 ps). + Numeric value is 1D hex."; + } + identity ca-time-accurate-to-2500-ps { + base clock-accuracy; + description + "The time is accurate to within 2.5 ns (2500 ps). + Numeric value is 1E hex."; + } + identity ca-time-accurate-to-10-ns { + base clock-accuracy; + description + "The time is accurate to within 10 ns. + Numeric value is 1F hex."; + } + identity ca-time-accurate-to-25-ns { + base clock-accuracy; + description + "The time is accurate to within 25 ns. + Numeric value is 20 hex."; + } + identity ca-time-accurate-to-100-ns { + base clock-accuracy; + description + "The time is accurate to within 100 ns. + Numeric value is 21 hex."; + } + identity ca-time-accurate-to-250-ns { + base clock-accuracy; + description + "The time is accurate to within 250 ns. + Numeric value is 22 hex."; + } + identity ca-time-accurate-to-1000-ns { + base clock-accuracy; + description + "The time is accurate to within 1 us (1000 ns). + Numeric value is 23 hex."; + } + identity ca-time-accurate-to-2500-ns { + base clock-accuracy; + description + "The time is accurate to within 2.5 us (2500 ns). + Numeric value is 24 hex."; + } + identity ca-time-accurate-to-10-us { + base clock-accuracy; + description + "The time is accurate to within 10 us. + Numeric value is 25 hex."; + } + identity ca-time-accurate-to-25-us { + base clock-accuracy; + description + "The time is accurate to within 25 us. + Numeric value is 26 hex."; + } + identity ca-time-accurate-to-100-us { + base clock-accuracy; + description + "The time is accurate to within 100 us. + Numeric value is 27 hex."; + } + identity ca-time-accurate-to-250-us { + base clock-accuracy; + description + "The time is accurate to within 250 us. + Numeric value is 28 hex."; + } + identity ca-time-accurate-to-1000-us { + base clock-accuracy; + description + "The time is accurate to within 1 ms (1000 us). + Numeric value is 29 hex."; + } + identity ca-time-accurate-to-2500-us { + base clock-accuracy; + description + "The time is accurate to within 2.5 ms (2500 us). + Numeric value is 2A hex."; + } + identity ca-time-accurate-to-10-ms { + base clock-accuracy; + description + "The time is accurate to within 10 ms. + Numeric value is 2B hex."; + } + identity ca-time-accurate-to-25-ms { + base clock-accuracy; + description + "The time is accurate to within 25 ms. + Numeric value is 2Chex."; + } + identity ca-time-accurate-to-100-ms { + base clock-accuracy; + description + "The time is accurate to within 100 ms. + Numeric value is 2D hex."; + } + identity ca-time-accurate-to-250-ms { + base clock-accuracy; + description + "The time is accurate to within 250 ms. + Numeric value is 2E hex."; + } + identity ca-time-accurate-to-1-s { + base clock-accuracy; + description + "The time is accurate to within 1 s. + Numeric value is 2F hex."; + } + identity ca-time-accurate-to-10-s { + base clock-accuracy; + description + "The time is accurate to within 10 s. + Numeric value is 30 hex."; + } + identity ca-time-accurate-to-gt-10-s { + base clock-accuracy; + description + "The time accuracy exceeds 10 s. + Numeric value is 31 hex."; + } + + identity time-source { + description + "Enumeration for the source of time used by the Grandmaster + PTP Instance. + YANG identity is used so that a PTP Profile's YANG augment + can assign values, using numeric range F0 to FE hex."; + reference + "7.6.2.8 of IEEE Std 1588-2019"; + } + identity atomic-clock { + base time-source; + description + "Any PTP Instance that is based on an atomic resonance + for frequency, or a PTP Instance directly connected + to a device that is based on an atomic resonance for + frequency. Numeric value is 10 hex."; + } + identity gnss { + base time-source; + description + "Any PTP Instance synchronized to a satellite system that + distributes time and frequency. Numeric value is 20 hex."; + } + identity terrestrial-radio { + base time-source; + description + "Any PTP Instance synchronized via any of the radio + distribution systems that distribute time and frequency. + Numeric value is 30 hex."; + } + identity serial-time-code { + base time-source; + description + "Any PTP Instance synchronized via any of the serial + time code distribution systems that distribute time + and frequency, for example, IRIG-B. + Numeric value is 39 hex."; + } + identity ptp { + base time-source; + description + "Any PTP Instance synchronized to a PTP-based source + of time external to the domain. Numeric value is 40 hex."; + } + identity ntp { + base time-source; + description + "Any PTP Instance synchronized via NTP or Simple Network + Time Protocol (SNTP) servers that distribute time and + frequency. Numeric value is 50 hex."; + } + identity hand-set { + base time-source; + description + "Used for any PTP Instance whose time has been set by + means of a human interface based on observation of a + source of time to within the claimed clock accuracy. + Numeric value is 60 hex."; + } + identity other { + base time-source; + description + "Other source of time and/or frequency not covered by + other values. Numeric value is 90 hex."; + } + identity internal-oscillator { + base time-source; + description + "Any PTP Instance whose frequency is not based on atomic + resonance, and whose time is based on a free-running + oscillator with epoch determined in an arbitrary or + unknown manner. Numeric value is A0 hex."; + } + + typedef time-interval { + type int64; + description + "Time interval, expressed in nanoseconds, multiplied by 2^16. + Positive or negative time intervals outside the maximum range + of this data type shall be encoded as the largest positive and + negative values of the data type, respectively."; + reference + "5.3.2 of IEEE Std 1588-2019"; + } + + typedef clock-identity { + type string { + pattern "[0-9A-F]{2}(-[0-9A-F]{2}){7}"; + } + description + "Identifies unique entities within a PTP Network, + e.g. a PTP Instance or an entity of a common service. + The identity is an 8-octet array, constructed according + to specifications in IEEE Std 1588, using an + organization identifier from the IEEE Registration + Authority. + Each octet is represented in YANG as a pair of + hexadecimal characters, using uppercase for a letter. + Each octet in the array is separated by the dash + character."; + reference + "5.3.4 of IEEE Std 1588-2019 + 7.5.2.2 of IEEE Std 1588-2019"; + } + + typedef relative-difference { + type int64; + description + "Relative difference expressed as a dimensionless + fraction and multiplied by 2^62, with any + remaining fractional part truncated."; + reference + "5.3.11 of IEEE Std 1588-2019"; + } + + typedef instance-type { + type enumeration { + enum oc { + value 0; + description + "Ordinary Clock"; + } + enum bc { + value 1; + description + "Boundary Clock"; + } + enum p2p-tc { + value 2; + description + "Peer-to-peer Transparent Clock"; + } + enum e2e-tc { + value 3; + description + "End-to-end Transparent Clock"; + } + } + description + "Enumeration for the type of PTP Instance. + Values for this enumeration are specified by the IEEE 1588 + standard exclusively."; + reference + "8.2.1.5.5 of IEEE Std 1588-2019"; + } + + typedef fault-severity { + type enumeration { + enum emergency { + value 0; + description + "Emergency: system is unusable"; + } + enum alert { + value 1; + description + "Alert: immediate action needed"; + } + enum critical { + value 2; + description + "Critical: critical conditions"; + } + enum error { + value 3; + description + "Error: error conditions"; + } + enum warning { + value 4; + description + "Warning: warning conditions"; + } + enum notice { + value 5; + description + "Notice: normal but significant condition"; + } + enum informational { + value 6; + description + "Informational: informational messages"; + } + enum debug { + value 7; + description + "Debug: debug-level messages"; + } + } + description + "Enumeration for the severity of a fault record. + Values for this enumeration are specified by the IEEE 1588 + standard exclusively."; + reference + "8.2.6.3 of IEEE Std 1588-2019"; + } + + typedef port-state { + type enumeration { + enum initializing { + value 1; + description + "The PTP Port is initializing its data sets, hardware, and + communication facilities. The PTP Port shall not place any + PTP messages on its communication path."; + } + enum faulty { + value 2; + description + "The fault state of the protocol. Except for PTP management + messages that are a required response to a PTP message + received from the applicable management mechanism, + a PTP Port in this state shall not transmit any PTP related + messages. In a Boundary Clock, no activity on a faulty + PTP Port shall affect the other PTP Ports of the + PTP Instance. If fault activity on a PTP Port in this state + cannot be confined to the faulty PTP Port, then all + PTP Ports shall be in the faulty state."; + } + enum disabled { + value 3; + description + "The PTP Port is disabled. Except for PTP management + messages that are a required response to a PTP message + received from the applicable management mechanism, + a PTP Port in this state shall not transmit any PTP related + messages. In a Boundary Clock, no activity at the PTP Port + shall be allowed to affect the activity at any other + PTP Port of the Boundary Clock. A PTP Port in this state + shall discard all received PTP messages except for PTP + management messages."; + } + enum listening { + value 4; + description + "The PTP Port is waiting for the announce-receipt-timeout + to expire or to receive an Announce message from a + Master PTP Instance. The purpose of this state is to allow + orderly addition of PTP Instances to a domain + (i.e. to know if this PTP Port is truly a port of the + Grandmaster PTP Instance prior to taking that role)."; + } + enum pre-master { + value 5; + description + "This port state provides an additional mechanism to + support more orderly reconfiguration of PTP Networks when + PTP Instances are added or deleted, PTP Instance + characteristics change, or connection topology changes. + In this state, a PTP Port behaves as it would if it were in + the master state except that it does not place certain + classes of PTP messages on the PTP Communication Path + associated with the PTP Port."; + } + enum master { + value 6; + description + "The PTP Port is the source of time on the + PTP Communication Path."; + } + enum passive { + value 7; + description + "The PTP Port is not the source of time on the + PTP Communication Path nor does it synchronize to a + Master Clock (receive time). The PTP Port can potentially + change to slave when PTP Instances are added or deleted, + PTP Instance characteristics change, or connection + topology changes."; + } + enum uncalibrated { + value 8; + description + "The PTP Port is anticipating a change to the slave state, + but it has not yet satisfied all requirements + (implementation or PTP Profile) necessary to ensure + complete synchronization. For example, an implementation + might require a minimum number of PTP Sync messages + in order to completely synchronize its servo algorithm."; + } + enum slave { + value 9; + description + "The PTP Port synchronizes to the PTP Port on the + PTP Communication Path that is in the master state + (i.e. receives time)."; + } + } + description + "Enumeration for the state of the protocol engine associated + with the PTP Port. Values for this enumeration are specified + by the IEEE 1588 standard exclusively."; + reference + "8.2.15.3.1 of IEEE Std 1588-2019 + 9.2.5 of IEEE Std 1588-2019"; + } + + typedef delay-mechanism { + type enumeration { + enum e2e { + value 1; + description + "The PTP Port is configured to use the delay + request-response mechanism."; + } + enum p2p { + value 2; + description + "The PTP Port is configured to use the peer-to-peer + delay mechanism."; + } + enum no-mechanism { + value 254; + description + "The PTP Port does not implement the delay mechanism. + This value shall not be used except when the applicable + PTP Profile specifies either: + 1) that the PTP Instance only supports frequency + transfer (syntonization) and that neither path delay + mechanism is to be used or + 2) that the PTP Instance participates in time transfer, + but the system accuracy requirements are such that, + for a segment of the system path, delays can be neglected + allowing PTP Instances in that portion of the PTP Network + to use the no-mechanism value."; + } + enum common-p2p { + value 3; + description + "The PTP Port is configured to use the Common Mean Link + Delay Service option."; + } + enum special { + value 4; + description + "Special Ports do not use either delay mechanism."; + } + } + description + "Enumeration for the path delay measuring mechanism. + Values for this enumeration are specified by the IEEE 1588 + standard exclusively."; + reference + "8.2.15.4.4 of IEEE Std 1588-2019"; + } + + typedef l1sync-state { + type enumeration { + enum disabled { + value 1; + description + "L1Sync is not enabled on this PTP Port, + or the event L1SYNC_RESET has occurred."; + } + enum idle { + value 2; + description + "L1Sync is enabled on this PTP Port. The PTP Port + sends messages with the L1_SYNC TLV. Initialization + occurs in this state."; + } + enum link-alive { + value 3; + description + "The PTP Port sends messages with the L1_SYNC TLV. + The PTP Port is receiving valid L1_SYNC TLV + from a peer PTP Port."; + } + enum config-match { + value 4; + description + "The PTP Port sends messages with the L1_SYNC TLV. + The PTP Port has a compatible configuration profile + when compared with its peer PTP Port configuration + profile received in the L1_SYNC TLV."; + } + enum l1-sync-up { + value 5; + description + "The PTP Port sends messages with the L1_SYNC TLV. + The relationship required by configuration is currently + in place. Synchronization enhancements are performed."; + } + } + description + "Enumeration for states of an L1Sync state machine associated + with an L1Sync port. + Values for this enumeration are specified by the IEEE 1588 + standard exclusively."; + reference + "L.5.3.5 of IEEE Std 1588-2019 + L.7.2 of IEEE Std 1588-2019"; + } + + grouping timestamp { + description + "The IEEE Std 1588 Timestamp type represents a + positive time with respect to the epoch + of PTP Instance Time. + This type is represented in YANG as a grouping, + with leafs seconds-field and nanoseconds-field."; + reference + "5.3.3 of IEEE Std 1588-2019 + 8.2.6.3 of IEEE Std 1588-2019"; + + leaf seconds-field { + type uint64 { + range "0..281474976710655"; + } + description + "The seconds-field member is the integer portion + of the timestamp in units of seconds. Since the + IEEE 1588 type is UInteger48, only 48 bits + are represented in YANG."; + } + + leaf nanoseconds-field { + type uint32; + description + "The nanoseconds-field member is the fractional + portion of the timestamp in units of nanoseconds."; + } + } + grouping port-identity { + description + "The IEEE Std 1588 PortIdentity type identifies a + PTP Port or Link Port."; + reference + "5.3.5 of IEEE Std 1588-2019"; + + leaf clock-identity { + type clock-identity; + description + "IEEE Std 1588 clockIdentity."; + } + + leaf port-number { + type uint16; + description + "IEEE Std 1588 portNumber. + If portNumber is unavailable, the value 0 can + be used, or this leaf can be omitted from the + operational datastore."; + reference + "7.5.2.3 of IEEE Std 1588-2019"; + } + } + + grouping port-address { + description + "The IEEE Std 1588 PortAddress type represents the + protocol address of a PTP Port."; + reference + "5.3.6 of IEEE Std 1588-2019"; + + leaf network-protocol { + type identityref { + base network-protocol; + } + description + "Protocol used by a PTP Instance to transport + PTP messages."; + } + + leaf address-length { + type uint16; + description + "Number of octets in address-field."; + } + + leaf address-field { + type string { + pattern "[0-9A-F]{2}(-[0-9A-F]{2})*"; + } + description + "The protocol address of a PTP Port in the format + defined by the mapping annex of the protocol as + identified by the network-protocol leaf. + The most significant octet of the address-field + is mapped into the octet of the address-field + member with index 0. + Each octet is represented in YANG as a pair of + hexadecimal characters, using uppercase for a letter. + Each octet in the array is separated by the dash + character."; + } + } + + grouping clock-quality { + description + "Quality of a PTP Instance, which contains IEEE Std 1588 + clockClass, clockAccuracy and offsetScaledLogVariance. + PTP Instances with better quality are more likely to + become the Grandmaster PTP Instance."; + reference + "5.3.7 of IEEE Std 1588-2019 + 8.2.1.3.1 of IEEE Std 1588-2019"; + + leaf clock-class { + type identityref { + base clock-class; + } + description + "The clockClass denotes the traceability of the time + or frequency distributed by the clock."; + reference + "7.6.2.5 of IEEE Std 1588-2019 + 8.2.1.3.1.2 of IEEE Std 1588-2019"; + } + + leaf clock-accuracy { + type identityref { + base clock-accuracy; + } + description + "The clockAccuracy indicates the accuracy of the clock + (Local Clock of the PTP Instance)."; + reference + "7.6.2.6 of IEEE Std 1588-2019 + 8.2.1.3.1.3 of IEEE Std 1588-2019"; + } + + leaf offset-scaled-log-variance { + type uint16; + description + "The offsetScaledLogVariance indicates the stability of the + clock (Local Clock of the PTP Instance). It provides an + estimate of the variations of the clock from a linear timescale + when it is not synchronized to another clock using the protocol."; + reference + "7.6.2.7 of IEEE Std 1588-2019"; + } + } + + grouping fault-record { + description + "Record of a fault in the PTP Instance. + + NOTE - IEEE Std 1588 specifies a member + faultRecordLength for this type, which is needed + for PTP Management Messages, but is not needed for + YANG management."; + reference + "5.3.10 of IEEE Std 1588-2019"; + + container time { + description + "Time the fault occurred as indicated by the Timestamping + Clock of the PTP Instance. A value of all 1's for the + fields in the timestamp shall indicate that the occurrence + time is not available."; + uses timestamp; + } + + leaf severity { + type fault-severity; + description + "Severity of the fault."; + } + + leaf name { + type string; + description + "Name for the fault, unique within the implementation."; + } + + leaf value { + type string; + description + "Any value that may be associated with the fault that is + necessary for fault diagnosis."; + } + + leaf description { + type string; + description + "Any supplementary description of the fault."; + } + } + + grouping communication-capabilities { + description + "Multicast/unicast capabilities for a port + and message type. + These attributes report the values that are transmitted + by this PTP Instance to other PTP Instance(s) in the + network to indicate the multicast/unicast capabilities + for a port and message type. Therefore, the context is + protocol communication, and not YANG configuration."; + reference + "5.3.12 of IEEE Std 1588-2019 + 8.2.25 of IEEE Std 1588-2019 + 16.9.2 of IEEE Std 1588-2019"; + + leaf multicast-capable { + type boolean; + description + "True if the PTP Port is capable of transmitting + PTP messages using multicast communication, + otherwise it shall be false."; + } + + leaf unicast-capable { + type boolean; + description + "True if the PTP Port is capable of transmitting + PTP messages using unicast communication, + otherwise it shall be false."; + } + + leaf unicast-negotiation-capable { + type boolean; + description + "True if the PTP Port is capable negotiating unicast + communication using the unicast negotiation feature, + and unicast-negotiation-port-ds/enable is true, + otherwise the value of shall be false."; + } + + leaf unicast-negotiation-required { + type boolean; + description + "True if the value of unicast-negotiation-capable is true + and the use of the unicast negotiation feature is + required by the implementation, otherwise the value + shall be false."; + } + } + + grouping ptp-instance-performance-parameters { + description + "PTP Instance Performance Monitoring Parameters, + related to the PTP Port or Link Port in the + slave state."; + reference + "Table J.1 of IEEE Std 1588-2019"; + + leaf average-master-slave-delay { + type time-interval; + description + "Average of the MasterSlaveDelay for this interval."; + } + leaf minimum-master-slave-delay { + type time-interval; + description + "Minimum of the MasterSlaveDelay for this interval."; + } + leaf maximum-master-slave-delay { + type time-interval; + description + "Maximum of the MasterSlaveDelay for this interval."; + } + leaf stddev-master-slave-delay { + type time-interval; + description + "StdDev of the MasterSlaveDelay for this interval."; + } + leaf average-slave-master-delay { + type time-interval; + description + "Average of the SlaveMasterDelay for this interval."; + } + leaf minimum-slave-master-delay { + type time-interval; + description + "Minimum of the SlaveMasterDelay for this interval."; + } + leaf maximum-slave-master-delay { + type time-interval; + description + "Maximum of the SlaveMasterDelay for this interval."; + } + leaf stddev-slave-master-delay { + type time-interval; + description + "StdDev of the SlaveMasterDelay for this interval."; + } + leaf average-mean-path-delay { + type time-interval; + description + "Average of the this interval."; + } + leaf minimum-mean-path-delay { + type time-interval; + description + "Minimum of the for this interval."; + } + leaf maximum-mean-path-delay { + type time-interval; + description + "Maximum of the for this interval."; + } + leaf stddev-mean-path-delay { + type time-interval; + description + "StdDev of the for this interval."; + } + leaf average-offset-from-master { + type time-interval; + description + "Average of the for this interval."; + } + leaf minimum-offset-from-master { + type time-interval; + description + "Minimum of the for this interval."; + } + leaf maximum-offset-from-master { + type time-interval; + description + "Maximum of the for this interval."; + } + leaf stddev-offset-from-master { + type time-interval; + description + "StdDev of the for this interval."; + } + } + + grouping ptp-port-performance-parameters-peer-delay { + description + "PTP Port Performance Monitoring Parameters, + related to the PTP Port or Link Port using the + peer-to-peer delay mechanism."; + reference + "Table J.2 of IEEE Std 1588-2019"; + + leaf average-mean-link-delay { + type time-interval; + description + "Average of the for this interval."; + } + leaf min-mean-link-delay { + type time-interval; + description + "Minimum of the for this interval."; + } + leaf max-mean-link-delay { + type time-interval; + description + "Maximum of the for this interval."; + } + leaf stddev-mean-link-delay { + type time-interval; + description + "StdDev of the for this interval."; + } + } + + grouping additional-performance-parameters { + description + "Additional Performance Monitoring Parameters, + intended to complement ptp-instance-performance-parameters."; + reference + "Table J.3 of IEEE Std 1588-2019"; + + leaf announce-tx { + type yang:zero-based-counter32; + description + "Counter indicating the number of Announce + messages that have been transmitted for this + interval."; + } + leaf announce-rx { + type yang:zero-based-counter32; + description + "Counter indicating the number of Announce + messages from the current GM that have been + received for this interval."; + } + leaf announce-foreign-rx { + type yang:zero-based-counter32; + description + "Counter indicating the total number of Announce + messages from the foreign Masters that have been + received for this interval."; + } + leaf sync-tx { + type yang:zero-based-counter32; + description + "Counter indicating the number of Sync + messages that have been transmitted for this + interval."; + } + leaf sync-rx { + type yang:zero-based-counter32; + description + "Counter indicating the number of Sync + messages that have been received for this + interval."; + } + leaf follow-up-tx { + type yang:zero-based-counter32; + description + "Counter indicating the number of Follow_Up + messages that have been transmitted for this + interval."; + } + leaf follow-up-rx { + type yang:zero-based-counter32; + description + "Counter indicating the number of Follow_Up + messages that have been received for this + interval."; + } + leaf delay-req-tx { + type yang:zero-based-counter32; + description + "Counter indicating the number of Delay_Req + messages that have been transmitted for this + interval."; + } + leaf delay-req-rx { + type yang:zero-based-counter32; + description + "Counter indicating the number of Delay_Req + messages that have been received for this + interval."; + } + leaf delay-resp-tx { + type yang:zero-based-counter32; + description + "Counter indicating the number of Delay_Resp + messages that have been transmitted for this + interval."; + } + leaf delay-resp-rx { + type yang:zero-based-counter32; + description + "Counter indicating the number of Delay_Resp + messages that have been received for this + interval."; + } + leaf pdelay-req-tx { + type yang:zero-based-counter32; + description + "Counter indicating the number of Pdelay_Req + messages that have been transmitted for this + interval."; + } + leaf pdelay-req-rx { + type yang:zero-based-counter32; + description + "Counter indicating the number of Pdelay_Req + messages that have been received for this + interval."; + } + leaf pdelay-resp-tx { + type yang:zero-based-counter32; + description + "Counter indicating the number of Pdelay_Resp + messages that have been transmitted for this + interval."; + } + leaf pdelay-resp-rx { + type yang:zero-based-counter32; + description + "Counter indicating the number of Pdelay_Resp + messages that have been received for this + interval."; + } + leaf pdelay-resp-follow-up-tx { + type yang:zero-based-counter32; + description + "Counter indicating the number of + Pdelay_Resp_Follow_Up messages that have + been transmitted for this interval."; + } + leaf pdelay-resp-follow-up-rx { + type yang:zero-based-counter32; + description + "Counter indicating the number of + Pdelay_Resp_Follow_Up messages that have + been transmitted for this interval."; + } + } + + grouping clock-performance-monitoring-data-record { + description + "The IEEE Std 1588 ClockPerformanceMonitoringDataRecord + type is used for PTP Instance performance monitoring + statistics."; + reference + "Table J.4.1 of IEEE Std 1588-2019"; + + leaf index { + type uint16; + description + "Index to each record in the list (0-99)."; + } + + leaf measurement-valid { + type boolean; + description + "The measurement-valid flag shall indicate the data + can be correctly interpreted. Validity is + implementation specific and may be defined in + a PTP Profile. If for some periods the data is not + valid for part of the data collection interval + (e.g. the clock is not locked), a specific + implementation can report the statistics only for + valid data and with measurement-valid true. + + This flag applies to all parameters for a + given measurement period, including PTP Port + and Link Port related."; + } + + leaf period-complete { + type boolean; + description + "The period-complete flag shall indicate that + measurements were performed during the entire + period (15-minute or 24-hour). For example, + if the PTP Instance is disabled for five minutes + of a 15-minute period, period-complete is false. + The period-complete flag is not related to the + validity of measurements that were performed. + + This flag applies to all parameters for a + given measurement period, including PTP Port + and Link Port related."; + } + + leaf pm-time { + type yang:timestamp; + description + "Time of the beginning of the measurement record. + This leaf's type is YANG timestamp, which is based + on system time (also known as local time). System + time is an unsigned integer in units of + 10 milliseconds, using an epoch defined by the + implementation (typically time of boot-up)."; + reference + "IETF RFC 6991"; + } + + uses ptp-instance-performance-parameters; + } + + grouping port-performance-monitoring-peer-delay-data-record { + description + "The IEEE Std 1588 PortPerformanceMonitoringPeerDelayDataRecord + type is used for the PTP Port related performance monitoring + statistics for the peer-to-peer delay measurement mechanism."; + reference + "Table J.4.1 of IEEE Std 1588-2019"; + + leaf index { + type uint16; + description + "Index to each record in the list (0-99)."; + } + + leaf pm-time { + type yang:timestamp; + description + "Time of the beginning of the measurement record. + This leaf's type is YANG timestamp, which is based + on system time (also known as local time). System + time is an unsigned integer in units of + 10 milliseconds, using an epoch defined by the + implementation (typically time of boot-up)."; + reference + "RFC 6991"; + } + + uses ptp-port-performance-parameters-peer-delay; + } + + grouping port-performance-monitoring-data-record { + description + "The IEEE Std 1588 PortPerformanceMonitoringDataRecord + type is used for additional PTP Port related performance + monitoring statistics."; + reference + "Table J.4.1 of IEEE Std 1588-2019"; + + leaf index { + type uint16; + description + "Index to each record in the list (0-99)."; + } + + leaf pm-time { + type yang:timestamp; + description + "Time of the beginning of the measurement record. + This leaf's type is YANG timestamp, which is based + on system time (also known as local time). System + time is an unsigned integer in units of + 10 milliseconds, using an epoch defined by the + implementation (typically time of boot-up)."; + reference + "RFC 6991"; + } + + uses additional-performance-parameters; + } + + container ptp { + description + "Contains all YANG nodes for the PTP data sets. + This hierarchy can be augmented with YANG nodes + for a specific vendor or PTP Profile."; + + container instances { + description + "YANG container that is used to get all PTP Instances. + YANG does not allow get of all elements in a YANG list, + so a YANG container wrapping the YANG list is provided for + that purpose. The naming convention uses plural for the + wrapping YANG container, and singular for the YANG list."; + + list instance { + + key "instance-index"; + + description + "List of one or more PTP Instances in the product (PTP Node). + Each PTP Instance represents a distinct instance of PTP + implementation (i.e. distinct Ordinary Clock, Boundary Clock, + or Transparent Clock), maintaining a distinct time. + PTP Instances may be created or deleted dynamically in + implementations that support dynamic create/delete."; + reference + "8.1.4.2 of IEEE Std 1588-2019"; + + leaf instance-index { + type uint32; + description + "The instance list is indexed using a number that is + unique per PTP Instance within the PTP Node, applicable + to the management context only (i.e. not used in PTP + messages). The domain-number of the PTP Instance is not + used as the key to instance-list, since it is possible + for a PTP Node to contain multiple PTP Instances using + the same domain-number."; + reference + "8.1.4.2 of IEEE Std 1588-2019"; + } + + container default-ds { + description + "The default data set of the PTP Instance."; + reference + "8.2.1 of IEEE Std 1588-2019"; + + leaf two-step-flag { + type boolean; + config false; + status deprecated; + description + "When set to true, the PTP Instance is two-step, + otherwise the PTP Instance is one-step. + This data set member is no longer used. However, + the twoStepFlag of the PTP common header is used. + One step or two step egress behavior is allowed to + be specified per PTP Port, or per PTP Instance. + Management of the one/two step egress behavior of + a PTP Port is not provided by this standard, but + can be specified as extensions to the data sets by a + PTP Profile or a product specification."; + reference + "8.2.1.2.1 of IEEE Std 1588-2019"; + } + + leaf clock-identity { + type clock-identity; + config false; + description + "The IEEE Std 1588 clockIdentity of the PTP Instance."; + reference + "8.2.1.2.2 of IEEE Std 1588-2019"; + } + + leaf number-ports { + type uint16; + config false; + description + "The number of PTP Ports on the PTP Instance. + For an Ordinary Clock, the value shall be one."; + reference + "8.2.1.2.3 of IEEE Std 1588-2019"; + } + + container clock-quality { + description + "The IEEE Std 1588 clockQuality of the PTP Instance. + PTP Instances with better quality are more likely to + become the Grandmaster PTP Instance."; + reference + "8.2.1.3.1 of IEEE Std 1588-2019"; + uses clock-quality; + } + + leaf priority1 { + type uint8; + description + "The IEEE Std 1588 priority1 of the PTP Instance. + Since priority1 is one of the first comparisons + performed by the Best Master Clock Algorithm (BMCA), + this leaf's configuration can be used to explicitly + select a Grandmaster PTP Instance. + Lower values take precedence. + The value of priority1 shall be configurable to any + value in the range 0 to 255, unless restricted by + limits established by the applicable PTP Profile."; + reference + "7.6.2.3 of IEEE Std 1588-2019 + 8.2.1.4.1 of IEEE Std 1588-2019"; + } + + leaf priority2 { + type uint8; + description + "The IEEE Std 1588 priority2 of the PTP Instance. + The priority2 member is compared by the Best Master + Clock Algorithm (BMCA) after priority1 and clockQuality. + Lower values take precedence. + The value of priority2 shall be configurable to any + value in the range 0 to 255, unless restricted by + limits established by the applicable PTP Profile."; + reference + "7.6.2.4 of IEEE Std 1588-2019 + 8.2.1.4.2 of IEEE Std 1588-2019"; + } + + leaf domain-number { + type uint8; + description + "The IEEE Std 1588 domainNumber of the PTP Instance. + A domain consists of one or more PTP Instances + communicating with each other as defined by the + protocol. A domain shall define the scope of PTP message + communication, state, operations, data sets, and + timescale. Therefore, each domain represents a distinct + time. + Within a PTP Network, a domain is identified by two + data set members: domainNumber and sdoId. + The domainNumber is the primary mechanism for end users + and system integrators to isolate the operation of a + PTP Instance from PTP messages used in other domains. + The value of the domainNumber shall be configurable + to values permitted in IEEE Std 1588, unless the + allowed values are further restricted by the applicable + PTP Profile."; + reference + "7.1 of IEEE Std 1588-2019 + 8.2.1.4.3 of IEEE Std 1588-2019"; + } + + leaf slave-only { + type boolean; + description + "The value of slave-only shall be true if the + PTP Instance is a slave-only PTP Instance + (false for non-slave-only). + The slave-only member can be true for Ordinary Clocks + only. + When slave-only is true, the PTP Instance implements + special behavior in the context of the state machines + that determine port-state."; + reference + "8.2.1.4.4 of IEEE Std 1588-2019 + 9.2.2.1 of IEEE Std 1588-2019"; + } + + leaf sdo-id { + type uint16 { + range "0..4095"; + } + description + "The IEEE Std 1588 sdoId of the PTP Instance. + A domain consists of one or more PTP Instances + communicating with each other as defined by the + protocol. A domain shall define the scope of PTP message + communication, state, operations, data sets, and + timescale. Therefore, each domain represents a distinct + time. + Within a PTP Network, a domain is identified by two + data set members: domainNumber and sdoId. + The sdoId of a domain is a 12-bit integer in the + closed range 0 to 4095. + The sdoId member is the primary mechanism for providing + isolation of PTP Instances operating a PTP Profile + specified by a Standards Development Organization (SDO), + from other PTP Instances operating a PTP Profile + specified by a different SDO."; + reference + "7.1 of IEEE Std 1588-2019 + 8.2.1.4.5 of IEEE Std 1588-2019 + 16.5 of IEEE Std 1588-2019"; + } + + container current-time { + description + "For management read, this member shall return the + current value of the PTP Instance Time. + When management write is supported, this member + shall set the PTP Instance Time. + Time originates in the Grandmaster PTP Instance and + is distributed by PTP to other PTP Instances in + the domain. + NOTE 1 — The time in the Grandmaster PTP Instance + is normally determined by interacting with a primary + reference, e.g., GPS, by means outside the scope of + this standard. + NOTE 2 — When this member is used to set time in a + PTP Instance other than the Grandmaster PTP Instance, + the PTP Node can return a management error. + NOTE 3 — If the time is set in a PTP Instance other + than the Grandmaster PTP Instance, it will be + overwritten by the operation of the protocol and will + therefore exist only as a transient."; + reference + "8.2.1.5.1 of IEEE Std 1588-2019"; + uses timestamp; + } + + leaf instance-enable { + type boolean; + description + "Indicates if the PTP Instance is enabled for + PTP operation. + When management write is supported: + - Write of the value true shall cause the PTP Instance + to initialize, only if the value was previously false. + - Write of the value false shall immediately disable + operation of the PTP Instance (i.e. analogous to power + off). + If this leaf is not supported, the PTP Instance shall be + specified-by-design to be enabled (true)."; + reference + "8.2.1.5.2 of IEEE Std 1588-2019"; + } + + leaf external-port-config-enable { + if-feature external-port-config; + type boolean; + description + "This value determines whether the external port + configuration option is in the disabled state (false) + or enabled state (true). + When this value is false, each PTP Port's state + is determined by PTP state machines, including + the Best Master Clock Algorithm (BMCA). + When this value is true, each PTP Port's state + is configured externally, and PTP state machines + are effectively disabled. External configuration + of PTP Port state can be accomplished using the + desiredState member of the port (i.e., + ../ports/port[]/external-port-config-port-ds/ + desired-state)."; + reference + "8.2.1.5.3 of IEEE Std 1588-2019 + 17.6 of IEEE Std 1588-2019"; + } + + leaf max-steps-removed { + type uint8 { + range "2..255"; + } + description + "If the value of stepsRemoved of an Announce message + is greater than or equal to the value of this + max-steps-removed leaf, the Announce message is not + considered in the operation of the + Best Master Clock Algorithm (BMCA). + The value shall be in the closed range 2 to 255. + If the leaf is not supported, the value used shall + be 255."; + reference + "8.2.1.5.4 of IEEE Std 1588-2019 + 9.3.2.5 of IEEE Std 1588-2019"; + } + + leaf instance-type { + type instance-type; + description + "The type of PTP Instance. + This leaf is read-only unless support for write is + explicitly specified by the applicable PTP Profile or + product specification."; + reference + "8.2.1.5.5 of IEEE Std 1588-2019"; + } + } + + container current-ds { + description + "Provides current data from operation + of the protocol."; + reference + "8.2.2 of IEEE Std 1588-2019"; + + leaf steps-removed { + type uint16; + config false; + description + "The number of PTP Communication Paths traversed + between this PTP Instance and the Grandmaster + PTP Instance."; + reference + "8.2.2.2 of IEEE Std 1588-2019"; + } + + leaf offset-from-master { + type time-interval; + config false; + description + "The current value of the time difference between + a Master PTP Instance and a Slave PTP Instance as + computed by the Slave PTP Instance. + NOTE - When a PTP Profile requires a Boundary + Clock to transfer offset information internally + from Slave PTP Port to Master PTP Port(s), this value + effectively returns the offset from the Grandmaster + PTP Instance."; + reference + "8.2.2.3 of IEEE Std 1588-2019"; + } + + leaf mean-delay { + type time-interval; + config false; + description + "The current value of the mean propagation time between + a Master PTP Instance and a Slave PTP Instance as + computed by the Slave PTP Instance. + If the PTP Instance has no PTP Port in slave or + uncalibrated state, this returns zero. + Otherwise, the Slave PTP Port returns this value + depending on its delay-mechanism: + e2e: mean propagation time over the + PTP Communication Path, i.e. + p2p or common-p2p: mean propagation time over the + PTP Link, i.e. + disabled or special: zero"; + reference + "7.4.2 of IEEE Std 1588-2019 + 8.2.2.4 of IEEE Std 1588-2019"; + } + + leaf mean-path-delay { + type time-interval; + config false; + status deprecated; + description + "In IEEE Std 1588-2008, currentDS.meanDelay was called + currentDS.meanPathDelay. While the specification of + this member is retained in the current standard, the + member is renamed to currentDS.meanDelay. This change + is consistent with other changes that ensure clarity + and consistency of naming, where + - “path” is associated with the + request-response mechanism + - “link” is associated with the + peer-to-peer delay mechanism"; + reference + "8.2.2.4 of IEEE Std 1588-2008"; + } + + leaf synchronization-uncertain { + type boolean; + config false; + description + "This boolean is true when synchronization is + uncertain (e.g., not within specification) + in either the Parent PTP Port or this + PTP Instance. The value is copied from a + received Announce message to transmitted Announce + message, such that it reflects uncertain + synchronization from this PTP Instance to the + Grandmaster. Performance metrics for determining + uncertainty are specified by the applicable + PTP Profile."; + reference + "8.2.2.5 of IEEE Std 1588-2019"; + } + } + + container parent-ds { + description + "Provides data learned from the parent of this + PTP Instance (i.e. master port on the other side + of the path/link)."; + reference + "8.2.3 of IEEE Std 1588-2019"; + + container parent-port-identity { + config false; + description + "The IEEE Std 1588 portIdentity of the PTP Port on the + Master PTP Instance that issues the Sync messages + used in synchronizing this PTP Instance."; + reference + "8.2.3.2 of IEEE Std 1588-2019"; + uses port-identity; + } + + leaf parent-stats { + type boolean; + config false; + description + "When set to true, the values of + parent-ds/observed-parent-offset-scaled-log-variance + and + parent-ds/observed-parent-clock-phase-change-rate + have been measured and are valid."; + reference + "8.2.3.3 of IEEE Std 1588-2019"; + } + + leaf observed-parent-offset-scaled-log-variance { + type uint16; + config false; + description + "Estimate of the variance of the phase offset of the + Local PTP Clock of the Parent PTP Instance as measured + with respect to the Local PTP Clock in the Slave PTP + Instance. This measurement is optional, but if not made, + the value of parent-ds/parent-stats shall be false."; + reference + "7.6.3.3 of IEEE Std 1588-2019 + 7.6.3.5 of IEEE Std 1588-2019 + 8.2.3.4 of IEEE Std 1588-2019"; + } + + leaf observed-parent-clock-phase-change-rate { + type int32; + config false; + description + "Estimate of the phase change rate of the + Local PTP Clock of the Parent PTP Instance as measured + by the Slave PTP Instance using its Local PTP Clock. + If the estimate exceeds the capacity of its data type, + this value shall be set to 7FFF FFFF (base 16) or + 8000 0000 (base 16), as appropriate. A positive sign + indicates that the phase change rate in the + Parent PTP Instance is greater than that in the + Slave PTP Instance. The measurement of this value is + optional, but if not measured, the value of + parent-ds/parent-stats shall be false."; + reference + "7.6.4.4 of IEEE Std 1588-2019 + 8.2.3.5 of IEEE Std 1588-2019"; + } + + leaf grandmaster-identity { + type clock-identity; + config false; + description + "The IEEE Std 1588 clockIdentity of the Grandmaster PTP + Instance."; + reference + "8.2.3.6 of IEEE Std 1588-2019"; + } + + container grandmaster-clock-quality { + config false; + description + "The IEEE Std 1588 clockQuality of the Grandmaster PTP + Instance."; + reference + "8.2.3.7 of IEEE Std 1588-2019"; + uses clock-quality; + } + + leaf grandmaster-priority1 { + type uint8; + config false; + description + "The IEEE Std 1588 priority1 of the Grandmaster PTP + Instance."; + reference + "8.2.3.8 of IEEE Std 1588-2019"; + } + + leaf grandmaster-priority2 { + type uint8; + config false; + description + "The IEEE Std 1588 priority2 of the Grandmaster PTP + Instance."; + reference + "8.2.3.9 of IEEE Std 1588-2019"; + } + + container protocol-address { + description + "The protocol address of the PTP Port + that issues the Sync messages used in synchronizing + this PTP Instance."; + reference + "8.2.3.10 of IEEE Std 1588-2019"; + uses port-address; + } + + leaf synchronization-uncertain { + type boolean; + config false; + description + "This boolean is true when synchronization is + uncertain in the Parent PTP Port."; + reference + "8.2.3.11 of IEEE Std 1588-2019"; + } + } + + container time-properties-ds { + description + "Provides data learned from the current + Grandmaster PTP Instance."; + reference + "8.2.4 of IEEE Std 1588-2019"; + + leaf current-utc-offset { + when "../current-utc-offset-valid='true'"; + type int16; + description + "Specified as in IERS Bulletin C, this provides + the offset from UTC (TAI - UTC). The offset is in + units of seconds."; + reference + "7.2.4 of IEEE Std 1588-2019 + 8.2.4.2 of IEEE Std 1588-2019"; + } + + leaf current-utc-offset-valid { + type boolean; + description + "The value of current-utc-offset-valid shall be true + if the values of current-utc-offset, leap59, and leap61 + are known to be correct, otherwise it shall be false. + NOTE - The constraint for leap59 and leap61 did not + exist in IEEE Std 1588-2008, and for compatibility, + corresponding when statements were not included below."; + reference + "8.2.4.3 of IEEE Std 1588-2019"; + } + + leaf leap59 { + type boolean; + description + "If the timescale is PTP, a true value for leap59 + shall indicate that the last minute of the + current UTC day contains 59 seconds. + If the timescale is not PTP, the value shall be + false."; + reference + "8.2.4.4 of IEEE Std 1588-2019"; + } + + leaf leap61 { + type boolean; + description + "If the timescale is PTP, a true value for leap61 + shall indicate that the last minute of the + current UTC day contains 61 seconds. + If the timescale is not PTP, the value shall be + false."; + reference + "8.2.4.5 of IEEE Std 1588-2019"; + } + + leaf time-traceable { + type boolean; + description + "The value of time-traceable shall be true if the + timescale is traceable to a primary reference; + otherwise, the value shall be false. + The uncertainty specifications appropriate to the + evaluation of whether traceability to a primary + reference is achieved should be defined in the + applicable PTP Profile. In the absence of such a + definition the value of time-traceable is + implementation specific."; + reference + "8.2.4.6 of IEEE Std 1588-2019"; + } + + leaf frequency-traceable { + type boolean; + description + "The value of time-traceable shall be true if the + frequency determining the timescale is traceable + to a primary reference; otherwise, the value shall + be false. + The uncertainty specifications appropriate to the + evaluation of whether traceability to a primary + reference is achieved should be defined in the + applicable PTP Profile. In the absence of such a + definition the value of frequency-traceable is + implementation specific."; + reference + "8.2.4.7 of IEEE Std 1588-2019"; + } + + leaf ptp-timescale { + type boolean; + description + "If ptp-timescale is true, the timescale of + the Grandmaster PTP Instance is PTP, which is + the elapsed time since the PTP epoch measured + using the second defined by International Atomic + Time (TAI). + If ptp-timescale is false, the timescale of + the Grandmaster PTP Instance is ARB, which is + the elapsed time since an arbitrary epoch."; + reference + "7.2.1 of IEEE Std 1588-2019 + 8.2.4.8 of IEEE Std 1588-2019"; + } + + leaf time-source { + type identityref { + base time-source; + } + description + "The source of time used by the Grandmaster + PTP Instance."; + reference + "7.6.2.8 of IEEE Std 1588-2019 + 8.2.4.9 of IEEE Std 1588-2019"; + } + } + + container description-ds { + description + "Provides descriptive information for the PTP Instance."; + reference + "8.2.5 of IEEE Std 1588-2019"; + + leaf manufacturer-identity { + type string { + pattern "[0-9A-F]{2}(-[0-9A-F]{2}){2}"; + } + config false; + description + "3-octet OUI or CID owned by the manufacturer of the + PTP Instance, assigned by the IEEE Registration + Authority. + Each octet is represented in YANG as a pair of + hexadecimal characters, using uppercase for a letter. + Each octet in the array is separated by the dash + character."; + reference + "8.2.5.2 of IEEE Std 1588-2019"; + } + + leaf product-description { + type string { + length "2..64"; + } + config false; + description + "The product-description string shall indicate, in order: + - The name of the manufacturer of the PTP Instance, + manufacturerName, followed by a semicolon (;) + - The model number of the PTP Instance, modelNumber, + followed by a semicolon (;) + - A unique identifier of this PTP Instance, + instanceIdentifier, such as the MAC address or + the serial number. + The content and meaning of the manufacturerName, + modelNumber, and the instanceIdentifier strings are + determined by the manufacturer of the PTP Instance."; + reference + "8.2.5.3 of IEEE Std 1588-2019"; + } + + leaf product-revision { + type string { + length "2..32"; + } + config false; + description + "Indicate the revisions for PTP Instance's + hardware (HW), firmware (FW), and software (SW). + This information shall be semicolon (;) separated + text fields in the order HW;FW;SW. Non-applicable + revisions shall be indicated by a text fields of + zero length."; + reference + "8.2.5.4 of IEEE Std 1588-2019"; + } + + leaf user-description { + type string { + length "0..128"; + } + description + "Configurable description of the product's PTP Instance. + The user-description string should indicate, in order: + - A user-defined name of the PTP Instance, + e.g., Sensor-1, followed by a semicolon (;) + - A user-defined physical location of the PTP Instance, + e.g., Rack-2 Shelf-3."; + reference + "8.2.5.5 of IEEE Std 1588-2019"; + } + } + + container fault-log-ds { + if-feature fault-log; + config false; + description + "Represents an optional mechanism for logging of faults + that occur in the PTP Instance. If one member of + fault-log-ds is supported, all members shall be + supported."; + reference + "8.2.6 of IEEE Std 1588-2019"; + + leaf number-of-fault-records { + type uint16; + config false; + description + "The number of fault records available in + fault-record-list."; + reference + "8.2.6.2 of IEEE Std 1588-2019"; + } + + list fault-record-list { + config false; + description + "List of fault records, number-of-fault-records + in length. + The maximum length of fault-record-list is + implementation-specific. The fault-record-list + is maintained by the PTP Instance until + fault-log-ds.reset is used."; + reference + "8.2.6.3 of IEEE Std 1588-2019"; + + uses fault-record; + } + + action reset { + description + "This action causes the contents of fault-record-list + to be cleared, and number-of-fault-records to be set + to zero."; + reference + "8.2.6.4 of IEEE Std 1588-2019"; + } + } + + // The nonvolatileStorageDS in 8.2.7 of IEEE Std 1588-2019 + // is not applicable for YANG, since protocols like NETCONF + // and RESTCONF specify analogous features for configuration + // storage. + + container path-trace-ds { + if-feature path-trace; + description + "Provides data for the optional path + trace mechanism."; + reference + "16.2 of IEEE Std 1588-2019"; + + leaf-list list { + type clock-identity; + config false; + description + "List of IEEE Std 1588 clock identity values + (type ClockIdentity), in the order provided in the + PATH_TRACE TLV."; + reference + "16.2.2.2.1 of IEEE Std 1588-2019"; + } + + leaf enable { + type boolean; + description + "Allows for enable/disable of the path trace mechanism + using management. If path-trace-ds.enable is true, + the path trace mechanism shall be operational. + If path-trace-ds.enable is false, the path trace + mechanism shall be inactive."; + reference + "16.2.2.3.1 of IEEE Std 1588-2019"; + } + } + + container alternate-timescale-ds { + if-feature alternate-timescale; + description + "Provides data for the optional alternate + timescale offsets mechanism."; + reference + "16.3 of IEEE Std 1588-2019"; + + leaf max-key { + type uint8; + config false; + description + "The value of max-key shall indicate the value of + the largest key-field in the list."; + reference + "16.3.4.3.1 of IEEE Std 1588-2019"; + } + + list list { + key "key-field"; + description + "List of alternate timescales in the PTP Instance. + Elements in the list can be created or deleted, if + those operations are supported by management. + + If management write is supported for items + current-offset, jump-seconds, and time-of-next-jump, + the value for all three items shall be provided + within a single write operation, and the update of + all three items shall be atomic. If any of the three + values fails to update, a management error shall be + returned."; + reference + "16.3.4.4.1 of IEEE Std 1588-2019"; + + leaf key-field { + type uint8; + description + "Unique identifier of each element in the list."; + } + + leaf enable { + type boolean; + description + "If enable is true, the + ALTERNATE_TIME_OFFSET_INDICATOR TLV + for this alternate timescale shall be attached + to Announce messages. If enable is false, the TLV + shall not be attached."; + } + + leaf current-offset { + type int32; + description + "Offset of the alternate time, in seconds, from + PTP Instance Time in the Grandmaster PTP Instance."; + } + + leaf jump-seconds { + type int32; + description + "Size of the next discontinuity, in seconds, in the + alternate timescale. A value of zero indicates that + no discontinuity is expected. A positive value + indicates that the discontinuity will cause the + current-offset of the alternate timescale to + increase."; + } + + leaf time-of-next-jump { + type uint64; + description + "Value of the seconds-field of the transmitting PTP + Instance Time at the time that the next discontinuity + will occur. The discontinuity occurs at the start of + the second indicated by the value of time-of-next-jump. + Only 48-bits are valid (the upper 16-bits are always + zero)."; + } + + leaf display-name { + type string { + length "0..10"; + } + description + "Textual description of the alternate timescale."; + } + } + } + + container holdover-upgrade-ds { + if-feature holdover-upgrade; + description + "Provides data for the optional holdover + upgrade mechanism."; + reference + "16.4 of IEEE Std 1588-2019"; + + leaf enable { + type boolean; + description + "Used to enable (true) or disable (false) the + holdover upgrade mechanism."; + } + } + + container grandmaster-cluster-ds { + if-feature grandmaster-cluster; + description + "Provides data for the optional grandmaster + cluster mechanism."; + reference + "17.2.3 of IEEE Std 1588-2019"; + + leaf max-table-size { + type uint8; + config false; + description + "Maximum number of elements permitted + in the port-address list. + + NOTE - The actualTableSize of IEEE Std 1588 is not + applicable for YANG, since YANG mechanisms can be used + to control the number of elements in port-address."; + } + + leaf log-query-interval { + type int8; + description + "Logarithm to the base 2 of the mean interval in + seconds between unicast Announce messages from + cluster members."; + } + + list port-address { + key "index"; + description + "List of port addresses, one for each member of the + grandmaster cluster."; + + leaf index { + type uint16; + description + "Index to a port address in the list, typically + sequential from 0 to N-1, where N is the number of + port addresses."; + } + + uses port-address; + } + } + + container acceptable-master-ds { + if-feature acceptable-master; + description + "Provides data for the optional acceptable + master table mechanism."; + reference + "17.5.3 of IEEE Std 1588-2019"; + + leaf max-table-size { + type uint16; + config false; + description + "Maximum number of elements permitted + in the list. + + NOTE - The actualTableSize of IEEE Std 1588 is not + applicable for YANG, since YANG mechanisms can be used + to control the number of elements in list."; + reference + "17.5.3.3.1 of IEEE Std 1588-2019"; + } + + list list { + key "index"; + description + "List of acceptable masters in the PTP Instance. + Elements in the list can be created or deleted, if + those operations are supported by management. + + If management write is supported for items + acceptable-clock-identity, acceptable-port-number, + and alternate-priority1, the value for all three items + shall be provided within a single write operation, + and the update of all three items shall be atomic. + If any of the three values fails to update, a management + error shall be returned."; + reference + "17.5.3.4.2 of IEEE Std 1588-2019"; + + leaf index { + type uint8; + description + "Unique index to each element in the list, typically + sequential from 0 to N-1, where N is the number of + elements."; + } + + container acceptable-port-identity { + description + "The IEEE Std 1588 portIdentity of the + acceptable master."; + uses port-identity; + } + + leaf alternate-priority1 { + type uint8; + description + "The IEEE Std 1588 priority1 used as an alternate + for the acceptable master."; + } + } + } + + container performance-monitoring-ds { + if-feature performance-monitoring; + description + "Provides data for the optional performance + monitoring mechanism, scoped to the PTP Instance."; + reference + "8.2.13 of IEEE Std 1588-2019 + J.5.1 of IEEE Std 1588-2019"; + + leaf enable { + type boolean; + description + "Permits management control over the collection of + performance monitoring data, including + performance-monitoring-ds (PTP Instance), + ports/port[]/performance-monitoring-port-ds + (PTP Port of PTP Instance), and + common-services/cmlds/ports/port[]/ + performance-monitoring-port-ds (CMLDS Link Port + associated with enabled PTP Port)."; + reference + "J.5.1.1 of IEEE Std 1588-2019"; + } + + list record-list { + key "index"; + max-elements 99; + config false; + description + "List of performance monitoring records for the + PTP Instance. The list is organized as follows: + - 97 15-minute measurement records, the current record + at index 0, followed by the most recent 96 records. + - 2 24-hour measurement records, the current record + at index 97, and the previous record at index 98. + + If a record is not implemented for a specific index, + management does not return the record. For example, + if only four 15-minute periods are implemented, + a management request for performance-monitoring-ds/ + record-list[6] returns an error. + + If only some of the data is reported, the same index + values are used. As an example, if only the 24-hour + statistics are accessed, the indexes are still 97 and 98. + + If a specific parameter (e.g. max-master-slave-delay) + is not implemented, management does not return the + parameter (i.e., error). Parameters that are invalid + (not measured correctly) shall be indicated with + one in all bits, except the most significant. This + represents the largest positive value of + time-interval, indicating a value outside the + maximum range."; + reference + "J.5.1.2 of IEEE Std 1588-2019"; + + uses clock-performance-monitoring-data-record; + } + } + + container enhanced-metrics-ds { + if-feature enhanced-metrics; + description + "Provides data for the optional enhanced + synchronization accuracy metrics mechanism."; + reference + "16.12 of IEEE Std 1588-2019"; + + leaf enable { + type boolean; + description + "If the Enhanced Synchronization Accuracy Metrics feature + is implemented, the value true shall indicate that + the feature is enabled on the PTP Instance, and the + value false shall indicate that the option is disabled + on the PTP Instance."; + reference + "8.2.14.2 of IEEE Std 1588-2019"; + } + } + + container ports { + description + "YANG container that is used to get all PTP Ports + in the PTP Instance. + YANG does not allow get of all elements in a YANG list, + so a YANG container wrapping the YANG list is provided for + that purpose. The naming convention uses plural for the + wrapping YANG container, and singular for the YANG list."; + + list port { + key "port-index"; + description + "List of data for each PTP Port in the PTP Instance. + While the PTP Instance is disabled, it is possible to + have zero PTP Ports (i.e., ports not yet created). + While the PTP Instance is enabled, an Ordinary Clock + will have one PTP Port, and a Boundary Clock or + Transparent Clock will have more than one PTP Port."; + reference + "8.1.4.2 of IEEE Std 1588-2019"; + + leaf port-index { + type uint16; + description + "The port list is indexed using a number that is + unique per PTP Port within the PTP Instance, + applicable to the management context only + (i.e., not used in PTP messages)."; + } + + leaf underlying-interface { + type if:interface-ref; + description + "Reference to the configured underlying IETF YANG + interface that is used by this PTP Port for + transport of PTP messages. Among other data, + physical identifiers for the interface + (e.g., MAC address) can be obtained using this + reference."; + reference + "RFC 8343"; + } + + container port-ds { + description + "Primary data set for the PTP Port."; + reference + "8.2.15 of IEEE Std 1588-2019"; + + container port-identity { + config false; + description + "The IEEE Std 1588 portIdentity of this PTP Port."; + reference + "8.2.15.2.1 of IEEE Std 1588-2019"; + uses port-identity; + } + + leaf port-state { + type port-state; + config false; + description + "Current state of the protocol engine associated + with this PTP Port."; + reference + "8.2.15.3.1 of IEEE Std 1588-2019"; + } + + leaf log-min-delay-req-interval { + type int8; + description + "Logarithm to the base 2 of the IEEE Std 1588 + minDelayReqInterval, the minimum permitted + mean time interval between successive Delay_Req + messages sent by a Slave PTP Instance."; + reference + "7.7.2.4 of IEEE Std 1588-2019 + 8.2.15.3.2 of IEEE Std 1588-2019"; + } + + leaf mean-link-delay { + type time-interval; + config false; + description + "If the value of the delay-mechanism leaf is p2p + this value shall be an estimate of the current + one-way propagation delay on the PTP Link attached + to this PTP Port, computed using the peer-to-peer + delay mechanism. + If the value of the delay-mechanism leaf is + common-p2p, this value shall be equal to the value of + ptp/common-services/cmlds/ports/port[]/port-ds/ + mean-link-delay. + If the value of the delay-mechanism leaf is e2e, + disabled, or special, this value shall be zero."; + reference + "8.2.15.3.3 of IEEE Std 1588-2019"; + } + + leaf peer-mean-path-delay { + type time-interval; + config false; + status deprecated; + description + "In IEEE Std 1588-2008, this data set member was + called portDS.peerMeanPathDelay. While the + specification of this member is retained in the + current standard, the member is renamed to + portDS.meanLinkDelay (i.e., ../mean-link-delay). + This change is consistent with other changes that + ensure clarity and consistency of naming, where + - “path” is associated with the + request-response mechanism + - “link” is associated with the + peer-to-peer delay mechanism"; + reference + "8.2.5.3.3 of IEEE Std 1588-2008"; + } + + leaf log-announce-interval { + type int8; + description + "Logarithm to the base 2 of the mean IEEE Std 1588 + announceInterval, the time interval between + successive Announce messages sent by a PTP Port."; + reference + "7.7.2.2 of IEEE Std 1588-2019 + 8.2.15.4.1 of IEEE Std 1588-2019"; + } + + leaf announce-receipt-timeout { + type uint8; + description + "The integral multiple of IEEE Std 1588 + announceInterval that must pass without receipt of + an Announce message before the occurrence of the + event ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES. The range + shall be 2 to 255 subject to further restrictions of + the applicable PTP Profile. While 2 is permissible, + normally the value should be at least 3."; + reference + "7.7.3.1 of IEEE Std 1588-2019 + 8.2.15.4.2 of IEEE Std 1588-2019"; + } + + leaf log-sync-interval { + type int8; + description + "Logarithm to the base 2 of the mean IEEE Std 1588 + syncInterval, the time interval between successive + Sync messages, when transmitted as multicast + messages. The rates for unicast transmissions are + negotiated separately on a per PTP Port basis and + are not constrained by this leaf."; + reference + "7.7.2.3 of IEEE Std 1588-2019 + 8.2.15.4.3 of IEEE Std 1588-2019"; + } + + leaf delay-mechanism { + type delay-mechanism; + description + "The path delay measuring mechanism used by the PTP + Port in computing (propagation delay)."; + reference + "8.2.15.4.4 of IEEE Std 1588-2019"; + } + + leaf log-min-pdelay-req-interval { + type int8; + description + "Logarithm to the base 2 of the IEEE Std 1588 + minPdelayReqInterval, the minimum permitted + mean time interval between successive Pdelay_Req + messages sent over a PTP Link."; + reference + "7.7.2.5 of IEEE Std 1588-2019 + 8.2.15.4.5 of IEEE Std 1588-2019"; + } + + leaf version-number { + type uint8; + description + "The PTP major version in use on the PTP Port. + NOTE - This indicates the version of the + IEEE 1588 standard, and not the version of an + applicable PTP Profile."; + reference + "8.2.15.4.6 of IEEE Std 1588-2019"; + } + + leaf minor-version-number { + type uint8; + description + "The PTP minor version in use on the PTP Port. + NOTE - This indicates the version of the + IEEE 1588 standard, and not the version of an + applicable PTP Profile."; + reference + "8.2.15.4.7 of IEEE Std 1588-2019"; + } + + leaf delay-asymmetry { + type time-interval; + description + "The value of IEEE Std 1588 + applicable to the PTP Port, which is the + difference in transmission time in one direction + as compared to the opposite direction."; + reference + "7.4.2 of IEEE Std 1588-2019 + 8.2.15.4.8 of IEEE Std 1588-2019"; + } + + leaf port-enable { + type boolean; + description + "Indicates if the PTP Port is enabled for + PTP operation. + When management write is supported: + - Write of the value true causes the + DESIGNATED_ENABLED event to occur, even if the + value was previously true. + - Write of the value false causes the + DESIGNATED_DISABLED event to occur, even if the + value was previously false. + If this leaf is not supported, the PTP Port shall be + specified-by-design to be enabled (true)."; + reference + "8.2.15.5.1 of IEEE Std 1588-2019"; + } + + leaf master-only { + type boolean; + description + "If the value of master-only is true, the PTP Port + shall be in the IEEE Std 1588 masterOnly mode. + If the value is false, the PTP Port shall not be + in the masterOnly mode. + When master-only is true, the PTP Port can never + enter the slave port-state."; + reference + "8.2.15.5.2 of IEEE Std 1588-2019 + 9.2.2.2 of IEEE Std 1588-2019"; + } + } + + container timestamp-correction-port-ds { + if-feature timestamp-correction; + description + "Provides access to the configurable correction of + timestamps provided to the PTP protocol."; + reference + "8.2.16 of IEEE Std 1588-2019 + 16.7 of IEEE Std 1588-2019"; + + leaf egress-latency { + type time-interval; + description + "Interval between the + provided for a PTP message and the time at which + the message timestamp point of the PTP message + crosses the reference plane."; + reference + "7.3.4.2 of IEEE Std 1588-2019 + 8.2.16.2 of IEEE Std 1588-2019"; + } + + leaf ingress-latency { + type time-interval; + description + "Interval between the time the message timestamp + point of an ingress PTP message crosses the + reference plane and the + provided for the PTP message."; + reference + "7.3.4.2 of IEEE Std 1588-2019 + 8.2.16.3 of IEEE Std 1588-2019"; + } + } + + container asymmetry-correction-port-ds { + if-feature asymmetry-correction; + description + "Provides access to asymmetry correction parameters + that are used to compute the value of + delayAsymmetry>."; + reference + "8.2.17 of IEEE Std 1588-2019 + 16.8 of IEEE Std 1588-2019"; + + leaf constant-asymmetry { + type time-interval; + description + "Constant asymmetry used to fine adjust the + dynamically calculated value of , + when the mechanism to calculate + or certain media is enabled."; + reference + "8.2.17.2 of IEEE Std 1588-2019"; + } + + leaf scaled-delay-coefficient { + type relative-difference; + description + "This is the ."; + reference + "8.2.17.3 of IEEE Std 1588-2019"; + } + + leaf enable { + type boolean; + description + "When this value is true, the mechanism to calculate + for certain media is enabled on + this PTP Port. When this value is false, this + mechanism is disabled on this PTP Port."; + reference + "8.2.17.4 of IEEE Std 1588-2019"; + } + } + + container description-port-ds { + description + "Provides descriptive information for the PTP Port."; + reference + "8.2.18 of IEEE Std 1588-2019"; + + leaf profile-identifier { + type string { + pattern "[0-9A-F]{2}(-[0-9A-F]{2}){5}"; + } + config false; + description + "When profile-identifier is supported, its value + shall identify the PTP Profile implemented by the + PTP Port, using the value assigned by the + organization that created the PTP Profile. + The profile identifier is six octets that identify + the PTP Profile's organization, profile within the + organization, and version. + Each octet is represented in YANG as a pair of + hexadecimal characters, using uppercase for a letter. + Each octet in the array is separated by the dash + character."; + reference + "8.2.18.2 of IEEE Std 1588-2019 + 20.3.3 of IEEE Std 1588-2019"; + } + + container protocol-address { + config false; + description + "Protocol address which is used as the source address + by the network transport protocol for this + PTP Port."; + reference + "8.2.18.3 of IEEE Std 1588-2019"; + uses port-address; + } + } + + container unicast-negotiation-port-ds { + if-feature unicast-negotiation; + description + "Provides management access to the optional unicast + negotiation mechanism."; + reference + "16.1 of IEEE Std 1588-2019"; + + leaf enable { + type boolean; + description + "When enable is false, the unicast negotiation + mechanism is disabled on this PTP Port. + When enable is true, the unicast negotiation + mechanism is enabled on this PTP Port."; + reference + "8.2.19.2 of IEEE Std 1588-2019"; + } + } + + container alternate-master-port-ds { + if-feature alternate-master; + description + "Provides management access to the optional alternate + master mechanism."; + reference + "17.3.3 of IEEE Std 1588-2019"; + + leaf number-of-alt-masters { + type uint8; + description + "Limits the number of PTP Ports that can + simultaneously transmit messages with the + alternate master flag set to TRUE."; + reference + "17.3.3.2.1 of IEEE Std 1588-2019"; + } + + leaf tx-alt-multicast-sync { + type boolean; + description + "Controls Sync transmission. If true and the + PTP Port is currently transmitting multicast + Announce messages with alternateMasterFlag + TRUE, the PTP Port shall also transmit multicast + Sync and, if a two-step PTP Instance, + Follow_Up messages. Otherwise do not transmit + these messages."; + reference + "17.3.3.2.2 of IEEE Std 1588-2019"; + } + + leaf log-alt-multicast-sync-interval { + type int8; + description + "Logarithm to the base 2 of the mean interval + in seconds between Sync messages transmitted + under the terms of this alternate masters + mechanism."; + reference + "17.3.3.2.3 of IEEE Std 1588-2019"; + } + } + + container unicast-discovery-port-ds { + if-feature unicast-discovery; + description + "Provides management access to the optional unicast + discovery mechanism."; + reference + "17.4.3 of IEEE Std 1588-2019"; + + leaf max-table-size { + type uint16; + config false; + description + "Maximum number of elements permitted + in the port-address list. + + NOTE - The actualTableSize of IEEE Std 1588 is not + applicable for YANG, since YANG mechanisms can be + used to control the number of elements in + port-address."; + } + + leaf log-query-interval { + type int8; + description + "Logarithm to the base 2 of the mean interval in + seconds between requests from a PTP Instance for + a unicast Announce message."; + } + + list port-address { + key "index"; + description + "List of port addresses for unicast discovery."; + + leaf index { + type uint16; + description + "Index to a port address in the list, typically + sequential from 0 to N-1, where N is the number of + port addresses."; + } + + uses port-address; + } + } + + container acceptable-master-port-ds { + if-feature acceptable-master; + description + "Provides management access to the optional acceptable + master mechanism."; + reference + "17.5.4 of IEEE Std 1588-2019"; + + leaf enable { + type boolean; + description + "When enable is false, the acceptable master table + option is not used on this PTP Port, and the normal + operation of the protocol is in effect. + When enable is true, the acceptable master table + option is used on this PTP Port as specified + in the standard."; + reference + "17.5.4.2.1 of IEEE Std 1588-2019"; + } + } + + container l1-sync-basic-port-ds { + if-feature l1-sync; + description + "Provides data for operation of the optional layer-1 + based synchronization performance enhancement feature. + This data is required when the feature is supported."; + reference + "8.2.23 of IEEE Std 1588-2019 + L.5 of IEEE Std 1588-2019"; + + leaf enabled { + type boolean; + description + "Specifies whether the L1Sync option is enabled + on the PTP Port. If enabled is true, then the + L1Sync message exchange is supported and enabled."; + reference + "L.4.1 of IEEE Std 1588-2019"; + } + + leaf tx-coherent-is-required { + type boolean; + description + "Specifies whether the L1Sync port is required + to be a transmit coherent port."; + reference + "L.4.2 of IEEE Std 1588-2019"; + } + + leaf rx-coherent-is-required { + type boolean; + description + "Specifies whether the L1Sync port is required + to be a receive coherent port."; + reference + "L.4.3 of IEEE Std 1588-2019"; + } + + leaf congruent-is-required { + type boolean; + description + "Specifies whether the L1Sync port is required + to be a congruent port."; + reference + "L.4.4 of IEEE Std 1588-2019"; + } + + leaf opt-params-enabled { + type boolean; + description + "Specifies whether the L1Sync port transmitting + the L1_SYNC TLV extends this TLV with optional + parameters."; + reference + "L.4.5 of IEEE Std 1588-2019"; + } + + leaf log-l1sync-interval { + type int8; + description + "Logarithm to the base 2 of the mean IEEE Std 1588 + L1SyncInterval, the time interval between successive + periodic messages sent by the L1Sync port and + carrying the L1_SYNC TLV."; + reference + "L.4.6 of IEEE Std 1588-2019"; + } + + leaf l1sync-receipt-timeout { + type uint8; + description + "The intergral number of elapsed IEEE Std 1588 + L1SyncIntervals that must pass without receipt + of the L1_SYNC TLV before the L1_SYNC TLV + reception timeout occurs."; + reference + "L.4.7 of IEEE Std 1588-2019"; + } + + leaf link-alive { + type boolean; + config false; + description + "True when a L1_SYNC TLV is received at the PTP Port + and L1Sync is enaled on the PTP Port. False when the + L1_SYNC TLV reception timeout occurs."; + reference + "L.5.3.1 of IEEE Std 1588-2019"; + } + + leaf is-tx-coherent { + type boolean; + config false; + description + "True when the L1Sync port is a transmit coherent + port."; + reference + "L.5.3.2 of IEEE Std 1588-2019"; + } + + leaf is-rx-coherent { + type boolean; + config false; + description + "True when the L1Sync port is a receive coherent + port."; + reference + "L.5.3.3 of IEEE Std 1588-2019"; + } + + leaf is-congruent { + type boolean; + config false; + description + "True when the L1Sync port is a congruent port."; + reference + "L.5.3.4 of IEEE Std 1588-2019"; + } + + leaf l1sync-state { + type l1sync-state; + config false; + description + "Current state of the L1Sync state machine associated + with this L1Sync port."; + reference + "L.5.3.5 of IEEE Std 1588-2019"; + } + + leaf peer-tx-coherent-is-required { + type boolean; + config false; + description + "Specifies whether this L1Sync port is required + to be a transmit coherent port by a peer, + as indicated in the value of the TCR field of the + most recently received L1_SYNC TLV."; + reference + "L.5.3.6 of IEEE Std 1588-2019"; + } + + leaf peer-rx-coherent-is-required { + type boolean; + config false; + description + "Specifies whether this L1Sync port is required + to be a receive coherent port by a peer, + as indicated in the value of the RCR field of the + most recently received L1_SYNC TLV."; + reference + "L.5.3.7 of IEEE Std 1588-2019"; + } + + leaf peer-congruent-is-required { + type boolean; + config false; + description + "Specifies whether this L1Sync port is required + is required to be a congruent port by a peer, + as indicated in the value of the CR field of the + most recently received L1_SYNC TLV."; + reference + "L.5.3.8 of IEEE Std 1588-2019"; + } + + leaf peer-is-tx-coherent { + type boolean; + config false; + description + "True when the peer L1Sync port is a + transmit coherent port + (as received in the L1_SYNC TLV)."; + reference + "L.5.3.9 of IEEE Std 1588-2019"; + } + + leaf peer-is-rx-coherent { + type boolean; + config false; + description + "True when the peer L1Sync port is a + receive coherent port + (as received in the L1_SYNC TLV)."; + reference + "L.5.3.10 of IEEE Std 1588-2019"; + } + + leaf peer-is-congruent { + type boolean; + config false; + description + "True when the peer L1Sync port is a + congruent port + (as received in the L1_SYNC TLV)."; + reference + "L.5.3.11 of IEEE Std 1588-2019"; + } + } + + container l1-sync-opt-params-port-ds { + if-feature l1-sync; + description + "Provides data for operation of the optional layer-1 + based synchronization performance enhancement feature. + This data is optional when the feature is supported."; + reference + "8.2.24 of IEEE Std 1588-2019 + L.8.4 of IEEE Std 1588-2019"; + + leaf timestamps-corrected-tx { + type boolean; + description + "When true, the L1Sync port shall correct the + transmitted egress timestamps with the known value + of the phase offset, as indicated in the Link + Reference Model."; + reference + "L.8.4.2.1 of IEEE Std 1588-2019"; + } + + leaf phase-offset-tx-valid { + type boolean; + config false; + description + "True if and only if the values of the transmission + phase offset parameters (phase-offset-tx + and phase-offset-tx-timestamp) are valid."; + reference + "L.8.4.3.1 of IEEE Std 1588-2019"; + } + + leaf phase-offset-tx { + type time-interval; + config false; + description + "Transmission phase offset, which is the + time difference between the significant instant + with which the passage of the message timestamp + point through the reference plane is aligned, + and the time represented by the captured + timestamp of this passage of the message."; + reference + "L.8.4.3.3 of IEEE Std 1588-2019"; + } + + container phase-offset-tx-timestamp { + config false; + description + "Transmission phase offset timestamp + for the associated transmission phase offset."; + reference + "L.8.4.3.4 of IEEE Std 1588-2019"; + + uses timestamp; + } + + leaf frequency-offset-tx-valid { + type boolean; + config false; + description + "True if and only if the values of the transmission + frequency offset parameters (frequency-offset-tx + and frequency-offset-tx-timestamp) are valid."; + reference + "L.8.4.3.2 of IEEE Std 1588-2019"; + } + + leaf frequency-offset-tx { + type time-interval; + config false; + description + "Transmission frequency offset, multiplied + by one second. Transmission frequency offset + is the known rate of change of the transmission + phase offset."; + reference + "L.8.4.3.5 of IEEE Std 1588-2019"; + } + + container frequency-offset-tx-timestamp { + config false; + description + "Transmission frequency offset timestamp + for the associated transmission frequency + offset."; + reference + "L.8.4.3.6 of IEEE Std 1588-2019"; + + uses timestamp; + } + } + + container communication-cap-port-ds { + config false; + description + "Provides data for multicast/unicast communication + capabilities."; + reference + "8.2.25 of IEEE Std 1588-2019"; + + container sync { + description + "Communication capabilities of the PTP Port with + respect to sending Sync messages."; + + uses communication-capabilities; + } + + container delay-resp { + description + "Communication capabilities of the PTP Port with + respect to sending Delay_Resp messages."; + + uses communication-capabilities; + } + } + + container performance-monitoring-port-ds { + if-feature performance-monitoring; + description + "Provides data for the optional performance + monitoring mechanism, scoped to each PTP Port."; + reference + "8.2.26 of IEEE Std 1588-2019 + J.5.2 of IEEE Std 1588-2019"; + + list record-list-peer-delay { + key "index"; + max-elements 99; + config false; + description + "List of performance monitoring records for the + PTP Port that is using the peer-to-peer delay + measurement mehanism. The list is organized + as follows: + - 97 15-minute measurement records, the current + record at index 0, followed by the most recent + 96 records. + - 2 24-hour measurement records, the current record + at index 97, and the previous record at index 98. + + If a record is not implemented for a specific index, + management does not return the record. For example, + if only four 15-minute periods are implemented, + a management request for + performance-monitoring-port-ds/ + record-list-peer-delay[6] returns an error. + + If only some of the data is reported, the same index + values are used. As an example, if only the 24-hour + statistics are accessed, the indexes are still + 97 and 98. + + If a specific parameter (e.g. min-mean-link-delay) + is not implemented, management does not return the + parameter (i.e., error). Parameters that are invalid + (not measured correctly) shall be indicated with + one in all bits, except the most significant. This + represents the largest positive value of + time-interval, indicating a value outside the + maximum range."; + reference + "J.5.2.1 of IEEE Std 1588-2019"; + + uses port-performance-monitoring-peer-delay-data-record; + } + + list record-list { + key "index"; + max-elements 99; + config false; + description + "List of performance monitoring records for the + PTP Port, not specific to the peer-to-peer delay + measurement mehanism. The list is organized + as follows: + - 97 15-minute measurement records, the current + record at index 0, followed by the most recent + 96 records. + - 2 24-hour measurement records, the current record + at index 97, and the previous record at index 98. + + If a record is not implemented for a specific index, + management does not return the record. For example, + if only four 15-minute periods are implemented, + a management request for + performance-monitoring-port-ds/record-list[6] + returns an error. + + If only some of the data is reported, the same index + values are used. As an example, if only the 24-hour + statistics are accessed, the indexes are still + 97 and 98. + + If a specific parameter (e.g. sync-tx) + is not implemented, management does not return the + parameter (i.e., error). Parameters that are invalid + (not measured correctly) shall be indicated with + with the value zero, indicating that nothing was + counted. + + Each counter in the record shall be initialized to + zero at the start of a new 15-minute and + 24-hour interval."; + reference + "J.5.2.2 of IEEE Std 1588-2019"; + + uses port-performance-monitoring-data-record; + } + } + + container common-services-port-ds { + description + "Provides management access to the common services, + scoped to each PTP Port."; + reference + "16.6.5 of IEEE Std 1588-2019"; + + leaf cmlds-link-port-port-number { + if-feature cmlds; + type uint16; + config false; + description + "Common services operate on all PTP Instances + of the PTP Node. When a common service has + port-specific behavior, it specifies a Link Port, + which represents the physical port that the service + uses to transport PTP messages. In the context of + such a common service, the PTP Port represents a + logical port. + The Common Mean Link Delay Service (CMLDS) is + port-specific, and this leaf provides the + mapping of the PTP Port of this PTP Instance + to the corresponding Link Port in CMLDS. The + Link Port is identified using an IEEE Std 1588 + portNumber. The corresponding Link Port's + portNumber is located in the hierarchy at + /ptp/common-services/cmlds/ports/port[]/port-ds/ + port-identity/port-number."; + reference + "16.6.5.1.1.1 of IEEE Std 1588-2019"; + } + } + + container external-port-config-port-ds { + if-feature external-port-config; + description + "Provides management access to the external + configuration option, scoped to each PTP Port."; + reference + "17.6.3 of IEEE Std 1588-2019"; + + leaf desired-state { + type port-state; + description + "When the value of + default-ds/external-port-config-enable is true, + this desired-state is used to externally configure + the PTP Port's state (i.e., ../../port-ds/port-state) + to a desired value."; + reference + "17.6.3.2 of IEEE Std 1588-2019"; + } + } + + container slave-monitoring-port-ds { + if-feature slave-monitoring; + description + "Provides management access to the optional + Slave Event Monitor service, scoped to each PTP Port."; + reference + "16.11.6 of IEEE Std 1588-2019"; + + leaf enable { + type bits { + bit slave-rx-sync-timing-data { + position 0; + description + "True activates generation of the + SLAVE_RX_SYNC_TIMING_DATA TLV."; + } + bit slave-rx-sync-computed-data { + position 1; + description + "True activates generation of the + SLAVE_RX_SYNC_COMPUTED_DATA TLV."; + } + bit slave-tx-event-timestamps { + position 2; + description + "True activates generation of the + SLAVE_TX_EVENT_TIMESTAMPS_DATA TLV."; + } + } + description + "Each bit (boolean flag) indicates whether + the data for a corresponding slave event monitoring + TLV is computed, and whether the data is transmitted + by the slave."; + reference + "16.11.6.2 of IEEE Std 1588-2019"; + } + + leaf events-per-rx-sync-timing-tlv { + type uint8; + description + "Indicates the number of events to report per + SLAVE_RX_SYNC_TIMING_DATA TLV."; + reference + "16.11.6.3 of IEEE Std 1588-2019"; + } + + leaf events-per-rx-sync-computed-tlv { + type uint8; + description + "Indicates the number of events to report per + SLAVE_RX_SYNC_COMPUTED_DATA TLV."; + reference + "16.11.6.4 of IEEE Std 1588-2019"; + } + + leaf events-per-tx-timestamps-tlv { + type uint8; + description + "Indicates the number of events to report per + SLAVE_TX_EVENT_TIMESTAMPS_DATA TLV."; + reference + "16.11.6.5 of IEEE Std 1588-2019"; + } + + leaf tx-event-type { + type uint8; + description + "Indicates the event message type selected for + the egress event monitoring. The four low-order + bits are defined to correspond to the + IEEE Std 1588 messageType field."; + reference + "16.11.6.6 of IEEE Std 1588-2019"; + } + + leaf rx-sync-timing-tlv-message-m { + type uint8; + description + "The value M, where M indicates that every Mth + event message is selected for monitoring in the + SLAVE_RX_SYNC_TIMING_DATA TLV. For example, if + the value of M is 4, every fourth event message + is selected for monitoring in the TLV."; + reference + "16.11.6.7 of IEEE Std 1588-2019"; + } + + leaf rx-sync-computed-tlv-message-m { + type uint8; + description + "The value M, where M indicates that every Mth + event message is selected for monitoring in the + SLAVE_RX_SYNC_COMPUTED_DATA TLV. For example, if + the value of M is 4, every fourth event message + is selected for monitoring in the TLV."; + reference + "16.11.6.8 of IEEE Std 1588-2019"; + } + + leaf tx-timestamps-tlv-message-m { + type uint8; + description + "The value M, where M indicates that every Mth + event message is selected for monitoring in the + SLAVE_TX_EVENT_TIMESTAMPS_DATA TLV. For example, if + the value of M is 4, every fourth event message + is selected for monitoring in the TLV."; + reference + "16.11.6.9 of IEEE Std 1588-2019"; + } + } + } + } + } + } + + container transparent-clock-default-ds { + status deprecated; + description + "This default data set was specified in + IEEE Std 1588-2008, and under some interpretations, + it applied to all domains, which in turn means that it + represents multiple Transparent Clocks. + In IEEE Std 1588-2019, this data set is specified as + applying to the PTP Node (all domains), but the data set is + deprecated. For new designs, the standard recommends that + Transparent Clocks use the PTP Instance data sets + (i.e., /ptp/instances/instance[]), such that each + Transparent Clock supports a single PTP Instance and + domain."; + reference + "8.3.1 of IEEE Std 1588-2019"; + + leaf clock-identity { + type clock-identity; + config false; + status deprecated; + description + "The clockIdentity of the local clock."; + reference + "8.3.2.2.1 of IEEE Std 1588-2019"; + } + + leaf number-ports { + type uint16; + config false; + status deprecated; + description + "The number of PTP Ports of the device."; + reference + "8.3.2.2.2 of IEEE Std 1588-2019"; + } + + leaf delay-mechanism { + type delay-mechanism; + status deprecated; + description + "The propagation delay measuring mechanism (e2e or p2p)."; + reference + "8.3.2.3.1 of IEEE Std 1588-2019"; + } + + leaf primary-domain { + type uint8; + status deprecated; + description + "The domainNumber of the primary syntonization domain."; + reference + "8.3.2.3.2 of IEEE Std 1588-2019"; + } + } + + container transparent-clock-ports { + status deprecated; + description + "YANG container that is used to get all ports of the + IEEE Std 1588 transparentClockPortDS. + YANG does not allow get of all elements in a YANG list, + so a YANG container wrapping the YANG list is provided for + that purpose. The naming convention uses plural for the + wrapping YANG container, and singular for the YANG list."; + + list port { + key "port-index"; + status deprecated; + description + "This list of Transparent Clock port data sets was specified + in IEEE Std 1588-2008, and under some interpretations, + it applied to all domains, which in turn means that it + represents multiple Transparent Clocks. + In IEEE Std 1588-2019, this list is specified as + applying to the PTP Node (all domains), but the list is + deprecated. For new designs, the standard recommends that + Transparent Clocks use the PTP Instance data sets + (i.e., /ptp/instances/instance[]), such that each + Transparent Clock supports a single PTP Instance + and domain."; + reference + "8.3.1 of IEEE Std 1588-2019"; + + leaf port-index { + type uint16; + description + "The port list is indexed using a number that is + unique per port within the Transparent Clock, + applicable to the management context only + (i.e., not used in PTP messages)."; + } + + leaf underlying-interface { + type if:interface-ref; + description + "Reference to the configured underlying IETF YANG + interface that is used by this port for + transport of PTP messages. Among other data, + physical identifiers for the interface + (e.g. MAC address) can be obtained using this + reference."; + reference + "RFC 8343"; + } + + container port-ds { + description + "IEEE Std 1588 transparentClockPortDS."; + reference + "8.3.3 of IEEE Std 1588-2019"; + + container port-identity { + config false; + status deprecated; + description + "The IEEE Std 1588 portIdentity of this port."; + reference + "8.3.3.2.1 of IEEE Std 1588-2019"; + uses port-identity; + } + + leaf log-min-pdelay-req-interval { + type int8; + status deprecated; + description + "The logarithm to the base 2 of the + minPdelayReqInterval (minimum permitted mean time + interval between successive Pdelay_Req messages)."; + reference + "8.3.3.3.1 of IEEE Std 1588-2019"; + } + + leaf faulty-flag { + type boolean; + status deprecated; + description + "Shall be true if the port is faulty and false + if the port is operating normally."; + reference + "8.3.3.3.2 of IEEE Std 1588-2019"; + } + + leaf peer-mean-path-delay { + type time-interval; + config false; + status deprecated; + description + "An estimate of the current one-way propagation delay + on the link when the delayMechanism is P2P; otherwise, + it is zero."; + reference + "8.3.3.3.3 of IEEE Std 1588-2019"; + } + } + } + } + + container common-services { + description + "Provides management access to the common services. + Common services operate on all PTP Instances + of the PTP Node."; + + container cmlds { + if-feature cmlds; + description + "The Common Mean Link Delay Service (CMLDS) is an + optional service that enables any PTP Port that would + normally obtain the value of a link's + and using the peer-to-peer method + to instead obtain these values from this optional service. + The CMLDS service is available to all PTP Instances + communicating with a specific transport mechanism, + e.g. using Annex F, over the physical link between two PTP + Nodes. + + In this option, the term Link Port refers to the mechanism + enabling communication with a specific transport mechanism, + e.g. using Annex F, over the physical link between two PTP + Nodes. + + The Common Mean Link Delay Service is designed to run + independently from any PTP Instances communicating + over a Link Port. The service provides information on the + as well as the as the + measured in the timescale used by the service. The service + runs on every Link Port where the CMLDS is present. + Information required by a PTP Port is requested from and + delivered by the service running on the associated + Link Port."; + reference + "16.6.4 of IEEE Std 1588-2019"; + + container default-ds { + description + "The default data set of CMLDS."; + reference + "16.6.4.1 of IEEE Std 1588-2019"; + + leaf clock-identity { + type clock-identity; + config false; + description + "The IEEE Std 1588 clockIdentity used by CMLDS."; + reference + "16.6.4.1.2.1 of IEEE Std 1588-2019"; + } + + leaf number-link-ports { + type uint16; + config false; + description + "The number of Link Ports of CMLDS."; + reference + "16.6.4.1.2.2 of IEEE Std 1588-2019"; + } + } + + container ports { + description + "YANG container that is used to get all Link Ports + of CMLDS. + YANG does not allow get of all elements in a YANG list, + so a YANG container wrapping the YANG list is provided for + that purpose. The naming convention uses plural for the + wrapping YANG container, and singular for the YANG list."; + + list port { + key "port-index"; + description + "List of data for each Link Port of CMLDS. + The list is structured as leafs for each member + of the IEEE Std 1588 cmldsLinkPortDS (primary + Link Port data set), followed by containers for + each optional Link Port data set. Members of data set + cmldsLinkPortDS.commonMeanLinkDelayInformation + are listed directly under the list, in order + to keep the YANG naming hierarchy as short as + possible."; + reference + "16.6.4.2 of IEEE Std 1588-2019"; + + leaf port-index { + type uint16; + description + "The port list is indexed using a number that is + unique per Link Port within the CMLDS, applicable + to the management context only (i.e. not used in PTP + messages)."; + } + + leaf underlying-interface { + type if:interface-ref; + description + "Reference to the configured underlying IETF YANG + interface that is used by this Link Port for + transport of PTP messages. Among other data, + physical identifiers for the interface + (e.g. MAC address) can be obtained using this + reference."; + reference + "RFC 8343"; + } + + container link-port-ds { + description + "The IEEE Std 1588 cmldsLinkPortDS of this Link Port."; + reference + "16.6.4.2 of IEEE Std 1588-2019"; + + container port-identity { + config false; + description + "The IEEE Std 1588 portIdentity of this Link Port."; + reference + "16.6.4.2.2.1 of IEEE Std 1588-2019"; + uses port-identity; + } + + leaf domain-number { + type uint8; + config false; + description + "The IEEE Std 1588 domainNumber used by this + Link Port. This domain number is not configurable, + since its value is determined by the transport + mechanism of the Link Port."; + reference + "16.6.4.2.2.2 of IEEE Std 1588-2019"; + } + + leaf service-measurement-valid { + type boolean; + config false; + description + "This boolean is initialized to false, and will + be false whenever the required PTP messages for + CMLDS are not received on the Link Port. When + the required PTP messages for CMLDS are received, + this boolean is true. + This value is obtained from the + CommonMeanLinkDelayInformation structure returned + by CMLDS."; + reference + "16.6.3.2 of IEEE Std 1588-2019"; + } + + leaf mean-link-delay { + type time-interval; + config false; + description + "Estimate of the current one-way propagation delay + on the PTP Link, i.e., , attached + to this Link Port, computed using the peer-to-peer + delay mechanism. + This value is obtained from the + CommonMeanLinkDelayInformation structure returned + by CMLDS."; + reference + "16.6.3.2 of IEEE Std 1588-2019"; + } + + leaf scaled-neighbor-rate-ratio { + type int32; + config false; + description + "Ratio of the rate of this PTP Node's clock to + the clock of its neighbor attached + to this Link Port, i.e., , + scaled as specified in the standard. + This value is obtained from the + CommonMeanLinkDelayInformation structure returned + by CMLDS."; + reference + "16.6.3.2 of IEEE Std 1588-2019"; + } + + leaf log-min-pdelay-req-interval { + type int8; + description + "Logarithm to the base 2 of the IEEE Std 1588 + minPdelayReqInterval, the minimum permitted + mean time interval between successive Pdelay_Req + messages sent by CMLDS."; + reference + "16.6.4.2.4.1 of IEEE Std 1588-2019"; + } + + leaf version-number { + type uint8; + description + "The PTP major version in use on the Link Port. + NOTE - This indicates the version of the + IEEE 1588 standard, and not the version of an + applicable PTP Profile."; + reference + "16.6.4.2.4.2 of IEEE Std 1588-2019"; + } + + leaf minor-version-number { + type uint8; + description + "The PTP minor version in use on the Link Port. + NOTE - This indicates the version of the + IEEE 1588 standard, and not the version of an + applicable PTP Profile."; + reference + "16.6.4.2.4.3 of IEEE Std 1588-2019"; + } + + leaf delay-asymmetry { + type time-interval; + description + "The value of IEEE Std 1588 + applicable to the Link Port, which is the + difference in transmission time in one direction + as compared to the opposite direction."; + reference + "7.4.2 of IEEE Std 1588-2019 + 16.6.4.2.4.4 of IEEE Std 1588-2019"; + } + } + + container timestamp-correction-port-ds { + if-feature timestamp-correction; + description + "Provides access to the configurable correction of + timestamps provided to the PTP protocol."; + reference + "16.6.4.3 of IEEE Std 1588-2019"; + + leaf egress-latency { + type time-interval; + description + "Interval between the + provided for a PTP message and the time at which + the message timestamp point of the PTP message + crosses the reference plane."; + reference + "7.3.4.2 of IEEE Std 1588-2019 + 8.2.16.2 of IEEE Std 1588-2019"; + } + + leaf ingress-latency { + type time-interval; + description + "Interval between the time the message timestamp + point of an ingress PTP message crosses the + reference plane and the + provided for the PTP message."; + reference + "7.3.4.2 of IEEE Std 1588-2019 + 8.2.16.3 of IEEE Std 1588-2019"; + } + } + + container asymmetry-correction-port-ds { + if-feature asymmetry-correction; + description + "Provides access to asymmetry correction parameters + that are used to compute the value of ."; + reference + "16.6.4.4 of IEEE Std 1588-2019"; + + leaf enable { + type boolean; + description + "When this value is true, the mechanism to calculate + for certain media is enabled on + this PTP Port. When this value is false, this + mechanism is disabled on this PTP Port."; + reference + "8.2.17.4 of IEEE Std 1588-2019"; + } + + leaf constant-asymmetry { + type time-interval; + description + "Constant asymmetry used to fine adjust the + dynamically calculated value of , + when the mechanism to calculate + or certain media is enabled."; + reference + "8.2.17.2 of IEEE Std 1588-2019"; + } + + leaf scaled-delay-coefficient { + type relative-difference; + description + "This is the ."; + reference + "8.2.17.3 of IEEE Std 1588-2019"; + } + } + + container performance-monitoring-port-ds { + if-feature performance-monitoring; + description + "Provides data for the optional performance + monitoring mechanism, scoped to each Link Port."; + reference + "16.6.4.5 of IEEE Std 1588-2019"; + + list record-list-peer-delay { + key "index"; + max-elements 99; + config false; + description + "List of performance monitoring records for the + Link Port that is using the peer-to-peer delay + measurement mehanism. The list is organized + as follows: + - 97 15-minute measurement records, the current + record at index 0, followed by the most recent + 96 records. + - 2 24-hour measurement records, the current record + at index 97, and the previous record at index 98. + + If a record is not implemented for a specific index, + management does not return the record. For example, + if only four 15-minute periods are implemented, + a management request for + performance-monitoring-port-ds/ + record-list-peer-delay[6] returns an error. + + If only some of the data is reported, the same index + values are used. As an example, if only the 24-hour + statistics are accessed, the indexes are still + 97 and 98. + + If a specific parameter (e.g. min-mean-link-delay) + is not implemented, management does not return the + parameter (i.e., error). Parameters that are invalid + (not measured correctly) shall be indicated with + one in all bits, except the most significant. This + represents the largest positive value of + time-interval, indicating a value outside the + maximum range."; + reference + "J.5.2.1 of IEEE Std 1588-2019"; + + uses port-performance-monitoring-peer-delay-data-record; + } + + list record-list { + key "index"; + max-elements 99; + config false; + description + "List of performance monitoring records for the + Link Port, not specific to the peer-to-peer delay + measurement mehanism. The list is organized + as follows: + - 97 15-minute measurement records, the current + record at index 0, followed by the most recent + 96 records. + - 2 24-hour measurement records, the current record + at index 97, and the previous record at index 98. + + If a record is not implemented for a specific index, + management does not return the record. For example, + if only four 15-minute periods are implemented, + a management request for + performance-monitoring-port-ds/record-list[6] + returns an error. + + If only some of the data is reported, the same index + values are used. As an example, if only the 24-hour + statistics are accessed, the indexes are still + 97 and 98. + + If a specific parameter (e.g. sync-tx) + is not implemented, management does not return the + parameter (i.e., error). Parameters that are invalid + (not measured correctly) shall be indicated with + with the value zero, indicating that nothing was + counted. + + Each counter in the record shall be initialized to + zero at the start of a new 15-minute and + 24-hour interval."; + reference + "J.5.2.2 of IEEE Std 1588-2019"; + + uses port-performance-monitoring-data-record; + } + } + } + } + } + } + } +} diff --git a/standard/ieee/ieee802-dot1as-ptp.yang b/standard/ieee/ieee802-dot1as-ptp.yang new file mode 100644 index 0000000..75714f9 --- /dev/null +++ b/standard/ieee/ieee802-dot1as-ptp.yang @@ -0,0 +1,1380 @@ +module ieee802-dot1as-ptp { + yang-version 1.1; + namespace urn:ieee:std:802.1AS:yang:ieee802-dot1as-ptp; + prefix dot1as-ptp; + + import ietf-yang-types { + prefix yang; + } + import ieee1588-ptp { + prefix ptp; + } + + organization + "IEEE 802.1 Working Group"; + contact + "WG-URL: http://ieee802.org/1/ + WG-EMail: stds-802-1-l@ieee.org + + Contact: IEEE 802.1 Working Group Chair + Postal: C/O IEEE 802.1 Working Group + IEEE Standards Association + 445 Hoes Lane + Piscataway, NJ 08854 + USA + + E-mail: stds-802-1-chairs@ieee.org"; + description + "Management objects that control timing and synchronization + for time sensitive applications, as specified in + IEEE Std 802.1AS-2020. + + Copyright (C) IEEE (2022). + This version of this YANG module is part of IEEE Std 802.1AS; + see the standard itself for full legal notices."; + + revision 2023-04-04 { + description + "Published as part of IEEE Std 802.1ASdn-XXXX. + Initial version."; + reference + "IEEE Std 802.1ASdn-XXXX - YANG Data Model"; + } + // The year (XXXX) will be replaced during publication. + // This is the 4th balloted draft D1.1 + // of the YANG module for amendment IEEE P802.1ASdn. + + typedef scaled-ns { + type string { + pattern "[0-9A-F]{2}(-[0-9A-F]{2}){11}"; + } + description + "The IEEE Std 802.1AS ScaledNs type represents + signed values of time and time interval in units + of 2^16 ns, as a signed 96-bit integer. + YANG does not support a signed 96-bit integer. + Each of the 12 octets is represented in YANG as a pair of + hexadecimal characters, using uppercase for a letter. + Each octet in the array is separated by the dash + character. The most significant octet is first."; + reference + "6.4.3.1 of IEEE Std 802.1AS-2020"; + } + + typedef uscaled-ns { + type string { + pattern "[0-9A-F]{2}(-[0-9A-F]{2}){11}"; + } + description + "The IEEE Std 802.1AS UScaledNs type represents + unsigned values of time and time interval in units + of 2^16 ns, as an unsigned 96-bit integer. + YANG does not support an unsigned 96-bit integer. + Each of the 12 octets is represented in YANG as a pair of + hexadecimal characters, using uppercase for a letter. + Each octet in the array is separated by the dash + character. The most significant octet is first."; + reference + "6.4.3.2 of IEEE Std 802.1AS-2020"; + } + + typedef float64 { + type string { + pattern "[0-9A-F]{2}(-[0-9A-F]{2}){7}"; + } + description + "The IEEE Std 802.1AS Float64 type represents + IEEE Std 754 binary64 (64-bit + double-precision floating-point format). + YANG does not support floating-point, + Each of the 8 octets is represented in YANG as a pair of + hexadecimal characters, using uppercase for a letter. + Each octet in the array is separated by the dash + character. The most significant octet is first."; + reference + "6.4.2 of IEEE Std 802.1AS-2020"; + } + + augment "/ptp:ptp/ptp:instances/ptp:instance/ptp:default-ds" { + description + "Augment IEEE Std 1588 defaultDS."; + + leaf gm-capable { + type boolean; + config false; + description + "The value is true if the time-aware system is capable + of being a grandmaster, and false if the time-aware + system is not capable of being a grandmaster."; + reference + "14.2.7 of IEEE Std 802.1AS-2020"; + } + + leaf current-utc-offset { + when "../current-utc-offset-valid='true'"; + type int16; + config false; + description + "Offset from UTC (TAI - UTC). + The offset is in units of seconds. + This leaf applies to the ClockTimeTransmitter entity + (i.e., local only, unrelated to a remote GM)."; + reference + "14.2.8 of IEEE Std 802.1AS-2020"; + } + + leaf current-utc-offset-valid { + type boolean; + config false; + description + "The value of current-utc-offset-valid shall be true + if the value of current-utc-offset is known to be + correct, otherwise it shall be false. + This leaf applies to the ClockTimeTransmitter entity + (i.e., local only, unrelated to a remote GM)."; + reference + "14.2.9 of IEEE Std 802.1AS-2020"; + } + + leaf leap59 { + type boolean; + config false; + description + "If the timescale is PTP, a true value for leap59 + shall indicate that the last minute of the + current UTC day contains 59 seconds. + If the timescale is not PTP, the value shall be + false. + This leaf applies to the ClockTimeTransmitter entity + (i.e., local only, unrelated to a remote GM)."; + reference + "14.2.10 of IEEE Std 802.1AS-2020"; + } + + leaf leap61 { + type boolean; + config false; + description + "If the timescale is PTP, a true value for leap61 + shall indicate that the last minute of the + current UTC day contains 61 seconds. + If the timescale is not PTP, the value shall be + false. + This leaf applies to the ClockTimeTransmitter entity + (i.e., local only, unrelated to a remote GM)."; + reference + "14.2.11 of IEEE Std 802.1AS-2020"; + } + + leaf time-traceable { + type boolean; + config false; + description + "The value of time-traceable shall be true if the + timescale is traceable to a primary reference; + otherwise, the value shall be false. + This leaf applies to the ClockTimeTransmitter entity + (i.e., local only, unrelated to a remote GM)."; + reference + "14.2.12 of IEEE Std 802.1AS-2020"; + } + + leaf frequency-traceable { + type boolean; + config false; + description + "The value of frequency-traceable shall be true if + the frequency determining the timescale is traceable + to a primary reference; otherwise, the value shall + be false. + This leaf applies to the ClockTimeTransmitter entity + (i.e., local only, unrelated to a remote GM)."; + reference + "14.2.13 of IEEE Std 802.1AS-2020"; + } + + leaf ptp-timescale { + type boolean; + config false; + description + "If ptp-timescale is true, the timescale of + the ClockTimeTransmitter entity is PTP, which is + the elapsed time since the PTP epoch measured + using the second defined by International Atomic + Time (TAI). + If ptp-timescale is false, the timescale of + the ClockTimeTransmitter entity is ARB, which is + the elapsed time since an arbitrary epoch. + This leaf applies to the ClockTimeTransmitter entity + (i.e., local only, unrelated to a remote GM)."; + reference + "14.2.14 of IEEE Std 802.1AS-2020"; + } + + leaf time-source { + type identityref { + base ptp:time-source; + } + config false; + description + "The source of time used by the Grandmaster Clock + This leaf applies to the ClockTimeTransmitter entity + (i.e., local only, unrelated to a remote GM)."; + reference + "14.2.15 of IEEE Std 802.1AS-2020"; + } + } + + augment "/ptp:ptp/ptp:instances/ptp:instance/ptp:current-ds" { + description + "Augment IEEE Std 1588 currentDS."; + + leaf last-gm-phase-change { + type scaled-ns; + config false; + description + "Phase change that occurred on the most recent + change in either the Grandmaster PTP Instance + or gm-timebase-indicator leaf."; + reference + "14.3.4 of IEEE Std 802.1AS-2020"; + } + + leaf last-gm-freq-change { + type float64; + config false; + description + "Frequency change that occurred on the most recent + change in either the Grandmaster PTP Instance + or gm-timebase-indicator leaf."; + reference + "14.3.5 of IEEE Std 802.1AS-2020"; + } + + leaf gm-timebase-indicator { + type uint16; + config false; + description + "The timeBaseIndicator of the current + Grandmaster PTP Instance."; + reference + "14.3.6 of IEEE Std 802.1AS-2020"; + } + + leaf gm-change-count { + type yang:counter32; + config false; + description + "This statistics counter tracks the number of times + the Grandmaster PTP Instance has changed in a + gPTP domain."; + reference + "14.3.7 of IEEE Std 802.1AS-2020"; + } + + leaf time-of-last-gm-change { + type yang:timestamp; + config false; + description + "System time when the most recent Grandmaster Clock + change occurred in a gPTP domain. + This leaf's type is YANG timestamp, which is based + on system time. System time is an unsigned integer + in units of 10 milliseconds, using an epoch defined + by the implementation (typically time of boot-up)."; + reference + "14.3.8 of IEEE Std 802.1AS-2020"; + } + + leaf time-of-last-phase-change { + type yang:timestamp; + config false; + description + "System time when the most recent change in Grandmaster + Clock phase occurred. + This leaf's type is YANG timestamp, which is based + on system time. System time is an unsigned integer + in units of 10 milliseconds, using an epoch defined + by the implementation (typically time of boot-up)."; + reference + "14.3.9 of IEEE Std 802.1AS-2020"; + } + + leaf time-of-last-freq-change { + type yang:timestamp; + config false; + description + "System time when the most recent change in Grandmaster + Clock frequency occurred. + This leaf's type is YANG timestamp, which is based + on system time. System time is an unsigned integer + in units of 10 milliseconds, using an epoch defined + by the implementation (typically time of boot-up)."; + reference + "14.3.10 of IEEE Std 802.1AS-2020"; + } + } + + augment "/ptp:ptp/ptp:instances/ptp:instance/ptp:parent-ds" { + description + "Augment IEEE Std 1588 parentDS."; + + leaf cumulative-rate-ratio { + type int32; + config false; + description + "Estimate of the ratio of the frequency of the Grandmaster + Clock to the frequency of the LocalClock entity of this + PTP Instance. cumulative-rate-ratio is expressed as + the fractional frequency offset multiplied by 2^41, + i.e., the quantity (rateRatio - 1.0)(2^41)."; + reference + "14.4.3 of IEEE Std 802.1AS-2020"; + } + } + + augment "/ptp:ptp/ptp:instances/ptp:instance/ptp:ports/ptp:port/ptp:port-ds" { + description + "Augment IEEE Std 1588 portDS. + + 14.8.4 of IEEE Std 802.1AS-2020 specifies ptpPortEnabled + (ptp-port-enabled), which is provided in YANG as the + semantically equivalent node in ieee1588-ptp named + port-enable (in port-ds). + + 14.8.15 of IEEE Std 802.1AS-2020 specifies + mgtSettableLogAnnounceInterval + (mgt-settable-log-announce-interval), which is provided in + YANG as the semantically equivalent node in ieee1588-ptp named + log-announce-interval (in port-ds). In the context of + IEEE Std 802.1AS, log-announce-interval cannot be used + unless use-mgt-log-announce-interval is true. + + 14.8.20 of IEEE Std 802.1AS-2020 specifies + mgtSettableLogSyncInterval + (mgt-settable-log-sync-interval), which is provided in YANG + as the semantically equivalent node in ieee1588-ptp named + log-sync-interval (in port-ds). In the context of + IEEE Std 802.1AS, log-sync-interval cannot be used + unless use-mgt-log-sync-interval is true."; + + leaf is-measuring-delay { + type boolean; + config false; + description + "Boolean that is true if the port is measuring + PTP Link propagation delay."; + reference + "14.8.6 of IEEE Std 802.1AS-2020"; + } + + leaf as-capable { + type boolean; + config false; + description + "Boolean that is true if and only if it is determined + that this PTP Instance and the PTP Instance at the + other end of the link attached to this port can + interoperate with each other via the IEEE Std + 802.1AS protocol."; + reference + "10.2.5.1 of IEEE Std 802.1AS-2020 + 14.8.7 of IEEE Std 802.1AS-2020"; + } + + leaf mean-link-delay-thresh { + type ptp:time-interval; + description + "Propagation time threshold for mean-link-delay, + above which a port is not considered capable of + participating in the IEEE Std 802.1AS protocol."; + reference + "14.8.9 of IEEE Std 802.1AS-2020"; + } + + leaf neighbor-rate-ratio { + type int32; + config false; + description + "Estimate of the ratio of the frequency of the LocalClock + entity of the PTP Instance at the other end of the + link attached to this PTP Port, to the frequency of the + LocalClock entity of this PTP Instance. + neighbor-rate-ratio is expressed as the fractional + frequency offset multiplied by 2^41, + i.e., the quantity (rateRatio - 1.0)(2^41)."; + reference + "14.8.11 of IEEE Std 802.1AS-2020"; + } + + leaf initial-log-announce-interval { + type int8; + description + "When use-mgt-log-announce-interval is false + (i.e., change with Signaling message), this is the + the logarithm to base 2 of the announce + interval used when the port is initialized."; + reference + "14.8.12 of IEEE Std 802.1AS-2020"; + } + + leaf current-log-announce-interval { + type int8; + config false; + description + "Logarithm to base 2 of the current + announce interval."; + reference + "14.8.13 of IEEE Std 802.1AS-2020"; + } + + leaf use-mgt-log-announce-interval { + type boolean; + description + "Boolean that determines the source of the + announce interval. + If the value is true, the announce interval + (current-log-announce-interval) is set equal to the value + of mgt-log-announce-interval. + If the value is false, the announce interval is determined + by the AnnounceIntervalSetting state machine (i.e., changed + with Signaling message)."; + reference + "14.8.14 of IEEE Std 802.1AS-2020"; + } + + leaf initial-log-sync-interval { + type int8; + description + "When use-mgt-log-sync-interval is false + (i.e., change with Signaling message), this is the + the logarithm to base 2 of the sync + interval used when the port is initialized."; + reference + "14.8.17 of IEEE Std 802.1AS-2020"; + } + + leaf current-log-sync-interval { + type int8; + config false; + description + "Logarithm to base 2 of the current sync + interval."; + reference + "14.8.18 of IEEE Std 802.1AS-2020"; + } + + leaf use-mgt-log-sync-interval { + type boolean; + description + "Boolean that determines the source of the + sync interval. + If the value is true, the sync interval + (current-log-sync-interval) is set equal to the value + of mgt-log-sync-interval. + If the value is false, the sync interval is determined + by the SyncIntervalSetting state machine (i.e., changed + with Signaling message)."; + reference + "14.8.19 of IEEE Std 802.1AS-2020"; + } + + leaf sync-receipt-timeout { + type uint8; + description + "Number of sync intervals that a timeReceiver port waits + without receiving synchronization information, before + assuming that the timeTransmitter is no longer transmitting + synchronization information and that the BTCA needs to be + run, if appropriate."; + reference + "14.8.21 of IEEE Std 802.1AS-2020"; + } + + leaf sync-receipt-timeout-interval { + type uscaled-ns; + config false; + description + "Time interval after which sync receipt timeout occurs + if time-synchronization information has not been + received during the interval."; + reference + "14.8.22 of IEEE Std 802.1AS-2020"; + } + + leaf initial-log-pdelay-req-interval { + type int8; + description + "When use-mgt-log-pdelay-req-interval is false + (i.e., change with Signaling message), this is the + the logarithm to base 2 of the Pdelay_Req transmit + interval used when the port is initialized."; + reference + "14.8.23 of IEEE Std 802.1AS-2020"; + } + + leaf current-log-pdelay-req-interval { + type int8; + config false; + description + "Logarithm to base 2 of the current Pdelay_Req transmit + interval."; + reference + "14.8.24 of IEEE Std 802.1AS-2020"; + } + + leaf use-mgt-log-pdelay-req-interval { + type boolean; + description + "Boolean that determines the source of the + Pdelay_Req transmit interval. + If the value is true, the Pdelay_Req transmit interval + (current-log-pdelay-req-interval) is set equal to the value + of mgt-log-pdelay-req-interval. + If the value is false, the Pdelay_Req transmit interval is + determined by the LinkDelayIntervalSetting state machine + (i.e., changed with Signaling message)."; + reference + "14.8.25 of IEEE Std 802.1AS-2020"; + } + + leaf mgt-log-pdelay-req-interval { + type int8; + description + "Logarithm to base 2 of the Pdelay_Req transmit interval, + used if use-mgt-log-pdelay-req-interval is true. + This value is not used if use-mgt-log-pdelay-req-interval + is false."; + reference + "14.8.26 of IEEE Std 802.1AS-2020"; + } + + leaf initial-log-gptp-cap-interval { + type int8; + description + "When use-mgt-log-gptp-cap-interval is false + (i.e., change with Signaling message), this is the + the logarithm to base 2 of the gPTP capable message + interval used when the port is initialized."; + reference + "14.8.27 of IEEE Std 802.1AS-2020"; + } + + leaf current-log-gptp-cap-interval { + type int8; + config false; + description + "Logarithm to base 2 of the current gPTP capable message + interval."; + reference + "14.8.28 of IEEE Std 802.1AS-2020"; + } + + leaf use-mgt-log-gptp-cap-interval { + type boolean; + description + "Boolean that determines the source of the + gPTP capable message interval. + If the value is true, the gPTP capable message interval + (current-log-gptp-cap-interval) is set equal to the value + of mgt-gptp-cap-req-interval. + If the value is false, the gPTP capable message interval is + determined by the GptpCapableMessageIntervalSetting + state machine (i.e., changed with Signaling message)."; + reference + "14.8.29 of IEEE Std 802.1AS-2020"; + } + + leaf mgt-log-gptp-cap-interval { + type int8; + description + "Logarithm to base 2 of the gPTP capable message interval, + used if use-mgt-log-gptp-cap-interval is true. + This value is not used if use-mgt-log-pdelay-req-interval + is false."; + reference + "14.8.30 of IEEE Std 802.1AS-2020"; + } + + leaf initial-compute-rate-ratio { + type int8; + description + "When use-mgt-compute-rate-ratio is false + (i.e., change with Signaling message), this is the + initial value of computeNeighborRateRatio."; + reference + "14.8.31 of IEEE Std 802.1AS-2020"; + } + + leaf current-compute-rate-ratio { + type int8; + config false; + description + "Current value of computeNeighborRateRatio."; + reference + "14.8.32 of IEEE Std 802.1AS-2020"; + } + + leaf use-mgt-compute-rate-ratio { + type boolean; + description + "Boolean that determines the source of + computeNeighborRateRatio.. + If the value is true, computeNeighborRateRatio + is set equal to the value of mgt-compute-rate-ratio. + If the value is false, computeNeighborRateRatio is + determined by the LinkDelayIntervalSetting + state machine (i.e., changed with Signaling message)."; + reference + "14.8.33 of IEEE Std 802.1AS-2020"; + } + + leaf mgt-compute-rate-ratio { + type int8; + description + "Value of computeNeighborRateRatio, used if + use-mgt-compute-rate-ratio is true. + This value is not used if use-mgt-compute-rate-ratio + is false."; + reference + "14.8.34 of IEEE Std 802.1AS-2020"; + } + + leaf initial-compute-mean-link-delay { + type int8; + description + "When use-mgt-compute-mean-link-delay is false + (i.e., change with Signaling message), this is the + initial value of computeMeanLinkDelay."; + reference + "14.8.35 of IEEE Std 802.1AS-2020"; + } + + leaf current-compute-mean-link-delay { + type int8; + config false; + description + "Current value of computeMeanLinkDelay."; + reference + "14.8.36 of IEEE Std 802.1AS-2020"; + } + + leaf use-mgt-compute-mean-link-delay { + type boolean; + description + "Boolean that determines the source of + computeMeanLinkDelay. + If the value is true, computeMeanLinkDelay + is set equal to the value of mgt-compute-mean-link-delay. + If the value is false, computeMeanLinkDelay is + determined by the LinkDelayIntervalSetting + state machine (i.e., changed with Signaling message)."; + reference + "14.8.37 of IEEE Std 802.1AS-2020"; + } + + leaf mgt-compute-mean-link-delay { + type int8; + description + "Value of computeMeanLinkDelay, used if + use-mgt-compute-mean-link-delay is true. + This value is not used if use-mgt-compute-mean-link-delay + is false."; + reference + "14.8.38 of IEEE Std 802.1AS-2020"; + } + + leaf allowed-lost-responses { + type uint8; + description + "Number of Pdelay_Req messages for which a valid response + is not received, above which a port is considered to not + be exchanging peer delay messages with its neighbor."; + reference + "14.8.39 of IEEE Std 802.1AS-2020"; + } + + leaf allowed-faults { + type uint8; + description + "Number of faults above which asCapable is set to false."; + reference + "14.8.40 of IEEE Std 802.1AS-2020"; + } + + leaf gptp-cap-receipt-timeout { + type uint8; + description + "Number of transmission intervals that a port waits without + receiving the gPTP capable TLV, before assuming that the + neighbor port is no longer invoking the gPTP protocol."; + reference + "14.8.41 of IEEE Std 802.1AS-2020"; + } + + leaf nup { + type float64; + description + "For an OLT port of an IEEE Std 802.3 EPON link, this value + is the effective index of refraction for the EPON + upstream wavelength light of the optical path"; + reference + "14.8.43 of IEEE Std 802.1AS-2020"; + } + + leaf ndown { + type float64; + description + "For an OLT port of an IEEE 802.3 EPON link, this value + is the effective index of refraction for the EPON + downstream wavelength light of the optical path"; + reference + "14.8.44 of IEEE Std 802.1AS-2020"; + } + + leaf one-step-tx-oper { + type boolean; + config false; + description + "This value is true if the port is sending one-step + Sync messages, and false if the port is sending + two-step Sync and Follow-Up messages."; + reference + "14.8.45 of IEEE Std 802.1AS-2020"; + } + + leaf one-step-receive { + type boolean; + config false; + description + "This value is true if the port is capable of + receiving and processing one-step Sync messages."; + reference + "14.8.46 of IEEE Std 802.1AS-2020"; + } + + leaf one-step-transmit { + type boolean; + config false; + description + "This value is true if the port is capable of + transmitting one-step Sync messages."; + reference + "14.8.47 of IEEE Std 802.1AS-2020"; + } + + leaf initial-one-step-tx-oper { + type int8; + description + "When use-mgt-one-step-tx-oper is false + (i.e., change with Signaling message), this is the + initial value of current-one-step-tx-oper."; + reference + "14.8.48 of IEEE Std 802.1AS-2020"; + } + + leaf current-one-step-tx-oper { + type int8; + config false; + description + "This value is true if the port is configured to + transmit one-step Sync messages, either via management + (mgt-one-step-tx-oper) or Signaling. If both + current-one-step-tx-oper and one-step-transmit + are true, the port transmits one-step Sync messages + (i.e., one-step-tx-oper true)."; + reference + "14.8.49 of IEEE Std 802.1AS-2020"; + } + + leaf use-mgt-one-step-tx-oper { + type boolean; + description + "Boolean that determines the source of + current-one-step-tx-oper. + If the value is true, current-one-step-tx-oper + is set equal to the value of mgt-one-step-tx-oper. + If the value is false, current-one-step-tx-oper is + determined by the OneStepTxOperSetting + state machine (i.e., changed with Signaling message)."; + reference + "14.8.50 of IEEE Std 802.1AS-2020"; + } + + leaf mgt-one-step-tx-oper { + type int8; + description + "If use-mgt-one-step-tx-oper is true, + current-one-step-tx-oper is set equal to this value. + This value is not used if use-mgt-one-step-tx-oper + is false."; + reference + "14.8.51 of IEEE Std 802.1AS-2020"; + } + + leaf sync-locked { + type boolean; + config false; + description + "This value is true if the port will transmit a Sync as + soon as possible after the timeReceiver port receives a Sync + message."; + reference + "14.8.52 of IEEE Std 802.1AS-2020"; + } + + leaf-list pdelay-truncated-timestamps { + type uint64 { + range "0..281474976710655"; + } + config false; + description + "For full-duplex IEEE Std 802.3 media, and CSN media that use + the peer-to-peer delay mechanism to measure path delay, + the values of the four elements of this leaf-list correspond + to the timestamps t1, t2, t3, and t4, listed in that order. + Each timestamp is expressed in units of 2^-16 ns (i.e., the + value of each array element is equal to the remainder obtained + upon dividing the respective timestamp, expressed in units of + 2^-16 ns, by 2^48). At any given time, the timestamp values + stored in the array are for the same, and most recently + completed, peer delay message exchange. For each timestamp, + only 48-bits are valid (the upper 16-bits are always zero)."; + reference + "14.8.53 of IEEE Std 802.1AS-2020"; + } + } + + augment "/ptp:ptp/ptp:instances/ptp:instance/ptp:ports/ptp:port" { + description + "Augment to add port-statistics-ds to IEEE Std 1588 PTP Port."; + + container port-statistics-ds { + description + "Provides counters associated with the port of the + PTP Instance."; + reference + "14.10 of IEEE Std 802.1AS-2020"; + + leaf rx-sync-count { + type yang:counter32; + config false; + description + "Counter that increments every time synchronization + information is received."; + reference + "14.10.2 of IEEE Std 802.1AS-2020"; + } + + leaf rx-one-step-sync-count { + type yang:counter32; + config false; + description + "Counter that increments every time a one-step Sync + message is received."; + reference + "14.10.3 of IEEE Std 802.1AS-2020"; + } + + leaf rx-follow-up-count { + type yang:counter32; + config false; + description + "Counter that increments every time a Follow_Up + message is received."; + reference + "14.10.4 of IEEE Std 802.1AS-2020"; + } + + leaf rx-pdelay-req-count { + type yang:counter32; + config false; + description + "Counter that increments every time a Pdelay_Req + message is received."; + reference + "14.10.5 of IEEE Std 802.1AS-2020"; + } + + leaf rx-pdelay-resp-count { + type yang:counter32; + config false; + description + "Counter that increments every time a Pdelay_Resp + message is received."; + reference + "14.10.6 of IEEE Std 802.1AS-2020"; + } + + leaf rx-pdelay-resp-follow-up-count { + type yang:counter32; + config false; + description + "Counter that increments every time a Pdelay_Resp_Follow_Up + message is received."; + reference + "14.10.7 of IEEE Std 802.1AS-2020"; + } + + leaf rx-announce-count { + type yang:counter32; + config false; + description + "Counter that increments every time an Announce + message is received."; + reference + "14.10.8 of IEEE Std 802.1AS-2020"; + } + + leaf rx-packet-discard-count { + type yang:counter32; + config false; + description + "Counter that increments every time a PTP message + of the respective PTP Instance is discarded."; + reference + "14.10.9 of IEEE Std 802.1AS-2020"; + } + + leaf sync-receipt-timeout-count { + type yang:counter32; + config false; + description + "Counter that increments every time a sync receipt + timeout occurs."; + reference + "14.10.10 of IEEE Std 802.1AS-2020"; + } + + leaf announce-receipt-timeout-count { + type yang:counter32; + config false; + description + "Counter that increments every time an announce receipt + timeout occurs."; + reference + "14.10.11 of IEEE Std 802.1AS-2020"; + } + + leaf pdelay-allowed-lost-exceeded-count { + type yang:counter32; + config false; + description + "Counter that increments every time the value of the + variable lostResponses exceeds the value of the variable + allowedLostResponses, in the RESET state of the + MDPdelayReq state machine."; + reference + "14.10.12 of IEEE Std 802.1AS-2020"; + } + + leaf tx-sync-count { + type yang:counter32; + config false; + description + "Counter that increments every time synchronization + information is transmitted."; + reference + "14.10.13 of IEEE Std 802.1AS-2020"; + } + + leaf tx-one-step-sync-count { + type yang:counter32; + config false; + description + "Counter that increments every time a one-step Sync + message is transmitted."; + reference + "14.10.14 of IEEE Std 802.1AS-2020"; + } + + leaf tx-follow-up-count { + type yang:counter32; + config false; + description + "Counter that increments every time a Follow_Up + message is transmitted."; + reference + "14.10.15 of IEEE Std 802.1AS-2020"; + } + + leaf tx-pdelay-req-count { + type yang:counter32; + config false; + description + "Counter that increments every time a Pdelay_Req + message is transmitted."; + reference + "14.10.16 of IEEE Std 802.1AS-2020"; + } + + leaf tx-pdelay-resp-count { + type yang:counter32; + config false; + description + "Counter that increments every time a Pdelay_Resp + message is transmitted."; + reference + "14.10.17 of IEEE Std 802.1AS-202014.10.17"; + } + + leaf tx-pdelay-resp-follow-up-count { + type yang:counter32; + config false; + description + "Counter that increments every time a Pdelay_Resp_Follow_Up + message is transmitted."; + reference + "14.10.18 of IEEE Std 802.1AS-2020"; + } + + leaf tx-announce-count { + type yang:counter32; + config false; + description + "Counter that increments every time an Announce + message is transmitted."; + reference + "14.10.19 of IEEE Std 802.1AS-2020"; + } + } + } + + augment "/ptp:ptp/ptp:instances/ptp:instance/ptp:ports/ptp:port" { + description + "Augment to add asymmetry-measurement-mode-ds to + IEEE Std 1588 PTP Port."; + + container asymmetry-measurement-mode-ds { + description + "Represents the capability to enable/disable the Asymmetry + Compensation Measurement Procedure on a PTP Port. + This data set is used instead of the CMLDS + asymmetry-measurement-mode-ds when only a single PTP + Instance is present (i.e., CMLDS is not used)."; + reference + "14.13 of IEEE Std 802.1AS-2020 + Annex G of IEEE Std 802.1AS-2020"; + + leaf enabled { + type boolean; + description + "For full-duplex IEEE Std 802.3 media, the value is true + if an asymmetry measurement is being performed for the + link attached to this PTP Port, and false otherwise. + For all other media, the value shall be false."; + } + } + } + + augment "/ptp:ptp/ptp:common-services/ptp:cmlds/ptp:ports/ptp:port/ptp:link-port-ds" { + description + "Augment IEEE Std 1588 cmldsLinkPortDS. + + 14.16.9 of IEEE Std 802.1AS-2020 specifies neighborRateRatio + (neighbor-rate-ratio), which is provided in YANG as the + semantically equivalent node in ieee1588-ptp named + scaled-neighbor-rate-ratio (in link-port-ds)."; + + leaf cmlds-link-port-enabled { + type boolean; + config false; + description + "Boolean that is true if both delay-mechanism is common-p2p + and the value of ptp-port-enabled is true, for at least one + PTP Port that uses the CMLDS; otherwise, the value is false."; + reference + "11.2.18.1 of IEEE Std 802.1AS-2020 + 14.16.3 of IEEE Std 802.1AS-2020"; + } + + leaf is-measuring-delay { + type boolean; + config false; + description + "This leaf is analogous to is-measuring-delay + for a PTP Port, but applicable to this Link Port."; + reference + "14.16.4 of IEEE Std 802.1AS-2020"; + } + + leaf as-capable-across-domains { + type boolean; + config false; + description + "This leaf is true when all PTP Instances (domains) + for this Link Port detect proper exchange of Pdelay + messages."; + reference + "11.2.2 of IEEE Std 802.1AS-2020 + 14.16.5 of IEEE Std 802.1AS-2020"; + } + + leaf mean-link-delay-thresh { + type ptp:time-interval; + description + "Propagation time threshold for mean-link-delay, + above which a Link Port is not considered capable of + participating in the IEEE Std 802.1AS protocol."; + reference + "14.16.7 of IEEE Std 802.1AS-2020"; + } + + leaf initial-log-pdelay-req-interval { + type int8; + description + "This leaf is analogous to initial-log-pdelay-req-interval + for a PTP Port, but applicable to this Link Port."; + reference + "14.16.10 of IEEE Std 802.1AS-2020"; + } + + leaf current-log-pdelay-req-interval { + type int8; + config false; + description + "This leaf is analogous to current-log-pdelay-req-interval + for a PTP Port, but applicable to this Link Port."; + reference + "14.16.11 of IEEE Std 802.1AS-2020"; + } + + leaf use-mgt-log-pdelay-req-interval { + type boolean; + description + "This leaf is analogous to use-mgt-log-pdelay-req-interval + for a PTP Port, but applicable to this Link Port."; + reference + "14.16.12 of IEEE Std 802.1AS-2020"; + } + + leaf mgt-log-pdelay-req-interval { + type int8; + description + "This leaf is analogous to mgt-log-pdelay-req-interval + for a PTP Port, but applicable to this Link Port."; + reference + "14.16.13 of IEEE Std 802.1AS-2020"; + } + + leaf initial-compute-rate-ratio { + type int8; + description + "This leaf is analogous to initial-compute-rate-ratio + for a PTP Port, but applicable to this Link Port."; + reference + "14.16.14 of IEEE Std 802.1AS-2020"; + } + + leaf current-compute-rate-ratio { + type int8; + config false; + description + "This leaf is analogous to current-compute-rate-ratio + for a PTP Port, but applicable to this Link Port."; + reference + "14.16.15 of IEEE Std 802.1AS-2020"; + } + + leaf use-mgt-compute-rate-ratio { + type boolean; + description + "This leaf is analogous to use-mgt-compute-rate-ratio + for a PTP Port, but applicable to this Link Port."; + reference + "14.16.16 of IEEE Std 802.1AS-2020"; + } + + leaf mgt-compute-rate-ratio { + type int8; + description + "This leaf is analogous to mgt-compute-rate-ratio + for a PTP Port, but applicable to this Link Port."; + reference + "14.16.17 of IEEE Std 802.1AS-2020"; + } + + leaf initial-compute-mean-link-delay { + type int8; + description + "This leaf is analogous to initial-compute-mean-link-delay + for a PTP Port, but applicable to this Link Port."; + reference + "14.16.18 of IEEE Std 802.1AS-2020"; + } + + leaf current-compute-mean-link-delay { + type int8; + config false; + description + "This leaf is analogous to current-compute-mean-link-delay + for a PTP Port, but applicable to this Link Port."; + reference + "14.16.19 of IEEE Std 802.1AS-2020"; + } + + leaf use-mgt-compute-mean-link-delay { + type boolean; + description + "This leaf is analogous to use-mgt-compute-mean-link-delay + for a PTP Port, but applicable to this Link Port."; + reference + "14.16.20 of IEEE Std 802.1AS-2020"; + } + + leaf mgt-compute-mean-link-delay { + type int8; + description + "This leaf is analogous to mgt-compute-mean-link-delay + for a PTP Port, but applicable to this Link Port."; + reference + "14.16.21 of IEEE Std 802.1AS-2020"; + } + + leaf allowed-lost-responses { + type uint8; + description + "This leaf is analogous to allowed-lost-responses + for a PTP Port, but applicable to this Link Port."; + reference + "14.16.22 of IEEE Std 802.1AS-2020"; + } + + leaf allowed-faults { + type uint8; + description + "This leaf is analogous to allowed-faults + for a PTP Port, but applicable to this Link Port."; + reference + "14.16.23 of IEEE Std 802.1AS-2020"; + } + + leaf-list pdelay-truncated-timestamps { + type uint64 { + range "0..281474976710655"; + } + config false; + description + "This leaf is analogous to pdelay-truncated-timestamps + for a PTP Port, but applicable to this Link Port."; + reference + "14.16.25 of IEEE Std 802.1AS-2020"; + } + } + + augment "/ptp:ptp/ptp:common-services/ptp:cmlds/ptp:ports/ptp:port" { + description + "Augment to add port-statistics-ds to IEEE Std 1588 Link Port."; + + container port-statistics-ds { + description + "This container is analogous to port-statistics-ds + for a PTP Port, but applicable to this Link Port."; + reference + "14.17 of IEEE Std 802.1AS-2020"; + + leaf rx-pdelay-req-count { + type yang:counter32; + config false; + description + "This leaf is analogous to rx-pdelay-req-count + for a PTP Port, but applicable to this Link Port."; + reference + "14.17.2 of IEEE Std 802.1AS-2020"; + } + + leaf rx-pdelay-resp-count { + type yang:counter32; + config false; + description + "This leaf is analogous to rx-pdelay-resp-count + for a PTP Port, but applicable to this Link Port."; + reference + "14.17.3 of IEEE Std 802.1AS-2020"; + } + + leaf rx-pdelay-resp-follow-up-count { + type yang:counter32; + config false; + description + "This leaf is analogous to rx-pdelay-resp-follow-up-count + for a PTP Port, but applicable to this Link Port."; + reference + "14.17.4 of IEEE Std 802.1AS-2020"; + } + + leaf rx-packet-discard-count { + type yang:counter32; + config false; + description + "This leaf is analogous to rx-packet-discard-count + for a PTP Port, but applicable to this Link Port."; + reference + "14.17.5 of IEEE Std 802.1AS-2020"; + } + + leaf pdelay-allowed-lost-exceeded-count { + type yang:counter32; + config false; + description + "This leaf is analogous to + pdelay-allowed-lost-exceeded-count + for a PTP Port, but applicable to this Link Port."; + reference + "14.17.6 of IEEE Std 802.1AS-2020"; + } + + leaf tx-pdelay-req-count { + type yang:counter32; + config false; + description + "This leaf is analogous to tx-pdelay-req-count + for a PTP Port, but applicable to this Link Port."; + reference + "14.17.7 of IEEE Std 802.1AS-2020"; + } + + leaf tx-pdelay-resp-count { + type yang:counter32; + config false; + description + "This leaf is analogous to tx-pdelay-resp-count + for a PTP Port, but applicable to this Link Port."; + reference + "14.17.8 of IEEE Std 802.1AS-2020"; + } + + leaf tx-pdelay-resp-follow-up-count { + type yang:counter32; + config false; + description + "This leaf is analogous to tx-pdelay-resp-follow-up-count + for a PTP Port, but applicable to this Link Port."; + reference + "14.17.9 of IEEE Std 802.1AS-2020"; + } + } + } + + augment "/ptp:ptp/ptp:common-services/ptp:cmlds/ptp:ports/ptp:port" { + description + "Augment to add asymmetry-measurement-mode-ds to + IEEE Std 1588 Link Port."; + + container asymmetry-measurement-mode-ds { + description + "This container is analogous to asymmetry-measurement-mode-ds + for a PTP Port, but applicable to this Link Port."; + reference + "14.18 of IEEE Std 802.1AS-2020"; + + leaf enabled { + type boolean; + description + "This leaf is analogous to + asymmetry-measurement-mode-ds.enabled + for a PTP Port, but applicable to this Link Port."; + } + } + } +} diff --git a/standard/ieee/ieee802-dot1cb-frer-types.yang b/standard/ieee/ieee802-dot1cb-frer-types.yang new file mode 100644 index 0000000..2a82f5d --- /dev/null +++ b/standard/ieee/ieee802-dot1cb-frer-types.yang @@ -0,0 +1,86 @@ +module ieee802-dot1cb-frer-types { + yang-version "1.1"; + namespace urn:ieee:std:802.1Q:yang:ieee802-dot1cb-frer-types; + prefix dot1cb-frer-types; + organization + "Institute of Electrical and Electronics Engineers"; + contact + "WG-URL: http://ieee802.org/1/ + WG-EMail: stds-802-1-l@ieee.org + + Contact: IEEE 802.1 Working Group Chair + Postal: C/O IEEE 802.1 Working Group + IEEE Standards Association + 445 Hoes Lane + Piscataway, NJ 08854 + USA + + E-mail: stds-802-1-chairs@ieee.org"; + description + "Management objects that control the frame replication and + elimination from IEEE Std 802.1CB-2017. This YANG data model conforms + to the Network Management Datastore Architecture defined in RFC 8342. + Copyright (C) IEEE (2021). This version of this YANG module is part + of IEEE Std 802.1CBcv; see the draft itself for full legal notices."; + revision 2021-05-06 { + description + "Published as part of IEEE Std 802.1CBcv-2021. Initial version."; + reference + "IEEE Std 802.1CBcv-2021, Frame Replication and Elimination for + Reliability - FRER YANG Data Model and Management Information Base + Module."; + } + typedef seq-rcvy-algorithm { + type enumeration { + enum vector { + value 0; + description + "The sequence recovery type used for the Vector Recovery + Algorithm."; + } + enum match { + value 1; + description + "The sequence recovery type used for the Match Recovery + Algorithm."; + } + } + description + "An enumerated value specifying which sequence recovery algorithm + is to be used for an instance of the Sequence recovery function."; + reference + "10.4.1.5 of IEEE Std 802.1CB-2017"; + } + typedef seq-encaps-method { + type enumeration { + enum reserved { + value 0; + description + "Reserved value."; + } + enum r-tag { + value 1; + description + "The sequence encode decode type used for the R_TAG + encode/decode method."; + } + enum hsr-seq-tag { + value 2; + description + "The sequence encode decode type used for the HSR encode/decode + method."; + } + enum prp-seq-trailer { + value 3; + description + "The sequence encode decode type used for the PRP encode/decode + method."; + } + } + description + "An enumerated value indicating the type of encapsulation used for + an instance of the Sequence encode/ decode function."; + reference + "10.5.1.5 of IEEE Std 802.1CB-2017"; + } +} diff --git a/standard/ieee/ieee802-dot1cb-frer.yang b/standard/ieee/ieee802-dot1cb-frer.yang new file mode 100644 index 0000000..185d4cc --- /dev/null +++ b/standard/ieee/ieee802-dot1cb-frer.yang @@ -0,0 +1,1237 @@ +module ieee802-dot1cb-frer { + yang-version "1.1"; + namespace urn:ieee:std:802.1Q:yang:ieee802-dot1cb-frer; + prefix dot1cb-frer; + import ieee802-dot1cb-stream-identification { + prefix dot1cb-sid; + } + import ieee802-dot1cb-stream-identification-types { + prefix dot1cb-sid-types; + } + import ieee802-dot1cb-frer-types { + prefix dot1cb-frer-types; + } + import ieee802-dot1q-types { + prefix dot1qtypes; + } + import ietf-interfaces { + prefix if; + } + organization + "Institute of Electrical and Electronics Engineers"; + contact + "WG-URL: http://ieee802.org/1/ + WG-EMail: stds-802-1-l@ieee.org + + Contact: IEEE 802.1 Working Group Chair + Postal: C/O IEEE 802.1 Working Group + IEEE Standards Association + 445 Hoes Lane + Piscataway, NJ 08854 + USA + + E-mail: stds-802-1-chairs@ieee.org"; + description + "Management objects that control the frame replication and + elimination from IEEE Std 802.1CB-2017. This YANG data model conforms + to the Network Management Datastore Architecture defined in RFC 8342. + Copyright (C) IEEE (2021). This version of this YANG module is part + of IEEE Std 802.1CBcv; see the draft itself for full legal notices."; + revision 2021-05-06 { + description + "Published as part of IEEE Std 802.1CBcv-2021. Initial version."; + reference + "IEEE Std 802.1CBcv-2021, Frame Replication and Elimination for + Reliability - FRER YANG Data Model and Management Information Base + Module."; + } + feature auto-configuration { + description + "Autoconfiguration of entries in the tables for stream identity + table, sequence recovery table and sequence identification table."; + reference + "7.11 of IEEE Std 802.1CB-2017 + 10.7 of IEEE Std 802.1CB-2017"; + } + typedef lan-path-id { + type int8; + description + "An integer specifying a path or LAN. If and only if a packet + matches an entry in the Sequence identification table that + specifies HSR or PRP in its frerSeqEncEncapsType object, + tsnStreamIdLanPathId specifies the LanId or PathId value that must + be matched for this tsnStreamIdEntry to apply. A value of –1 + indicates that the LanId or PathId are to be ignored."; + reference + "10.22 of IEEE Std 802.1CB-2017"; + } + typedef sequence-history-length { + type uint32 { + range "2..max"; + } + description + "An integer specifying how many bits of the SequenceHistory + variable are to be used."; + reference + "7.4.3.2.2 of IEEE Std 802.1CB-2017"; + } + grouping sequence-encode-decode { + description + "The sequence-encode-decode grouping indicates the type of + encapsulation used for this instance of the Sequence encode/decode + function."; + reference + "10.5.1.5 of IEEE Std 802.1CB-2017"; + choice encapsulation { + description + "This choice indicates the type of encapsulation used for this + instance of the Sequence encode/decode function. The + encapsulation includes an Organizationally Unique Identifier + (OUI) or Company ID (CID) to identify the organization defining + the sequence encode/decode method."; + reference + "10.5.1.5 of IEEE Std 802.1CB-2017"; + container r-tag { + presence "true"; + description + "R-TAG"; + reference + "7.8 of IEEE Std 802.1CB-2017"; + leaf type-number { + type dot1cb-frer-types:seq-encaps-method; + default "r-tag"; + config false; + description + "The type number used for the R-TAG encode/decode method."; + reference + "10.5.1.5 of IEEE Std 802.1CB-2017"; + } + leaf oui-cid { + type string { + pattern "[0-9A-F]{2}(-[0-9A-F]{2}){2}"; + } + default "00-80-C2"; + config false; + description + "The Organizationally Unique Identifier (OUI) or Company ID + (CID) to identify the organization defining the encode/decode + method. For encode/decode methods defined in IEEE Std + 802.1CB-2017 the OUI/CID is always 00-80-C2."; + reference + "10.5.1.5 of IEEE Std 802.1CB-2017"; + } + } + container hsr-sequence-tag { + presence "true"; + description + "HSR sequence tag"; + reference + "7.9 of IEEE Std 802.1CB-2017"; + leaf type-number { + type dot1cb-frer-types:seq-encaps-method; + default "hsr-seq-tag"; + config false; + description + "The type number used for the HSR sequence tag encode/decode + method."; + reference + "10.5.1.5 of IEEE Std 802.1CB-2017"; + } + leaf oui-cid { + type string { + pattern "[0-9A-F]{2}(-[0-9A-F]{2}){2}"; + } + default "00-80-C2"; + config false; + description + "The Organizationally Unique Identifier (OUI) or Company ID + (CID) to identify the organization defining the encode/decode + method. For encode/decode methods defined in IEEE Std + 802.1CB-2017 the OUI/CID is always 00-80-C2."; + reference + "10.5.1.5 of IEEE Std 802.1CB-2017"; + } + } + container prp-sequence-tag { + presence "true"; + description + "PRP sequence trailer"; + reference + "7.10 of IEEE Std 802.1CB-2017"; + leaf type-number { + type dot1cb-frer-types:seq-encaps-method; + default "prp-seq-trailer"; + config false; + description + "The type number used for the PRP sequence trailer + encode/decode method."; + reference + "10.5.1.5 of IEEE Std 802.1CB-2017"; + } + leaf oui-cid { + type string { + pattern "[0-9A-F]{2}(-[0-9A-F]{2}){2}"; + } + default "00-80-C2"; + config false; + description + "The Organizationally Unique Identifier (OUI) or Company ID + (CID) to identify the organization defining the encode/decode + method. For encode/decode methods defined in IEEE Std + 802.1CB-2017 the OUI/CID is always 00-80-C2."; + reference + "10.5.1.5 of IEEE Std 802.1CB-2017"; + } + } + container organization-specific { + presence "true"; + description + "This container allows to select sequence encode/decode types + that are defined by entities outside of IEEE 802.1."; + reference + "10.5.1.5 of IEEE Std 802.1CB-2017"; + leaf type-number { + type int32 { + range "256..max"; + } + description + "The type number used for an encode/decode method defined by + an entity owning the OUI or CID for this encapsulation type."; + reference + "10.5.1.5 of IEEE Std 802.1CB-2017"; + } + leaf oui-cid { + type string { + pattern "[0-9A-F]{2}(-[0-9A-F]{2}){2}"; + } + description + "The Organizationally Unique Identifier (OUI) or Company ID + (CID) to identify the organization defining the encode/decode + method."; + reference + "10.5.1.5 of IEEE Std 802.1CB-2017"; + } + } + } + } + grouping sequence-recovery-algorithm { + description + "The sequence-recovery-algorithm grouping specifies which sequence + recovery algorithm is to be used for this instance of the Sequence + recovery function."; + reference + "10.4.1.5 of IEEE Std 802.1CB-2017"; + choice algorithm { + description + "This choice indicates the sequence recovery algorithm used for + this instance of the Sequence recovery function. It includes an + Organizationally Unique Identifier (OUI) or Company ID (CID) to + identify the organization defining the sequence recovery + algorithm."; + reference + "10.4.1.5 of IEEE Std 802.1CB-2017"; + container vector { + presence "true"; + description + "Vector Recovery Algorithm."; + reference + "10.4.1.5 of IEEE Std 802.1CB-2017"; + leaf type-number { + type dot1cb-frer-types:seq-rcvy-algorithm; + default "vector"; + config false; + description + "The type number used for the VectorRecoveryAlgorithm."; + reference + "10.4.1.5 of IEEE Std 802.1CB-2017"; + } + leaf oui-cid { + type string { + pattern "[0-9A-F]{2}(-[0-9A-F]{2}){2}"; + } + default "00-80-C2"; + config false; + description + "The Organizationally Unique Identifier (OUI) or Company ID + (CID) to identify the organization defining the sequence + recovery algorithm. For sequence recovery algorithms defined + in IEEE Std 802.1CB-2017 the OUI/CID is always 00-80-C2."; + reference + "10.4.1.5 of IEEE Std 802.1CB-2017"; + } + } + container match { + presence "true"; + description + "Match Recovery Algorithm."; + reference + "10.4.1.5 of IEEE Std 802.1CB-2017"; + leaf type-number { + type dot1cb-frer-types:seq-rcvy-algorithm; + default "match"; + config false; + description + "The type number used for the MatchRecoveryAlgorithm."; + reference + "10.4.1.5 of IEEE Std 802.1CB-2017"; + } + leaf oui-cid { + type string { + pattern "[0-9A-F]{2}(-[0-9A-F]{2}){2}"; + } + default "00-80-C2"; + config false; + description + "The Organizationally Unique Identifier (OUI) or Company ID + (CID) to identify the organization defining the sequence + recovery algorithm. For sequence recovery algorithms defined + in IEEE Std 802.1CB-2017 the OUI/CID is always 00-80-C2."; + reference + "10.4.1.5 of IEEE Std 802.1CB-2017"; + } + } + container organization-specific { + presence "true"; + description + "This container allows to select sequence recovery algorithms + that are defined by entities outside of IEEE 802.1."; + reference + "10.4.1.5 of IEEE Std 802.1CB-2017"; + leaf type-number { + type int32 { + range "256..max"; + } + description + "The type number used for a sequence recovery algorithm + defined by an entity owning the OUI or CID for this algorithm + type."; + reference + "10.4.1.5 of IEEE Std 802.1CB-2017"; + } + leaf oui-cid { + type string { + pattern "[0-9A-F]{2}(-[0-9A-F]{2}){2}"; + } + description + "The Organizationally Unique Identifier (OUI) or Company ID + (CID) to identify the organization defining the sequence + recovery algorithm."; + reference + "10.4.1.5 of IEEE Std 802.1CB-2017"; + } + } + } + } + container frer { + description + "The managed objects that control Stream identification are + described in Clause 9 of IEEE Std 802.1CB-2017. The managed objects + that control FRER are described in Clause 10 of IEEE Std + 802.1CB-2017as follows: + + a) General requirements on the behavior of counters are in 10.1. + b) The various tables of managed objects that can manage, in + detail, each individual Stream, are described in five + subclauses, including: + 1) Additions to the Stream identity table required for + Autoconfiguration. + 2) The Sequence generation table that configures instances of + the Sequence generation function; + 3) The Sequence recovery table that configures instances of the + Individual recovery function, the Sequence recovery function, + and the Latent error detection function; + 4) The Sequence identification table that configures instances + of the Sequence encode/decode function; and + 5) The Stream split table that configures instances of the + Stream splitting function. + c) The managed objects that support the automatic configuration, + upon receipt of a packet, of entries in the first four of the + preceding tables, are described in the subclause on + Autoconfiguration. + d) The per-port, per-Stream packet counters that are kept by FRER + functions for inspection by network management entities are + described in 10.8, and the per-port (totaled over all Streams) + counters in 10.9. + + The managed objects in the subclauses under 9.1 make it possible to + configure more than one encapsulation for the same stream_handle + subparameter on the same port. Similarly, the managed objects in + the subclauses under 10.3 and 10.4 make it possible to configure + more than one Sequence encode/decode function or more than one + Sequence generation function for the same stream_handle + subparameter. [The same value of stream_handle can be in the + frerSeqGenStreamList of more than one frerSeqGenEntry or in the + frerSeqRcvyStreamList of more than one frerSeqRcvyEntry.] A system + shall return an error if an attempt is made to configure + conflicting requirements upon that system."; + reference + "Clause 10 of IEEE Std 802.1CB-2017"; + list sequence-generation { + key "index"; + description + "There is one Sequence generation table in a system, and one + entry in the Sequence generation table for each Sequence + generation function. Each frerSeqGenEntry lists the Streams and + direction for which a single instance of the Sequence generation + function is to be placed."; + reference + "10.3 of IEEE Std 802.1CB-2017"; + leaf index { + type uint32; + description + "Clause 10 of IEEE Std 802.1CB-2017 states that the same stream + handle can be present multiple times in the sequence generation + table. Therefore this index leaf is being used to uniquely + identify an entry in the sequence generation table."; + } + leaf-list stream { + type leafref { + path '/dot1cb-sid:stream-identity/dot1cb-sid:handle'; + } + min-elements 1; + description + "A list of stream_handle values, corresponding to the values of + the tsnStreamIdHandle objects in the Stream identity table, on + which this instance of the Sequence generation function is to + operate. The single instance of the Sequence generation + function created by this frerSeqGenEntry operates every packet + belonging to this Stream, regardless of the port on which it is + received."; + reference + "10.3.1.1 of IEEE Std 802.1CB-2017"; + } + leaf direction-out-facing { + type dot1cb-sid-types:direction; + description + "An object indicating whether the Sequence generation function + is to be placed on the out-facing (True) or in-facing (False) + side of the port."; + reference + "10.3.1.2 of IEEE Std 802.1CB-2017"; + } + leaf reset { + type boolean; + description + "A Boolean object indicating that the Sequence generation + function is to be reset by calling its corresponding + SequenceGenerationReset function. Writing the value True to + frerSeqGenReset triggers a reset; writing the value False has + no effect. When read, frerSeqGenReset always returns the value + False."; + reference + "10.3.1.3 of IEEE Std 802.1CB-2017"; + } + } + list sequence-recovery { + key "index"; + description + "There is one Sequence recovery table in a system, and one entry + in the Sequence recovery table for each Sequence recovery + function or Individual recovery function that can also be + present. The entry describes a set of managed objects for the + single instance of a Base recovery function and Latent error + detection function included in the Sequence recovery function or + Individual recovery function. Each frerSeqRcvyEntry lists the + Streams, ports, and direction for which instances of a Sequence + recovery function or Individual recovery function are to be + instantiated."; + reference + "10.4 of IEEE Std 802.1CB-2017"; + leaf index { + type uint32; + description + "Clause 10 of IEEE Std 802.1CB-2017 states that the same stream + handle can be present multiple times in the sequence recovery + table. Therefore this index leaf is being used to uniquely + identify an entry in the sequence recovery table."; + } + leaf-list stream { + type leafref { + path '/dot1cb-sid:stream-identity/dot1cb-sid:handle'; + } + min-elements 1; + description + "A list of the stream_handle values, corresponding to the + values of the tsnStreamIdHandle objects in the Stream identity + table, to which the system is to apply the instance of the + Sequence recovery function or Individual recovery function."; + reference + "10.4.1.1 of IEEE Std 802.1CB-2017"; + } + leaf-list port { + type if:interface-ref; + min-elements 1; + description + "The list of ports on each of which the system is to + instantiate the Sequence recovery function, or from which + received packets are to be fed to a single instance of the + Individual recovery function."; + reference + "10.4.1.2 of IEEE Std 802.1CB-2017"; + } + leaf direction-out-facing { + type dot1cb-sid-types:direction; + description + "An object indicating whether the Sequence recovery function or + Individual recovery function is to be placed on the out-facing + (True) or in-facing (False) side of the port."; + reference + "10.4.1.3 of IEEE Std 802.1CB-2017"; + } + leaf reset { + type boolean; + default "false"; + description + "A Boolean object indicating that the Sequence recovery + function or Individual recovery function is to be reset by + calling its corresponding SequenceGenerationReset function. + Writing the value True to frerSeqRcvyReset triggers a reset; + writing the value False has no effect. When read, + frerSeqRcvyReset always returns the value False."; + reference + "10.4.1.4 of IEEE Std 802.1CB-2017"; + } + container algorithm { + description + "This object is an enumerated value specifying which sequence + recovery algorithm is to be used for this instance of the + Sequence recovery function. The enumeration uses an OUI or CID + as shown in Table 10-1. The default value for + frerSeqRcvyAlgorithm is Vector_Alg (00-80-C2, 0)."; + reference + "10.4.1.5 of IEEE Std 802.1CB-2017"; + uses sequence-recovery-algorithm; + } + leaf history-length { + type sequence-history-length; + default "2"; + description + "An integer specifying how many bits of the SequenceHistory + variable are to be used. The minimum and the default value is + 2, maximum is the maximum allowed by the implementation. [Not + used if frerSeqRcvyAlgorithm = Match_Alg (00-80-C2, 1).]"; + reference + "10.4.1.6 of IEEE Std 802.1CB-2017"; + } + leaf reset-timeout { + type uint32; + units "ms"; + description + "An unsigned integer specifying the timeout period in + milliseconds for the RECOVERY_TIMEOUT event."; + reference + "10.4.1.7 of IEEE Std 802.1CB-2017"; + } + leaf invalid-sequence-value { + type uint32; + config false; + description + "A read-only unsigned integer value that cannot be encoded in a + packet as a value for the sequence_number subparameter, i.e., + frerSeqRcvyInvalidSequenceValue is larger than or equal to + RecovSeqSpace."; + reference + "10.4.1.8 of IEEE Std 802.1CB-2017"; + } + leaf take-no-sequence { + type boolean; + default "false"; + description + "A Boolean value specifying whether packets with no + sequence_number subparameter are to be accepted (True) or not + (False). Default value False."; + reference + "10.4.1.9 of IEEE Std 802.1CB-2017"; + } + leaf individual-recovery { + type boolean; + description + "A Boolean value specifying whether this entry describes a + Sequence recovery function or Individual recovery function. + a) True: The entry describes an Individual recovery function. + Packets discarded by the SequenceGenerationAlgorithm will + cause the variable RemainingTicks to be reset. There is no + Latent error detection function associated with this entry, + so frerSeqRcvyLatentErrorDetection cannot also be True. + b) False: The entry describes a Sequence recovery function. + Packets discarded by the SequenceGenerationAlgorithm will + not cause the variable RemainingTicks to be reset."; + reference + "10.4.1.10 of IEEE Std 802.1CB-2017"; + } + leaf latent-error-detection { + type boolean; + description + "A Boolean value indicating whether an instance of the Latent + error detection function is to be instantiated along with the + Base recovery function in this Sequence recovery function or + Individual recovery function. frerSeqRcvyLatentErrorDetection + cannot be set True if frerSeqRcvyIndividualRecovery is also + True; an Individual recovery function does not include a Latent + error detection function."; + reference + "10.4.1.11 of IEEE Std 802.1CB-2017"; + } + container latent-error-detection-parameters { + description + "The objects in the following subclauses are present if and + only if frerSeqRcvyIndividualRecovery is False."; + reference + "10.4.1.12 of IEEE Std 802.1CB-2017"; + leaf difference { + type int32; + description + "An integer specifying the maximum difference between + frerCpsSeqRcvyDiscardedPackets, and the product of + frerCpsSeqRcvyPassedPackets and (frerSeqRcvyLatentErrorPaths + – 1) that is allowed. Any larger difference will trigger the + detection of a latent error by the LatentErrorTest function."; + reference + "10.4.1.12.1 of IEEE Std 802.1CB-2017"; + } + leaf period { + type uint32; + units "ms"; + default "2000"; + description + "The integer number of milliseconds that are to elapse + between instances of running the LatentErrorTest function. An + implementation can have a minimum value for + frerSeqRcvyLatentErrorPeriod, below which it cannot be set, + but this minimum shall be no larger than 1000 ms (1 s). + Default value 2000 (2 s)."; + reference + "10.4.1.12.2 of IEEE Std 802.1CB-2017"; + } + leaf paths { + type uint16; + description + "The integer number of paths over which FRER is operating for + this instance of the Base recovery function and Latent error + detection function."; + reference + "10.4.1.12.3 of IEEE Std 802.1CB-2017"; + } + leaf reset-period { + type uint32; + units "ms"; + default "30000"; + description + "The integer number of milliseconds that are to elapse + between instances of running the LatentErrorReset function. + An implementation can have a minimum value for + LatentErrorReset, below which it cannot be set, but this + minimum shall be no larger than 1000 ms (1 s). Default value + 30000 (30 s)."; + reference + "10.4.1.12.4 of IEEE Std 802.1CB-2017"; + } + } + } + list sequence-identification { + key "port direction-out-facing"; + description + "There is one Sequence identification table per system, and one + entry in the Sequence identification table for each port and + direction for which an instance of the Sequence encode/decode + function is to be created. Each entry in the Sequence + identification table specifies a port and direction on which an + instance of the Sequence encode/decode function is to be + instantiated for a list of Streams."; + reference + "10.5 of IEEE Std 802.1CB-2017"; + leaf-list stream { + type leafref { + path '/dot1cb-sid:stream-identity/dot1cb-sid:handle'; + } + min-elements 1; + description + "A list of stream_handles, corresponding to the values of the + tsnStreamIdHandle objects in the Stream identity table, for + which the system is to use the same encapsulation for the + Sequence encode/decode function."; + reference + "10.5.1.1 of IEEE Std 802.1CB-2017"; + } + leaf port { + type if:interface-ref; + description + "The port on which the system is to place an instance of the + Sequence encode/decode function."; + reference + "10.5.1.2 of IEEE Std 802.1CB-2017"; + } + leaf direction-out-facing { + type dot1cb-sid-types:direction; + description + "An object indicating whether the Sequence encode/decode + function is to be placed on the out-facing (True) or in-facing + (False) side of the port."; + reference + "10.5.1.3 of IEEE Std 802.1CB-2017"; + } + leaf active { + type boolean; + description + "A Boolean value specifying whether this frerSeqEncEntry is + passive (False), and therefore is used only to decode (extract + information from) input packets passing up the protocol stack, + or active (True), and therefore is used both for recognizing + input packets and for encoding output packets being passed down + the protocol stack."; + reference + "10.5.1.4 of IEEE Std 802.1CB-2017"; + } + container encapsulation { + description + "An enumerated value indicating the type of encapsulation used + for this instance of the Sequence encode/decode function. The + type includes an OUI or CID."; + reference + "10.5.1.5 of IEEE Std 802.1CB-2017"; + uses sequence-encode-decode; + } + leaf path-id-lan-id { + type lan-path-id; + description + "A 4-bit integer value to be placed in the PathId field of an + HSR sequence tag or the LanId field of a PRP sequence trailer + added to an output packet. This managed object is used only if: + a) The HSR sequence tag or the PRP sequence trailer is + selected by the frerSeqEncEncapsType object; and + b) frerSeqEncActive is False (passive)"; + reference + "10.5.1.6 of IEEE Std 802.1CB-2017"; + } + } + list stream-split { + key "port direction-out-facing"; + description + "There is one Stream split table per system, with one + frerSplitEntry per Stream splitting function per set of + stream_handle values. Each entry in the Stream split table + specifies a port and direction on which an instance of the Stream + splitting function is to be instantiated, and the list of + stream_handles specifying its operation."; + reference + "10.6 of IEEE Std 802.1CB-2017"; + leaf port { + type if:interface-ref; + description + "The port on which the system is to place an instance of the + Stream splitting function performing the stream_handle + translations specified by frerSplitInputIdList and + frerSplitOutputIdList is to be placed."; + reference + "10.6.1.1 of IEEE Std 802.1CB-2017"; + } + leaf direction-out-facing { + type dot1cb-sid-types:direction; + description + "An object indicating whether the instance of the Stream + splitting function performing the stream_handle translations + specified by frerSplitInputIdList and frerSplitOutputIdList is + to be placed on the out-facing (True) or in-facing (False) side + of the port."; + reference + "10.6.1.2 of IEEE Std 802.1CB-2017"; + } + leaf-list input-id { + type leafref { + path '/dot1cb-sid:stream-identity/dot1cb-sid:handle'; + } + min-elements 1; + description + "A list of stream_handles (tsnStreamIdHandle values) that are + to be split."; + reference + "10.6.1.3 of IEEE Std 802.1CB-2017"; + } + leaf-list output-id { + type leafref { + path '/dot1cb-sid:stream-identity/dot1cb-sid:handle'; + } + min-elements 1; + description + "A list of stream_handles (tsnStreamIdHandle values) into which + the input packet is to be split, one copy per item in the + frerSplitOutputIdList."; + reference + "10.6.1.4 of IEEE Std 802.1CB-2017"; + } + } + container autoconfiguration { + if-feature "auto-configuration"; + description + "Container for autoconfiguration managed objects."; + reference + "10.7 of IEEE Std 802.1CB-2017"; + list sequence { + key "index"; + description + "There is one Sequence autoconfiguration table per system. It + contains any number of table entries. No two (or more) entries + in the Sequence autoconfiguration table can have the same + values for frerAutSeqSeqEncaps, frerAutSeqTagged, and + frerAutSeqVlan on any given port. Each frerAutSeqEntry objects + relates to a single class of Streams, and specifies how entries + are created (and destroyed) in the Stream identity table, the + Sequence recovery table, and the Sequence identification table."; + reference + "10.7.1 of IEEE Std 802.1CB-2017"; + leaf index { + type uint32; + description + "Entry in the sequence list referencing to a single class of + streams."; + } + container sequence-encapsulation { + description + "An enumerated value, specifying which Sequence encode/decode + function, and therefore, which type sequence_number encoding, + is to be recognized for the purposes of Autoconfiguration."; + reference + "10.7.1.1.1 of IEEE Std 802.1CB-2017"; + uses sequence-encode-decode; + } + leaf-list receive-port { + type if:interface-ref; + min-elements 1; + description + "The list of ports to which this frerAutSeqEntry applies, and + on which Stream identification functions, Sequence + encode/decode functions, and Individual recovery functions + are to be autocreated."; + reference + "10.7.1.1.2 of IEEE Std 802.1CB-2017"; + } + leaf tagged { + type enumeration { + enum tagged { + value 1; + description + "A frame must have a VLAN tag to be matched."; + } + enum priority { + value 2; + description + "A frame must be untagged, or have a VLAN tag with a VLAN + ID = 0 to be matched."; + } + enum all { + value 3; + description + "A frame is matched whether tagged or not."; + } + } + description + "An enumerated value indicating whether packets to be matched + by this frerAutSeqEntry are permitted to have a VLAN tag."; + reference + "10.7.1.1.3 of IEEE Std 802.1CB-2017"; + } + leaf-list vlan { + type dot1qtypes:vlanid; + description + "A list of vlan_identifiers for the packet to match. A null + list matches all vlan_identifiers."; + reference + "10.7.1.1.4 of IEEE Std 802.1CB-2017"; + } + leaf-list recovery-port { + type if:interface-ref; + min-elements 1; + description + "The list of ports on which Sequence recovery functions are + to be autocreated by this frerAutSeqEntry."; + reference + "10.7.1.1.5 of IEEE Std 802.1CB-2017"; + } + leaf destruction-interval { + type uint64; + units "ms"; + default "86400000"; + description + "An integer number of milliseconds after which an idle set of + functions created by this frerAutSeqEntry can be destroyed. A + value of 0 indicates that idle autoconfigured functions are + not to be destroyed. Default value is 86 400 000 decimal (one + day)."; + reference + "10.7.1.1.6 of IEEE Std 802.1CB-2017"; + } + leaf reset-interval { + type uint64; + units "ms"; + description + "The value used to fill frerSeqRcvyResetMSec when + autoconfiguring entries in the Sequence recovery table."; + reference + "10.7.1.1.7 of IEEE Std 802.1CB-2017"; + } + container algorithm { + description + "The value used to fill frerSeqRcvyAlgorithm when + autoconfiguring entries in the Sequence recovery table."; + reference + "10.7.1.1.8 of IEEE Std 802.1CB-2017"; + uses sequence-recovery-algorithm; + } + leaf history-length { + type sequence-history-length; + default "2"; + description + "The value used to fill frerSeqRcvyHistoryLength when + autoconfiguring entries in the Sequence recovery table."; + reference + "10.7.1.1.9 of IEEE Std 802.1CB-2017"; + } + leaf create-individual { + type boolean; + description + "A Boolean value. If True, the receipt of a packet that + triggers the autoconfiguration of a new tsnStreamIdEntry also + triggers the instantiation of a frerSeqRcvyEntry for an + Individual recovery function."; + reference + "10.7.1.1.10 of IEEE Std 802.1CB-2017"; + } + leaf create-recovery { + type boolean; + description + "A Boolean value. If True, the receipt of a packet that + triggers the autoconfiguration of a new tsnStreamIdEntry can + also trigger the instantiation of a frerSeqRcvyEntry for a + Sequence recovery function."; + reference + "10.7.1.1.11 of IEEE Std 802.1CB-2017"; + } + leaf latent-error-detection { + type boolean; + description + "A Boolean value. If True, the autoconfiguration of a new + Sequence recovery function also creates an associated Latent + Error Detection function."; + reference + "10.7.1.1.12 of IEEE Std 802.1CB-2017"; + } + leaf latent-error-difference { + type int32; + description + "The value used to fill frerSeqRcvyLatentErrorDifference when + autoconfiguring entries in the Sequence recovery table."; + reference + "10.7.1.1.13 of IEEE Std 802.1CB-2017"; + } + leaf latent-error-period { + type uint32; + units "ms"; + default "2000"; + description + "The value used to fill frerSeqRcvyLatentErrorPeriod when + autoconfiguring entries in the Sequence recovery table."; + reference + "10.7.1.1.14 of IEEE Std 802.1CB-2017"; + } + leaf latent-error-reset-period { + type uint32; + units "ms"; + default "30000"; + description + "The value used to fill frerSeqRcvyLatentResetPeriod when + autoconfiguring entries in the Sequence recovery table."; + reference + "10.7.1.1.15 of IEEE Std 802.1CB-2017"; + } + } + list output { + key "index"; + description + "There is one Output autoconfiguration table per system. It + contains any number of frerAutOutEntry objects, each relating + to a single class of Streams specifying how active entries are + created in the Sequence identification table. No two (or more) + entries in the Output autoconfiguration table can include the + same port in their frerAutSeqReceivePortList objects."; + reference + "10.7.2 of IEEE Std 802.1CB-2017"; + leaf index { + type uint32; + description + "Entry in the output list referencing to a single class of + streams."; + } + leaf-list port { + type if:interface-ref; + min-elements 1; + description + "The list of ports to which this frerAutOutEntry applies, and + on which active Sequence encode/decode functions are to be + autocreated."; + reference + "10.7.2.1.1 of IEEE Std 802.1CB-2017"; + } + container encapsulation { + description + "An enumerated value, specifying which Sequence encode/decode + function, and therefore, which type sequence_number encoding, + is to be used for autoconfigured Streams on the ports in + frerAutSeqReceivePortList."; + reference + "10.7.2.1.2 of IEEE Std 802.1CB-2017"; + uses sequence-encode-decode; + } + leaf lan-path-id { + type lan-path-id; + description + "An integer specifying a path or LAN. If and only if + frerAutOutEncaps specifies HSR or PRP frerAutOutLanPathId + specifies the LanId or PathId value to be inserted into the + HSR sequence tag or PRP sequence trailer of autoconfigured + packets transmitted on the ports in + frerAutSeqReceivePortList."; + reference + "10.7.2.1.3 of IEEE Std 802.1CB-2017"; + } + } + } + } + augment "/dot1cb-sid:stream-identity" { + if-feature "auto-configuration"; + description + "Two managed objects augment each tsnStreamIdEntry in the Stream + identity table when Managed objects for autoconfiguration is + implemented."; + reference + "10.2 of IEEE Std 802.1CB-2017"; + leaf auto-configured { + type boolean; + config false; + description + "A read-only Boolean value, supplied by the system, specifying + whether this entry was created explicitly (False) or via the + Sequence autoconfiguration table."; + reference + "10.2.1 of IEEE Std 802.1CB-2017"; + } + leaf lan-path-id { + type lan-path-id; + description + "An integer specifying a path or LAN. If and only if a packet + matches an entry in the Sequence identification table that + specifies HSR or PRP in its frerSeqEncEncapsType object, + tsnStreamIdLanPathId specifies the LanId or PathId value that + must be matched for this tsnStreamIdEntry to apply. A value of –1 + indicates that the LanId or PathId are to be ignored."; + reference + "10.2.2 of IEEE Std 802.1CB-2017"; + } + } + augment "/if:interfaces/if:interface/if:statistics" { + description + "The following counters are the counters for frame replication and + elimination for reliability. All counters are unsigned integers. If + used on links faster than 650 000 000 bits per second, they shall + be 64 bits in length to ensure against excessively short wrap + times. + + A Stream identification component shall implement the first two + counters provided in the stream-identification YANG module per-port + counters, input-packets and output-packets; the remainder of the + counters in the frer YANG module module are optional for such a + system."; + reference + "10.8 of IEEE Std 802.1CB-2017 + 10.9 of IEEE Std 802.1CB-2017"; + container frer { + description + "This container contains the per-port as well as the + per-port-per-stream counters for frame replication and + elimination for reliability."; + reference + "10.8 of IEEE Std 802.1CB-2017 + 10.9 of IEEE Std 802.1CB-2017"; + container per-port-counters { + config false; + description + "Contains the per-port counters for frame replication and + elimination for reliability. The following counters are + instantiated for each port on which any of the Stream + identification function, Sequencing function, or Sequence + encode/decode function is configured. The counters are indexed + by port number."; + leaf rx-passed-pkts { + type uint64; + config false; + description + "The frerCpSeqRcvyPassedPackets counter is incremented once + for each packet passed up the stack by the + VectorRecoveryAlgorithm or MatchRecoveryAlgorithm. Its value + equals the sum (modulo the size of the counters) of all of + the frerCpsSeqRcvyPassedPackets counters on this same port."; + reference + "10.9.1 of IEEE Std 802.1CB-2017"; + } + leaf rx-discarded-pkts { + type uint64; + config false; + description + "The frerCpSeqRcvyDiscardPackets counter is incremented once + for each packet discarded due to a duplicate sequence number + or for being a rogue packet by any VectorRecoveryAlgorithm or + MatchRecoveryAlgorithm on this port. Its value equals the sum + (modulo the size of the counters) of all of the + frerCpsSeqRcvyRoguePackets and frerCpsSeqRcvyDiscardedPackets + counters on this same port."; + reference + "10.9.2 of IEEE Std 802.1CB-2017"; + } + leaf encode-errored-pkts { + type uint64; + config false; + description + "The frerCpSeqEncErroredPackets counter is incremented once + each time the Sequence encode/decode function receives a + packet that it is unable to decode successfully. Its value + equals the sum (modulo the size of the counters) of all of + the frerCpsSeqEncErroredPackets counters on this same port."; + reference + "10.9.2 of IEEE Std 802.1CB-2017"; + } + } + list per-port-per-stream-counters { + key "direction-out-facing handle"; + config false; + description + "Contains the per-port-per-stream counters for frame + replication and elimination for reliability. The following + counters are instantiated for each port on which any of the + Stream identification function, Sequencing function, or + Sequence encode/decode function is configured. The counters are + indexed by port number, facing (in-facing or out-facing), and + stream_handle value."; + reference + "10.8 of IEEE Std 802.1CB-2017"; + leaf direction-out-facing { + type dot1cb-sid-types:direction; + description + "An object indicating whether the counters apply to + out-facing (True) or in-facing (False)."; + } + leaf handle { + type leafref { + path '/dot1cb-sid:stream-identity/dot1cb-sid:handle'; + } + description + "The according tsnStreamIdHandle for the counters."; + } + leaf generation-reset { + type uint64; + config false; + description + "The frerCpsSeqGenResets counter is incremented each time the + SequenceGenerationReset function is called."; + reference + "10.8.2 of IEEE Std 802.1CB-2017"; + } + leaf rx-out-of-order-pkts { + type uint64; + config false; + description + "The frerCpsSeqRcvyOutOfOrderPackets counter is incremented + once for each packet accepted out-of-order by the + VectorRecoveryAlgorithm or MatchRecoveryAlgorithm. + Out-of-order means that the packet’s sequence number is not + one more than the previous packet received."; + reference + "10.8.3 of IEEE Std 802.1CB-2017"; + } + leaf rx-rogue-pkts { + type uint64; + config false; + description + "The frerCpsSeqRcvyRoguePackets counter is incremented once + for each packet discarded by the VectorRecoveryAlgorithm + because its sequence_number subparameter is more than + frerSeqRcvyHistoryLength from RecovSeqNum."; + reference + "10.8.4 of IEEE Std 802.1CB-2017"; + } + leaf rx-passed-pkts { + type uint64; + config false; + description + "The frerCpsSeqRcvyPassedPackets counter is incremented once + for each packet passed up the stack by the + VectorRecoveryAlgorithm or MatchRecoveryAlgorithm."; + reference + "10.8.5 of IEEE Std 802.1CB-2017"; + } + leaf rx-discarded-pkts { + type uint64; + config false; + description + "The frerCpsSeqRcvyDiscardedPackets counter is incremented + once for each packet discarded due to a duplicate sequence + number by the VectorRecoveryAlgorithm or + MatchRecoveryAlgorithm."; + reference + "10.8.6 of IEEE Std 802.1CB-2017"; + } + leaf rx-lost-pkts { + type uint64; + config false; + description + "The frerCpsSeqRcvyLostPackets counter is incremented once + for each packet lost by the VectorRecoveryAlgorithm. A packet + is counted as lost if its sequence number is not received on + any ingress port. + + NOTE—If per-source sequence numbering is used, + frerCpsSeqRcvyLostPackets can count, as lost, packets that + were sent to another destination, but not lost."; + reference + "10.8.7 of IEEE Std 802.1CB-2017"; + } + leaf rx-tagless-pkts { + type uint64; + config false; + description + "The frerCpsSeqRcvyTaglessPackets counter is incremented once + for each packet received by the VectorRecoveryAlgorithm that + has no sequence_number subparameter."; + reference + "10.8.8 of IEEE Std 802.1CB-2017"; + } + leaf rx-resets { + type uint64; + config false; + description + "The frerCpsSeqRcvyResets counter is incremented once each + time the SequenceRecoveryReset function is called."; + reference + "10.8.9 of IEEE Std 802.1CB-2017"; + } + leaf rx-latent-error-resets { + type uint64; + config false; + description + "The frerCpsSeqRcvyLatentErrorResets counter is incremented + once each time the LatentErrorReset function is called."; + reference + "10.8.10 of IEEE Std 802.1CB-2017"; + } + leaf encode-errored-pkts { + type uint64; + config false; + description + "The frerCpsSeqEncErroredPackets counter is incremented once + each time the Sequence encode/decode function receives a + packet that it is unable to decode successfully."; + reference + "10.8.11 of IEEE Std 802.1CB-2017"; + } + } + } + } +} diff --git a/standard/ieee/ieee802-dot1cb-stream-identification-types.yang b/standard/ieee/ieee802-dot1cb-stream-identification-types.yang new file mode 100644 index 0000000..a7d8b68 --- /dev/null +++ b/standard/ieee/ieee802-dot1cb-stream-identification-types.yang @@ -0,0 +1,99 @@ +module ieee802-dot1cb-stream-identification-types { + yang-version "1.1"; + namespace + urn:ieee:std:802.1Q:yang:ieee802-dot1cb-stream-identification-types; + prefix dot1cb-sid-types; + organization + "Institute of Electrical and Electronics Engineers"; + contact + "WG-URL: http://ieee802.org/1/ + WG-EMail: stds-802-1-l@ieee.org + + Contact: IEEE 802.1 Working Group Chair + Postal: C/O IEEE 802.1 Working Group + IEEE Standards Association + 445 Hoes Lane + Piscataway, NJ 08854 + USA + + E-mail: stds-802-1-chairs@ieee.org"; + description + "Management objects that control the stream identification from IEEE + Std 802.1CB-2017. This YANG data model conforms to the Network + Management Datastore Architecture defined in RFC 8342. Copyright (C) + IEEE (2021). This version of this YANG module is part of IEEE Std + 802.1CBdb-2021; see the draft itself for full legal notices."; + revision 2021-06-14 { + description + "Published as part of IEEE Std 802.1CBdb-2021. + Added the stream identification type used for the Mask-and-match + identification method "; + reference + "IEEE Std 802.1CBdb-2021, Frame Replication and Elimination for + Reliability - Extended Stream identification functions."; + } + revision 2021-05-06 { + description + "Published as part of IEEE Std 802.1CBcv-2021. Initial version."; + reference + "IEEE Std 802.1CBcv-2021, Frame Replication and Elimination for + Reliability - FRER YANG Data Model and Management Information Base + Module."; + } + identity strid-idty { + description + "Root identity for all stream identification types"; + } + typedef direction { + type boolean; + description + "A boolean object indicating whether the direction is out-facing + (True) or in-facing (False)."; + reference + "10.4.1.3 of IEEE Std 802.1CB-2017"; + } + typedef stream-id-function { + type enumeration { + enum reserved { + value 0; + description + "Reserved value."; + } + enum null-stream { + value 1; + description + "The stream identification type used for the Null Stream + identification method."; + } + enum smac-vlan { + value 2; + description + "The stream identification type used for the Source MAC and + VLAN Stream identification method."; + } + enum dmac-vlan { + value 3; + description + "The stream identification type used for the Active Destination + MAC and VLAN Stream identification method."; + } + enum ip { + value 4; + description + "The stream identification type used for the IP Stream + identification method."; + } + enum mask-and-match { + value 5; + description + "The stream identification type used for the Mask-and-match + identification method."; + } + } + description + "An enumerated value indicating the method used to identify packets + belonging to a Stream."; + reference + "9.1.1.6 of IEEE Std 802.1CBdb-2021"; + } +} diff --git a/standard/ieee/ieee802-dot1cb-stream-identification.yang b/standard/ieee/ieee802-dot1cb-stream-identification.yang new file mode 100644 index 0000000..4741121 --- /dev/null +++ b/standard/ieee/ieee802-dot1cb-stream-identification.yang @@ -0,0 +1,817 @@ +module ieee802-dot1cb-stream-identification { + yang-version "1.1"; + namespace urn:ieee:std:802.1Q:yang:ieee802-dot1cb-stream-identification; + prefix dot1cb-sid; + import ieee802-types { + prefix ieee; + } + import ieee802-dot1q-types { + prefix dot1qtypes; + } + import ietf-inet-types { + prefix inet; + } + import ietf-interfaces { + prefix if; + } + import ieee802-dot1cb-stream-identification-types { + prefix dot1cb-sid-types; + } + organization + "Institute of Electrical and Electronics Engineers"; + contact + "WG-URL: http://ieee802.org/1/ + WG-EMail: stds-802-1-l@ieee.org + + Contact: IEEE 802.1 Working Group Chair + Postal: C/O IEEE 802.1 Working Group + IEEE Standards Association + 445 Hoes Lane + Piscataway, NJ 08854 + USA + + E-mail: stds-802-1-chairs@ieee.org"; + description + "Management objects that control the stream identification from IEEE + Std 802.1CB-2017. This YANG data model conforms to the Network + Management Datastore Architecture defined in RFC 8342. Copyright (C) + IEEE (2021). This version of this YANG module is part of IEEE Std + 802.1CBcv; see the draft itself for full legal notices."; + revision 2021-05-06 { + description + "Published as part of IEEE Std 802.1CBcv-2021. Initial version."; + reference + "IEEE Std 802.1CBcv-2021, Frame Replication and Elimination for + Reliability - FRER YANG Data Model and Management Information Base + Module."; + } + identity null-stream-identification { + base dot1cb-sid-types:strid-idty; + description + "Null Stream Identification"; + } + identity smac-vlan-stream-identification { + base dot1cb-sid-types:strid-idty; + description + "Source MAC and VLAN Stream Identification"; + } + identity dmac-vlan-stream-identification { + base dot1cb-sid-types:strid-idty; + description + "Active Destination MAC and VLAN Stream Identification"; + } + identity ip-stream-identification { + base dot1cb-sid-types:strid-idty; + description + "IP Stream Identification"; + } + typedef vlan-tag-identification-type { + type enumeration { + enum tagged { + value 1; + description + "A frame must have a VLAN tag to be recognized as belonging to + the Stream."; + } + enum priority { + value 2; + description + "A frame must be untagged, or have a VLAN tag with a VLAN ID = + 0 to be recognized as belonging to the Stream."; + } + enum all { + value 3; + description + "A frame is recognized as belonging to the Stream whether + tagged or not."; + } + } + description + "Enumeration describing how a Stream can be identified using the + VLAN tag."; + } + typedef vlan-identifier-type { + type uint16 { + range "0 .. 4095"; + } + description + "Specifies the vlan_identifier. A value of 0 indicates that the + vlan_identifier carries a special meaning."; + } + list stream-identity { + key "index"; + description + "The Stream identity table consists of a set of tsnStreamIdEntry + objects, each relating to a single Stream, specifying the points in + the system where Stream identification functions are to be + instantiated. Each entry in the Stream identity table has a + tsnStreamIdHandle object specifying a stream_handle value and one + or more tsnStreamIdEntry objects describing one identification + method for that Stream. If a single Stream has multiple + identification methods, perhaps (but not necessarily) on different + ports, then there can be multiple tsnStreamIdEntry objects with the + same value for the tsnStreamIdHandle. If the HSR or PRP method or + the Sequence encode/decode function is applied to a packet, then + the LanId or PathId fields are also used to identify the Stream to + which the packet belongs."; + reference + "9.1. of IEEE Std 802.1CB-2017"; + leaf index { + type uint32; + description + "If a single Stream has multiple identification methods, perhaps + (but not necessarily) on different ports, then there can be + multiple tsnStreamIdEntry objects with the same value for the + tsnStreamIdHandle"; + } + leaf handle { + type uint32; + mandatory true; + description + "The objects in a given entry of the Stream identity table are + used to control packets whose stream_handle subparameter is equal + to the entry’s tsnStreamIdHandle object. The specific values used + in the tsnStreamIdHandle object are not necessarily used in the + system; they are used only to relate the various management + objects in Clause 9 and Clause 10."; + reference + "9.1.1.1 of IEEE Std 802.1CB-2017"; + } + container in-facing { + description + "Container for in-facing Stream identification functions."; + leaf-list input-port { + type if:interface-ref; + description + "The list of ports on which an in-facing Stream identification + function using this identification method is to be placed for + this Stream in the input (coming from the system forwarding + function) direction. Any number of tsnStreamIdEntry objects can + list the same port for the same tsnStreamIdHandle in its + tsnStreamIdInFacInputPortList."; + reference + "9.1.1.4 of IEEE Std 802.1CB-2017"; + } + leaf-list output-port { + type if:interface-ref; + description + "The list of ports on which an in-facing Stream identification + function using this identification method is to be placed for + this Stream in the output (towards the system forwarding + function) direction. At most one tsnStreamIdEntry can list a + given port for a given tsnStreamIdHandle in its + tsnStreamIdInFacOutputPortList."; + reference + "9.1.1.2 of IEEE Std 802.1CB-2017"; + } + } + container out-facing { + description + "Container for out-facing Stream identification functions."; + leaf-list input-port { + type if:interface-ref; + description + "The list of ports on which an out-facing Stream identification + function using this identification method is to be placed for + this Stream in the input (coming from the physical interface) + direction. Any number of tsnStreamIdEntry objects can list the + same port for the same tsnStreamIdHandle in its + tsnStreamIdOutFacInputPortList."; + reference + "9.1.1.5 of IEEE Std 802.1CB-2017"; + } + leaf-list output-port { + type if:interface-ref; + description + "The list of ports on which an out-facing Stream identification + function using this identification method is to be placed for + this Stream in the output (towards the physical interface) + direction. At most one tsnStreamIdEntry can list a given port + for a given tsnStreamIdHandle in its + tsnStreamIdOutFacOutputPortList."; + reference + "9.1.1.3 of IEEE Std 802.1CB-2017"; + } + } + choice parameters { + mandatory true; + description + "The number of controlling parameters for a Stream identification + method, their types and values, are specific to the + tsnStreamIdIdentificationType."; + reference + "9.1.1.7 of IEEE Std 802.1CB-2017"; + container null-stream-identification { + description + "When instantiating an instance of the Null Stream + identification function for a particular input Stream, the + managed objects in this container serve as the + tsnStreamIdParameters managed object."; + reference + "9.1.2 of IEEE Std 802.1CB-2017"; + container identification-type { + config false; + description + "The identification type indicating the method used to + identify packets belonging to the Stream. The identification + type contains a type number and an Organizationally Unique + Identifier (OUI) or Company ID (CID) to identify the + organization defining the identification method."; + reference + "9.1.1.6 of IEEE Std 802.1CB-2017"; + leaf type-number { + type dot1cb-sid-types:stream-id-function; + default "null-stream"; + description + "The stream identification type used for the Null Stream + identification method."; + reference + "9.1.1.6 of IEEE Std 802.1CB-2017"; + } + leaf oui-cid { + type string { + pattern "[0-9A-F]{2}(-[0-9A-F]{2}){2}"; + } + default "00-80-C2"; + description + "The Organizationally Unique Identifier (OUI) or Company ID + (CID) to identify the organization defining the + identification method. For identification methods defined + in IEEE Std 802.1CB-2017 the OUI/CID is always 00-80-C2."; + reference + "9.1.1.6 of IEEE Std 802.1CB-2017"; + } + } + leaf destination-mac { + type ieee:mac-address; + description + "Specifies the destination_address that identifies a packet + in an EISS indication primitive, to the Null Stream + identification function. The ieee:mac-address type has a + pattern that allows upper and lower case letters. To avoid + issues with string comparison, it is suggested to only use + Upper Case for the letters in the hexadecimal numbers. There + is still an issue with a difference between the IETF + mac-address definition and the IEEE mac-address definition, + so consider that if implementing code that compares + mac-addresses."; + reference + "9.1.2.1 of IEEE Std 802.1CB-2017"; + } + leaf tagged { + type vlan-tag-identification-type; + description + "An enumerated value indicating whether a packet in an EISS + indication primitive to the Null Stream identification + function is permitted to have a VLAN tag."; + reference + "9.1.2.2 of IEEE Std 802.1CB-2017"; + } + leaf vlan { + type vlan-identifier-type; + description + "Specifies the vlan_identifier parameter that identifies a + packet in an EISS indication primitive to the Null Stream + identification function. A value of 0 indicates that the + vlan_identifier parameter is ignored on EISS indication + primitives."; + reference + "9.1.2.3 of IEEE Std 802.1CB-2017"; + } + } + container smac-vlan-stream-identification { + description + "When instantiating an instance of the Source MAC and VLAN + Stream identification function for a particular input Stream, + the managed objects in the following subclauses serve as the + tsnStreamIdParameters managed object."; + reference + "9.1.3 of IEEE Std 802.1CB-2017"; + container identification-type { + config false; + description + "The identification type indicating the method used to + identify packets belonging to the Stream. The identification + type contains a type number and an Organizationally Unique + Identifier (OUI) or Company ID (CID) to identify the + organization defining the identification method."; + reference + "9.1.1.6 of IEEE Std 802.1CB-2017"; + leaf type-number { + type dot1cb-sid-types:stream-id-function; + default "smac-vlan"; + description + "The stream identification type used for the Source MAC and + VLAN Stream identification method."; + reference + "9.1.1.6 of IEEE Std 802.1CB-2017"; + } + leaf oui-cid { + type string { + pattern "[0-9A-F]{2}(-[0-9A-F]{2}){2}"; + } + default "00-80-C2"; + description + "The Organizationally Unique Identifier (OUI) or Company ID + (CID) to identify the organization defining the + identification method. For identification methods defined + in IEEE Std 802.1CB-2017 the OUI/CID is always 00-80-C2."; + reference + "9.1.1.6 of IEEE Std 802.1CB-2017"; + } + } + leaf source-mac { + type ieee:mac-address; + description + "Specifies the source_address that identifies a packet in an + EISS indication primitive, to the Source MAC and VLAN Stream + identification function. The ieee:mac-address type has a + pattern that allows upper and lower case letters. To avoid + issues with string comparison, it is suggested to only use + Upper Case for the letters in the hexadecimal numbers. There + is still an issue with a difference between the IETF + mac-address definition and the IEEE mac-address definition, + so consider that if implementing code that compares + mac-addresses."; + reference + "9.1.3.1 of IEEE Std 802.1CB-2017"; + } + leaf tagged { + type vlan-tag-identification-type; + description + "An enumerated value indicating whether a packet in an EISS + indication primitive to the Source MAC and VLAN Stream + identification function is permitted to have a VLAN tag."; + reference + "9.1.3.2 of IEEE Std 802.1CB-2017"; + } + leaf vlan { + type vlan-identifier-type; + description + "Specifies the vlan_identifier parameter that identifies a + packet in an EISS indication primitive to the Source MAC and + VLAN Stream identification function. A value of 0 indicates + that the vlan_identifier parameter is ignored on EISS + indication primitives."; + reference + "9.1.3.3 of IEEE Std 802.1CB-2017"; + } + } + container dmac-vlan-stream-identification { + description + "When instantiating an instance of the Active Destination MAC + and VLAN Stream identification function for a particular output + Stream, the managed objects in the following subclauses, along + with those listed in 9.1.2, serve as the tsnStreamIdParameters + managed object."; + reference + "9.1.4 of IEEE Std 802.1CB-2017"; + container identification-type { + config false; + description + "The identification type indicating the method used to + identify packets belonging to the Stream. The identification + type contains a type number and an Organizationally Unique + Identifier (OUI) or Company ID (CID) to identify the + organization defining the identification method."; + reference + "9.1.1.6 of IEEE Std 802.1CB-2017"; + leaf type-number { + type dot1cb-sid-types:stream-id-function; + default "dmac-vlan"; + description + "The stream identification type used for the Active + Destination MAC and VLAN Stream identification method."; + reference + "9.1.1.6 of IEEE Std 802.1CB-2017"; + } + leaf oui-cid { + type string { + pattern "[0-9A-F]{2}(-[0-9A-F]{2}){2}"; + } + default "00-80-C2"; + description + "The Organizationally Unique Identifier (OUI) or Company ID + (CID) to identify the organization defining the + identification method. For identification methods defined + in IEEE Std 802.1CB-2017 the OUI/CID is always 00-80-C2."; + reference + "9.1.1.6 of IEEE Std 802.1CB-2017"; + } + } + container down { + description + "Container for all parameters which are sent to lower layers."; + leaf destination-mac { + type ieee:mac-address; + description + "Specifies the destination_address parameter to use in the + EISS request primitive for output packets sent to lower + layers by the Active Destination MAC and VLAN Stream + identification function, and the destination_address that + identifies an input packet in an EISS indication primitive + to the Active Destination MAC and VLAN Stream + identification function. The ieee:mac-address type has a + pattern that allows upper and lower case letters. To avoid + issues with string comparison, it is suggested to only use + Upper Case for the letters in the hexadecimal numbers. + There is still an issue with a difference between the IETF + mac-address definition and the IEEE mac-address definition, + so consider that if implementing code that compares + mac-addresses."; + reference + "9.1.4.1 of IEEE Std 802.1CB-2017"; + } + leaf tagged { + type vlan-tag-identification-type; + description + "An enumerated value indicating whether a packet in an EISS + indication or request primitive between the Active + Destination MAC and VLAN Stream identification function and + the lower layers is to have a VLAN tag. This variable is + not used in an FRER C-component. See 8.4."; + reference + "9.1.4.2 of IEEE Std 802.1CB-2017"; + } + leaf vlan { + type vlan-identifier-type; + description + "Specifies the vlan_identifier parameter to use in the EISS + request primitive for output packets sent to lower layers + by the Active Destination MAC and VLAN Stream + identification function, and the vlan_identifier that + identifies an input packet in an EISS indication primitive + to the Active Destination MAC and VLAN Stream + identification function. A value of 0 indicates that the + vlan_identifier parameter is ignored on EISS indication + primitives."; + reference + "9.1.4.3 of IEEE Std 802.1CB-2017"; + } + leaf priority { + type dot1qtypes:priority-type; + description + "Specifies the priority parameter to use in the EISS + request primitive for output packets sent to lower layers + by the Active Destination MAC and VLAN Stream + identification function for all packets in a particular + Stream."; + reference + "9.1.4.4 of IEEE Std 802.1CB-2017"; + } + } + container up { + description + "Container for all parameters which are offered to higher + layers."; + leaf destination-mac { + type ieee:mac-address; + description + "Specifies the destination_address parameter to use in the + EISS indication primitive for input packets offered to + upper layers by the Active Destination MAC and VLAN Stream + identification layer. This address replaces the address + that was used to identify the packet + (tsnCpeDmacVlanDownDestMac). The ieee:mac-address type has + a pattern that allows upper and lower case letters. To + avoid issues with string comparison, it is suggested to + only use Upper Case for the letters in the hexadecimal + numbers. There is still an issue with a difference between + the IETF mac-address definition and the IEEE mac-address + definition, so consider that if implementing code that + compares mac-addresses."; + reference + "9.1.4.5 of IEEE Std 802.1CB-2017"; + } + leaf tagged { + type vlan-tag-identification-type; + description + "An enumerated value indicating whether a packet in an EISS + indication or request primitive between the Active + Destination MAC and VLAN Stream identification function and + the upper layers is to have a VLAN tag. This variable is + used only by an end system and not by a relay system."; + reference + "9.1.4.6 of IEEE Std 802.1CB-2017"; + } + leaf vlan { + type vlan-identifier-type; + description + "Specifies the vlan_identifier parameter to use in the EISS + indication primitive for packets offered to upper layers, + or the VLAN ID field for an IEEE 802.1Q tag in an ISS + mac_service_data_unit. This address replaces the VLAN ID + that was used to identify the packet + (tsnCpeDmacVlanDownVlan)."; + reference + "9.1.4.7 of IEEE Std 802.1CB-2017"; + } + leaf priority { + type dot1qtypes:priority-type; + description + "Specifies the priority parameter to use in the EISS + indication primitive for packets offered to upper layers."; + reference + "9.1.4.8 of IEEE Std 802.1CB-2017"; + } + } + } + container ip-stream-identification { + description + "When instantiating an instance of the IP Stream identification + function, the parameters in the following subclauses replace + the tsnStreamIdParameters managed object."; + reference + "9.1.5 of IEEE Std 802.1CB-2017"; + container identification-type { + config false; + description + "The identification type indicating the method used to + identify packets belonging to the Stream. The identification + type contains a type number and an Organizationally Unique + Identifier (OUI) or Company ID (CID) to identify the + organization defining the identification method."; + reference + "9.1.1.6 of IEEE Std 802.1CB-2017"; + leaf type-number { + type dot1cb-sid-types:stream-id-function; + default "ip"; + description + "The stream identification type used for the IP Stream + identification method."; + reference + "9.1.1.6 of IEEE Std 802.1CB-2017"; + } + leaf oui-cid { + type string { + pattern "[0-9A-F]{2}(-[0-9A-F]{2}){2}"; + } + default "00-80-C2"; + description + "The Organizationally Unique Identifier (OUI) or Company ID + (CID) to identify the organization defining the + identification method. For identification methods defined + in IEEE Std 802.1CB-2017 the OUI/CID is always 00-80-C2."; + reference + "9.1.1.6 of IEEE Std 802.1CB-2017"; + } + } + leaf destination-mac { + type ieee:mac-address; + description + "Specifies the destination_address parameter that identifies + a packet in an EISS indication primitive. The + ieee:mac-address type has a pattern that allows upper and + lower case letters. To avoid issues with string comparison, + it is suggested to only use Upper Case for the letters in the + hexadecimal numbers. There is still an issue with a + difference between the IETF mac-address definition and the + IEEE mac-address definition, so consider that if implementing + code that compares mac-addresses."; + reference + "9.1.5.1 of IEEE Std 802.1CB-2017"; + } + leaf tagged { + type vlan-tag-identification-type; + description + "An enumerated value indicating whether a packet in an EISS + indication or request primitive to the IP Stream + identification function is to have a VLAN tag."; + reference + "9.1.5.2 of IEEE Std 802.1CB-2017"; + } + leaf vlan { + type vlan-identifier-type; + description + "Specifies the vlan_identifier parameter that identifies a + packet in an EISS indication primitive. A value of 0 + indicates that the frame is not to have a VLAN tag."; + reference + "9.1.5.3 of IEEE Std 802.1CB-2017"; + } + leaf ip-source { + type inet:ip-address; + description + "Specifies the IPv4 (RFC 791) or IPv6 (RFC 2460) source + address parameter that must be matched to identify packets + coming up from lower layers. An address of all 0 indicates + that the IP source address is to be ignored on packets + received from lower layers."; + reference + "9.1.5.4 of IEEE Std 802.1CB-2017"; + } + leaf ip-destination { + type inet:ip-address; + description + "Specifies the IPv4 (RFC 791) or IPv6 (RFC 2460) destination + address parameter that must be matched to identify packets + coming up from lower layers."; + reference + "9.1.5.5 of IEEE Std 802.1CB-2017"; + } + leaf dscp { + type inet:dscp; + description + "Specifies the IPv4 (RFC 791) or IPv6 (RFC 2460) + differentiated services codepoint (DSCP, RFC 2474) that must + be matched to identify packets coming up from the lower + layers. A value of 64 decimal indicates that the DSCP is to + be ignored on packets received from lower layers."; + reference + "9.1.5.6 of IEEE Std 802.1CB-2017"; + } + leaf next-protocol { + type enumeration { + enum none { + description + "No protocol is specified"; + } + enum udp { + description + "UDP is specified as the next protocol."; + reference + "RFC 768"; + } + enum tcp { + description + "TCP is specified as the next protocol."; + reference + "RFC 793"; + } + enum sctp { + description + "SCTP is specified as the next protocol."; + reference + "RFC 4960"; + } + } + description + "Specifies the IP next protocol parameter that must be + matched to identify packets coming up from lower layers. The + value of this parameter must specify either none, UDP (RFC + 768), TCP (RFC 793), or SCTP (RFC 4960). If “none,” then the + tsnCpeIpIdSourcePort and tsnCpeIpIdDestinationPort managed + objects are not used."; + reference + "9.1.5.7 of IEEE Std 802.1CB-2017"; + } + leaf source-port { + type inet:port-number; + description + "Specifies the TCP or UDP Source Port parameter that must be + matched to identify packets coming up from lower layers. A + value of 0 indicates that the Source Port number of the + packet is to be ignored on packets received from lower + layers."; + reference + "9.1.5.8 of IEEE Std 802.1CB-2017"; + } + leaf destination-port { + type inet:port-number; + description + "Specifies the TCP or UDP Destination Port parameter that + must be matched to identify packets coming up from lower + layers. A value of 0 indicates that the Destination Port + number of the packet is to be ignored on packets received + from lower layers."; + reference + "9.1.5.9 of IEEE Std 802.1CB-2017"; + } + } + container organization-specific { + description + "This container allows to select stream identification methods + that are defined by entities outside of IEEE 802.1."; + reference + "9.1.1.6 of IEEE Std 802.1CB-2017"; + container identification-type { + description + "The identification type indicating the method used to + identify packets belonging to the Stream. The identification + type contains a type number and an Organizationally Unique + Identifier (OUI) or Company ID (CID) to identify the + organization defining the identification method."; + reference + "9.1.1.6 of IEEE Std 802.1CB-2017"; + leaf type-number { + type int32 { + range "256..max"; + } + description + "The type number used for an identification method defined + by an entity owning the OUI or CID for this identification + type."; + reference + "9.1.1.6 of IEEE Std 802.1CB-2017"; + } + leaf oui-cid { + type string { + pattern "[0-9A-F]{2}(-[0-9A-F]{2}){2}"; + } + description + "The Organizationally Unique Identifier (OUI) or Company ID + (CID) to identify the organization defining the + identification method."; + reference + "9.1.1.6 of IEEE Std 802.1CB-2017"; + } + } + } + } + } + augment "/if:interfaces/if:interface/if:statistics" { + description + "The following counters are the counters for stream identification. + All counters are unsigned integers. If used on links faster than + 650 000 000 bits per second, they shall be 64 bits in length to + ensure against excessively short wrap times."; + reference + "9.2 of IEEE Std 802.1CB-2017 + 9.3 of IEEE Std 802.1CB-2017"; + container stream-id { + description + "This container contains the per-port as well as the + per-port-per-stream counters for stream identification."; + reference + "9.2 of IEEE Std 802.1CB-2017 + 9.3 of IEEE Std 802.1CB-2017"; + container per-port-counters { + config false; + description + "Contains the per-port counters for stream identification. The + following counters are instantiated for each port on which the + Stream identification function is configured. The counters are + indexed by port number."; + reference + "9.3 of IEEE Std 802.1CB-2017"; + leaf input-pkts { + type uint64; + config false; + description + "The tsnCpSidInputPackets counter is incremented once for + each packet identified by any Stream identification function + on this port. Its value equals the sum (modulo the size of + the counters) of all of the tsnCpsSidInputPackets counters on + this same port."; + reference + "9.3.1 of IEEE Std 802.1CB-2017"; + } + leaf output-pkts { + type uint64; + config false; + description + "The tsnCpSidOutputPackets counter is incremented once for + each packet passed down the stack by any Stream + identification function on this port. Its value equals the + sum (modulo the size of the counters) of all of the + tsnCpsSidOutputPackets counters on this same port."; + reference + "9.3.2 of IEEE Std 802.1CB-2017"; + } + } + list per-port-per-stream-counters { + key "direction-out-facing handle"; + config false; + description + "Contains the per-port-per-stream counters for stream + identification. The following counters are instantiated for + each port on which the Stream identification function is + configured. The counters are indexed by port number, facing + (in-facing or out-facing), and stream_handle value + (tsnStreamIdHandle)."; + reference + "9.2 of IEEE Std 802.1CB-2017"; + leaf direction-out-facing { + type dot1cb-sid-types:direction; + description + "An object indicating whether the counters apply to + out-facing (True) or in-facing (False)."; + } + leaf handle { + type leafref { + path '/stream-identity/handle'; + } + description + "The according tsnStreamIdHandle for these counters."; + } + leaf input-pkts { + type uint64; + description + "The tsnCpsSidInputPackets counter is incremented once for + each packet identified by the Stream identification function."; + reference + "9.2.1 of IEEE Std 802.1CB-2017"; + } + leaf output-pkts { + type uint64; + description + "The tsnCpsSidOutputPackets counter is incremented once for + each packet passed down the stack by the Stream + identification function."; + reference + "9.2.2 of IEEE Std 802.1CB-2017"; + } + } + } + } +} diff --git a/standard/ieee/ieee802-dot1q-ats.yang b/standard/ieee/ieee802-dot1q-ats.yang new file mode 100644 index 0000000..6cc5283 --- /dev/null +++ b/standard/ieee/ieee802-dot1q-ats.yang @@ -0,0 +1,315 @@ +module ieee802-dot1q-ats { + yang-version "1.1"; + namespace urn:ieee:std:802.1Q:yang:ieee802-dot1q-ats; + prefix ats; + import ietf-yang-types { + prefix yang; + } + import ietf-interfaces { + prefix if; + } + import ieee802-dot1q-types { + prefix dot1qtypes; + } + import ieee802-dot1q-bridge { + prefix dot1q; + } + import ieee802-dot1q-stream-filters-gates { + prefix sfsg; + } + organization + "IEEE 802.1 Working Group"; + contact + "WG-URL: http://ieee802.org/1/ + WG-EMail: stds-802-1-l@ieee.org + + Contact: IEEE 802.1 Working Group Chair + Postal: C/O IEEE 802.1 Working Group + IEEE Standards Association + 445 Hoes Lane + Piscataway, NJ 08854 + USA + + E-mail: stds-802-1-chairs@ieee.org"; + description + "This module provides management of 802.1Q bridge components that support + Asynchronous Traffic Shaping (ATS)."; + revision 2020-11-06 { + description + "Published as part of IEEE Std 802.1Qcr-2020. + Initial version."; + reference + "IEEE Std 802.1Qcr-2020, Bridges and Bridged Networks - + Asynchronous Traffic Shaping."; + } + typedef scheduler-ref-type { + type leafref { + path + '/dot1q:bridges'+ + '/dot1q:bridge'+ + '/dot1q:component'+ + '/ats:schedulers'+ + '/ats:scheduler-instance-table'+ + '/ats:scheduler-instance-id'; + } + description + "This type is used to refer to an ATS scheduler instance."; + } + typedef scheduler-group-ref-type { + type leafref { + path + '/dot1q:bridges'+ + '/dot1q:bridge'+ + '/dot1q:component'+ + '/ats:scheduler-groups'+ + '/ats:scheduler-group-instance-table'+ + '/ats:scheduler-group-instance-id'; + } + description + "This type is used to refer to an ATS scheduler group instance."; + } + augment + "/dot1q:bridges"+ + "/dot1q:bridge"+ + "/dot1q:component"+ + "/sfsg:stream-filters"+ + "/sfsg:stream-filter-instance-table" { + description + "Augments the Bridge component stream filter for ATS schedulers."; + container scheduler { + description + "Enapsulates ATS scheduler nodes."; + leaf scheduler-ref { + type ats:scheduler-ref-type; + description + "A reference to the ATS scheduler associated with this stream + filter."; + } + leaf scheduler-enable { + type boolean; + default "false"; + description + "If TRUE, this stream filter has an associated ATS scheduler + referenced by scheduler-ref. If FALSE, no ATS scheduler is + associated with this stream filter (scheduler-ref is ignored)."; + } + } + } + augment "/if:interfaces/if:interface/dot1q:bridge-port" { + description + "Augments Bridge Ports by ATS per-Port parameters."; + container ats-port-parameters { + description + "This container comprises all ATS per-Port parameters."; + leaf discarded-frames-count { + type yang:counter64; + config false; + description + "A counter of frames discarded by ATS scheduler instances + associated with the Bridge Port."; + reference + "12.31.7.3 of IEEE Std 802.1Qcr-2020"; + } + } + } + augment "/dot1q:bridges/dot1q:bridge/dot1q:component" { + description + "Augments the Bridge component by + a) ATS schedulers + b) ATS scheduler groups"; + container schedulers { + description + "This container comprises all nodes related to an ATS schedulers."; + list scheduler-instance-table { + key "scheduler-instance-id"; + description + "Each list entry comprises a set of parameters that defines a + single ATS scheduler instance, as detailed in Table 12-33."; + reference + "12.31.5 of IEEE Std 802.1Qcr-2020"; + leaf scheduler-instance-id { + type uint32; + mandatory true; + description + "A unique index identifying this ATS scheduler instance."; + reference + "12.31.5.1 of IEEE Std 802.1Qcr-2020 + 8.6.5.6 of IEEE Std 802.1Qcr-2020"; + } + leaf committed-information-rate { + type uint64; + units "bits/second"; + mandatory true; + description + "The committed information rate parameter of this ATS scheduler + instance."; + reference + "12.31.5.3 of IEEE Std 802.1Qcr-2020 + 8.6.5.6 of IEEE Std 802.1Qcr-2020"; + } + leaf committed-burst-size { + type uint32; + units "bits"; + mandatory true; + description + "The committed burst size parameter of this ATS scheduler + instance."; + reference + "12.31.5.2 of IEEE Std 802.1Qcr-2020 + 8.6.5.6 of IEEE Std 802.1Qcr-2020"; + } + leaf scheduler-group-ref { + type ats:scheduler-group-ref-type; + mandatory true; + description + "A reference to the scheduler group (12.32.5) associated with + this ATS scheduler instance. Multiple ATS scheduler instances + can be associated to one scheduler group, as detailed in + 8.6.5.6."; + reference + "12.31.6 of IEEE Std 802.1Qcr-2020"; + } + } + leaf max-scheduler-instances { + type uint32; + config false; + description + "The maximum number of ATS scheduler instances supported by this + Bridge component."; + reference + "12.31.1.5 of IEEE Std 802.1Qcr-2020"; + } + } + container scheduler-groups { + description + "This container comprises all ATS scheduler group related nodes."; + list scheduler-group-instance-table { + key "scheduler-group-instance-id"; + description + "Each list entry comprises a set of parameters that defines a + single ATS scheduler group instance."; + reference + "12.31.6 of IEEE Std 802.1Qcr-2020 + 8.6.5.6 of IEEE Std 802.1Qcr-2020"; + leaf scheduler-group-instance-id { + type uint32; + description + "A unique index identifying this ATS scheduler group instance."; + reference + "12.31.6.1 of IEEE Std 802.1Qcr-2020 + 8.6.5.6 of IEEE Std 802.1Qcr-2020"; + } + leaf max-residence-time { + type uint32; + units "nanoseconds"; + mandatory true; + description + "The maximum residence time parameter of the ATS scheduler + group."; + reference + "8.6.11.2.13 of IEEE Std 802.1Qcr-2020 + 8.6.5.6 of IEEE Std 802.1Qcr-2020"; + } + } + leaf max-scheduler-group-instances { + type uint32; + config false; + description + "The maximum number of ATS scheduler group instances supported by + this Bridge component."; + reference + "12.31.1.6 of IEEE Std 802.1Qcr-2020 + 8.6.5.6 of IEEE Std 802.1Qcr-2020"; + } + container scheduler-timing-characteristics { + description + "This container comprises all ATS scheduler timing + characteristics related nodes."; + list scheduler-timing-characteristics-table { + key "reception-port transmission-port"; + config false; + description + "Each list entry comprises the timing characteristics of a + reception Port transmission Port pair, as detailed in Table + 12-36."; + reference + "12.31.8 of IEEE Std 802.1Qcr-2020 + 8.6.11 of IEEE Std 802.1Qcr-2020"; + leaf reception-port { + type dot1qtypes:port-number-type; + config false; + mandatory true; + description + "A reference to the associated reception Port."; + reference + "12.31.8.1 of IEEE Std 802.1Qcr-2020"; + } + leaf transmission-port { + type dot1qtypes:port-number-type; + config false; + mandatory true; + description + "A reference to the associated transmission Port."; + reference + "12.31.8.2 of IEEE Std 802.1Qcr-2020"; + } + leaf clock-offset-variation-max { + type uint32; + units "nanoseconds"; + config false; + mandatory true; + description + "The maximum clock offset variation associated with the + reception Port transmission Port pair."; + reference + "12.31.8.3 of IEEE Std 802.1Qcr-2020"; + } + leaf clock-rate-deviation-max { + type uint32; + units "ppm"; + config false; + mandatory true; + description + "The maximum clock rate deviation associated with the + reception Port transmission Port pair."; + reference + "12.31.8.4 of IEEE Std 802.1Qcr-2020"; + } + leaf arrival-recognition-delay-max { + type uint32; + units "nanoseconds"; + config false; + mandatory true; + description + "The maximum arrival time recognition delay associated with + the reception Port transmission Port pair."; + reference + "12.31.8.5 of IEEE Std 802.1Qcr-2020"; + } + leaf processing-delay-min { + type uint32; + units "nanoseconds"; + config false; + mandatory true; + description + "The minimum processing delay associated with the reception + Port transmission Port pair."; + reference + "12.31.8.6 of IEEE Std 802.1Qcr-2020"; + } + leaf processing-delay-max { + type uint32; + units "nanoseconds"; + config false; + mandatory true; + description + "The maximum processing delay associated with the reception + Port transmission Port pair."; + reference + "12.31.8.7 of IEEE Std 802.1Qcr-2020"; + } + } + } + } + } +} diff --git a/standard/ieee/ieee802-dot1q-bridge.yang b/standard/ieee/ieee802-dot1q-bridge.yang new file mode 100644 index 0000000..3f7cc75 --- /dev/null +++ b/standard/ieee/ieee802-dot1q-bridge.yang @@ -0,0 +1,1777 @@ +module ieee802-dot1q-bridge { + namespace urn:ieee:std:802.1Q:yang:ieee802-dot1q-bridge; + prefix dot1q; + import ieee802-types { + prefix ieee; + } + import ietf-yang-types { + prefix yang; + } + import ietf-interfaces { + prefix if; + } + import iana-if-type { + prefix ianaif; + } + import ieee802-dot1q-types { + prefix dot1qtypes; + } + organization + "IEEE 802.1 Working Group"; + contact + "WG-URL: http://ieee802.org/1/ + WG-EMail: stds-802-1-l@ieee.org + + Contact: IEEE 802.1 Working Group Chair + Postal: C/O IEEE 802.1 Working Group + IEEE Standards Association + 445 Hoes Lane + Piscataway, NJ 08854 + USA + + E-mail: stds-802-1-chairs@ieee.org"; + description + "This YANG module describes the bridge configuration model for the + following IEEE 802.1Q Bridges: + 1) Two Port MAC Relays + 2) Customer VLAN Bridges + 3) Provider Bridges."; + revision 2020-11-06 { + description + "Published as part of IEEE Std 802.1Qcr-2020. + Third version."; + reference + "IEEE Std 802.1Qcr-2020, Bridges and Bridged Networks - + Asynchronous Traffic Shaping."; + } + revision 2020-06-04 { + description + "Published as part of IEEE Std 802.1Qcx-2020. + Second version."; + reference + "IEEE Std 802.1Qcx-2020, Bridges and Bridged Networks - + YANG Data Model for Connectivity Fault Management."; + } + revision 2018-03-07 { + description + "Published as part of IEEE Std 802.1Q-2018. + Initial version."; + reference + "IEEE Std 802.1Q-2018, Bridges and Bridged Networks."; + } + + feature ingress-filtering { + 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 frames 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."; + reference + "8.6.2 of IEEE Std 802.1Q-2018"; + } + feature extended-filtering-services { + 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 Ports default forwarding + or filtering behavior with regard to group MAC addresses for + which no specific static or dynamic filtering information has + been configured."; + reference + "8.8.4 of IEEE Std 802.1Q-2018 + Clause 10 of IEEE Std 802.1Q-2018"; + } + feature port-and-protocol-based-vlan { + 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."; + reference + "5.4.1.2 of IEEE Std 802.1Q-2018"; + } + feature flow-filtering { + description + "Flow filtering support enables Bridges to distinguish frames + belonging to different client flows and to use this information + in the forwarding process. Information related to client flows + may be used at the boundary of an SPT Domain to generate a flow + hash value. The flow hash, carried in an F-TAG, serves to + distinguish frames belonging to different flows and can be used + in the forwarding process to distribute frames over equal cost + paths. This provides for finer granularity load spreading while + maintaining frame order for each client flow."; + reference + "44.2 of IEEE Std 802.1Q-2018"; + } + feature simple-bridge-port { + description + "A simple bridge port allows underlying (MAC) layers to share + the same Interface as the Bridge Port."; + } + feature flexible-bridge-port { + description + "A flexible bridge port supports an Interface that is a Bridge + Port to be a separate Interface from the underlying (MAC) layer."; + } + + identity type-of-bridge { + description + "Represents the configured Bridge type."; + } + identity customer-vlan-bridge { + base type-of-bridge; + description + "Base identity for a Customer VLAN Bridge."; + } + identity provider-bridge { + base type-of-bridge; + description + "Base identity for a Provider Bridge (PB)."; + } + identity provider-edge-bridge { + base type-of-bridge; + description + "Base identity for a Provider Edge Bridge (PEB)."; + } + identity two-port-mac-relay-bridge { + base type-of-bridge; + description + "Base identity for a Two Port MAC Relay (TPMR)."; + } + identity type-of-component { + description + "Represents the type of Component."; + } + identity c-vlan-component { + base type-of-component; + description + "Base identity for a C-VLAN component."; + } + identity s-vlan-component { + base type-of-component; + description + "Base identity for a S-VLAN component."; + } + identity d-bridge-component { + base type-of-component; + description + "Base identity for a VLAN unaware component."; + } + identity edge-relay-component { + base type-of-component; + description + "Base identity for an EVB station ER component."; + } + identity type-of-port { + description + "Represents the type of Bridge port."; + } + identity c-vlan-bridge-port { + base type-of-port; + description + "Indicates the port can be a C-TAG aware port of an enterprise + VLAN aware Bridge."; + } + identity provider-network-port { + base type-of-port; + description + "Indicates the port can be an S-TAG aware port of a Provider + Bridge or Backbone Edge Bridge used for connections within a PBN + (Provider Bridged Network) or PBBN (Provider Backbone Bridged + Network)."; + } + identity customer-network-port { + base type-of-port; + description + "Indicates the port can be an S-TAG aware port of a Provider + Bridge or Backbone Edge Bridge used for connections to the + exterior of a PBN (Provider Bridged Network) or PBBN (Provider + Backbone Bridged Network)."; + } + identity customer-edge-port { + base type-of-port; + description + "Indicates the port can be a C-TAG aware port of a Provider + Bridge used for connections to the exterior of a PBN (Provider + Bridged Network) or PBBN (Provider Backbone Bridged Network)."; + } + identity d-bridge-port { + base type-of-port; + description + "Indicates the port can be a VLAN-unaware member of an 802.1Q + Bridge."; + } + identity remote-customer-access-port { + base type-of-port; + description + "Indicates the port can be an S-TAG aware port of a Provider + Bridge capable of providing Remote Customer Service Interfaces."; + } + identity bridge-interface { + description + "Generic interface property that represents any interface that + can be associated with an IEEE 802.1Q compliant Bridge + component. Any new Interface types would derive from this + identity to automatically pick up Bridge related configuration + or operational data."; + } + + container bridges { + description + "Contains the Bridge(s) configuration information."; + list bridge { + key "name"; + unique "address"; + description + "Provides configuration data in support of the Bridge + Configuration resources. There is a single bridge data node + per Bridge."; + leaf name { + type dot1qtypes:name-type; + description + "A text string associated with the Bridge, of locally + determined significance."; + reference + "12.4 of IEEE Std 802.1Q-2018"; + } + leaf address { + type ieee:mac-address; + mandatory true; + description + "The MAC address for the Bridge from which the Bridge + Identifiers used by the STP, RSTP, and MSTP are derived."; + reference + "12.4 of IEEE Std 802.1Q-2018"; + } + leaf bridge-type { + type identityref { + base type-of-bridge; + } + mandatory true; + description + "The type of Bridge."; + } + leaf ports { + type uint16 { + range "1..4095"; + } + config false; + description + "The number of Bridge Ports (MAC Entities)"; + reference + "12.4 of IEEE Std 802.1Q-2018"; + } + leaf up-time { + type yang:zero-based-counter32; + units "seconds"; + config false; + description + "The count in seconds of the time elapsed since the Bridge + was last reset or initialized."; + reference + "12.4 of IEEE Std 802.1Q-2018"; + } + leaf components { + type uint32; + config false; + description + "The number of components associated with the Bridge."; + } + list component { + key "name"; + description + "The set of components associated with a given Bridge. For + example, - A TPMR is associated with a single VLAN + unaware component. - A Customer VLAN Bridge is associated + with a single VLAN aware component. - A Provider Bridge is + associated with a single S-VLAN component and zero or more + C-VLAN components."; + reference + "12.3 of IEEE Std 802.1Q-2018"; + leaf name { + type string; + description + "The name of the Component."; + } + leaf id { + type uint32; + description + "Unique identifier for a particular Bridge component + within the system."; + reference + "12.3, item l) of IEEE Std 802.1Q-2018"; + } + leaf type { + type identityref { + base type-of-component; + } + mandatory true; + description + "The type of component used to classify a particular + Bridge component within a Bridge system comprising + multiple components."; + reference + "12.3, item m) of IEEE Std 802.1Q-2018"; + } + leaf address { + type ieee:mac-address; + description + "Unique EUI-48 Universally Administered MAC address + assigned to a Bridge component."; + reference + "13.24 of IEEE Std 802.1Q-2018 + 8.13.8 of IEEE Std 802.1Q-2018"; + } + leaf traffic-class-enabled { + type boolean; + default "true"; + description + "Indication of Traffic Classes enablement associated with + the Bridge Component. A value of True indicates that + Traffic Classes are enabled on this Bridge Component. A + value of False indicates that the Bridge Component + operates with a single priority level for all traffic."; + reference + "12.4.1.5.1 of IEEE Std 802.1Q-2018"; + } + leaf ports { + type uint16 { + range "1..4095"; + } + config false; + description + "The number of Bridge Ports associated with the Bridge + Component."; + reference + "12.4.1.1.3, item c) of IEEE Std 802.1Q-2018"; + } + leaf-list bridge-port { + type if:interface-ref; + config false; + description + "List of bridge-port references."; + } + container capabilities { + config false; + description + "Array of Boolean values of the feature capabilities + associated with a given Bridge Component."; + reference + "12.10.1.1.3, item b) of IEEE Std 802.1Q-2018 + 12.4.1.5.2 of IEEE Std 802.1Q-2018"; + leaf extended-filtering { + type boolean; + default "false"; + description + "Can perform filtering on individual multicast addresses + controlled by MMRP."; + reference + "12.4.1.5.2 of IEEE Std 802.1Q-2018"; + } + leaf traffic-classes { + type boolean; + default "false"; + description + "Can map priority to multiple traffic classes."; + reference + "12.4.1.5.2 of IEEE Std 802.1Q-2018"; + } + leaf static-entry-individual-port { + type boolean; + default "false"; + description + "Static entries per port."; + reference + "12.4.1.5.2 of IEEE Std 802.1Q-2018"; + } + leaf ivl-capable { + type boolean; + default "true"; + description + "Independent VLAN Learning (IVL)."; + reference + "12.4.1.5.2 of IEEE Std 802.1Q-2018"; + } + leaf svl-capable { + type boolean; + default "false"; + description + "Shared VLAN Learning (SVL)."; + reference + "12.4.1.5.2 of IEEE Std 802.1Q-2018"; + } + leaf hybrid-capable { + type boolean; + default "false"; + description + "Both IVL and SVL simultaneously."; + reference + "12.4.1.5.2 of IEEE Std 802.1Q-2018"; + } + leaf configurable-pvid-tagging { + type boolean; + default "false"; + description + "Whether the implementation supports the ability to + override the default PVID setting and its egress status + (VLAN-tagged or Untagged) on each port."; + reference + "12.4.1.5.2 of IEEE Std 802.1Q-2018"; + } + leaf local-vlan-capable { + type boolean; + default "false"; + description + "Can support multiple local Bridges, outside the scope + of 802.1Q defined VLANs."; + reference + "12.4.1.5.2 of IEEE Std 802.1Q-2018"; + } + } + container filtering-database { + when "../../bridge-type != 'dot1q:two-port-mac-relay-bridge'" { + description + "Applies to non TPMRs."; + } + description + "Contains filtering information used by the Forwarding + Process in deciding through which Ports of the Bridge + frames should be forwarded."; + reference + "12.7 of IEEE Std 802.1Q-2018"; + leaf aging-time { + type uint32 { + range "10..10000000"; + } + units "seconds"; + default "300"; + description + "The timeout period in seconds for aging out + dynamically-learned forwarding information."; + reference + "12.7 of IEEE Std 802.1Q-2018 + 8.8.3 of IEEE Std 802.1Q-2018"; + } + leaf size { + type yang:gauge32; + config false; + description + "The maximum number of entries that can be held in the + FDB."; + reference + "12.7 of IEEE Std 802.1Q-2018"; + } + leaf static-entries { + type yang:gauge32; + config false; + description + "The number of Static Filtering entries currently in the + FDB."; + reference + "12.7 of IEEE Std 802.1Q-2018 + 8.8.1 of IEEE Std 802.1Q-2018"; + } + leaf dynamic-entries { + type yang:gauge32; + config false; + description + "The number of Dynamic Filtering entries currently in + the FDB."; + reference + "12.7 of IEEE Std 802.1Q-2018 + 8.8.3 of IEEE Std 802.1Q-2018"; + } + leaf static-vlan-registration-entries { + type yang:gauge32; + config false; + description + "The number of Static VLAN Registration entries + currently in the FDB."; + reference + "12.7 of IEEE Std 802.1Q-2018 + 8.8.2 of IEEE Std 802.1Q-2018"; + } + leaf dynamic-vlan-registration-entries { + type yang:gauge32; + config false; + description + "The number of Dynamic VLAN Registration entries + currently in the FDB."; + reference + "12.7 of IEEE Std 802.1Q-2018 + 8.8.5 of IEEE Std 802.1Q-2018"; + } + leaf mac-address-registration-entries { + if-feature "extended-filtering-services"; + type yang:gauge32; + config false; + description + "The number of MAC Address Registration entries + currently in the FDB."; + reference + "12.7 of IEEE Std 802.1Q-2018 + 8.8.4 of IEEE Std 802.1Q-2018"; + } + list filtering-entry { + key "database-id vids address"; + description + "Information for the entries associated with the + Permanent Database."; + leaf database-id { + type uint32; + description + "The identity of this Filtering Database."; + reference + "12.7.7 of IEEE Std 802.1Q-2018"; + } + leaf address { + type ieee:mac-address; + description + "A MAC address (unicast, multicast, broadcast) for + which the device has forwarding and/or filtering + information."; + reference + "12.7.7 of IEEE Std 802.1Q-2018"; + } + leaf vids { + type dot1qtypes:vid-range-type; + description + "The set of VLAN identifiers to which this entry + applies."; + reference + "12.7.7 of IEEE Std 802.1Q-2018"; + } + leaf entry-type { + type enumeration { + enum static { + description + "Static entry type"; + } + enum dynamic { + description + "Dynamic/learnt entry type"; + } + } + description + "The type of filtering entry. Whether static or + dynamic. Static entries can be created, deleted, and + retrieved. However, dynamic entries can only be + deleted or retrieved by the management entity. + Consequently, a Bridge is not required to accept a + command that can alter the dynamic entries except + delete a dynamic entry."; + reference + "12.7.7 of IEEE Std 802.1Q-2018"; + } + uses dot1qtypes:port-map-grouping; + leaf status { + type enumeration { + enum other { + description + "None of the following. This may include the case + where some other object is being used to determine + if and how frames addressed to the value of the + corresponding instance of 'address' are being + forwarded."; + } + enum invalid { + description + "This entry is no longer valid (e.g., it was + learned but has since aged out), but has not yet + been flushed from the table."; + } + enum learned { + description + "The value of the corresponding instance of the + port node was learned and is being used."; + } + enum self { + description + "The value of the corresponding instance of the + address node representing one of the devices + address."; + } + enum mgmt { + description + "The value of the corresponding instance of + address node that is also the value of an existing + instance."; + } + } + config false; + description + "The status of this entry."; + } + } + list vlan-registration-entry { + key "database-id vids"; + description + "The VLAN Registration Entries models the operations + that can be performed on a single VLAN Registration + Entry in the FDB. The set of VLAN Registration Entries + within the FDB changes under management control and also + as a result of MVRP exchanges"; + reference + "12.7.5 of IEEE Std 802.1Q-2018"; + leaf database-id { + type uint32; + description + "The identity of this Filtering Database."; + reference + "12.7.7 of IEEE Std 802.1Q-2018"; + } + leaf vids { + type dot1qtypes:vid-range-type; + description + "The set of VLAN identifiers to which this entry + applies."; + reference + "12.7.7 of IEEE Std 802.1Q-2018"; + } + leaf entry-type { + type enumeration { + enum static { + description + "Static entry type"; + } + enum dynamic { + description + "Dynamic/learnt entry type"; + } + } + description + "The type of filtering entry. Whether static or + dynamic. Static entries can be created, deleted, and + retrieved. However, dynamic entries can only be + deleted or retrieved by the management entity. + Consequently, a Bridge is not required to accept a + command that can alter the dynamic entries except + delete a dynamic entry."; + reference + "12.7.7 of IEEE Std 802.1Q-2018"; + } + uses dot1qtypes:port-map-grouping; + } + } + container permanent-database { + description + "The Permanent Database container models the operations + that can be performed on, or affect, the Permanent + Database. There is a single Permanent Database per FDB."; + leaf size { + type yang:gauge32; + config false; + description + "The maximum number of entries that can be held in the + FDB."; + reference + "12.7.6 of IEEE Std 802.1Q-2018"; + } + leaf static-entries { + type yang:gauge32; + config false; + description + "The number of Static Filtering entries currently in the + FDB."; + reference + "12.7.6 of IEEE Std 802.1Q-2018"; + } + leaf static-vlan-registration-entries { + type yang:gauge32; + config false; + description + "The number of Static VLAN Registration entries + currently in the FDB."; + reference + "12.7.6 of IEEE Std 802.1Q-2018"; + } + list filtering-entry { + key "database-id vids address"; + description + "Information for the entries associated with the + Permanent Database."; + leaf database-id { + type uint32; + description + "The identity of this Filtering Database."; + reference + "12.7.7 of IEEE Std 802.1Q-2018"; + } + leaf address { + type ieee:mac-address; + description + "A MAC address (unicast, multicast, broadcast) for + which the device has forwarding and/or filtering + information."; + reference + "12.7.7 of IEEE Std 802.1Q-2018"; + } + leaf vids { + type dot1qtypes:vid-range-type; + description + "The set of VLAN identifiers to which this entry + applies."; + reference + "12.7.7 of IEEE Std 802.1Q-2018"; + } + leaf status { + type enumeration { + enum other { + description + "None of the following. This may include the case + where some other object is being used to determine + if and how frames addressed to the value of the + corresponding instance of 'address' are being + forwarded."; + } + enum invalid { + description + "This entry is no longer valid (e.g., it was + learned but has since aged out), but has not yet + been flushed from the table."; + } + enum learned { + description + "The value of the corresponding instance of the + port node was learned and is being used."; + } + enum self { + description + "The value of the corresponding instance of the + address node representing one of the devices + address."; + } + enum mgmt { + description + "The value of the corresponding instance of + address node that is also the value of an existing + instance."; + } + } + config false; + description + "The status of this entry."; + } + uses dot1qtypes:port-map-grouping; + } + } + container bridge-vlan { + when "../../bridge-type != 'dot1q:two-port-mac-relay-bridge'" { + description + "Applies to non TPMRs."; + } + description + "The Bridge VLAN container models configuration + information that modify, or inquire about, the overall + configuration of the Bridges VLAN resources. There is a + single Bridge VLAN Configuration managed object per + Bridge."; + reference + "12.10 of IEEE Std 802.1Q-2018"; + leaf version { + type uint16; + config false; + description + "The version number supported."; + reference + "12.10.1.3 of IEEE Std 802.1Q-2018"; + } + leaf max-vids { + type uint16; + config false; + description + "The maximum number of VIDs supported."; + reference + "12.10.1.3 of IEEE Std 802.1Q-2018"; + } + leaf override-default-pvid { + type boolean; + default "false"; + config false; + description + "Indicates if the default PVID can be overridden, and + its egress status (VLAN-tagged or untagged) on each + port."; + reference + "12.10.1.3 of IEEE Std 802.1Q-2018"; + } + leaf protocol-template { + if-feature "port-and-protocol-based-vlan"; + type dot1qtypes:protocol-frame-format-type; + config false; + description + "The data-link encapsulation format or the + detagged_frame_type in a Protocol Template"; + reference + "12.10.1.7 of IEEE Std 802.1Q-2018"; + } + leaf max-msti { + type uint16; + config false; + description + "The maximum number of MSTIs supported within an MST + region (i.e., the number of spanning tree instances that + can be supported in addition to the CIST), for MST + Bridges. For SST Bridges, this parameter may be either + omitted or reported as 0."; + reference + "12.10.1.7 of IEEE Std 802.1Q-2018"; + } + list vlan { + key "vid"; + description + "List of VLAN related configuration nodes associated + with the Bridge."; + reference + "12.10.2 of IEEE Std 802.1Q-2018"; + leaf vid { + type dot1qtypes:vlan-index-type; + description + "The VLAN identifier to which this entry applies."; + reference + "12.10.2 of IEEE Std 802.1Q-2018"; + } + leaf name { + type dot1qtypes:name-type; + description + "A text string of up to 32 characters of locally + determined significance."; + reference + "12.10.2 of IEEE Std 802.1Q-2018"; + } + leaf-list untagged-ports { + type if:interface-ref; + config false; + description + "The set of ports in the untagged set for this VID."; + reference + "12.10.2.1.3 of IEEE Std 802.1Q-2018 + 8.8.2 of IEEE Std 802.1Q-2018"; + } + leaf-list egress-ports { + type if:interface-ref; + config false; + description + "The set of egress ports in the member set for this + VID."; + reference + "12.10.2.1.3 of IEEE Std 802.1Q-2018 + 8.8.10 of IEEE Std 802.1Q-2018"; + } + } + list protocol-group-database { + if-feature "port-and-protocol-based-vlan"; + key "db-index"; + description + "List of the protocol group database entries."; + reference + "12.10.1.7 of IEEE Std 802.1Q-2018 + 6.12.3 of IEEE Std 802.1Q-2018"; + leaf db-index { + type uint16; + description + "The protocol group database index."; + } + leaf frame-format-type { + type dot1qtypes:protocol-frame-format-type; + description + "The data-link encapsulation format or the + detagged_frame_type in a Protocol Template"; + reference + "12.10.1.7 of IEEE Std 802.1Q-2018"; + } + choice frame-format { + description + "The identification of the protocol above the + data-link layer in a Protocol Template. Depending on + the frame type, the octet string will have one of the + following values: - For ethernet, rfc1042 and + snap8021H, this is the 16-bit (2-octet) IEEE 802 + Clause 9.3 EtherType field. - For snapOther, this is + the 40-bit (5-octet) PID. - For llcOther, this is the + 2-octet IEEE 802.2 Link Service Access Point (LSAP) + pair: first octet for Destination Service Access Point + (DSAP) and second octet for Source Service Access + Point (SSAP)."; + reference + "12.10.1.7 of IEEE Std 802.1Q-2018"; + case ethernet-rfc1042-snap8021H { + when + "frame-format-type = 'Ethernet' or "+ + "frame-format-type = 'rfc1042' or "+ + "frame-format-type = 'snap8021H'" { + description + "Applies to Ethernet, RFC 1042, SNAP 8021H frame + formats."; + } + description + "Identifier used if Ethenet, RFC1042, or SNAP 8021H."; + leaf ethertype { + type dot1qtypes:ethertype-type; + description + "Format containing the 16-bit IEEE 802 EtherType + field."; + reference + "9.3 of IEEE Std 802-2014"; + } + } + case snap-other { + when "frame-format-type = 'snapOther'" { + description + "Applies to Snap Other frame formats."; + } + description + "Identifier used if SNAP other."; + leaf protocol-id { + type string { + pattern "[0-9a-fA-F]{2}(-[0-9a-fA-F]{2}){4}"; + } + description + "Format containing the 40-bit protocol identifier + (PID). The canonical representation uses uppercase + characters."; + reference + "12.10.1.7.1 of IEEE Std 802.1Q-2018"; + } + } + case llc-other { + when "frame-format-type = 'llcOther'" { + description + "Applies to LLC Other frame formats"; + } + description + "Identifier used if LLC other."; + container dsap-ssap-pairs { + description + "A pair of ISO/IEC 8802-2 DSAP and SSAP address + field values, for matching frame formats of + LLC_Other."; + leaf llc-address { + type string { + pattern "[0-9a-fA-F]{2}-[0-9a-fA-F]{2}"; + } + description + "A pair of ISO/IEC 8802-2 DSAP and SSAP address + field values, for matching frame formats of + LLC_Other. The canonical representation uses + uppercase characters."; + reference + "12.10.1.7.1 of IEEE Std 802.1Q-2018"; + } + } + } + } + leaf group-id { + type uint32; + description + "Designates a group of protocols in the Protocol Group + Database."; + reference + "6.12.2 of IEEE Std 802.1Q-2018"; + } + } + list vid-to-fid-allocation { + key "vids"; + description + "This list allows inquiries about VID to FID + allocations."; + leaf vids { + type dot1qtypes:vid-range-type; + description + "Range of VLAN identifiers."; + reference + "12.10.3 of IEEE Std 802.1Q-2018"; + } + leaf fid { + type uint32; + config false; + description + "The Filtering Database used by a set of VIDs."; + reference + "12.10.3 of IEEE Std 802.1Q-2018"; + } + leaf allocation-type { + type enumeration { + enum undefined { + description + "No allocation defined."; + } + enum fixed { + description + "A fixed allocation to FID is defined."; + } + enum dynamic { + description + "A dynamic allocation to FID is defined."; + } + } + config false; + description + "The type of allocation used"; + reference + "12.10.3 of IEEE Std 802.1Q-2018"; + } + } + list fid-to-vid-allocation { + key "fid"; + description + "The FID to VID allocations managed object models + operations that inquire about FID to VID allocations."; + leaf fid { + type uint32; + description + "The Filtering Database used by a set of VIDs."; + reference + "12.10.3 of IEEE Std 802.1Q-2018"; + } + leaf allocation-type { + type enumeration { + enum undefined { + description + "No allocation defined."; + } + enum fixed { + description + "A fixed allocation to FID is defined."; + } + enum dynamic { + description + "A dynamic allocation to FID is defined."; + } + } + config false; + description + "The type of allocation used"; + reference + "12.10.3 of IEEE Std 802.1Q-2018"; + } + leaf-list vid { + type dot1qtypes:vlan-index-type; + config false; + description + "The VLAN identifier to which this entry applies."; + reference + "12.7.7 of IEEE Std 802.1Q-2018"; + } + } + list vid-to-fid { + key "vid"; + description + "Fixed allocation of a VID to an FID. The underlying + system will ensure that subsequent commands that make + changes to the VID to FID mapping can override previous + associations."; + reference + "12.10.3.4 of IEEE Std 802.1Q-2018 + 12.10.3.5 of IEEE Std 802.1Q-2018"; + leaf vid { + type dot1qtypes:vlan-index-type; + description + "A list of VLAN identifier associated with a given + database identifier (i.e., FID)."; + reference + "12.7.7 of IEEE Std 802.1Q-2018"; + } + leaf fid { + type uint32; + description + "The Filtering Database used by this VLAN"; + reference + "12.10.3 of IEEE Std 802.1Q-2018"; + } + } + } + container bridge-mst { + when "../../bridge-type != 'dot1q:two-port-mac-relay-bridge'" { + description + "Applies to non TPMRs."; + } + description + "The Bridge MST container models configuration information + that modify, or inquire about, the overall configuration + of the Bridges MST resources."; + reference + "12.12 of IEEE Std 802.1Q-2018"; + leaf-list mstid { + type dot1qtypes:mstid-type; + description + "The list of MSTID values that are currently supported + by the Bridge"; + } + list fid-to-mstid { + key "fid"; + description + "The FID to MSTID allocation table."; + reference + "12.12.2 of IEEE Std 802.1Q-2018"; + leaf fid { + type uint32; + description + "The Filtering Database identifier."; + reference + "12.12.2 of IEEE Std 802.1Q-2018"; + } + leaf mstid { + type dot1qtypes:mstid-type; + description + "The MSTID to which the FID is to be allocated."; + reference + "12.12.2 of IEEE Std 802.1Q-2018"; + } + } + list fid-to-mstid-allocation { + key "fids"; + description + "The FID to MSTID allocation table"; + leaf fids { + type dot1qtypes:vid-range-type; + description + "Range of FIDs."; + reference + "12.12.2 of IEEE Std 802.1Q-2018"; + } + leaf mstid { + type dot1qtypes:mstid-type; + description + "The MSTID to which the FID is allocated."; + reference + "12.12.2 of IEEE Std 802.1Q-2018"; + } + } + } + } + } + } + augment "/if:interfaces/if:interface" { + when + "if:type = 'ianaif:bridge' or if:type ="+ + "'ianaif:ethernetCsmacd' or if:type = 'ianaif:ieee8023adLag'"+ + "or if:type = 'ianaif:ilan'" { + description + "Applies when a Bridge interface."; + } + description + "Augment the interface model with the Bridge Port"; + container bridge-port { + description + "Bridge Port is an extension of the IETF Interfaces model + (RFC7223)."; + leaf component-name { + type string; + description + "Used to reference configured Component node."; + } + leaf port-type { + type identityref { + base type-of-port; + } + description + "The port type. Indicates the capabilities of this port."; + reference + "12.4.2.1 of IEEE Std 802.1Q-2018"; + } + leaf pvid { + when "../component-name != 'd-bridge-component'" { + description + "Applies to non TPMRs"; + } + type dot1qtypes:vlan-index-type; + default "1"; + description + "The primary (default) VID assigned to a specific Bridge + Port."; + reference + "12.10.1 of IEEE Std 802.1Q-2018 + 5.4, item m) of IEEE Std 802.1Q-2018"; + } + leaf default-priority { + type dot1qtypes:priority-type; + default "0"; + description + "The default priority assigned to a specific Bridge Port."; + reference + "12.6.2 of IEEE Std 802.1Q-2018"; + } + container priority-regeneration { + description + "The Priority Regeneration Table parameters associated with + a specific Bridge Port. A list of Regenerated User + Priorities for each received priority on each port of a + Bridge. The regenerated priority value may be used to index + the Traffic Class Table for each input port. This only has + effect on media that support native priority. The default + values for Regenerated User Priorities are the same as the + User Priorities"; + reference + "12.6.2 of IEEE Std 802.1Q-2018 + 6.9.4 of IEEE Std 802.1Q-2018"; + uses dot1qtypes:priority-regeneration-table-grouping; + } + leaf pcp-selection { + type dot1qtypes:pcp-selection-type; + default "8P0D"; + description + "The Priority Code Point selection assigned to a specific + Bridge Port. This object identifies the rows in the PCP + encoding and decoding tables that are used to remark frames + on this port if this remarking is enabled"; + reference + "12.6.2 of IEEE Std 802.1Q-2018 + 6.9.3 of IEEE Std 802.1Q-2018"; + } + container pcp-decoding-table { + description + "The Priority Code Point Decoding Table parameters + associated with a specific Bridge Port."; + uses dot1qtypes:pcp-decoding-table-grouping; + } + container pcp-encoding-table { + description + "The Priority Code Point Encoding Table parameters + associated with a specific Bridge Port."; + uses dot1qtypes:pcp-encoding-table-grouping; + } + leaf use-dei { + type boolean; + default "false"; + description + "The Drop Eligible Indicator. If it is set to True, then the + drop_eligible parameter is encoded in the DEI of transmitted + frames, and the drop_eligible parameter shall be true(1) for + a received frame if the DEI is set in the VLAN tag or the + Priority Code Point Decoding Table indicates drop_eligible + True for the received PCP value. If this parameter is False, + the DEI shall be transmitted as zero and ignored on receipt."; + reference + "12.6.2 of IEEE Std 802.1Q-2018 + 6.9.3 of IEEE Std 802.1Q-2018"; + } + leaf drop-encoding { + type boolean; + default "false"; + description + "The Drop Encoding parameter. If a Bridge supports encoding + or decoding of drop_eligible from the PCP field of a VLAN + tag (6.7.3) on any of its Ports, then it shall implement a + Boolean parameter Require Drop Encoding on each of its Ports + with default value False. If Require Drop Encoding is True + and the Bridge Port cannot encode particular priorities with + drop_eligible, then frames queued with those priorities and + drop_eligible True shall be discarded and not transmitted."; + reference + "12.6.2 of IEEE Std 802.1Q-2018 + 8.6.6 of IEEE Std 802.1Q-2018"; + } + leaf service-access-priority-selection { + type boolean; + default "false"; + description + "The Service Access Priority selection. Indication of + whether the Service Access Priority Selection function is + supported on the Customer Bridge Port to request priority + handling of the frame from a Port-based service interface."; + reference + "12.6.2 of IEEE Std 802.1Q-2018 + 6.13 of IEEE Std 802.1Q-2018"; + } + container service-access-priority { + description + "The Service Access Priority table parameters. A table that + contains information about the Service Access Priority + Selection function for a Provider Bridge. The use of this + table enables a mechanism for a Customer Bridge attached to + a Provider Bridged Network to request priority handling of + frames."; + reference + "12.6.2 of IEEE Std 802.1Q-2018 + 6.13.1 of IEEE Std 802.1Q-2018"; + uses dot1qtypes:service-access-priority-table-grouping; + } + container traffic-class { + description + "The Traffic Class table parameters. A table mapping + evaluated priority to Traffic Class, for forwarding by the + Bridge"; + reference + "12.6.3 of IEEE Std 802.1Q-2018 + 8.6.6 of IEEE Std 802.1Q-2018"; + uses dot1qtypes:traffic-class-table-grouping; + } + leaf acceptable-frame { + when "../component-name != 'd-bridge-component'" { + description + "Applies to non TPMRs"; + } + type enumeration { + enum admit-only-VLAN-tagged-frames { + description + "Admit only VLAN-tagged frames."; + } + enum admit-only-untagged-and-priority-tagged { + description + "Admit only untagged and priority-tagged frames."; + } + enum admit-all-frames { + description + "Admit all frames."; + } + } + default "admit-all-frames"; + description + "To configure the Acceptable Frame Types parameter + associated with one or more Ports"; + reference + "12.10.1.3 of IEEE Std 802.1Q-2018 + 6.9 of IEEE Std 802.1Q-2018"; + } + leaf enable-ingress-filtering { + when "../component-name != 'd-bridge-component'" { + description + "Applies to non TPMRs"; + } + type boolean; + default "false"; + description + "To enable the Ingress Filtering feature associated with one + or more Ports."; + reference + "12.10.1.4 of IEEE Std 802.1Q-2018 + 8.6.2 of IEEE Std 802.1Q-2018"; + } + leaf enable-restricted-vlan-registration { + when "../component-name != 'd-bridge-component'" { + description + "Applies to non TPMRs"; + } + type boolean; + default "false"; + description + "To enable the Restricted VLAN Registration associated with + one or more Ports."; + reference + "11.2.3.2.3 of IEEE Std 802.1Q-2018 + 12.10.1.6 of IEEE Std 802.1Q-2018"; + } + leaf enable-vid-translation-table { + when "../component-name != 'd-bridge-component'" { + description + "Applies to non TPMRs"; + } + type boolean; + default "false"; + description + "To enable VID Translation table associated with a Bridge + Port. This is not applicable to Bridge Ports that do no + support a VID Translation Table."; + reference + "12.10.1.8 of IEEE Std 802.1Q-2018 + 6.9 of IEEE Std 802.1Q-2018"; + } + leaf enable-egress-vid-translation-table { + when "../component-name != 'd-bridge-component'" { + description + "Applies to non TPMRs"; + } + type boolean; + default "false"; + description + "To enable Egress VID Translation table associated with a + Bridge Port. This is not applicable to Ports that do not + support an Egress VID Translation table."; + reference + "12.10.1.9 of IEEE Std 802.1Q-2018 + 6.9 of IEEE Std 802.1Q-2018"; + } + list protocol-group-vid-set { + when "../component-name != 'd-bridge-component'" { + description + "Applies to non TPMRs"; + } + if-feature "port-and-protocol-based-vlan"; + key "group-id"; + description + "The list of VID values associated with the Protocol Group + Identifier for this port."; + reference + "12.10.1.1.3 of IEEE Std 802.1Q-2018"; + leaf group-id { + type uint32; + description + "The protocol group identifier"; + reference + "12.10.1.7 of IEEE Std 802.1Q-2018"; + } + leaf-list vid { + type dot1qtypes:vlanid; + description + "The VLAN identifier to which this entry applies."; + reference + "12.10.2 of IEEE Std 802.1Q-2018"; + } + } + leaf admin-point-to-point { + type enumeration { + enum force-true { + value 1; + description + "Indicates that this port should always be treated as if + it is connected to a point-to-point link."; + } + enum force-false { + value 2; + description + "Indicates that this port should be treated as having a + shared media connection."; + } + enum auto { + value 3; + description + "Indicates that this port is considered to have a + point-to-point link if it is an Aggregator and all of + its members are aggregatable, or if the MAC entity is + configured for full duplex operation, either through + auto-negotiation or by management means."; + } + } + description + "For a port running spanning tree, this object represents + the administrative point-to-point status of the LAN segment + attached to this port, using the enumeration values of IEEE + Std 802.1AC. A value of forceTrue(1) indicates that this + port should always be treated as if it is connected to a + point-to-point link. A value of forceFalse(2) indicates that + this port should be treated as having a shared media + connection. A value of auto(3) indicates that this port is + considered to have a point-to-point link if it is an + Aggregator and all of its members are aggregatable, or if + the MAC entity is configured for full duplex operation, + either through auto-negotiation or by management means. + Manipulating this object changes the underlying + adminPointToPointMAC."; + reference + "12.4.2 of IEEE Std 802.1Q-2018 + 6.8.2 of IEEE Std 802.1Q-2018"; + } + leaf protocol-based-vlan-classification { + when "../component-name != 'd-bridge-component'" { + description + "Applies to non TPMRs"; + } + if-feature "port-and-protocol-based-vlan"; + type boolean; + config false; + description + "A boolean indication indicating if Port-and-Protocol-based + VLAN classification is supported on a given Port."; + reference + "5.4.1.2 of IEEE Std 802.1Q-2018"; + } + leaf max-vid-set-entries { + when "../component-name != 'd-bridge-component'" { + description + "Applies to non TPMRs"; + } + if-feature "port-and-protocol-based-vlan"; + type uint16; + config false; + description + "The maximum number of entries supported in the VID set on a + given Port."; + reference + "12.10.1.1.3 of IEEE Std 802.1Q-2018"; + } + leaf port-number { + type dot1qtypes:port-number-type; + config false; + description + "An integer that uniquely identifies a Bridge Port."; + reference + "12.3, item i) of IEEE Std 802.1Q-2018 + 17.3.2.2 of IEEE Std 802.1Q-2018"; + } + leaf address { + type ieee:mac-address; + config false; + description + "The specific MAC address of the individual MAC Entity + associated with the Port."; + reference + "12.4.2 of IEEE Std 802.1Q-2018 + 12.4.2.1.1.3, item a) of IEEE Std 802.1Q-2018"; + } + leaf capabilities { + type bits { + bit tagging { + position "0"; + description + "Supports 802.1Q VLAN tagging of frames and MVRP."; + } + bit configurable-acceptable-frame-type { + position "1"; + description + "Allows modified values of acceptable frame types"; + } + bit ingress-filtering { + position "2"; + description + "Supports the discarding of any frame received on a Port + whose VLAN classification does not include that Port in + its member set."; + } + } + config false; + description + "The feature capabilities associated with port. Indicates + the parts of IEEE 802.1Q that are optional on a per-port + basis, that are implemented by this device, and that are + manageable."; + reference + "12.10.1.1.3, item c) of IEEE Std 802.1Q-2018 + 12.4.2 of IEEE Std 802.1Q-2018"; + } + leaf type-capabilties { + type bits { + bit customer-vlan-port { + position "0"; + description + "Indicates the port can be a C-TAG aware port of an + enterprise VLAN aware Bridge"; + } + bit provider-network-port { + position "1"; + description + "Indicates the port can be an S-TAG aware port of a + Provider Bridge or Backbone Edge Bridge used for + connections within a PBN or PBBN."; + } + bit customer-network-port { + position "2"; + description + "Indicates the port can be an S-TAG aware port of a + Provider Bridge or Backbone Edge Bridge used for + connections to the exterior of a PBN or PBBN."; + } + bit customer-edge-port { + position "3"; + description + "Indicates the port can be a C-TAG aware port of a + Provider Bridge used for connections to the exterior of + a PBN or PBBN."; + } + bit customer-backbone-port { + position "4"; + description + "Indicates the port can be a I-TAG aware port of a + Backbone Edge Bridge's B-component."; + } + bit virtual-instance-port { + position "5"; + description + "Indicates the port can be a virtual S-TAG aware port + within a Backbone Edge Bridge's I-component which is + responsible for handling S-tagged traffic for a specific + backbone service instance."; + } + bit d-bridge-port { + position "6"; + description + "Indicates the port can be a VLAN-unaware member of an + 802.1Q Bridge."; + } + bit remote-customer-access-port { + position "7"; + description + "Indicates the port can be an S-TAG aware port of a + Provider Bridge capable of providing Remote Customer + Service Interfaces."; + } + bit station-facing-bridge-port { + position "8"; + description + "Indicates the station-facing Bridge Port in a EVB + Bridge."; + } + bit uplink-access-port { + position "9"; + description + "Indicates the uplink access port in an EVB Bridge or + EVB station."; + } + bit uplink-relay-port { + position "10"; + description + "Indicates the uplink relay port in an EVB station."; + } + } + config false; + description + "The type of feature capabilities supported with port. + Indicates the capabilities of this port."; + reference + "12.4.2 of IEEE Std 802.1Q-2018"; + } + leaf external { + type boolean; + config false; + description + "A boolean indicating whether the port is external. A value + of True means the port is external. A value of False means + the port is internal."; + reference + "12.4.2 of IEEE Std 802.1Q-2018"; + } + leaf oper-point-to-point { + type boolean; + config false; + description + "For a port running spanning tree, this object represents + the operational point-to-point status of the LAN segment + attached to this port. It indicates whether a port is + considered to have a point-to-point connection. + + If admin-point-to-point is set to auto(2), then the value of + oper-point-to-point is determined in accordance with the + specific procedures defined for the MAC entity concerned, as + defined in IEEE Std 802.1AC. + + The value is determined dynamically; that is, it is + re-evaluated whenever the value of admin-point-to-point + changes, and whenever the specific procedures defined for + the MAC entity evaluate a change in its point-to-point + status."; + reference + "IEEE Std 802.1AC + 12.4.2 of IEEE Std 802.1Q-2018"; + } + leaf media-dependent-overhead { + type uint8; + units "octets"; + config false; + description + "The portMediaDependentOverhead parameter provides the + number of additional octets for media-dependent framing. The + overhead includes all octets prior the first octet of the + Destination Address field and all octets after the last octet + of the frame check sequence."; + reference + "12.4.2 of IEEE Std 802.1Qcr-2020"; + } + container statistics { + config false; + description + "Container of operational state node information associated + with the bridge port."; + uses dot1qtypes:bridge-port-statistics-grouping; + leaf discard-on-ingress-filtering { + when "../../component-name != 'd-bridge-component'" { + description + "Applies to non TPMRs"; + } + if-feature "ingress-filtering"; + type yang:counter64; + description + "The number of frames that were discarded as a result of + Ingress Filtering being enabled. + + Discontinuities in the value of this counter can occur at + re-initialization of the management system, and at other + times as indicated by the value of 'discontinuity-time'."; + reference + "12.6.1.1.3 of IEEE Std 802.1Q-2018"; + } + } + list vid-translations { + when "../component-name != 'd-bridge-component'" { + description + "Applies to non TPMRs"; + } + key "local-vid"; + description + "To configure the VID Translation Table (6.9) associated + with a Port. This object is not applicable to Ports that do + not support a VID Translation Table. The default + configuration of the table has the value of the Relay VID + equal to the value of the Local VID. If no local VID is + configured, then it is assumed that the relay VID is the + same value as the local VID. + + If the port supports an Egress VID translation table, the + VID Translation Configuration object configures the Local + VID to Relay VID mapping on ingress only. If an Egress VID + translation is not supported, the VID Translation + Configuration object defines a single bidirectional mapping. + In this case, the Bridge should not allow multiple keys + ('local-vid') mapped to the same 'relay-vid' value."; + leaf local-vid { + type dot1qtypes:vlanid; + description + "The Local VID after translation received at the ISS or + EISS."; + reference + "12.10.1.8 of IEEE Std 802.1Q-2018 + 6.9 of IEEE Std 802.1Q-2018"; + } + leaf relay-vid { + type dot1qtypes:vlanid; + description + "The Relay VID received before translation received at ISS + or EISS."; + reference + "12.10.1.8 of IEEE Std 802.1Q-2018 + 6.9 of IEEE Std 802.1Q-2018"; + } + } + list egress-vid-translations { + when "../component-name != 'd-bridge-component'" { + description + "Applies to non TPMRs"; + } + key "relay-vid"; + description + "To configure the Egress VID Translation Table (6.9) + associated with a Port. This object is not applicable to + Ports that do not support an Egress VID Translation Table. + The default configuration of the table has the value of the + Local VID equal to the value of the Relay VID. If no Relay + VID is configured, then it is assumed that the local VID is + the same value as the relay VID."; + leaf relay-vid { + type dot1qtypes:vlanid; + description + "The Relay VID received before translation received at ISS + or EISS."; + reference + "12.10.1.9 of IEEE Std 802.1Q-2018 + 6.9 of IEEE Std 802.1Q-2018"; + } + leaf local-vid { + type dot1qtypes:vlanid; + description + "The Local VID after translation received at the ISS or + EISS."; + reference + "12.10.1.9 of IEEE Std 802.1Q-2018 + 6.9 of IEEE Std 802.1Q-2018"; + } + } + } + } +} diff --git a/standard/ieee/ieee802-dot1q-preemption.yang b/standard/ieee/ieee802-dot1q-preemption.yang new file mode 100644 index 0000000..2dd4a16 --- /dev/null +++ b/standard/ieee/ieee802-dot1q-preemption.yang @@ -0,0 +1,151 @@ +module ieee802-dot1q-preemption { + namespace urn:ieee:std:802.1Q:yang:ieee802-dot1q-preemption; + prefix preempt; + import ieee802-dot1q-types { + prefix dot1q-types; + } + import ietf-interfaces { + prefix if; + } + import ieee802-dot1q-bridge { + prefix dot1q; + } + organization + "IEEE 802.1 Working Group"; + contact + "WG-URL: http://www.ieee802.org/1/ + WG-EMail: stds-802-1-L@ieee.org + + Contact: IEEE 802.1 Working Group Chair + Postal: C/O IEEE 802.1 Working Group + IEEE Standards Association + 445 Hoes Lane + P.O. Box 1331 + Piscataway + NJ 08855-1331 + USA + + E-mail: STDS-802-1-L@IEEE.ORG"; + description + "This module provides for management of IEEE Std 802.1Q Bridges + that support Frame Preemption."; + + revision 2020-07-07 { + description + "Published as part of IEEE Std 802.1Qcw. + Initial version."; + reference + "IEEE Std 802.1Qcw - Bridges and Bridged Networks — Amendment: + YANG Data Models for Scheduled Traffic, Frame Preemption, and + Per-Stream Filtering and Policing."; + } + + feature frame-preemption { + description + "Frame preemption supported."; + reference + "IEEE Std 802.1Q-2018"; + } + augment "/if:interfaces/if:interface/dot1q:bridge-port" { + if-feature "frame-preemption"; + description + "Augment bridge-port with Frame Preemption configuration."; + container frame-preemption-parameters { + description + "A table containing a set of frame preemption parameters, one + for each Port. All writeable objects in this table must be + persistent over power up restart/reboot."; + reference + "12.30.1 of IEEE Std 802.1Q-2018"; + list frame-preemption-status-table { + key "priority"; + description + "The framePreemptionStatusTable consists of 8 + framePreemptionAdminStatus values, one per priority"; + reference + "12.30.1.1 of IEEE Std 802.1Q-2018"; + leaf priority { + type dot1q-types:priority-type; + description + "Priority."; + } + leaf frame-preemption-status { + type enumeration { + enum express { + description + "Frames queued for the priority are to be transmitted + using the express service for the Port."; + } + enum preemptible { + description + "Frames queued for the priority are to be transmitted + using the preemptible service for the Port and + preemption is enabled for the Port."; + } + } + default "express"; + description + "The value of the framePreemptionAdminStatus parameter for + the traffic class. The default value of the + framePreemptionAdminStatus parameter is express. The + value of this object must be retained across + reinitializations of the management system."; + reference + "12.30.1.1.1 of IEEE Std 802.1Q-2018"; + } + } + leaf hold-advance { + type uint32; + units "nanoseconds"; + config false; + description + "The value of the holdAdvance parameter for the Port in + nanoseconds. There is no default value; the holdAdvance is a + property of the underlying MAC."; + reference + "12.30.1.2 of IEEE Std 802.1Q-2018"; + } + leaf release-advance { + type uint32; + units "nanoseconds"; + config false; + description + "The value of the releaseAdvance parameter for the Port in + nanoseconds. There is no default value; the releaseAdvance + is a property of the underlying MAC."; + reference + "12.30.1.3 of IEEE Std 802.1Q-2018"; + } + leaf preemption-active { + type boolean; + config false; + description + "TRUE if preemption is both supported by the MAC and + currently active."; + reference + "12.30.1.4 of IEEE Std 802.1Q-2018"; + } + leaf hold-request { + type enumeration { + enum hold { + value 1; + description + "A hold request has been issued to the MAC."; + } + enum release { + value 2; + description + "A release request has been issued to the MAC."; + } + } + config false; + description + "The value of the holdRequest parameter for the Port, either + hold (1) or release (2). The value of this object is release + (2) on system initialization."; + reference + "12.30.1.5 of IEEE Std 802.1Q-2018"; + } + } + } +} diff --git a/standard/ieee/ieee802-dot1q-stream-filters-gates.yang b/standard/ieee/ieee802-dot1q-stream-filters-gates.yang new file mode 100644 index 0000000..5b70f16 --- /dev/null +++ b/standard/ieee/ieee802-dot1q-stream-filters-gates.yang @@ -0,0 +1,385 @@ +module ieee802-dot1q-stream-filters-gates { + yang-version "1.1"; + namespace urn:ieee:std:802.1Q:yang:ieee802-dot1q-stream-filters-gates; + prefix sfsg; + import ieee802-dot1q-bridge { + prefix dot1q; + } + organization + "IEEE 802.1 Working Group"; + contact + "WG-URL: http://ieee802.org/1/ + WG-EMail: stds-802-1-l@ieee.org + + Contact: IEEE 802.1 Working Group Chair + Postal: C/O IEEE 802.1 Working Group + IEEE Standards Association + 445 Hoes Lane + Piscataway, NJ 08854 + USA + + E-mail: stds-802-1-chairs@ieee.org"; + description + "This module provides management of 802.1Q bridge components that support + Stream Filters and Stream Gates."; + revision 2020-11-06 { + description + "Published as part of IEEE Std 802.1Qcr-2020. + Initial version."; + reference + "IEEE Std 802.1Qcr-2020, Bridges and Bridged Networks - + Asynchronous Traffic Shaping."; + } + + feature closed-gate-state { + description + "The bridge component supports gate state closed."; + reference + "IEEE Std 802.1Qcr-2020"; + } + + /* Types and groupings */ + typedef priority-spec-type { + type enumeration { + enum zero { + value 0; + description + "Priority 0"; + } + enum one { + value 1; + description + "Priority 1"; + } + enum two { + value 2; + description + "Priority 2"; + } + enum three { + value 3; + description + "Priority 3"; + } + enum four { + value 4; + description + "Priority 4"; + } + enum five { + value 5; + description + "Priority 5"; + } + enum six { + value 6; + description + "Priority 6"; + } + enum seven { + value 7; + description + "Priority 7"; + } + enum wildcard { + description + "wildcard value"; + } + } + } + typedef ipv-spec-type { + type enumeration { + enum zero { + value 0; + description + "Priority 0"; + } + enum one { + value 1; + description + "Priority 1"; + } + enum two { + value 2; + description + "Priority 2"; + } + enum three { + value 3; + description + "Priority 3"; + } + enum four { + value 4; + description + "Priority 4"; + } + enum five { + value 5; + description + "Priority 5"; + } + enum six { + value 6; + description + "Priority 6"; + } + enum seven { + value 7; + description + "Priority 7"; + } + enum null { + description + "null value"; + } + } + description + "An IPV can be either of the following: + 1) The null value. For a frame that passes through the gate, the + priority value associated with the frame is used to determine + the frame’s traffic class, using the Traffic Class Table as + specified in 8.6.6. + 2) An internal priority value. For a frame that passes through the + gate, the IPV is used, in place of the priority value + associated with the frame, to determine the frame’s traffic + class, using the Traffic Class Table as specified in 8.6.6."; + reference + "8.6.5.2 of IEEE Std 802.1Qcr-2020"; + } + typedef gate-state-value-type { + type enumeration { + enum closed { + description + "Gate closed"; + } + enum open { + description + "Gate open"; + } + } + description + "The gate-state-value-type indicates a gate state, open or closed, + for the stream gate."; + reference + "12.31.3.2.1 of IEEE Std 802.1Qcr-2020"; + } + typedef stream-gate-ref { + type leafref { + path + '/dot1q:bridges'+ + '/dot1q:bridge'+ + '/dot1q:component'+ + '/sfsg:stream-gates'+ + '/sfsg:stream-gate-instance-table'+ + '/sfsg:stream-gate-instance-id'; + } + description + "This type is used to refer to a stream gate instance."; + } + augment "/dot1q:bridges/dot1q:bridge/dot1q:component" { + description + "Augments the Bridge component with stream filters and stream gates."; + container stream-filters { + description + "This container encapsulates all nodes related to stream bilters."; + reference + "12.31.1 of IEEE Std 802.1Qcr-2020 + 12.31.2 of IEEE Std 802.1Qcr-2020 + 12.31.3 of IEEE Std 802.1Qcr-2020"; + list stream-filter-instance-table { + key "stream-filter-instance-id"; + description + "Each list entry contains a set of parameters that defines a + single stream filter (8.6.5.1) with associated maximum SDU size + filtering (8.6.5.3.1), as detailed in Table 12-32. Entries can be + created or removed dynamically in implementations that support + dynamic configuration of stream filters. The value of the + stream-handle-spec and priority-spec parameters associated with a + received frame determine which stream filter is selected by the + frame, and therefore what combination of filtering and policing + actions is applied to the frame. If the stream-handle-spec and + priority-spec parameters associated with a received frame match + more than one stream filter, the stream filter that is selected + is the one that appears earliest in the ordered list. If a + received frame’s stream-handle-spec and priority-spec does not + match any of the stream filters in the list, the frame is + processed as if stream filters and stream gates would not be + supported."; + reference + "12.31.2 of IEEE Std 802.1Qcr-2020"; + leaf stream-filter-instance-id { + type uint32; + mandatory true; + description + "An integer index value that determines the place of the stream + filter in the ordered list of stream filter instances. The + values are ordered according to their integer value; smaller + values appear earlier in the ordered list."; + reference + "12.31.2.1 of IEEE Std 802.1Qcr-2020"; + } + choice stream-handle-spec { + description + "The stream_handle specification data type allows either of the + following to be represented: + a) A stream_handle value, represented as an integer. + b) The wildcard value, which matches any frame"; + reference + "12.31.2.2 of IEEE Std 802.1Qcr-2020"; + + /* NOTE: The mapping of the wildcard literal is + * other than in the MIB definition, where + * the wildcard value is mapped to -1. + */ + case wildcard { + leaf wildcard { + type empty; + description + "The stream handle specification represents a wildcard value."; + } + } + case stream-handle { + leaf stream-handle { + type uint32; + mandatory true; + description + "The stream handle specification refers to a stream_handle + value."; + } + } + } + leaf priority-spec { + type priority-spec-type; + mandatory true; + description + "The priority specification data type allows either of the + following to be represented: + a) A priority value, represented as an integer. + b) The wildcard value, which matches any priority."; + reference + "12.31.2.3 of IEEE Std 802.1Qcr-2020"; + } + leaf max-sdu-size { + type uint32; + units "octets"; + mandatory true; + description + "The allowed maximum SDU size, in octets. If set to 0, any SDU + size is accepted."; + reference + "8.6.5.3.1 of IEEE Std 802.1Qcr-2020"; + } + leaf stream-blocked-due-to-oversize-frame-enabled { + type boolean; + default "false"; + description + "A value of true indicates that + stream-blocked-due-to-oversize-frame is set to true as soon as + a frame exceeds max-sdu-size."; + reference + "8.6.5.3.1 of IEEE Std 802.1Qcr-2020"; + } + leaf stream-blocked-due-to-oversize-frame { + type boolean; + default "false"; + description + "Indicates by value true that frames are permanently discarded + as a result of an initial frame exceeding max-sdu-size. The + value of stream-blocked-due-to-oversize-frame can be + administratively reset to false."; + reference + "8.6.5.3.1 of IEEE Std 802.1Qcr-2020"; + } + leaf stream-gate-ref { + type stream-gate-ref; + mandatory true; + description + "This node refers to the stream gate (12.31.3) that is + associated with the stream filter. The relationship between + stream filters and stream gates is many to one; a given stream + filter can be associated with only one stream gate, but there + can be multiple stream filters associated with a given stream + gate."; + reference + "12.31.2.4 of IEEE Std 802.1Qcr-2020"; + } + } + leaf max-stream-filter-instances { + type uint32; + config false; + description + "The maximum number of stream filter instances supported by this + Bridge component."; + reference + "12.31.1.1 of IEEE Std 802.1Qcr-2020 + 8.6.5.1 of IEEE Std 802.1Qcr-2020"; + } + } + container stream-gates { + description + "This container encapsulates all nodes related to Stream Gates."; + list stream-gate-instance-table { + key "stream-gate-instance-id"; + description + "Each list entry contains a set of parameters that defines a + single stream gate (8.6.5.2), as detailed in Table 12-33. Entries + in the table can be created or removed dynamically in + implementations that support dynamic configuration of stream + gates."; + reference + "12.31.3 of IEEE Std 802.1Qcr-2020"; + leaf stream-gate-instance-id { + type uint32; + description + "An integer table index that allows the stream gate to be + referenced from Stream Filter Instance Table entries."; + reference + "12.31.2.4 of IEEE Std 802.1Qcr-2020 + 8.6.5.3 of IEEE Std 802.1Qcr-2020 + 8.6.5.4 of IEEE Std 802.1Qcr-2020"; + } + leaf gate-enable { + type boolean; + default "false"; + description + "A Boolean variable that indicates whether the operation of the + state machines is enabled (TRUE) or disabled (FALSE). This + variable is set by management. The default value of this + variable is FALSE."; + reference + "8.6.9.4.14 of IEEE Std 802.1Q-2018"; + } + leaf admin-gate-states { + type gate-state-value-type; + default "open"; + description + "The administratively set gate state of this gate."; + reference + "12.31.3.2.1 of IEEE Std 802.1Qcr-2020 + 8.6.10.4 of IEEE Std 802.1Qcr-2020"; + } + leaf admin-ipv { + type ipv-spec-type; + default "null"; + description + "The administratively set internal priority value + specification."; + reference + "12.31.3.3 of IEEE Std 802.1Qcr-2020 + 8.6.10.6 of IEEE Std 802.1Qcr-2020 + 8.6.5.4 of IEEE Std 802.1Qcr-2020"; + } + } + leaf max-stream-gate-instances { + type uint32; + config false; + description + "The maximum number of Stream Gate instances supported by this + Bridge component."; + reference + "12.31.1.2 of IEEE Std 802.1Qcr-2020"; + } + } + } +} diff --git a/standard/ieee/ieee802-dot1q-tsn-types.yang b/standard/ieee/ieee802-dot1q-tsn-types.yang new file mode 100644 index 0000000..8486652 --- /dev/null +++ b/standard/ieee/ieee802-dot1q-tsn-types.yang @@ -0,0 +1,1477 @@ +module ieee802-dot1q-tsn-types { + + namespace "urn:ieee:std:802.1Q:yang:ieee802-dot1q-tsn-types"; + prefix "dot1q-tsn-types"; + + import ietf-inet-types { prefix "inet"; } + + organization + "Institute of Electrical and Electronics Engineers"; + + contact + "WG-URL: http://ieee802.org/1/ + WG-EMail: stds-802-1@ieee.org + + Contact: IEEE 802.1 Working Group Chair + Postal: C/O IEEE 802.1 Working Group + IEEE Standards Association + 445 Hoes Lane + Piscataway + NJ 08854 + USA + + E-mail: stds-802-1@ieee.org"; + + description + "Common typedefs and groupings for TSN user/network configuration + in IEEE Std 802.1Q."; + + revision 2018-02-15 { + description + "Initial revision specified in 46.3 of IEEE Std 802.1Qcc-2018, + Amendment: Stream Reservation Protocol (SRP) Enhancements + and Performance Improvements."; + reference + "46.3 of IEEE Std 802.1Qcc-2018"; + } + + typedef stream-id-type { + type string { + pattern '[0-9a-fA-F]{2}(-[0-9a-fA-F]{2}){5}:[0-9a-fA-F]{2}-[0-9a-fA-F]{2}'; + } + description + "This typedef specifies a Stream ID, a unique identifier + of the Stream's configuration, used by protocols in the + network to associate the user's Stream with TSN resources. + + The Stream ID is a string that represents two fields: + + MAC Address: + + A 48-bit IEEE 802 MAC address associated with + the Talker sourcing the Stream to the bridged network. + The entire range of MAC addresses are acceptable. + + NOTE 1 — The MAC address component of the StreamID can, + but does not necessarily, have the same value as the + source_address parameter of any frame in the actual + data Stream. For example, the Stream ID can be assigned + by a TSN CUC (see 46.1.3.3 of IEEE Std 802.1Qcc-2018), + using a pool of MAC addresses that the TSN CUC maintains. + + NOTE 2 — If the MAC addresses used to construct + Stream IDs are not unique within the network, duplicate + Stream IDs can be generated, with unpredictable results. + + Unique ID: + + A 16-bit unique ID that is used to distinguish + between multiple Streams within the station + identified by MAC Address. + + The string specifies eight octets, with + each octet represented as two hexadecimal + characters. The first six octets specify + the MAC Address, using the canonical format of + IEEE Std 802, with a dash separating each octet. + The last two octets specify the Unique ID, + with the high-order octet, a dash, and then the + low-order octet. The MAC Address and Unique ID + are separated by colon. + + stream-id-type is intended for use by other modules + as the type for a key to a list of Stream + configurations (using group-talker and group-listener) + and a list of Stream status (using group-status-stream + and group-status-talker-listener)."; + reference + "46.2.3.1 of IEEE Std 802.1Qcc-2018"; + } + + grouping group-interface-id { + description + "This YANG grouping specifies the identification of + a distinct point of attachment (interface) in a station + (end station or Bridge)."; + reference + "46.2.3.3 of IEEE Std 802.1Qcc-2018"; + leaf mac-address { + type string { + pattern '[0-9a-fA-F]{2}(-[0-9a-fA-F]{2}){5}'; + } + description + "mac-address is the EUI-48 MAC address (IEEE Std 802) + of the interface in the station (end station or Bridge). + This MAC address uniquely identifies the station within + the local network. + + mac-address shall be included in an instance of + a container using group-interface-id. + + NOTE — This MAC address can be discovered in the + physical topology using protocols such as + IEEE Std 802.1AB (LLDP). LLDP supports MAC address + as a subtype for the station’s Chassis ID and Port ID. + If the station does not use MAC address for its LLDP IDs, + remote management can be used to associate this mac-address + to the values provided in the LLDP IDs. + + The string uses the hexadecimal representation + specified in IEEE Std 802 (i.e. canonical format)."; + } + leaf interface-name { + type string; + description + "interface-name is the name of the interface that is + assigned locally by the station (end station or Bridge). + + interface-name may be included in an instance of + a container using group-interface-id. + + IEEE Std 802 recommends that each distinct point of + attachment to an IEEE 802 network have its own EUI MAC + address. If the identified station follows this + IEEE 802 recommendation, the mac-address leaf + uniquely identifies the interface as well as the + station, and interface-name is not needed. + + If the mac-address applies to more than one interface + (distinct point of attachment) within the station, + interface-name provides a locally assigned name that + can help to identify the interface. + + When YANG is used for management of the station, + interface-name is the interface name that serves + as the key for the station’s interface list (RFC7223). + + NOTE 1 — The TSN CNC is typically located in a different + physical product than the station identified by this + group-interface-id. Since the interface-name is assigned + locally by the identified station, it is possible that + the station’s product will change interface-name in a + manner that the TSN CNC cannot detect. For example, + RFC7223 mentions that the YANG interface name can change + when a physical attachment point is inserted or removed. + + NOTE 2 — This interface name can be discovered in the + physical topology using protocols such as + IEEE Std 802.1AB (LLDP). LLDP supports interface name + as a subtype for its Port ID. If the station does not + use interface name for its LLDP Port ID, remote management + can be used to associate this interface-name to the values + provided in the LLDP Port ID."; + } + } + + grouping group-ieee802-mac-addresses { + description + "This YANG grouping specifies the pair of + IEEE 802 MAC addresses for Stream identification. + + The use of these fields for Stream identification + corresponds to the managed objects for + Stream identification in IEEE Std 802.1CB. + If inconsistency arises between this specification + and IEEE Std 802.1CB, IEEE Std 802.1CB takes + precedence."; + reference + "46.2.3.4.1 of IEEE Std 802.1Qcc-2018"; + leaf destination-mac-address { + type string { + pattern '[0-9a-fA-F]{2}(-[0-9a-fA-F]{2}){5}'; + } + description + "Destination MAC address. + + An address of all 1's specifies that + the destination MAC address is ignored for + purposes of Stream identification. + + The string uses the hexadecimal representation + specified in IEEE Std 802 (i.e. canonical format)."; + } + leaf source-mac-address { + type string { + pattern '[0-9a-fA-F]{2}(-[0-9a-fA-F]{2}){5}'; + } + description + "Source MAC address. + + An address of all 1's specifies that + the source MAC address is ignored for + purposes of Stream identification. + + The string uses the hexadecimal representation + specified in IEEE Std 802 (i.e. canonical format)."; + } + } + + grouping group-ieee802-vlan-tag { + description + "This YANG grouping specifies a + customer VLAN Tag (C-TAG of clause 9) + for Stream identification. + + The Drop Eligible Indicator (DEI) field is + not relevant from the perspective of a + TSN Talker/Listener. + + The use of these fields for Stream identification + corresponds to the managed objects for + Stream identification in IEEE Std 802.1CB. + If inconsistency arises between this specification + and IEEE Std 802.1CB, IEEE Std 802.1CB takes + precedence."; + reference + "46.2.3.4.2 of IEEE Std 802.1Qcc-2018"; + leaf priority-code-point { + type uint8 { + range "0 .. 7"; // 3 bits + } + description + "Priority Code Point (PCP) field. + + The priority-code-point is not used to + identify the Stream, but it does + identify a traffic class (queue) in + Bridges."; + } + leaf vlan-id { + type uint16 { + range "0 .. 4095"; // 12 bits + } + description + "VLAN ID (VID) field. + + If only the priority-code-point is known, + the vlan-id is specified as 0."; + } + } + + grouping group-ipv4-tuple { + description + "This YANG grouping specifies parameters + to identify an IPv4 (RFC791) Stream. + + The use of these fields for Stream identification + corresponds to the managed objects for + Stream identification in IEEE Std 802.1CB. + If inconsistency arises between this specification + and IEEE Std 802.1CB, IEEE Std 802.1CB takes + precedence."; + reference + "46.2.3.4.3 of IEEE Std 802.1Qcc-2018"; + leaf source-ip-address { + type inet:ipv4-address; + description + "Source IPv4 address. + + An address of all 0's specifies that + the IP source address is ignored for + purposes of Stream identification."; + } + leaf destination-ip-address { + type inet:ipv4-address; + description + "Destination IPv4 address."; + } + leaf dscp { + type uint8; + description + "Differentiated services code + point, DSCP (RFC2474). + + A value of 64 decimal specifies that + the DSCP is ignored for + purposes of Stream identification."; + } + leaf protocol { + type uint16; + description + "IPv4 Protocol (e.g. UDP). + + The special value of all 1’s (FFFF hex) + represents ’None’, meaning that + protocol, source-port, and + destination-port are ignored for + purposes of Stream identification. + + For any value other than all 1’s, the + lower octet is used to match IPv4 Protocol."; + } + leaf source-port { + type uint16; + description + "This matches the source port of the protocol."; + } + leaf destination-port { + type uint16; + description + "This matches the destination port of the protocol."; + } + } + + grouping group-ipv6-tuple { + description + "This YANG grouping specifies parameters + to identify an IPv6 (RFC2460) Stream. + + The use of these fields for Stream identification + corresponds to the managed objects for + Stream identification in IEEE Std 802.1CB. + If inconsistency arises between this specification + and IEEE Std 802.1CB, IEEE Std 802.1CB takes + precedence."; + reference + "46.2.3.4.4 of IEEE Std 802.1Qcc-2018"; + leaf source-ip-address { + type inet:ipv6-address; + description + "Source IPv6 address. + + An address of all 0's specifies that + the IP source address is ignored for + purposes of Stream identification."; + } + leaf destination-ip-address { + type inet:ipv6-address; + description + "Destination IPv6 address."; + } + leaf dscp { + type uint8; + description + "Differentiated services code + point, DSCP (RFC2474). + + A value of 64 decimal specifies that + the DSCP is ignored for + purposes of Stream identification."; + } + leaf protocol { + type uint16; + description + "IPv6 Next Header (e.g. UDP). + + The special value of all 1’s (FFFF hex) + represents ’None’, meaning that + protocol, source-port, and + destination-port are ignored for + purposes of Stream identification. + + For any value other than all 1’s, the + lower octet is used to match IPv6 Next Header."; + } + leaf source-port { + type uint16; + description + "This matches the source port of the protocol."; + } + leaf destination-port { + type uint16; + description + "This matches the destination port of the protocol."; + } + } + + grouping group-user-to-network-requirements { + description + "This YANG grouping specifies specifies user requirements + for the Stream, such as latency and redundancy. + + The network (e.g. CNC) will merge + all user-to-network-requirements for a Stream + to ensure that all requirements are met."; + reference + "46.2.3.6 of IEEE Std 802.1Qcc-2018"; + leaf num-seamless-trees { + type uint8; + default "1"; + description + "num-seamless-trees specifies the number + of trees that the network will configure to + deliver seamless redundancy for the Stream. + + The value zero is interpreted as one + (i.e. no seamless redundancy). + + This requirement is provided from the Talker only. + Listeners shall set this leaf to one. + + From each Talker to a single Listener, the + network configures a path that relays Stream data + through Bridges. If the Talker has more + than one Listener, the network configures a + tree of multiple paths. + + num-seamless-trees specifies the number of maximally + disjoint trees that the network shall configure + from the Talker to all Listeners. Each + tree is disjoint from other trees, in that the + network evaluates the physical topology to avoid + sharing the same Bridge and links in each + tree’s paths. This computation of disjoint trees + is maximal, in that shared Bridges and links + are avoided to the maximum extent allowed + by the physical topology. For example, if a + single link exists from a Bridge to a Listener, + and num-seamless-trees is 3, then all 3 trees will + share that link to the Listener. + + When num-seamless-trees is greater than one, + the transfer of the Stream’s data frames + shall use a seamless redundancy standard, such as + IEEE Std 802.1CB. When a link shared by multiple trees + diverges to multiple disjoint links, the + seamless redundancy standard replicates + (i.e. forwards a distinct copy of each data frame + to the disjoint trees). When disjoint trees + converge to a single link, the seamless redundancy + standard eliminates the duplicate copies of each + data frame. Assuming that other sources of frame loss + are mitigated (e.g. congestion), failure of a link or + Bridge in one disjoint tree does not result in frame + loss as long as at least one remaining disjoint tree + is operational. + + If the Talker sets this leaf to one, the network + may make use of redundancy standards that are + not seamless (i.e. failure of link results in + lost frames), such as MSTP and IS-IS. + + If the Talker sets this leaf to greater than one, + and seamless redundancy is not possible in the + current network (no disjoint paths, or no seamless + redundancy standard in Bridges), + group-status-stream.status-info.failure-code + is non-zero (46.2.4.1 of IEEE Std 802.1Qcc-2018). + + If group-user-to-network-requirements is not + provided by the Talker or Listener, the network + shall use the default value of one for this leaf."; + reference + "46.2.3.6.1 of IEEE Std 802.1Qcc-2018"; + } + leaf max-latency { + type uint32; + default "0"; + description + "Maximum latency from Talker to + Listener(s) for a single frame of the Stream. + + max-latency is specified as an integer number + of nanoseconds. + + Latency shall use the definition of 3.102, + with additional context as follows: + The ’known reference point in the frame’ is + the message timestamp point specified in + IEEE Std 802.1AS for various media + (i.e. start of the frame). The ’first point’ + is in the Talker, at the reference plane + marking the boundary between the network + media and PHY (see IEEE Std 802.1AS). + The ’second point’ is in the Listener, + at the reference plane marking the boundary + between the network media and PHY. + + When this requirement is specified by + the Talker, it must be satisfied for + all Listeners. + + When this requirement is specified by + the Listener, it must be satisfied for + this Listener only. + + If group-user-to-network-requirements is + not provided by the Talker or Listener, + the network shall use the default value of + zero for this leaf. + + The special value of zero represents + usage of the initial value of + group-status-talker-listener.accumulated-latency + as the maximum latency requirement. This effectively + locks-down the initial latency that the network + calculates after successful configuration of the + Stream, such that any subsequent increase in + latency beyond that value causes the Stream to fail. + + The assumption for when the ’first point’ occurs + in the Talker depends on the presence of the + time-aware container in the Talker’s + traffic-specification. + + When time-aware is not present: + + The Talker is assumed to transmit + at an arbitrary time (not scheduled). + + When time-aware is present: + + The ’first point’ is assumed to occur + at the start of traffic-specification.interval, + as if the Talker’s offsets (earliest-transmit-offset + and latest-transmit-offset) are both zero. + The Talker’s offsets are not typically zero, + but use of the start of interval for purposes + of max-latency allows the Listener(s) to + schedule their application independently + from the Talker’s offset configuration. + + The Listener determines max-latency + based on its scheduling of a read + function in the application. Nevertheless, + the time from frame reception (i.e. ’second + point’) to execution of the read function + is in the user scope, and therefore + not included in max-latency. + + max-latency can be set to + a value greater than the Talker’s + interval, in order to specify a + longer latency requirement. For example, + if the Talker’s interval is 500 microsec, + and max-latency is 700 microsec, the Listener + receives the frame no later than + 200 microsec into the interval that follows + the Talker’s interval."; + reference + "46.2.3.6.2 of IEEE Std 802.1Qcc-2018"; + } + } + + grouping group-interface-capabilities { + description + "This YANG grouping specifies the network + capabilities of all interfaces (Ports) contained + in end-station-interfaces. + + The network may provide configuration + of these capabilities in + group-status-talker-listener.interface-configuration. + + NOTE: If an end station contains multiple interfaces + with different network capabilities, each interface + should be specified as a distinct Talker or + Listener (i.e. one entry in end-station-interfaces). + Use of multiple entries in end-station-interfaces is intended + for network capabilities that span multiple interfaces + (e.g. seamless redundancy)."; + reference + "46.2.3.7 of IEEE Std 802.1Qcc-2018"; + leaf vlan-tag-capable { + type boolean; + default "false"; + description + "When vlan-tag-capable is true, the interface supports + the ability to tag/untag frames using a + Customer VLAN Tag (C-TAG of clause 9) + provided by the network. + + For a Talker, the network’s tag replaces the + tag specified by the data-frame-specification. + If the data-frame-specification is untagged + (no group-ieee802-vlan-tag), the network’s tag is + inserted in the frame as it passes through the + interface. + + For a Listener, the user’s tag from + the data-frame-specification replaces the + network’s tag as the frame passes + through the interface. If the data-frame-specification + is untagged (no group-ieee802-vlan-tag), the + network’s tag is removed from the frame as it + passes through the interface. + + If the end station supports more than one interface + (i.e. more than one entry in end-station-interfaces), + vlan-tag-capable of true means that a distinct + VLAN tag can be applied to each interface. The list + of VLAN tag (one for each interface) can be provided + by the network in interface-configuration.interface-list + (ieee802-vlan-tag choice). + + When vlan-tag-capable is false, the interface + does not support the capability to tag/untag frames + using a Customer VLAN Tag (C-TAG of clause 9) + provided by the network. + + If interface-capabilities is not provided by the Talker + or Listener, the network shall use the default + value of false for this leaf."; + reference + "46.2.3.7.1 of IEEE Std 802.1Qcc-2018"; + } + leaf-list cb-stream-iden-type-list { + type uint32; + description + "cb-stream-iden-type-list provides a list of the + supported Stream Identification types as specified + in IEEE Std 802.1CB. + + Each Stream Identification type is provided as a + 32-bit unsigned integer. The upper three octets + contain the OUI/CID, and the lowest octet contains + the type number. + + NOTE — If the Talker/Listener end system supports + IEEE Std 802.1CB, Null Stream identification is + required, and that Stream Identification type is + included in this list. If the Talker/Listener end + system does not support IEEE Std 802.1CB, this + list is empty. + + If the end station supports more than one interface + (i.e. more than one interface-id in end-station-interfaces, + an empty cb-stream-iden-type-list means that the end station + is capable of transferring the Stream on any one of its + interfaces (not all). When this is specified, the network + shall decide which interface is best used for TSN purposes, + and communicate that decision by returning a single interface + in interface-configuration.interface-list. The + Talker/Listener uses this interface alone for the Stream. + + If interface-capabilities is not provided within + group-talker or group-listener, the network shall use an empty + list as the default value for this element."; + reference + "46.2.3.7.2 of IEEE Std 802.1Qcc-2018"; + } + leaf-list cb-sequence-type-list { + type uint32; + description + "cb-sequence-type-list provides a list of the supported + Sequence Encode/Decode types as specified in + IEEE Std 802.1CB. + + Each sequence type is provided as a 32-bit unsigned + integer. The upper three octets contain the OUI/CID, + and the lowest octet contains the type number. + + If interface-capabilities is not provided within + group-talker or group-listener, the network shall use an empty + list as the default value for this element."; + reference + "46.2.3.7.3 of IEEE Std 802.1Qcc-2018"; + } + } + + grouping group-interface-configuration { + description + "This YANG grouping provides configuration of + interfaces in the Talker/Listener. This configuration + assists the network in meeting the Stream’s requirements. + The interface-configuration meets the capabilities of + the interface as provided in interface-capabilities."; + reference + "46.2.5.3 of IEEE Std 802.1Qcc-2018"; + list interface-list { + key "mac-address interface-name"; + description + "A distinct configuration is provided for + each interface in the Talker/Listener (even if + multiple interfaces use the same configuration). + Each entry in this interface-list consists + of an interface identification (group-interface-id), + followed by a list of configuration values for + that interface (config-list). + + If interface-configuration is not provided within + group-status-talker-listener, the network shall + assume zero entries as the default (no interface + configuration). + + Since the interface-name leaf is optional, empty string + can be used for its key value."; + uses group-interface-id; + list config-list { + key "index"; + description + "List of configuration values for + the interface."; + leaf index { + type uint8; + description + "This index is provided in order to + provide a unique key per list entry. + The value of index for each entry + shall be unique (but not necessarily + contiguous)."; + } + choice config-value { + description + "One of the following choices is + provided for each configuration value. + Each container name acts as the case name + for the choice."; + container ieee802-mac-addresses { + description + "Source and destination MAC addresses + that apply to the network side of + the user/network boundary. + + NOTE 1 - On the userside, the MAC addresses + correspond to the ieee802-mac-addresses + of data-frame-specification. + + NOTE 2 - The source MAC address of the + network is typically the same as the + user. The destination MAC address can + be different. For example, the user + can use an individual address, but + the network can use a group (multicast) + address. + + This configuration value is not provided + unless IEEE Std 802.1CB is supported, and + a value for Active Destination MAC + and VLAN Stream identification + is provided in cb-stream-iden-type-list + of interface-capabilities."; + reference + "46.2.5.3.1 of IEEE Std 802.1Qcc-2018"; + uses group-ieee802-mac-addresses; + } + container ieee802-vlan-tag { + description + "Customer VLAN Tag (C-TAG of clause 9) + that applies to the network side of + the user/network boundary. + + NOTE - On the user side, the VLAN tag corresponds + to the ieee802-vlan-tag of data-frame-specification + (including untagged if this field is not provided). + + If the user provides a VLAN ID in the + ieee802-vlan-tag of data-frame-specification, + the Stream’s data frames are assumed to + be limited to the active topology for + that VLAN ID. Therefore, if the network + uses a different VLAN ID in + this config-value, the network shall ensure + that the replacement VLAN ID is limited + to the equivalent active topology. + + This configuration value is not provided + unless vlan-tag-capable of + interface-capabilities is true."; + reference + "46.2.5.3.2 of IEEE Std 802.1Qcc-2018"; + uses group-ieee802-vlan-tag; + } + container ipv4-tuple { + description + "IPv4 identification that applies to the + network side of the user/network + boundary. + + This configuration value is not provided + unless IEEE Std 802.1CB is supported, + and a value for IP Stream identification + is provided in cb-stream-iden-type-list + of interface-capabilities."; + reference + "46.2.5.3.3 of IEEE Std 802.1Qcc-2018"; + uses group-ipv4-tuple; + } + container ipv6-tuple { + description + "IPv6 identification that applies to the + network side of the user/network + boundary. + + This configuration value is not provided + unless IEEE Std 802.1CB is supported, + and a value for IP Stream identification + is provided in cb-stream-iden-type-list + of interface-capabilities."; + reference + "46.2.5.3.4 of IEEE Std 802.1Qcc-2018"; + uses group-ipv6-tuple; + } + leaf time-aware-offset { + type uint32; + description + "If the time-aware container + is present in the + traffic-specification of the Talker, + this config-value shall be provided + by the network to the Talker. + + If the time-aware container + is not present in the + traffic-specification of the Talker, + this config-value shall not + be provided by the network. + + This config-value shall not + be provided to Listeners, as it is + not applicable. + + time-aware-offset specifies + the offset that the Talker + shall use for transmit. + The network returns a value between + earliest-transmit-offset + and latest-transmit-offset of the + Talker’s traffic-specification. + The value is expressed as + nanoseconds after the start + of the Talker’s interval."; + reference + "46.2.5.3.5 of IEEE Std 802.1Qcc-2018"; + } + } + } + } + } + + grouping group-talker { + description + "This YANG grouping specifies: + - Talker’s behavior for Stream (how/when transmitted) + - Talker’s requirements from the network + - TSN capabilities of the Talker’s interface(s) + + In the fully centralized model of TSN configuration, + this grouping originates from the CUC, and + is delivered to the CNC."; + reference + "46.2.3 of IEEE Std 802.1Qcc-2018"; + + container stream-rank { + description + "Rank of this Stream's configuration relative to other + Streams in the network. This rank is used to determine + success/failure of Stream resource configuration, + and it is unrelated to the Stream’s data."; + reference + "46.2.3.2 of IEEE Std 802.1Qcc-2018"; + leaf rank { + type uint8; + description + "The Rank is used by the network to decide which Streams + can and cannot exist when TSN resources reach their limit. + If a Bridge’s Port becomes oversubscribed (e.g. network + reconfiguration, IEEE 802.11 bandwidth reduction), the + Rank is used to help determine which Streams can be + dropped (i.e. removed from Bridge configuration). + + The only valid values for Rank shall be zero and one. + The configuration of a Stream with Rank zero is more + important than the configuration of a Stream with + Rank one. The Rank value of zero is intended for + emergency traffic, and the Rank value of one is + intended for non-emergency traffic. + + NOTE — It is expected that higher layer applications + and protocols can use the Rank to indicate the + relative importance of Streams based on user + preferences. Those user preferences are expressed + by means beyond the scope of this standard. When + multiple applications exist in a network + (e.g. audio/video along with industrial control), + it can be challenging for the varied applications + and vendors to agree on multiple Rank values. + To mitigate such challenges, this Rank uses + a simple concept of emergency (zero) and + non-emergency (one) that can be applied + over all applications. For example, in a network + that carries audio Streams for fire safety + announcements, all applications are likely to + agree that those Streams use Rank of zero."; + reference + "46.2.3.2.1 of IEEE Std 802.1Qcc-2018"; + } + } + + list end-station-interfaces { + key "mac-address interface-name"; + min-elements 1; + description + "List of identifiers, one for each physical + interface (distinct point of attachment) in + the end station acting as a Talker. + + Although many end stations contain a single interface, + this list allows for multiple interfaces. Some TSN + features allow a single Stream to span multiple interfaces + (e.g. seamless redundancy). + + Each entry of end-station-interfaces is used by the CNC + to locate the Talker in the topology. + + Since the interface-name leaf is optional, empty string + can be used for its key value."; + reference + "46.2.3.3 of IEEE Std 802.1Qcc-2018"; + uses group-interface-id; + } + + list data-frame-specification { + key "index"; + min-elements 1; + description + "data-frame-specification specifies the frame that carries the + Talker’s Stream data. The network uses the specification + to identify this Stream’s frames as TSN, in order to apply + the required TSN configuration. + + The specification is based on the user’s knowledge of the + frame, without any network specifics. In other words, this + specifies the frame that the Talker would use in the absence + of TSN. + + The specification is provided as a list of fields + that the user knows. The list is ordered + from start of frame to end of header. + For example, if the Talker uses a VLAN-tagged + Ethernet frame (not IP), the list consists of + ieee802-mac-addresses followed by ieee802-vlan-tag. + For example, if the Talker uses a UDP/IPv4 packet + without knowledge of the Ethernet header, + the list consists of ipv4-tuple. + + This list is optional, and its absence + indicates that Stream transformation is performed + in the Talker and Listeners of this Stream + (46.2.2 of IEEE Sd 802.1Q-2018)."; + reference + "46.2.3.4 of IEEE Std 802.1Qcc-2018"; + leaf index { + type uint8; + description + "This index is provided in order to + provide a unique key per list entry. + The value of index for each entry + shall be unique (but not necessarily + contiguous)."; + } + choice field { + description + "One of the following choices is provided + for each field that the user knows. + Each container name acts as the case name + for the choice."; + container ieee802-mac-addresses { + description "IEEE 802 MAC addresses."; + uses group-ieee802-mac-addresses; + } + container ieee802-vlan-tag { + description "IEEE 802.1 CTAG"; + uses group-ieee802-vlan-tag; + } + container ipv4-tuple { + description "IPv4 packet identification"; + uses group-ipv4-tuple; + } + container ipv6-tuple { + description "IPv6 packet identification"; + uses group-ipv6-tuple; + } + } + } + + container traffic-specification { + description + "This traffic-specification specifies how the Talker + transmits frames for the Stream. This is effectively + the Talker’s promise to the network. The network + uses this traffic spec to allocate resources and + adjust queue parameters in Bridges."; + reference + "46.2.3.5 of IEEE Std 802.1Qcc-2018"; + container interval { + description + "This interval specifies the period of time in + which the traffic specification cannot be exceeded. + The traffic specification is specified by + max-frames-per-interval and max-frame-size. + + The interval is a rational number of seconds, + defined by an integer numerator and an integer + denominator. + + If the time-aware container is not present, + the interval specifies a sliding window of time. + The Talker’s transmission is not synchronized + to a time on the network, and therefore + the traffic specification cannot be exceeded + during any interval in time. + + If the time-aware container is present, + the interval specifies a window of time that is + aligned with the time epoch that is synchronized + on the network. For example, if IEEE Std + 802.1AS-2011 is used with the PTP timescale, + the first interval begins at 1 January 00:00:00 TAI. + If CurrentTime represents the current time, then + the start of the next interval (StartOfNextInterval) + is: + StartOfNextInterval = N * interval + where N is the smallest integer for which the relation + StartOfNextInterval >= CurrentTime + would be TRUE."; + reference + "46.2.3.5.1 of IEEE Std 802.1Qcc-2018"; + leaf numerator { + type uint32; + description "interval’s numerator."; + } + leaf denominator { + type uint32; + description "interval’s denominator."; + } + } + leaf max-frames-per-interval { + type uint16; + description + "max-frames-per-interval specifies the maximum + number of frames that the Talker can transmit + in one interval."; + reference + "46.2.3.5.2 of IEEE Std 802.1Qcc-2018"; + } + leaf max-frame-size { + type uint16; + description + "max-frame-size specifies maximum frame size that + the Talker will transmit, excluding any overhead + for media-specific framing (e.g., preamble, + IEEE 802.3 header, Priority/VID tag, CRC, + interframe gap). As the Talker or Bridge determines + the amount of bandwidth to reserve on the + egress Port (interface), it will calculate the + media-specific framing overhead on that Port and + add it to the number specified in the max-frame-size + leaf."; + reference + "46.2.3.5.3 of IEEE Std 802.1Qcc-2018"; + } + leaf transmission-selection { + type uint8; + description + "transmission-selection specifies the algorithm + that the Talker uses to transmit this Stream’s + traffic class. This algorithm is often referred + to as the shaper for the traffic class. + + The value for this leaf uses Table 8-5 + (Transmission selection algorithm identifiers) + of 8.6.8 of IEEE Std 802.1Q-2018. + If no algorithm is known, the value + zero (strict priority) can be used. + + The Talker’s shaping and scheduling of the + Stream is considered to be on the user side + of the user/network boundary, and this leaf + specifies the Talker’s behavior to the network."; + reference + "46.2.3.5.4 of IEEE Std 802.1Qcc-2018"; + } + container time-aware { + presence + "Specifies that the Talker’s traffic is synchronized + to a known time on the network + (e.g. using IEEE Std 802.1AS)"; + description + "The time-aware container provides leafs to specify + the Talker’s time-aware transmit to the network. + + The Talker and Listeners of a Stream are assumed to + coordinate using user (application) mechanisms, such + that each Listener is aware that its Talker transmits + in a time-aware manner. + + If max-frames-per-interval is greater than one, + the Talker shall transmit multiple frames as a burst + within the interval, with the minimum inter-frame gap + allowed by the media. + + NOTE: Although scheduled traffic (8.6.8.4 of + IEEE Std 802.1Q-2018) specifies a valid implementation + of a time-aware Talker, the time-aware container + is intended to support alternate implementations of + scheduling."; + reference + "46.2.3.5 of IEEE Std 802.1Qcc-2018"; + leaf earliest-transmit-offset { + type uint32; + description + "earliest-transmit-offset specifies the + earliest offset within the interval at which + the Talker is capable of starting + transmit of its frames. As part of + group-status-talker-listener.interface-configuration, + the network will return a specific + time-aware-offset to the Talker + (within the earliest/latest range), + which the Talker uses to schedule its transmit. + + earliest-transmit-offset is specified + as an integer number of nanoseconds. + + The Talker’s transmit offsets + include earliest-transmit-offset, + latest-transmit-offset, and the + time-aware-offset returned to the Talker. + Each of the Talker’s offsets is specified + at the point when the message timestamp point + of the first frame of the Stream passes the + reference plane marking the boundary between + the network media and PHY. + The message timestamp point is specified + by IEEE Std 802.1AS for various media."; + reference + "46.2.3.5.5 of IEEE Std 802.1Qcc-2018"; + } + leaf latest-transmit-offset { + type uint32; + description + "latest-transmit-offset specifies the + latest offset within the interval at which + the Talker is capable of starting + transmit ofits frames. As part of + group-status-talker-listener.interface-configuration, + the network will return a specific + time-aware-offset to the Talker + within the earliest/latest range), + which the Talker uses to schedule its transmit. + + latest-transmit-offset is specified + as an integer number of nanoseconds."; + reference + "46.2.3.5.6 of IEEE Std 802.1Qcc-2018"; + } + leaf jitter { + type uint32; + description + "The jitter leaf specifies the maximum difference + in time between the Talker’s transmit offsets, + and the ideal synchronized network time + (e.g. IEEE 802.1AS time). Jitter is + specified as an unsigned integer number + of nanoseconds. + + The maximum difference means + sooner or later than the ideal (e.g. transmit + +/- 500 nanoseconds relative to IEEE 802.1AS time + results in jitter of 500). + + The ideal synchronized network time refers to + time at the source (e.g. IEEE 802.1AS grandmaster). + The jitter does not include inaccuracies as + time is propagated from the time source to the + Talker, because those inaccuracies are + assumed to be known by the network, and + time synchronization is a network technology. + The jitter leaf is intended to specify + inaccuracies in the Talker’s implementation. + For example, if the Talker’s IEEE 802.1AS time is + +/- 812 nanoseconds relative to the + grandmaster, and the Talker schedules using a + 100 microsecond timer tick driven by IEEE 802.1AS + time, Jitter is 50000 (not 50812). + + The Talker’s transmit offsets + include earliest-transmit-offset, + latest-transmit-offset, and the + time-aware-offset returned to the Talker in + group-status-talker-listener.interface-configuration."; + reference + "46.2.3.5.7 of IEEE Std 802.1Qcc-2018"; + } + } + } + + container user-to-network-requirements { + description + "user-to-network-requirements specifies user requirements + for the Stream, such as latency and redundancy. + The network (CNC) will merge all + user-to-network-requirements for a Stream + to ensure that all requirements are met."; + reference + "46.2.3.6 of IEEE Std 802.1Qcc-2018"; + uses group-user-to-network-requirements; + } + + container interface-capabilities { + description + "interface-capabilities specifies the network + capabilities of all interfaces (Ports) contained + in end-station-interfaces. + + The network may provide configuration + of these capabilities in + group-status-talker-listener.interface-configuration. + + NOTE: If an end station contains multiple interfaces + with different network capabilities, each interface + should be specified as a distinct Talker or + Listener (i.e. one entry in end-station-interfaces). + Use of multiple entries in end-station-interfaces is intended + for network capabilities that span multiple interfaces + (e.g. seamless redundancy)."; + reference + "46.2.3.7 of IEEE Std 802.1Qcc-2018"; + uses group-interface-capabilities; + } + } + + grouping group-listener { + description + "This YANG grouping specifies: + - Listener’s requirements from the network + - TSN capabilities of the Listener’s interface(s) + + In the fully centralized model of TSN configuration, + this grouping originates from the CUC, and + is delivered to the CNC."; + reference + "46.2.4 of IEEE Std 802.1Qcc-2018"; + + list end-station-interfaces { + key "mac-address interface-name"; + min-elements 1; + description + "List of identifiers, one for each physical + interface (distinct point of attachment) in + the end station acting as a Listener. + + Although many end stations contain a single interface, + this list allows for multiple interfaces. Some TSN + features allow a single Stream to span multiple interfaces + (e.g. seamless redundancy). + + Each entry of end-station-interfaces is used by the CNC + to locate the Listener in the topology. + + Since the interface-name leaf is optional, empty string + can be used for its key value."; + reference + "46.2.3.3 of IEEE Std 802.1Qcc-2018"; + uses group-interface-id; + } + + container user-to-network-requirements { + description + "user-to-network-requirements specifies user requirements + for the Stream, such as latency and redundancy. + The network (CNC) will merge all + user-to-network-requirements for a Stream + to ensure that all requirements are met."; + reference + "46.2.3.6 of IEEE Std 802.1Qcc-2018"; + uses group-user-to-network-requirements; + } + + container interface-capabilities { + description + "interface-capabilities specifies the network + capabilities of all interfaces (Ports) contained + in end-station-interfaces. + + The network may provide configuration + of these capabilities in + group-status-talker-listener.interface-configuration. + + NOTE: If an end station contains multiple interfaces + with different network capabilities, each interface + should be specified as a distinct Talker or + Listener (i.e. one entry in end-station-interfaces). + Use of multiple entries in end-station-interfaces is intended + for network capabilities that span multiple interfaces + (e.g. seamless redundancy)."; + reference + "46.2.3.7 of IEEE Std 802.1Qcc-2018"; + uses group-interface-capabilities; + } + } + + grouping group-status-stream { + description + "This YANG grouping provides the status of a Stream’s + configuration from the network to each user. The status + in this grouping applies to the entire Stream (Talker + and all Listeners). + + In the fully centralized model of TSN configuration, + this grouping originates from the CNC, and + is delivered to the CUC. + + The group-status-stream and group-status-talker-listener + groupings are intended to be used by other modules + within a list of status (state) for each Stream, + with each list entry using: + - leaf of type stream-id-type, used as key to the list + - container using group-status-stream + - container for Talker, using group-status-talker-listener + - list for Listeners, using group-status-talker-listener"; + reference + "46.2.5 of IEEE Std 802.1Qcc-2018"; + + container status-info { + description + "status-info provides information regarding the status + of a Stream’s configuration in the network."; + reference + "46.2.5.1 of IEEE Std 802.1Qcc-2018"; + leaf talker-status { + type enumeration { + enum none { + value 0; + description "No Talker detected."; + } + enum ready { + value 1; + description "Talker ready (configured)."; + } + enum failed { + value 2; + description "Talker failed."; + } + } + description + "This is an enumeration for the status of + the Stream’s Talker."; + reference + "46.2.5.1.1 of IEEE Std 802.1Qcc-2018"; + } + leaf listener-status { + type enumeration { + enum none { + value 0; + description "No Listener detected."; + } + enum ready { + value 1; + description "All Listeners ready (configured)."; + } + enum partial-failed { + value 2; + description + "One or more Listeners ready, and + one or more Listeners failed. + If Talker is ready, Stream can be used."; + } + enum failed { + value 3; + description "All Listeners failed"; + } + } + description + "This is an enumeration for the status of + the Stream’s Listener(s)."; + reference + "46.2.5.1.2 of IEEE Std 802.1Qcc-2018"; + } + leaf failure-code { + type uint8; + description + "If the Stream encounters a failure (talker-status + is failed, or listener-status is failed, or + listener-status is partial-failed), failure-code + provides a non-zero code that specifies the + problem. Table 46-1 of IEEE Std 802.1Q-2018 + describes each code.)"; + reference + "46.2.5.1.3 of IEEE Std 802.1Qcc-2018"; + } + } + + list failed-interfaces { + key "mac-address interface-name"; + description + "When a failure occurs in network configuration + (i.e. non-zero failure-code in status-info), + failed-interfaces provides a list of one or more + physical interfaces (distinct points of attachement) + in the failed end station or Bridge. Each identifier + is sufficient to locate the interface in the physical + topology. + + The failed-interfaces list is optional. + + Since the interface-name leaf is optional, empty string + can be used for its key value."; + reference + "46.2.5.4 of IEEE Std 802.1Qcc-2018"; + uses group-interface-id; + } + } + + grouping group-status-talker-listener { + description + "This YANG grouping provides the status for a specific + Talker or Listener. + + In the fully centralized model of TSN configuration, + this grouping originates from the CNC, and + is delivered to the CUC."; + reference + "46.2.5 of IEEE Std 802.1Qcc-2018"; + + leaf accumulated-latency { + type uint32; + description + "accumulated-latency provides the worst-case maximum + latency that a single frame of the Stream + can encounter along its current path(s). + + When provided to a Listener, accumulated-latency is the + worst-case maximum latency for that Listener only. + + When provided to a Talker, accumulated-latency is the + worst-case maximum latency for all Listeners (worst path). + + accumulated-latency is specified as an integer number + of nanoseconds. + + accumulated-latency uses the same definition + for latency as user-to-network-requirements.max-latency. + + For successful status-info, the network + returns a value less than or equal to + user-to-network-requirements.max-latency. + + If the time-aware container is present in + the traffic-specification of the Talker, + the value is expressed as nanoseconds after the + start of the Talker’s traffic-specification.interval. + + If the time-aware container is not present in + the traffic-specification of the Talker, + the value is expressed as nanoseconds after the + Talker’s transmit of any frame in the Stream, + at any arbitrary time. + + If user-to-network-requirements.num-seamless-trees is one, + accumulated-latency shall provide the worst-case maximum + latency for the current path from Talker to each Listener. + If the path is changed (e.g. by a spanning tree protocol), + accumulated-latency changes accordingly. + + If user-to-network-requirements.num-seamless-trees + is greater than one, accumulated-latency shall + provide the worst-case maximum latency for all paths + configured from the Talker to each Listener."; + reference + "46.2.5.2 of IEEE Std 802.1Qcc-2018"; + } + + container interface-configuration { + description + "interface-configuration provides configuration of + interfaces in the Talker/Listener. This configuration + assists the network in meeting the Stream’s requirements. + The interface-configuration meets the capabilities of + the interface as provided in interface-capabilities."; + reference + "46.2.5.3 of IEEE Std 802.1Qcc-2018"; + + uses group-interface-configuration; + } + } +} diff --git a/standard/ieee/ieee802-dot1q-types.yang b/standard/ieee/ieee802-dot1q-types.yang new file mode 100644 index 0000000..2e6ae70 --- /dev/null +++ b/standard/ieee/ieee802-dot1q-types.yang @@ -0,0 +1,1007 @@ +module ieee802-dot1q-types { + namespace urn:ieee:std:802.1Q:yang:ieee802-dot1q-types; + prefix dot1q-types; + import ietf-yang-types { + prefix yang; + } + organization + "IEEE 802.1 Working Group"; + contact + "WG-URL: http://www.ieee802.org/1/ + WG-EMail: stds-802-1-L@ieee.org + + Contact: IEEE 802.1 Working Group Chair + Postal: C/O IEEE 802.1 Working Group + IEEE Standards Association + 445 Hoes Lane + P.O. Box 1331 + Piscataway + NJ 08854 + USA + + E-mail: STDS-802-1-L@IEEE.ORG"; + description + "Common types used within dot1Q-bridge modules."; + revision 2020-10-23 { + description + "New revision date because Qcx project finished."; + reference + "IEEE Std 802.1Q-2018, Bridges and Bridged Networks."; + } + revision 2018-03-07 { + description + "Published as part of IEEE Std 802.1Q-2018. + Initial version."; + reference + "IEEE Std 802.1Q-2018, Bridges and Bridged Networks."; + } + + identity dot1q-vlan-type { + description + "Base identity from which all 802.1Q VLAN tag types are derived + from."; + } + identity c-vlan { + base dot1q-vlan-type; + description + "An 802.1Q Customer VLAN, using the 81-00 EtherType"; + reference + "5.5 of IEEE Std 802.1Q-2018"; + } + identity s-vlan { + base dot1q-vlan-type; + description + "An 802.1Q Service VLAN, using the 88-A8 EtherType originally + introduced in 802.1ad, and incorporated into 802.1Q (2011)"; + reference + "5.6 of IEEE Std 802.1Q-2018"; + } + typedef name-type { + type string { + length "0..32"; + } + description + "A text string of up to 32 characters, of locally determined + significance."; + } + typedef port-number-type { + type uint32 { + range "1..65535"; + } + description + "The port number of the Bridge port for which this entry + contains Bridge management information."; + } + typedef priority-type { + type uint8 { + range "0..7"; + } + description + "A range of priorities from 0 to 7 (inclusive). The Priority + Code Point (PCP) is a 3-bit field that refers to the class of + service associated with an 802.1Q 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."; + } + typedef vid-range-type { + type string { + pattern + "([1-9]"+ + "[0-9]{0,3}"+ + "(-[1-9][0-9]{0,3})?"+ + "(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)"; + } + description + "A list of VLAN Ids, or non overlapping VLAN ranges, in + ascending order, between 1 and 4094. + + This type is used to match an ordered list of VLAN Ids, or + contiguous ranges of VLAN Ids. Valid VLAN Ids must be in the + range 1 to 4094, and included in the list in non overlapping + ascending order. + + For example: 1,10-100,250,500-1000"; + } + typedef vlanid { + type uint16 { + range "1..4094"; + } + description + "The vlanid type uniquely identifies a VLAN. This is the 12-bit + VLAN-ID used in the VLAN Tag header. The range is defined by the + referenced specification. This type is in the value set and its + semantics equivalent to the VlanId textual convention of the + SMIv2."; + } + typedef vlan-index-type { + type uint32 { + range "1..4094 | 4096..4294967295"; + } + description + "A value used to index per-VLAN tables. Values of 0 and 4095 are + not permitted. The range of valid VLAN indices. If the value is + greater than 4095, then it represents a VLAN with scope local to + the particular agent, i.e., one without a global VLAN-ID + assigned to it. Such VLANs are outside the scope of IEEE 802.1Q, + but it is convenient to be able to manage them in the same way + using this YANG module."; + reference + "9.6 of IEEE Std 802.1Q-2018"; + } + typedef mstid-type { + type uint32 { + range "1..4094"; + } + description + "In an MSTP Bridge, an MSTID, i.e., a value used to identify a + spanning tree (or MST) instance"; + reference + "13.8 of IEEE Std 802.1Q-2018"; + } + typedef pcp-selection-type { + type enumeration { + enum 8P0D { + description + "8 priorities, 0 drop eligible"; + } + enum 7P1D { + description + "7 priorities, 1 drop eligible"; + } + enum 6P2D { + description + "6 priorities, 2 drop eligible"; + } + enum 5P3D { + description + "5 priorities, 3 drop eligible"; + } + } + description + "Priority Code Point selection types."; + reference + "12.6.2.5.3 of IEEE Std 802.1Q-2018 + 6.9.3 of IEEE Std 802.1Q-2018"; + } + typedef protocol-frame-format-type { + type enumeration { + enum Ethernet { + description + "Ethernet frame format"; + } + enum rfc1042 { + description + "RFC 1042 frame format"; + } + enum snap8021H { + description + "SNAP 802.1H frame format"; + } + enum snapOther { + description + "Other SNAP frame format"; + } + enum llcOther { + description + "Other LLC frame format"; + } + } + description + "A value representing the frame format to be matched."; + reference + "12.10.1.7.1 of IEEE Std 802.1Q-2018"; + } + typedef ethertype-type { + type string { + pattern "[0-9a-fA-F]{2}-[0-9a-fA-F]{2}"; + } + description + "The EtherType value represented in the canonical order defined + by IEEE 802. The canonical representation uses uppercase + characters."; + reference + "9.2 of IEEE Std 802-2014"; + } + typedef dot1q-tag-type { + type identityref { + base dot1q-vlan-type; + } + description + "Identifies a specific 802.1Q tag type"; + reference + "IEEE Std 802.1Q-2018"; + } + typedef traffic-class-type { + type uint8 { + range "0..7"; + } + description + "This is the numerical value associated with a traffic class in + a Bridge. Larger values are associated with higher priority + traffic classes."; + reference + "3.239 of IEEE Std 802.1Q-2018"; + } + grouping dot1q-tag-classifier-grouping { + description + "A grouping which represents an 802.1Q VLAN, matching both the + EtherType and a single VLAN Id."; + leaf tag-type { + type dot1q-tag-type; + mandatory true; + description + "VLAN type"; + } + leaf vlan-id { + type vlanid; + mandatory true; + description + "VLAN Id"; + } + } + grouping dot1q-tag-or-any-classifier-grouping { + description + "A grouping which represents an 802.1Q VLAN, matching both the + EtherType and a single VLAN Id or 'any' to match on any VLAN Id."; + leaf tag-type { + type dot1q-tag-type; + mandatory true; + description + "VLAN type"; + } + leaf vlan-id { + type union { + type vlanid; + type enumeration { + enum any { + value 4095; + description + "Matches 'any' VLAN in the range 1 to 4094 that is not + matched by a more specific VLAN Id match"; + } + } + } + mandatory true; + description + "VLAN Id or any"; + } + } + grouping dot1q-tag-ranges-classifier-grouping { + description + "A grouping which represents an 802.1Q VLAN that matches a range + of VLAN Ids."; + leaf tag-type { + type dot1q-tag-type; + mandatory true; + description + "VLAN type"; + } + leaf vlan-ids { + type vid-range-type; + mandatory true; + description + "VLAN Ids"; + } + } + grouping dot1q-tag-ranges-or-any-classifier-grouping { + description + "A grouping which represents an 802.1Q VLAN, matching both the + EtherType and a single VLAN Id, ordered list of ranges, or 'any' + to match on any VLAN Id."; + leaf tag-type { + type dot1q-tag-type; + mandatory true; + description + "VLAN type"; + } + leaf vlan-id { + type union { + type vid-range-type; + type enumeration { + enum any { + value 4095; + description + "Matches 'any' VLAN in the range 1 to 4094."; + } + } + } + mandatory true; + description + "VLAN Ids or any"; + } + } + grouping priority-regeneration-table-grouping { + description + "The priority regeneration table provides the ability to map + incoming priority values on a per-Port basis, under management + control."; + reference + "6.9.4 of IEEE Std 802.1Q-2018"; + leaf priority0 { + type priority-type; + default "0"; + description + "Priority 0"; + reference + "12.6.2.3 of IEEE Std 802.1Q-2018 + 6.9.4 of IEEE Std 802.1Q-2018"; + } + leaf priority1 { + type priority-type; + default "1"; + description + "Priority 1"; + reference + "12.6.2.3 of IEEE Std 802.1Q-2018 + 6.9.4 of IEEE Std 802.1Q-2018"; + } + leaf priority2 { + type priority-type; + default "2"; + description + "Priority 2"; + reference + "12.6.2.3 of IEEE Std 802.1Q-2018 + 6.9.4 of IEEE Std 802.1Q-2018"; + } + leaf priority3 { + type priority-type; + default "3"; + description + "Priority 3"; + reference + "12.6.2.3 of IEEE Std 802.1Q-2018 + 6.9.4 of IEEE Std 802.1Q-2018"; + } + leaf priority4 { + type priority-type; + default "4"; + description + "Priority 4"; + reference + "12.6.2.3 of IEEE Std 802.1Q-2018 + 6.9.4 of IEEE Std 802.1Q-2018"; + } + leaf priority5 { + type priority-type; + default "5"; + description + "Priority 5"; + reference + "12.6.2.3 of IEEE Std 802.1Q-2018 + 6.9.4 of IEEE Std 802.1Q-2018"; + } + leaf priority6 { + type priority-type; + default "6"; + description + "Priority 6"; + reference + "12.6.2.3 of IEEE Std 802.1Q-2018 + 6.9.4 of IEEE Std 802.1Q-2018"; + } + leaf priority7 { + type priority-type; + default "7"; + description + "Priority 7"; + reference + "12.6.2.3 of IEEE Std 802.1Q-2018 + 6.9.4 of IEEE Std 802.1Q-2018"; + } + } + grouping pcp-decoding-table-grouping { + description + "The Priority Code Point decoding table enables the decoding of + the priority and drop-eligible parameters from the PCP."; + reference + "6.9.3 of IEEE Std 802.1Q-2018"; + list pcp-decoding-map { + key "pcp"; + description + "This map associates the priority code point field found in + the VLAN to a priority and drop eligible value based upon the + priority code point selection type."; + leaf pcp { + type pcp-selection-type; + description + "The priority code point selection type."; + reference + "12.6.2.7 of IEEE Std 802.1Q-2018 + 6.9.3 of IEEE Std 802.1Q-2018"; + } + list priority-map { + key "priority-code-point"; + description + "This map associated a priority code point value to priority + and drop eligible parameters."; + leaf priority-code-point { + type priority-type; + description + "Priority associated with the pcp."; + reference + "12.6.2.7 of IEEE Std 802.1Q-2018 + 6.9.3 of IEEE Std 802.1Q-2018"; + } + leaf priority { + type priority-type; + description + "Priority associated with the pcp."; + reference + "12.6.2.7 of IEEE Std 802.1Q-2018 + 6.9.3 of IEEE Std 802.1Q-2018"; + } + leaf drop-eligible { + type boolean; + description + "Drop eligible value for pcp"; + reference + "12.6.2.7 of IEEE Std 802.1Q-2018 + 6.9.3 of IEEE Std 802.1Q-2018"; + } + } + } + } + grouping pcp-encoding-table-grouping { + description + "The Priority Code Point encoding table encodes the priority and + drop-eligible parameters in the PCP field of the VLAN tag."; + reference + "12.6.2.9 of IEEE Std 802.1Q-2018 + 6.9.3 of IEEE Std 802.1Q-2018"; + list pcp-encoding-map { + key "pcp"; + description + "This map associated the priority and drop-eligible parameters + to the priority used to encode the PCP of the VLAN based upon + the priority code point selection type."; + leaf pcp { + type pcp-selection-type; + description + "The priority code point selection type."; + reference + "12.6.2.7 of IEEE Std 802.1Q-2018 + 6.9.3 of IEEE Std 802.1Q-2018"; + } + list priority-map { + key "priority dei"; + description + "This map associated the priority and drop-eligible + parameters to the priority code point field of the VLAN tag."; + leaf priority { + type priority-type; + description + "Priority associated with the pcp."; + reference + "12.6.2.7 of IEEE Std 802.1Q-2018 + 6.9.3 of IEEE Std 802.1Q-2018"; + } + leaf dei { + type boolean; + description + "The drop eligible value."; + reference + "12.6.2 of IEEE Std 802.1Q-2018 + 8.6.6 of IEEE Std 802.1Q-2018"; + } + leaf priority-code-point { + type priority-type; + description + "PCP value for priority when DEI value"; + reference + "12.6.2.9 of IEEE Std 802.1Q-2018 + 6.9.3 of IEEE Std 802.1Q-2018"; + } + } + } + } + grouping service-access-priority-table-grouping { + description + "The Service Access Priority Table associates a received + priority with a serice access priority."; + reference + "12.6.2.17 of IEEE Std 802.1Q-2018 + 6.13.1 of IEEE Std 802.1Q-2018"; + leaf priority0 { + type priority-type; + default "0"; + description + "Service access priority value for priority 0"; + reference + "12.6.2.17 of IEEE Std 802.1Q-2018 + 6.13.1 of IEEE Std 802.1Q-2018"; + } + leaf priority1 { + type priority-type; + default "1"; + description + "Service access priority value for priority 1"; + reference + "12.6.2.17 of IEEE Std 802.1Q-2018 + 6.13.1 of IEEE Std 802.1Q-2018"; + } + leaf priority2 { + type priority-type; + default "2"; + description + "Service access priority value for priority 2"; + reference + "12.6.2.17 of IEEE Std 802.1Q-2018 + 6.13.1 of IEEE Std 802.1Q-2018"; + } + leaf priority3 { + type priority-type; + default "3"; + description + "Service access priority value for priority 3"; + reference + "12.6.2.17 of IEEE Std 802.1Q-2018 + 6.13.1 of IEEE Std 802.1Q-2018"; + } + leaf priority4 { + type priority-type; + default "4"; + description + "Service access priority value for priority 4"; + reference + "12.6.2.17 of IEEE Std 802.1Q-2018 + 6.13.1 of IEEE Std 802.1Q-2018"; + } + leaf priority5 { + type priority-type; + default "5"; + description + "Service access priority value for priority 5"; + reference + "12.6.2.17 of IEEE Std 802.1Q-2018 + 6.13.1 of IEEE Std 802.1Q-2018"; + } + leaf priority6 { + type priority-type; + default "6"; + description + "Service access priority value for priority 6"; + reference + "12.6.2.17 of IEEE Std 802.1Q-2018 + 6.13.1 of IEEE Std 802.1Q-2018"; + } + leaf priority7 { + type priority-type; + default "7"; + description + "Service access priority value for priority 7"; + reference + "12.6.2.17 of IEEE Std 802.1Q-2018 + 6.13.1 of IEEE Std 802.1Q-2018"; + } + } + grouping traffic-class-table-grouping { + status obsolete; + description + "The Traffic Class Table models the operations that can be + performed on, or inquire about, the current contents of the + Traffic Class Table (8.6.6) for a given Port."; + reference + "12.6.3 of IEEE Std 802.1Q-2018 + 8.6.6 of IEEE Std 802.1Q-2018"; + list traffic-class-map { + key "priority"; + description + "The priority index into the traffic class table."; + leaf priority { + type priority-type; + description + "The priority of the traffic class entry."; + reference + "8.6.6 of IEEE Std 802.1Q-2018"; + } + list available-traffic-class { + key "num-traffic-class"; + description + "The traffic class index associated with a given priority + within the traffic class table."; + reference + "8.6.6 of IEEE Std 802.1Q-2018"; + leaf num-traffic-class { + type uint8 { + range "1..8"; + } + description + "The available number of traffic classes."; + reference + "8.6.6 of IEEE Std 802.1Q-2018"; + } + leaf traffic-class { + type traffic-class-type; + description + "The traffic class index associated with a given traffic + class entry."; + reference + "8.6.6 of IEEE Std 802.1Q-2018"; + } + } + } + } + + grouping traffic-class-table-grouping-v2 { + description + "The default values for the table are specified in 8.6.6."; + reference + "12.6.2 of IEEE Std 802.1Q-2018"; + list traffic-class-table { + key "traffic-class"; + description + "The number of elements in traffic-class-table is + number-of-traffic-classes."; + leaf traffic-class { + type traffic-class-type; + description + "The traffic class index associated with a given traffic + class entry."; + reference + "8.6.6 of IEEE Std 802.1Q-2018"; + } + list priority { + key "index"; + leaf index { + type uint32; + } + description + "The priorities of the traffic class entry."; + reference + "8.6.6 of IEEE Std 802.1Q-2018"; + leaf priority { + type priority-type; + description + "The priority of the traffic class entry."; + reference + "8.6.6 of IEEE Std 802.1Q-2018"; + } + } + } + } + grouping port-map-grouping { + description + "A set of control indicators, one for each Port. A Port Map, + containing a control element for each outbound Port"; + reference + "8.8.1 of IEEE Std 802.1Q-2018 + 8.8.2 of IEEE Std 802.1Q-2018"; + list port-map { + key "port-ref"; + description + "The list of entries composing the port map."; + leaf port-ref { + type port-number-type; + description + "The interface port reference associated with this map."; + reference + "8.8.1 of IEEE Std 802.1Q-2018"; + } + choice map-type { + description + "Type of port map"; + container static-filtering-entries { + description + "Static filtering entries attributes."; + leaf control-element { + type enumeration { + enum forward { + description + "Forwarded, independently of any dynamic filtering + information held by the FDB."; + } + enum filter { + description + "Filtered, independently of any dynamic filtering + information."; + } + enum forward-filter { + description + "Forwarded or filtered on the basis of dynamic + filtering information, or on the basis of the + default Group filtering behavior for the outbound + Port (8.8.6) if no dynamic filtering information is + present specifically for the MAC address."; + } + } + description + "containing a control element for each outbound Port, + specifying that a frame with a destination MAC address, + and in the case of VLAN Bridge components, VID that + meets this specification."; + reference + "8.8.1 of IEEE Std 802.1Q-2018"; + } + leaf connection-identifier { + type port-number-type; + description + "A Port MAP may contain a connection identifier (8.8.12) + for each outbound port. The connection identifier may be + associated with the Bridge Port value maintained in a + Dynamic Filtering Entry of the FDB for Bridge Ports."; + reference + "8.8.1 of IEEE Std 802.1Q-2018 + 8.8.12 of IEEE Std 802.1Q-2018"; + } + } + container static-vlan-registration-entries { + description + "Static VLAN registration entries."; + leaf registrar-admin-control { + type enumeration { + enum fixed-new-ignored { + description + "Registration Fixed (New ignored)."; + } + enum fixed-new-propagated { + description + "Registration Fixed (New propagated."; + } + enum forbidden { + description + "Registration Forbidden."; + } + enum normal { + description + "Normal Registration."; + } + } + description + "The Registrar Administrative Control values for MVRP + and MIRP for the VID."; + reference + "8.8.2 of IEEE Std 802.1Q-2018"; + } + leaf vlan-transmitted { + type enumeration { + enum tagged { + description + "VLAN-tagged"; + } + enum untagged { + description + "VLAN-untagged"; + } + } + description + "Whether frames are to be VLAN-tagged or untagged when + transmitted."; + reference + "8.8.2 of IEEE Std 802.1Q-2018"; + } + } + container mac-address-registration-entries { + description + "MAC address registration entries attributes."; + leaf control-element { + type enumeration { + enum registered { + description + "Forwarded, independently of any dynamic filtering + information held by the FDB."; + } + enum not-registered { + description + "Filtered, independently of any dynamic filtering + information."; + } + } + description + "containing a control element for each outbound Port, + specifying that a frame with a destination MAC address, + and in the case of VLAN Bridge components, VID that + meets this specification."; + reference + "8.8.4 of IEEE Std 802.1Q-2018"; + } + } + container dynamic-vlan-registration-entries { + description + "Dynamic VLAN registration entries attributes."; + leaf control-element { + type enumeration { + enum registered { + description + "Forwarded, independently of any dynamic filtering + information held by the FDB."; + } + } + description + "containing a control element for each outbound Port, + specifying that a frame with a destination MAC address, + and in the case of VLAN Bridge components, VID that + meets this specification."; + reference + "8.8.5 of IEEE Std 802.1Q-2018"; + } + } + container dynamic-reservation-entries { + description + "Dynamic reservation entries attributes."; + leaf control-element { + type enumeration { + enum forward { + description + "Forwarded, independently of any dynamic filtering + information held by the FDB."; + } + enum filter { + description + "Filtered, independently of any dynamic filtering + information."; + } + } + description + "Containing a control element for each outbound Port, + specifying that a frame with a destination MAC address, + and in the case of VLAN Bridge components, VID that + meets this specification."; + reference + "8.8.7 of IEEE Std 802.1Q-2018"; + } + } + container dynamic-filtering-entries { + description + "Dynamic filtering entries attributes."; + leaf control-element { + type enumeration { + enum forward { + description + "Forwarded, independently of any dynamic filtering + information held by the FDB."; + } + } + description + "Containing a control element for each outbound Port, + specifying that a frame with a destination MAC address, + and in the case of VLAN Bridge components, VID that + meets this specification."; + reference + "8.8.3 of IEEE Std 802.1Q-2018"; + } + } + } + } + } + grouping bridge-port-statistics-grouping { + description + "Grouping of bridge port statistics."; + reference + "12.6.1.1.3 of IEEE Std 802.1Q-2018"; + leaf delay-exceeded-discards { + type yang:counter64; + description + "The number of frames discarded by this port due to excessive + transit delay through the Bridge. It is incremented by both + transparent and source route Bridges."; + reference + "12.6.1.1.3 of IEEE Std 802.1Q-2018 + 8.6.6 of IEEE Std 802.1Q-2018"; + } + leaf mtu-exceeded-discards { + type yang:counter64; + description + "The number of frames discarded by this port due to an + excessive size. It is incremented by both transparent and + source route Bridges."; + reference + "12.6.1.1.3, item g) of IEEE Std 802.1Q-2018"; + } + leaf frame-rx { + type yang:counter64; + description + "The number of frames that have been received by this port + from its segment. Note that a frame received on the interface + corresponding to this port is only counted by this object if + and only if it is for a protocol being processed by the local + bridging function, including Bridge management frames."; + reference + "12.6.1.1.3 of IEEE Std 802.1Q-2018"; + } + leaf octets-rx { + type yang:counter64; + description + "The total number of octets in all valid frames received + (including BPDUs, frames addressed to the Bridge as an end + station, and frames that were submitted to the Forwarding + Process)."; + reference + "12.6.1.1.3 of IEEE Std 802.1Q-2018"; + } + leaf frame-tx { + type yang:counter64; + description + "The number of frames that have been transmitted by this port + to its segment. Note that a frame transmitted on the interface + corresponding to this port is only counted by this object if + and only if it is for a protocol being processed by the local + bridging function, including Bridge management frames."; + } + leaf octets-tx { + type yang:counter64; + description + "The total number of octets that have been transmitted by this + port to its segment."; + } + leaf discard-inbound { + type yang:counter64; + description + "Count of received valid frames that were discarded (i.e., + filtered) by the Forwarding Process."; + reference + "12.6.1.1.3 of IEEE Std 802.1Q-2018"; + } + leaf forward-outbound { + type yang:counter64; + description + "The number of frames forwarded to the associated MAC Entity + (8.5)."; + reference + "12.6.1.1.3 of IEEE Std 802.1Q-2018"; + } + leaf discard-lack-of-buffers { + type yang:counter64; + description + "The count of frames that were to be transmitted through the + associated Port but were discarded due to lack of buffers."; + reference + "12.6.1.1.3 of IEEE Std 802.1Q-2018"; + } + leaf discard-transit-delay-exceeded { + type yang:counter64; + description + "The number of frames discarded by this port due to excessive + transit delay through the Bridge. It is incremented by both + transparent and source route Bridges."; + reference + "12.6.1.1.3 of IEEE Std 802.1Q-2018"; + } + leaf discard-on-error { + type yang:counter64; + description + "The number of frames that were to be forwarded on the + associated MAC but could not be transmitted (e.g., frame would + be too large, 6.5.8)."; + reference + "12.6.1.1.3 of IEEE Std 802.1Q-2018"; + } + } + + + identity type-of-operation { + description + "Represents the operation type (name)."; + } + grouping base-gate-control-entries { + list gate-control-entry { + key "index"; + leaf index { + type uint32; + } + leaf operation-name { + type identityref { + base type-of-operation; + } + mandatory true; + description + "The name (type) of the operation for this entry."; + } + leaf time-interval-value { + type uint32; + description + "timeIntervalValue is a 32-bit unsigned integer, + representing a number of nanoseconds. After timeIntervalValue + nanoseconds have elapsed since the completion of the previous + entry in the gate control list, control passes to the next + entry."; + reference + "12.29.1.2.3 of IEEE Std 802.1Q-2018 8.6.8.4 of IEEE Std + 802.1Q-2018"; + } + } + } + + +} diff --git a/standard/ieee/ieee802-types.yang b/standard/ieee/ieee802-types.yang new file mode 100644 index 0000000..575bacb --- /dev/null +++ b/standard/ieee/ieee802-types.yang @@ -0,0 +1,89 @@ +module ieee802-types { + namespace urn:ieee:std:802.1Q:yang:ieee802-types; + prefix ieee; + organization + "IEEE 802.1 Working Group"; + contact + "WG-URL: http://www.ieee802.org/1/ + WG-EMail: stds-802-1-L@ieee.org + + Contact: IEEE 802.1 Working Group Chair + Postal: C/O IEEE 802.1 Working Group + IEEE Standards Association + 445 Hoes Lane + P.O. Box 1331 + Piscataway + NJ 08854 + USA + + E-mail: STDS-802-1-L@IEEE.ORG"; + description + "This module contains a collection of generally useful derived + data types for IEEE YANG models."; + revision 2020-10-23 { + description + "New revision date because Qcx project finished."; + reference + "6.3.3.4 of IEEE Std 802.1AS-2020"; + } + revision 2019-03-07 { + description + "Adding types to define rational numbers and PTP time."; + reference + "6.3.3.4 of IEEE Std 802.1AS-2020"; + } + revision 2018-03-07 { + description + "Published as part of IEEE Std 802.1Q-2018. Initial version."; + reference + "IEEE Std 802.1Q-2018, Bridges and Bridged Networks."; + } + typedef mac-address { + type string { + pattern "[0-9a-fA-F]{2}(-[0-9a-fA-F]{2}){5}"; + } + description + "The mac-address type represents a MAC address in the canonical + format and hexadecimal format specified by IEEE Std 802. The + hexidecimal representation uses uppercase characters."; + reference + "3.1 of IEEE Std 802-2014 + 8.1 of IEEE Std 802-2014"; + } + grouping rational-grouping { + description + "Definition of a non-negative rational number."; + leaf numerator { + type uint32; + description + "Numerator of the rational number."; + } + leaf denominator { + type uint32 { + range "1..4294967295"; + } + description + "Denominator of the rational number."; + } + } + grouping ptp-time-grouping { + description + "This grouping specifies a PTP timestamp, represented as a + 48-bit unsigned integer number of seconds and a 32-bit unsigned + integer number of nanoseconds."; + reference + "6.3.3.4 of IEEE Std 802.1AS"; + leaf seconds { + type uint64; + description + "This is the integer portion of the timestamp in units of + seconds. The upper 16 bits are always zero."; + } + leaf nanoseconds { + type uint32; + description + "This is the fractional portion of the timestamp in units of + nanoseconds. This value is always less than 10^9."; + } + } +} diff --git a/standard/ietf/ietf-inet-types.yang b/standard/ietf/ietf-inet-types.yang new file mode 100644 index 0000000..eacefb6 --- /dev/null +++ b/standard/ietf/ietf-inet-types.yang @@ -0,0 +1,458 @@ +module ietf-inet-types { + + namespace "urn:ietf:params:xml:ns:yang:ietf-inet-types"; + prefix "inet"; + + organization + "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; + + contact + "WG Web: + WG List: + + WG Chair: David Kessens + + + WG Chair: Juergen Schoenwaelder + + + Editor: Juergen Schoenwaelder + "; + + description + "This module contains a collection of generally useful derived + YANG data types for Internet addresses and related things. + + Copyright (c) 2013 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 6991; see + the RFC itself for full legal notices."; + + revision 2013-07-15 { + description + "This revision adds the following new data types: + - ip-address-no-zone + - ipv4-address-no-zone + - ipv6-address-no-zone"; + reference + "RFC 6991: Common YANG Data Types"; + } + + revision 2010-09-24 { + description + "Initial revision."; + reference + "RFC 6021: Common YANG Data Types"; + } + + /*** collection of types related to protocol fields ***/ + + typedef ip-version { + type enumeration { + enum unknown { + value "0"; + description + "An unknown or unspecified version of the Internet + protocol."; + } + enum ipv4 { + value "1"; + description + "The IPv4 protocol as defined in RFC 791."; + } + enum ipv6 { + value "2"; + description + "The IPv6 protocol as defined in RFC 2460."; + } + } + description + "This value represents the version of the IP protocol. + + In the value set and its semantics, this type is equivalent + to the InetVersion textual convention of the SMIv2."; + reference + "RFC 791: Internet Protocol + RFC 2460: Internet Protocol, Version 6 (IPv6) Specification + RFC 4001: Textual Conventions for Internet Network Addresses"; + } + + typedef dscp { + type uint8 { + range "0..63"; + } + description + "The dscp type represents a Differentiated Services Code Point + that may be used for marking packets in a traffic stream. + In the value set and its semantics, this type is equivalent + to the Dscp textual convention of the SMIv2."; + reference + "RFC 3289: Management Information Base for the Differentiated + Services Architecture + RFC 2474: Definition of the Differentiated Services Field + (DS Field) in the IPv4 and IPv6 Headers + RFC 2780: IANA Allocation Guidelines For Values In + the Internet Protocol and Related Headers"; + } + + typedef ipv6-flow-label { + type uint32 { + range "0..1048575"; + } + description + "The ipv6-flow-label type represents the flow identifier or Flow + Label in an IPv6 packet header that may be used to + discriminate traffic flows. + + In the value set and its semantics, this type is equivalent + to the IPv6FlowLabel textual convention of the SMIv2."; + reference + "RFC 3595: Textual Conventions for IPv6 Flow Label + RFC 2460: Internet Protocol, Version 6 (IPv6) Specification"; + } + + typedef port-number { + type uint16 { + range "0..65535"; + } + description + "The port-number type represents a 16-bit port number of an + Internet transport-layer protocol such as UDP, TCP, DCCP, or + SCTP. Port numbers are assigned by IANA. A current list of + all assignments is available from . + + Note that the port number value zero is reserved by IANA. In + situations where the value zero does not make sense, it can + be excluded by subtyping the port-number type. + In the value set and its semantics, this type is equivalent + to the InetPortNumber textual convention of the SMIv2."; + reference + "RFC 768: User Datagram Protocol + RFC 793: Transmission Control Protocol + RFC 4960: Stream Control Transmission Protocol + RFC 4340: Datagram Congestion Control Protocol (DCCP) + RFC 4001: Textual Conventions for Internet Network Addresses"; + } + + /*** collection of types related to autonomous systems ***/ + + typedef as-number { + type uint32; + description + "The as-number type represents autonomous system numbers + which identify an Autonomous System (AS). An AS is a set + of routers under a single technical administration, using + an interior gateway protocol and common metrics to route + packets within the AS, and using an exterior gateway + protocol to route packets to other ASes. IANA maintains + the AS number space and has delegated large parts to the + regional registries. + + Autonomous system numbers were originally limited to 16 + bits. BGP extensions have enlarged the autonomous system + number space to 32 bits. This type therefore uses an uint32 + base type without a range restriction in order to support + a larger autonomous system number space. + + In the value set and its semantics, this type is equivalent + to the InetAutonomousSystemNumber textual convention of + the SMIv2."; + reference + "RFC 1930: Guidelines for creation, selection, and registration + of an Autonomous System (AS) + RFC 4271: A Border Gateway Protocol 4 (BGP-4) + RFC 4001: Textual Conventions for Internet Network Addresses + RFC 6793: BGP Support for Four-Octet Autonomous System (AS) + Number Space"; + } + + /*** collection of types related to IP addresses and hostnames ***/ + + typedef ip-address { + type union { + type inet:ipv4-address; + type inet:ipv6-address; + } + description + "The ip-address type represents an IP address and is IP + version neutral. The format of the textual representation + implies the IP version. This type supports scoped addresses + by allowing zone identifiers in the address format."; + reference + "RFC 4007: IPv6 Scoped Address Architecture"; + } + + typedef ipv4-address { + type string { + pattern + '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}' + + '([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])' + + '(%[\p{N}\p{L}]+)?'; + } + description + "The ipv4-address type represents an IPv4 address in + dotted-quad notation. The IPv4 address may include a zone + index, separated by a % sign. + + The zone index is used to disambiguate identical address + values. For link-local addresses, the zone index will + typically be the interface index number or the name of an + interface. If the zone index is not present, the default + zone of the device will be used. + + The canonical format for the zone index is the numerical + format"; + } + + typedef ipv6-address { + type string { + pattern '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}' + + '((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|' + + '(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\.){3}' + + '(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))' + + '(%[\p{N}\p{L}]+)?'; + pattern '(([^:]+:){6}(([^:]+:[^:]+)|(.*\..*)))|' + + '((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?)' + + '(%.+)?'; + } + description + "The ipv6-address type represents an IPv6 address in full, + mixed, shortened, and shortened-mixed notation. The IPv6 + address may include a zone index, separated by a % sign. + + The zone index is used to disambiguate identical address + values. For link-local addresses, the zone index will + typically be the interface index number or the name of an + interface. If the zone index is not present, the default + zone of the device will be used. + + The canonical format of IPv6 addresses uses the textual + representation defined in Section 4 of RFC 5952. The + canonical format for the zone index is the numerical + format as described in Section 11.2 of RFC 4007."; + reference + "RFC 4291: IP Version 6 Addressing Architecture + RFC 4007: IPv6 Scoped Address Architecture + RFC 5952: A Recommendation for IPv6 Address Text + Representation"; + } + + typedef ip-address-no-zone { + type union { + type inet:ipv4-address-no-zone; + type inet:ipv6-address-no-zone; + } + description + "The ip-address-no-zone type represents an IP address and is + IP version neutral. The format of the textual representation + implies the IP version. This type does not support scoped + addresses since it does not allow zone identifiers in the + address format."; + reference + "RFC 4007: IPv6 Scoped Address Architecture"; + } + + typedef ipv4-address-no-zone { + type inet:ipv4-address { + pattern '[0-9\.]*'; + } + description + "An IPv4 address without a zone index. This type, derived from + ipv4-address, may be used in situations where the zone is + known from the context and hence no zone index is needed."; + } + + typedef ipv6-address-no-zone { + type inet:ipv6-address { + pattern '[0-9a-fA-F:\.]*'; + } + description + "An IPv6 address without a zone index. This type, derived from + ipv6-address, may be used in situations where the zone is + known from the context and hence no zone index is needed."; + reference + "RFC 4291: IP Version 6 Addressing Architecture + RFC 4007: IPv6 Scoped Address Architecture + RFC 5952: A Recommendation for IPv6 Address Text + Representation"; + } + + typedef ip-prefix { + type union { + type inet:ipv4-prefix; + type inet:ipv6-prefix; + } + description + "The ip-prefix type represents an IP prefix and is IP + version neutral. The format of the textual representations + implies the IP version."; + } + + typedef ipv4-prefix { + type string { + pattern + '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}' + + '([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])' + + '/(([0-9])|([1-2][0-9])|(3[0-2]))'; + } + description + "The ipv4-prefix type represents an IPv4 address prefix. + The prefix length is given by the number following the + slash character and must be less than or equal to 32. + + A prefix length value of n corresponds to an IP address + mask that has n contiguous 1-bits from the most + significant bit (MSB) and all other bits set to 0. + + The canonical format of an IPv4 prefix has all bits of + the IPv4 address set to zero that are not part of the + IPv4 prefix."; + } + + typedef ipv6-prefix { + type string { + pattern '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}' + + '((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|' + + '(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\.){3}' + + '(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))' + + '(/(([0-9])|([0-9]{2})|(1[0-1][0-9])|(12[0-8])))'; + pattern '(([^:]+:){6}(([^:]+:[^:]+)|(.*\..*)))|' + + '((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?)' + + '(/.+)'; + } + + description + "The ipv6-prefix type represents an IPv6 address prefix. + The prefix length is given by the number following the + slash character and must be less than or equal to 128. + + A prefix length value of n corresponds to an IP address + mask that has n contiguous 1-bits from the most + significant bit (MSB) and all other bits set to 0. + + The IPv6 address should have all bits that do not belong + to the prefix set to zero. + + The canonical format of an IPv6 prefix has all bits of + the IPv6 address set to zero that are not part of the + IPv6 prefix. Furthermore, the IPv6 address is represented + as defined in Section 4 of RFC 5952."; + reference + "RFC 5952: A Recommendation for IPv6 Address Text + Representation"; + } + + /*** collection of domain name and URI types ***/ + + typedef domain-name { + type string { + pattern + '((([a-zA-Z0-9_]([a-zA-Z0-9\-_]){0,61})?[a-zA-Z0-9]\.)*' + + '([a-zA-Z0-9_]([a-zA-Z0-9\-_]){0,61})?[a-zA-Z0-9]\.?)' + + '|\.'; + length "1..253"; + } + description + "The domain-name type represents a DNS domain name. The + name SHOULD be fully qualified whenever possible. + + Internet domain names are only loosely specified. Section + 3.5 of RFC 1034 recommends a syntax (modified in Section + 2.1 of RFC 1123). The pattern above is intended to allow + for current practice in domain name use, and some possible + future expansion. It is designed to hold various types of + domain names, including names used for A or AAAA records + (host names) and other records, such as SRV records. Note + that Internet host names have a stricter syntax (described + in RFC 952) than the DNS recommendations in RFCs 1034 and + 1123, and that systems that want to store host names in + schema nodes using the domain-name type are recommended to + adhere to this stricter standard to ensure interoperability. + + The encoding of DNS names in the DNS protocol is limited + to 255 characters. Since the encoding consists of labels + prefixed by a length bytes and there is a trailing NULL + byte, only 253 characters can appear in the textual dotted + notation. + + The description clause of schema nodes using the domain-name + type MUST describe when and how these names are resolved to + IP addresses. Note that the resolution of a domain-name value + may require to query multiple DNS records (e.g., A for IPv4 + and AAAA for IPv6). The order of the resolution process and + which DNS record takes precedence can either be defined + explicitly or may depend on the configuration of the + resolver. + + Domain-name values use the US-ASCII encoding. Their canonical + format uses lowercase US-ASCII characters. Internationalized + domain names MUST be A-labels as per RFC 5890."; + reference + "RFC 952: DoD Internet Host Table Specification + RFC 1034: Domain Names - Concepts and Facilities + RFC 1123: Requirements for Internet Hosts -- Application + and Support + RFC 2782: A DNS RR for specifying the location of services + (DNS SRV) + RFC 5890: Internationalized Domain Names in Applications + (IDNA): Definitions and Document Framework"; + } + + typedef host { + type union { + type inet:ip-address; + type inet:domain-name; + } + description + "The host type represents either an IP address or a DNS + domain name."; + } + + typedef uri { + type string; + description + "The uri type represents a Uniform Resource Identifier + (URI) as defined by STD 66. + + Objects using the uri type MUST be in US-ASCII encoding, + and MUST be normalized as described by RFC 3986 Sections + 6.2.1, 6.2.2.1, and 6.2.2.2. All unnecessary + percent-encoding is removed, and all case-insensitive + characters are set to lowercase except for hexadecimal + digits, which are normalized to uppercase as described in + Section 6.2.2.1. + + The purpose of this normalization is to help provide + unique URIs. Note that this normalization is not + sufficient to provide uniqueness. Two URIs that are + textually distinct after this normalization may still be + equivalent. + + Objects using the uri type may restrict the schemes that + they permit. For example, 'data:' and 'urn:' schemes + might not be appropriate. + + A zero-length URI is not a valid URI. This can be used to + express 'URI absent' where required. + + In the value set and its semantics, this type is equivalent + to the Uri SMIv2 textual convention defined in RFC 5017."; + reference + "RFC 3986: Uniform Resource Identifier (URI): Generic Syntax + RFC 3305: Report from the Joint W3C/IETF URI Planning Interest + Group: Uniform Resource Identifiers (URIs), URLs, + and Uniform Resource Names (URNs): Clarifications + and Recommendations + RFC 5017: MIB Textual Conventions for Uniform Resource + Identifiers (URIs)"; + } + +} diff --git a/standard/ietf/ietf-interfaces.yang b/standard/ietf/ietf-interfaces.yang new file mode 100644 index 0000000..f66c205 --- /dev/null +++ b/standard/ietf/ietf-interfaces.yang @@ -0,0 +1,1123 @@ +module ietf-interfaces { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-interfaces"; + prefix if; + + import ietf-yang-types { + prefix yang; + } + + organization + "IETF NETMOD (Network Modeling) Working Group"; + + contact + "WG Web: + WG List: + + Editor: Martin Bjorklund + "; + + description + "This module contains a collection of YANG definitions for + managing network interfaces. + + Copyright (c) 2018 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (https://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8343; see + the RFC itself for full legal notices."; + + revision 2018-02-20 { + description + "Updated to support NMDA."; + reference + "RFC 8343: A YANG Data Model for Interface Management"; + } + + revision 2014-05-08 { + description + "Initial revision."; + reference + "RFC 7223: A YANG Data Model for Interface Management"; + } + + /* + * Typedefs + */ + + typedef interface-ref { + type leafref { + path "/if:interfaces/if:interface/if:name"; + } + description + "This type is used by data models that need to reference + interfaces."; + } + + /* + * Identities + */ + + identity interface-type { + description + "Base identity from which specific interface types are + derived."; + } + + /* + * Features + */ + + feature arbitrary-names { + description + "This feature indicates that the device allows user-controlled + interfaces to be named arbitrarily."; + } + feature pre-provisioning { + description + "This feature indicates that the device supports + pre-provisioning of interface configuration, i.e., it is + possible to configure an interface whose physical interface + hardware is not present on the device."; + } + feature if-mib { + description + "This feature indicates that the device implements + the IF-MIB."; + reference + "RFC 2863: The Interfaces Group MIB"; + } + + /* + * Data nodes + */ + + container interfaces { + description + "Interface parameters."; + + list interface { + key "name"; + + description + "The list of interfaces on the device. + + The status of an interface is available in this list in the + operational state. If the configuration of a + system-controlled interface cannot be used by the system + (e.g., the interface hardware present does not match the + interface type), then the configuration is not applied to + the system-controlled interface shown in the operational + state. If the configuration of a user-controlled interface + cannot be used by the system, the configured interface is + not instantiated in the operational state. + + System-controlled interfaces created by the system are + always present in this list in the operational state, + whether or not they are configured."; + + leaf name { + type string; + description + "The name of the interface. + + A device MAY restrict the allowed values for this leaf, + possibly depending on the type of the interface. + For system-controlled interfaces, this leaf is the + device-specific name of the interface. + + If a client tries to create configuration for a + system-controlled interface that is not present in the + operational state, the server MAY reject the request if + the implementation does not support pre-provisioning of + interfaces or if the name refers to an interface that can + never exist in the system. A Network Configuration + Protocol (NETCONF) server MUST reply with an rpc-error + with the error-tag 'invalid-value' in this case. + + If the device supports pre-provisioning of interface + configuration, the 'pre-provisioning' feature is + advertised. + + If the device allows arbitrarily named user-controlled + interfaces, the 'arbitrary-names' feature is advertised. + + When a configured user-controlled interface is created by + the system, it is instantiated with the same name in the + operational state. + + A server implementation MAY map this leaf to the ifName + MIB object. Such an implementation needs to use some + mechanism to handle the differences in size and characters + allowed between this leaf and ifName. The definition of + such a mechanism is outside the scope of this document."; + reference + "RFC 2863: The Interfaces Group MIB - ifName"; + } + + leaf description { + type string; + description + "A textual description of the interface. + + A server implementation MAY map this leaf to the ifAlias + MIB object. Such an implementation needs to use some + mechanism to handle the differences in size and characters + allowed between this leaf and ifAlias. The definition of + such a mechanism is outside the scope of this document. + + Since ifAlias is defined to be stored in non-volatile + storage, the MIB implementation MUST map ifAlias to the + value of 'description' in the persistently stored + configuration."; + reference + "RFC 2863: The Interfaces Group MIB - ifAlias"; + } + + leaf type { + type identityref { + base interface-type; + } + mandatory true; + description + "The type of the interface. + + When an interface entry is created, a server MAY + initialize the type leaf with a valid value, e.g., if it + is possible to derive the type from the name of the + interface. + + If a client tries to set the type of an interface to a + value that can never be used by the system, e.g., if the + type is not supported or if the type does not match the + name of the interface, the server MUST reject the request. + A NETCONF server MUST reply with an rpc-error with the + error-tag 'invalid-value' in this case."; + reference + "RFC 2863: The Interfaces Group MIB - ifType"; + } + + leaf enabled { + type boolean; + default "true"; + description + "This leaf contains the configured, desired state of the + interface. + + Systems that implement the IF-MIB use the value of this + leaf in the intended configuration to set + IF-MIB.ifAdminStatus to 'up' or 'down' after an ifEntry + has been initialized, as described in RFC 2863. + + Changes in this leaf in the intended configuration are + reflected in ifAdminStatus."; + reference + "RFC 2863: The Interfaces Group MIB - ifAdminStatus"; + } + + leaf link-up-down-trap-enable { + if-feature if-mib; + type enumeration { + enum enabled { + value 1; + description + "The device will generate linkUp/linkDown SNMP + notifications for this interface."; + } + enum disabled { + value 2; + description + "The device will not generate linkUp/linkDown SNMP + notifications for this interface."; + } + } + description + "Controls whether linkUp/linkDown SNMP notifications + should be generated for this interface. + + If this node is not configured, the value 'enabled' is + operationally used by the server for interfaces that do + not operate on top of any other interface (i.e., there are + no 'lower-layer-if' entries), and 'disabled' otherwise."; + reference + "RFC 2863: The Interfaces Group MIB - + ifLinkUpDownTrapEnable"; + } + + leaf admin-status { + if-feature if-mib; + type enumeration { + enum up { + value 1; + description + "Ready to pass packets."; + } + enum down { + value 2; + description + "Not ready to pass packets and not in some test mode."; + } + enum testing { + value 3; + description + "In some test mode."; + } + } + config false; + mandatory true; + description + "The desired state of the interface. + + This leaf has the same read semantics as ifAdminStatus."; + reference + "RFC 2863: The Interfaces Group MIB - ifAdminStatus"; + } + + leaf oper-status { + type enumeration { + enum up { + value 1; + description + "Ready to pass packets."; + } + enum down { + value 2; + + description + "The interface does not pass any packets."; + } + enum testing { + value 3; + description + "In some test mode. No operational packets can + be passed."; + } + enum unknown { + value 4; + description + "Status cannot be determined for some reason."; + } + enum dormant { + value 5; + description + "Waiting for some external event."; + } + enum not-present { + value 6; + description + "Some component (typically hardware) is missing."; + } + enum lower-layer-down { + value 7; + description + "Down due to state of lower-layer interface(s)."; + } + } + config false; + mandatory true; + description + "The current operational state of the interface. + + This leaf has the same semantics as ifOperStatus."; + reference + "RFC 2863: The Interfaces Group MIB - ifOperStatus"; + } + + leaf last-change { + type yang:date-and-time; + config false; + description + "The time the interface entered its current operational + state. If the current state was entered prior to the + last re-initialization of the local network management + subsystem, then this node is not present."; + reference + "RFC 2863: The Interfaces Group MIB - ifLastChange"; + } + + leaf if-index { + if-feature if-mib; + type int32 { + range "1..2147483647"; + } + config false; + mandatory true; + description + "The ifIndex value for the ifEntry represented by this + interface."; + reference + "RFC 2863: The Interfaces Group MIB - ifIndex"; + } + + leaf phys-address { + type yang:phys-address; + config false; + description + "The interface's address at its protocol sub-layer. For + example, for an 802.x interface, this object normally + contains a Media Access Control (MAC) address. The + interface's media-specific modules must define the bit + and byte ordering and the format of the value of this + object. For interfaces that do not have such an address + (e.g., a serial line), this node is not present."; + reference + "RFC 2863: The Interfaces Group MIB - ifPhysAddress"; + } + + leaf-list higher-layer-if { + type interface-ref; + config false; + description + "A list of references to interfaces layered on top of this + interface."; + reference + "RFC 2863: The Interfaces Group MIB - ifStackTable"; + } + + leaf-list lower-layer-if { + type interface-ref; + config false; + + description + "A list of references to interfaces layered underneath this + interface."; + reference + "RFC 2863: The Interfaces Group MIB - ifStackTable"; + } + + leaf speed { + type yang:gauge64; + units "bits/second"; + config false; + description + "An estimate of the interface's current bandwidth in bits + per second. For interfaces that do not vary in + bandwidth or for those where no accurate estimation can + be made, this node should contain the nominal bandwidth. + For interfaces that have no concept of bandwidth, this + node is not present."; + reference + "RFC 2863: The Interfaces Group MIB - + ifSpeed, ifHighSpeed"; + } + + container statistics { + config false; + description + "A collection of interface-related statistics objects."; + + leaf discontinuity-time { + type yang:date-and-time; + mandatory true; + description + "The time on the most recent occasion at which any one or + more of this interface's counters suffered a + discontinuity. If no such discontinuities have occurred + since the last re-initialization of the local management + subsystem, then this node contains the time the local + management subsystem re-initialized itself."; + } + + leaf in-octets { + type yang:counter64; + description + "The total number of octets received on the interface, + including framing characters. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifHCInOctets"; + } + + leaf in-unicast-pkts { + type yang:counter64; + description + "The number of packets, delivered by this sub-layer to a + higher (sub-)layer, that were not addressed to a + multicast or broadcast address at this sub-layer. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifHCInUcastPkts"; + } + + leaf in-broadcast-pkts { + type yang:counter64; + description + "The number of packets, delivered by this sub-layer to a + higher (sub-)layer, that were addressed to a broadcast + address at this sub-layer. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - + ifHCInBroadcastPkts"; + } + + leaf in-multicast-pkts { + type yang:counter64; + description + "The number of packets, delivered by this sub-layer to a + higher (sub-)layer, that were addressed to a multicast + address at this sub-layer. For a MAC-layer protocol, + this includes both Group and Functional addresses. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - + ifHCInMulticastPkts"; + } + + leaf in-discards { + type yang:counter32; + description + "The number of inbound packets that were chosen to be + discarded even though no errors had been detected to + prevent their being deliverable to a higher-layer + protocol. One possible reason for discarding such a + packet could be to free up buffer space. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifInDiscards"; + } + + leaf in-errors { + type yang:counter32; + description + "For packet-oriented interfaces, the number of inbound + packets that contained errors preventing them from being + deliverable to a higher-layer protocol. For character- + oriented or fixed-length interfaces, the number of + inbound transmission units that contained errors + preventing them from being deliverable to a higher-layer + protocol. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifInErrors"; + } + + leaf in-unknown-protos { + type yang:counter32; + + description + "For packet-oriented interfaces, the number of packets + received via the interface that were discarded because + of an unknown or unsupported protocol. For + character-oriented or fixed-length interfaces that + support protocol multiplexing, the number of + transmission units received via the interface that were + discarded because of an unknown or unsupported protocol. + For any interface that does not support protocol + multiplexing, this counter is not present. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifInUnknownProtos"; + } + + leaf out-octets { + type yang:counter64; + description + "The total number of octets transmitted out of the + interface, including framing characters. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifHCOutOctets"; + } + + leaf out-unicast-pkts { + type yang:counter64; + description + "The total number of packets that higher-level protocols + requested be transmitted and that were not addressed + to a multicast or broadcast address at this sub-layer, + including those that were discarded or not sent. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifHCOutUcastPkts"; + } + + leaf out-broadcast-pkts { + type yang:counter64; + description + "The total number of packets that higher-level protocols + requested be transmitted and that were addressed to a + broadcast address at this sub-layer, including those + that were discarded or not sent. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - + ifHCOutBroadcastPkts"; + } + + leaf out-multicast-pkts { + type yang:counter64; + description + "The total number of packets that higher-level protocols + requested be transmitted and that were addressed to a + multicast address at this sub-layer, including those + that were discarded or not sent. For a MAC-layer + protocol, this includes both Group and Functional + addresses. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - + ifHCOutMulticastPkts"; + } + + leaf out-discards { + type yang:counter32; + description + "The number of outbound packets that were chosen to be + discarded even though no errors had been detected to + prevent their being transmitted. One possible reason + for discarding such a packet could be to free up buffer + space. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifOutDiscards"; + } + + leaf out-errors { + type yang:counter32; + description + "For packet-oriented interfaces, the number of outbound + packets that could not be transmitted because of errors. + For character-oriented or fixed-length interfaces, the + number of outbound transmission units that could not be + transmitted because of errors. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifOutErrors"; + } + } + + } + } + + /* + * Legacy typedefs + */ + + typedef interface-state-ref { + type leafref { + path "/if:interfaces-state/if:interface/if:name"; + } + status deprecated; + description + "This type is used by data models that need to reference + the operationally present interfaces."; + } + + /* + * Legacy operational state data nodes + */ + + container interfaces-state { + config false; + status deprecated; + description + "Data nodes for the operational state of interfaces."; + + list interface { + key "name"; + status deprecated; + + description + "The list of interfaces on the device. + + System-controlled interfaces created by the system are + always present in this list, whether or not they are + configured."; + + leaf name { + type string; + status deprecated; + description + "The name of the interface. + + A server implementation MAY map this leaf to the ifName + MIB object. Such an implementation needs to use some + mechanism to handle the differences in size and characters + allowed between this leaf and ifName. The definition of + such a mechanism is outside the scope of this document."; + reference + "RFC 2863: The Interfaces Group MIB - ifName"; + } + + leaf type { + type identityref { + base interface-type; + } + mandatory true; + status deprecated; + description + "The type of the interface."; + reference + "RFC 2863: The Interfaces Group MIB - ifType"; + } + + leaf admin-status { + if-feature if-mib; + type enumeration { + enum up { + value 1; + description + "Ready to pass packets."; + } + enum down { + value 2; + description + "Not ready to pass packets and not in some test mode."; + } + enum testing { + value 3; + description + "In some test mode."; + } + } + mandatory true; + status deprecated; + description + "The desired state of the interface. + + This leaf has the same read semantics as ifAdminStatus."; + reference + "RFC 2863: The Interfaces Group MIB - ifAdminStatus"; + } + + leaf oper-status { + type enumeration { + enum up { + value 1; + description + "Ready to pass packets."; + } + enum down { + value 2; + description + "The interface does not pass any packets."; + } + enum testing { + value 3; + description + "In some test mode. No operational packets can + be passed."; + } + enum unknown { + value 4; + description + "Status cannot be determined for some reason."; + } + enum dormant { + value 5; + description + "Waiting for some external event."; + } + enum not-present { + value 6; + description + "Some component (typically hardware) is missing."; + } + enum lower-layer-down { + value 7; + description + "Down due to state of lower-layer interface(s)."; + } + } + mandatory true; + status deprecated; + description + "The current operational state of the interface. + + This leaf has the same semantics as ifOperStatus."; + reference + "RFC 2863: The Interfaces Group MIB - ifOperStatus"; + } + + leaf last-change { + type yang:date-and-time; + status deprecated; + description + "The time the interface entered its current operational + state. If the current state was entered prior to the + last re-initialization of the local network management + subsystem, then this node is not present."; + reference + "RFC 2863: The Interfaces Group MIB - ifLastChange"; + } + + leaf if-index { + if-feature if-mib; + type int32 { + range "1..2147483647"; + } + mandatory true; + status deprecated; + description + "The ifIndex value for the ifEntry represented by this + interface."; + + reference + "RFC 2863: The Interfaces Group MIB - ifIndex"; + } + + leaf phys-address { + type yang:phys-address; + status deprecated; + description + "The interface's address at its protocol sub-layer. For + example, for an 802.x interface, this object normally + contains a Media Access Control (MAC) address. The + interface's media-specific modules must define the bit + and byte ordering and the format of the value of this + object. For interfaces that do not have such an address + (e.g., a serial line), this node is not present."; + reference + "RFC 2863: The Interfaces Group MIB - ifPhysAddress"; + } + + leaf-list higher-layer-if { + type interface-state-ref; + status deprecated; + description + "A list of references to interfaces layered on top of this + interface."; + reference + "RFC 2863: The Interfaces Group MIB - ifStackTable"; + } + + leaf-list lower-layer-if { + type interface-state-ref; + status deprecated; + description + "A list of references to interfaces layered underneath this + interface."; + reference + "RFC 2863: The Interfaces Group MIB - ifStackTable"; + } + + leaf speed { + type yang:gauge64; + units "bits/second"; + status deprecated; + description + "An estimate of the interface's current bandwidth in bits + per second. For interfaces that do not vary in + bandwidth or for those where no accurate estimation can + + be made, this node should contain the nominal bandwidth. + For interfaces that have no concept of bandwidth, this + node is not present."; + reference + "RFC 2863: The Interfaces Group MIB - + ifSpeed, ifHighSpeed"; + } + + container statistics { + status deprecated; + description + "A collection of interface-related statistics objects."; + + leaf discontinuity-time { + type yang:date-and-time; + mandatory true; + status deprecated; + description + "The time on the most recent occasion at which any one or + more of this interface's counters suffered a + discontinuity. If no such discontinuities have occurred + since the last re-initialization of the local management + subsystem, then this node contains the time the local + management subsystem re-initialized itself."; + } + + leaf in-octets { + type yang:counter64; + status deprecated; + description + "The total number of octets received on the interface, + including framing characters. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifHCInOctets"; + } + + leaf in-unicast-pkts { + type yang:counter64; + status deprecated; + description + "The number of packets, delivered by this sub-layer to a + higher (sub-)layer, that were not addressed to a + multicast or broadcast address at this sub-layer. + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifHCInUcastPkts"; + } + + leaf in-broadcast-pkts { + type yang:counter64; + status deprecated; + description + "The number of packets, delivered by this sub-layer to a + higher (sub-)layer, that were addressed to a broadcast + address at this sub-layer. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - + ifHCInBroadcastPkts"; + } + + leaf in-multicast-pkts { + type yang:counter64; + status deprecated; + description + "The number of packets, delivered by this sub-layer to a + higher (sub-)layer, that were addressed to a multicast + address at this sub-layer. For a MAC-layer protocol, + this includes both Group and Functional addresses. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - + ifHCInMulticastPkts"; + } + + leaf in-discards { + type yang:counter32; + status deprecated; + + description + "The number of inbound packets that were chosen to be + discarded even though no errors had been detected to + prevent their being deliverable to a higher-layer + protocol. One possible reason for discarding such a + packet could be to free up buffer space. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifInDiscards"; + } + + leaf in-errors { + type yang:counter32; + status deprecated; + description + "For packet-oriented interfaces, the number of inbound + packets that contained errors preventing them from being + deliverable to a higher-layer protocol. For character- + oriented or fixed-length interfaces, the number of + inbound transmission units that contained errors + preventing them from being deliverable to a higher-layer + protocol. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifInErrors"; + } + + leaf in-unknown-protos { + type yang:counter32; + status deprecated; + description + "For packet-oriented interfaces, the number of packets + received via the interface that were discarded because + of an unknown or unsupported protocol. For + character-oriented or fixed-length interfaces that + support protocol multiplexing, the number of + transmission units received via the interface that were + discarded because of an unknown or unsupported protocol. + For any interface that does not support protocol + multiplexing, this counter is not present. + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifInUnknownProtos"; + } + + leaf out-octets { + type yang:counter64; + status deprecated; + description + "The total number of octets transmitted out of the + interface, including framing characters. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifHCOutOctets"; + } + + leaf out-unicast-pkts { + type yang:counter64; + status deprecated; + description + "The total number of packets that higher-level protocols + requested be transmitted and that were not addressed + to a multicast or broadcast address at this sub-layer, + including those that were discarded or not sent. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifHCOutUcastPkts"; + } + + leaf out-broadcast-pkts { + type yang:counter64; + status deprecated; + + description + "The total number of packets that higher-level protocols + requested be transmitted and that were addressed to a + broadcast address at this sub-layer, including those + that were discarded or not sent. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - + ifHCOutBroadcastPkts"; + } + + leaf out-multicast-pkts { + type yang:counter64; + status deprecated; + description + "The total number of packets that higher-level protocols + requested be transmitted and that were addressed to a + multicast address at this sub-layer, including those + that were discarded or not sent. For a MAC-layer + protocol, this includes both Group and Functional + addresses. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - + ifHCOutMulticastPkts"; + } + + leaf out-discards { + type yang:counter32; + status deprecated; + description + "The number of outbound packets that were chosen to be + discarded even though no errors had been detected to + prevent their being transmitted. One possible reason + for discarding such a packet could be to free up buffer + space. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifOutDiscards"; + } + + leaf out-errors { + type yang:counter32; + status deprecated; + description + "For packet-oriented interfaces, the number of outbound + packets that could not be transmitted because of errors. + For character-oriented or fixed-length interfaces, the + number of outbound transmission units that could not be + transmitted because of errors. + + Discontinuities in the value of this counter can occur + at re-initialization of the management system and at + other times as indicated by the value of + 'discontinuity-time'."; + reference + "RFC 2863: The Interfaces Group MIB - ifOutErrors"; + } + } + } + } +} diff --git a/standard/ietf/ietf-ip@2018-02-22.yang b/standard/ietf/ietf-ip@2018-02-22.yang new file mode 100644 index 0000000..a270f67 --- /dev/null +++ b/standard/ietf/ietf-ip@2018-02-22.yang @@ -0,0 +1,876 @@ +module ietf-ip { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-ip"; + prefix ip; + + import ietf-interfaces { + prefix if; + } + import ietf-inet-types { + prefix inet; + } + import ietf-yang-types { + prefix yang; + } + + organization + "IETF NETMOD (Network Modeling) Working Group"; + + contact + "WG Web: + WG List: + + Editor: Martin Bjorklund + "; + description + "This module contains a collection of YANG definitions for + managing IP implementations. + + Copyright (c) 2018 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (https://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8344; see + the RFC itself for full legal notices."; + + revision 2018-02-22 { + description + "Updated to support NMDA."; + reference + "RFC 8344: A YANG Data Model for IP Management"; + } + + revision 2014-06-16 { + description + "Initial revision."; + reference + "RFC 7277: A YANG Data Model for IP Management"; + } + + /* + * Features + */ + + feature ipv4-non-contiguous-netmasks { + description + "Indicates support for configuring non-contiguous + subnet masks."; + } + + feature ipv6-privacy-autoconf { + description + "Indicates support for privacy extensions for stateless address + autoconfiguration in IPv6."; + reference + "RFC 4941: Privacy Extensions for Stateless Address + Autoconfiguration in IPv6"; + } + + /* + * Typedefs + */ + + typedef ip-address-origin { + type enumeration { + enum other { + description + "None of the following."; + } + + enum static { + description + "Indicates that the address has been statically + configured -- for example, using the Network Configuration + Protocol (NETCONF) or a command line interface."; + } + enum dhcp { + description + "Indicates an address that has been assigned to this + system by a DHCP server."; + } + enum link-layer { + description + "Indicates an address created by IPv6 stateless + autoconfiguration that embeds a link-layer address in its + interface identifier."; + } + enum random { + description + "Indicates an address chosen by the system at + random, e.g., an IPv4 address within 169.254/16, a + temporary address as described in RFC 4941, or a + semantically opaque address as described in RFC 7217."; + reference + "RFC 4941: Privacy Extensions for Stateless Address + Autoconfiguration in IPv6 + RFC 7217: A Method for Generating Semantically Opaque + Interface Identifiers with IPv6 Stateless + Address Autoconfiguration (SLAAC)"; + } + } + description + "The origin of an address."; + } + + typedef neighbor-origin { + type enumeration { + enum other { + description + "None of the following."; + } + enum static { + description + "Indicates that the mapping has been statically + configured -- for example, using NETCONF or a command line + interface."; + } + + enum dynamic { + description + "Indicates that the mapping has been dynamically resolved + using, for example, IPv4 ARP or the IPv6 Neighbor + Discovery protocol."; + } + } + description + "The origin of a neighbor entry."; + } + + /* + * Data nodes + */ + + augment "/if:interfaces/if:interface" { + description + "IP parameters on interfaces. + + If an interface is not capable of running IP, the server + must not allow the client to configure these parameters."; + + container ipv4 { + presence + "Enables IPv4 unless the 'enabled' leaf + (which defaults to 'true') is set to 'false'"; + description + "Parameters for the IPv4 address family."; + + leaf enabled { + type boolean; + default true; + description + "Controls whether IPv4 is enabled or disabled on this + interface. When IPv4 is enabled, this interface is + connected to an IPv4 stack, and the interface can send + and receive IPv4 packets."; + } + leaf forwarding { + type boolean; + default false; + description + "Controls IPv4 packet forwarding of datagrams received by, + but not addressed to, this interface. IPv4 routers + forward datagrams. IPv4 hosts do not (except those + source-routed via the host)."; + } + + leaf mtu { + type uint16 { + range "68..max"; + } + units "octets"; + description + "The size, in octets, of the largest IPv4 packet that the + interface will send and receive. + + The server may restrict the allowed values for this leaf, + depending on the interface's type. + + If this leaf is not configured, the operationally used MTU + depends on the interface's type."; + reference + "RFC 791: Internet Protocol"; + } + list address { + key "ip"; + description + "The list of IPv4 addresses on the interface."; + + leaf ip { + type inet:ipv4-address-no-zone; + description + "The IPv4 address on the interface."; + } + choice subnet { + mandatory true; + description + "The subnet can be specified as a prefix length or, + if the server supports non-contiguous netmasks, as + a netmask."; + leaf prefix-length { + type uint8 { + range "0..32"; + } + description + "The length of the subnet prefix."; + } + leaf netmask { + if-feature ipv4-non-contiguous-netmasks; + type yang:dotted-quad; + description + "The subnet specified as a netmask."; + } + } + + leaf origin { + type ip-address-origin; + config false; + description + "The origin of this address."; + } + } + list neighbor { + key "ip"; + description + "A list of mappings from IPv4 addresses to + link-layer addresses. + + Entries in this list in the intended configuration are + used as static entries in the ARP Cache. + + In the operational state, this list represents the ARP + Cache."; + reference + "RFC 826: An Ethernet Address Resolution Protocol"; + + leaf ip { + type inet:ipv4-address-no-zone; + description + "The IPv4 address of the neighbor node."; + } + leaf link-layer-address { + type yang:phys-address; + mandatory true; + description + "The link-layer address of the neighbor node."; + } + leaf origin { + type neighbor-origin; + config false; + description + "The origin of this neighbor entry."; + } + } + } + + container ipv6 { + presence + "Enables IPv6 unless the 'enabled' leaf + (which defaults to 'true') is set to 'false'"; + description + "Parameters for the IPv6 address family."; + + leaf enabled { + type boolean; + default true; + description + "Controls whether IPv6 is enabled or disabled on this + interface. When IPv6 is enabled, this interface is + connected to an IPv6 stack, and the interface can send + and receive IPv6 packets."; + } + leaf forwarding { + type boolean; + default false; + description + "Controls IPv6 packet forwarding of datagrams received by, + but not addressed to, this interface. IPv6 routers + forward datagrams. IPv6 hosts do not (except those + source-routed via the host)."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) + Section 6.2.1, IsRouter"; + } + leaf mtu { + type uint32 { + range "1280..max"; + } + units "octets"; + description + "The size, in octets, of the largest IPv6 packet that the + interface will send and receive. + + The server may restrict the allowed values for this leaf, + depending on the interface's type. + + If this leaf is not configured, the operationally used MTU + depends on the interface's type."; + reference + "RFC 8200: Internet Protocol, Version 6 (IPv6) + Specification + Section 5"; + } + + list address { + key "ip"; + description + "The list of IPv6 addresses on the interface."; + + leaf ip { + type inet:ipv6-address-no-zone; + description + "The IPv6 address on the interface."; + } + leaf prefix-length { + type uint8 { + range "0..128"; + } + mandatory true; + description + "The length of the subnet prefix."; + } + leaf origin { + type ip-address-origin; + config false; + description + "The origin of this address."; + } + leaf status { + type enumeration { + enum preferred { + description + "This is a valid address that can appear as the + destination or source address of a packet."; + } + enum deprecated { + description + "This is a valid but deprecated address that should + no longer be used as a source address in new + communications, but packets addressed to such an + address are processed as expected."; + } + enum invalid { + description + "This isn't a valid address, and it shouldn't appear + as the destination or source address of a packet."; + } + + enum inaccessible { + description + "The address is not accessible because the interface + to which this address is assigned is not + operational."; + } + enum unknown { + description + "The status cannot be determined for some reason."; + } + enum tentative { + description + "The uniqueness of the address on the link is being + verified. Addresses in this state should not be + used for general communication and should only be + used to determine the uniqueness of the address."; + } + enum duplicate { + description + "The address has been determined to be non-unique on + the link and so must not be used."; + } + enum optimistic { + description + "The address is available for use, subject to + restrictions, while its uniqueness on a link is + being verified."; + } + } + config false; + description + "The status of an address. Most of the states correspond + to states from the IPv6 Stateless Address + Autoconfiguration protocol."; + reference + "RFC 4293: Management Information Base for the + Internet Protocol (IP) + - IpAddressStatusTC + RFC 4862: IPv6 Stateless Address Autoconfiguration"; + } + } + + list neighbor { + key "ip"; + description + "A list of mappings from IPv6 addresses to + link-layer addresses. + + Entries in this list in the intended configuration are + used as static entries in the Neighbor Cache. + + In the operational state, this list represents the + Neighbor Cache."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6)"; + + leaf ip { + type inet:ipv6-address-no-zone; + description + "The IPv6 address of the neighbor node."; + } + leaf link-layer-address { + type yang:phys-address; + mandatory true; + description + "The link-layer address of the neighbor node. + + In the operational state, if the neighbor's 'state' leaf + is 'incomplete', this leaf is not instantiated."; + } + leaf origin { + type neighbor-origin; + config false; + description + "The origin of this neighbor entry."; + } + leaf is-router { + type empty; + config false; + description + "Indicates that the neighbor node acts as a router."; + } + + leaf state { + type enumeration { + enum incomplete { + description + "Address resolution is in progress, and the + link-layer address of the neighbor has not yet been + determined."; + } + enum reachable { + description + "Roughly speaking, the neighbor is known to have been + reachable recently (within tens of seconds ago)."; + } + enum stale { + description + "The neighbor is no longer known to be reachable, but + until traffic is sent to the neighbor no attempt + should be made to verify its reachability."; + } + enum delay { + description + "The neighbor is no longer known to be reachable, and + traffic has recently been sent to the neighbor. + Rather than probe the neighbor immediately, however, + delay sending probes for a short while in order to + give upper-layer protocols a chance to provide + reachability confirmation."; + } + enum probe { + description + "The neighbor is no longer known to be reachable, and + unicast Neighbor Solicitation probes are being sent + to verify reachability."; + } + } + config false; + description + "The Neighbor Unreachability Detection state of this + entry."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) + Section 7.3.2"; + } + } + + leaf dup-addr-detect-transmits { + type uint32; + default 1; + description + "The number of consecutive Neighbor Solicitation messages + sent while performing Duplicate Address Detection on a + tentative address. A value of zero indicates that + Duplicate Address Detection is not performed on + tentative addresses. A value of one indicates a single + transmission with no follow-up retransmissions."; + reference + "RFC 4862: IPv6 Stateless Address Autoconfiguration"; + } + container autoconf { + description + "Parameters to control the autoconfiguration of IPv6 + addresses, as described in RFC 4862."; + reference + "RFC 4862: IPv6 Stateless Address Autoconfiguration"; + + leaf create-global-addresses { + type boolean; + default true; + description + "If enabled, the host creates global addresses as + described in RFC 4862."; + reference + "RFC 4862: IPv6 Stateless Address Autoconfiguration + Section 5.5"; + } + leaf create-temporary-addresses { + if-feature ipv6-privacy-autoconf; + type boolean; + default false; + description + "If enabled, the host creates temporary addresses as + described in RFC 4941."; + reference + "RFC 4941: Privacy Extensions for Stateless Address + Autoconfiguration in IPv6"; + } + + leaf temporary-valid-lifetime { + if-feature ipv6-privacy-autoconf; + type uint32; + units "seconds"; + default 604800; + description + "The time period during which the temporary address + is valid."; + reference + "RFC 4941: Privacy Extensions for Stateless Address + Autoconfiguration in IPv6 + - TEMP_VALID_LIFETIME"; + } + leaf temporary-preferred-lifetime { + if-feature ipv6-privacy-autoconf; + type uint32; + units "seconds"; + default 86400; + description + "The time period during which the temporary address is + preferred."; + reference + "RFC 4941: Privacy Extensions for Stateless Address + Autoconfiguration in IPv6 + - TEMP_PREFERRED_LIFETIME"; + } + } + } + } + + /* + * Legacy operational state data nodes + */ + + augment "/if:interfaces-state/if:interface" { + status deprecated; + description + "Data nodes for the operational state of IP on interfaces."; + + container ipv4 { + presence + "Present if IPv4 is enabled on this interface"; + config false; + status deprecated; + description + "Interface-specific parameters for the IPv4 address family."; + + leaf forwarding { + type boolean; + status deprecated; + description + "Indicates whether IPv4 packet forwarding is enabled or + disabled on this interface."; + } + leaf mtu { + type uint16 { + range "68..max"; + } + units "octets"; + status deprecated; + description + "The size, in octets, of the largest IPv4 packet that the + interface will send and receive."; + reference + "RFC 791: Internet Protocol"; + } + list address { + key "ip"; + status deprecated; + description + "The list of IPv4 addresses on the interface."; + + leaf ip { + type inet:ipv4-address-no-zone; + status deprecated; + description + "The IPv4 address on the interface."; + } + choice subnet { + status deprecated; + description + "The subnet can be specified as a prefix length or, + if the server supports non-contiguous netmasks, as + a netmask."; + leaf prefix-length { + type uint8 { + range "0..32"; + } + status deprecated; + description + "The length of the subnet prefix."; + } + leaf netmask { + if-feature ipv4-non-contiguous-netmasks; + type yang:dotted-quad; + status deprecated; + description + "The subnet specified as a netmask."; + } + } + leaf origin { + type ip-address-origin; + status deprecated; + description + "The origin of this address."; + } + } + list neighbor { + key "ip"; + status deprecated; + description + "A list of mappings from IPv4 addresses to + link-layer addresses. + + This list represents the ARP Cache."; + reference + "RFC 826: An Ethernet Address Resolution Protocol"; + + leaf ip { + type inet:ipv4-address-no-zone; + status deprecated; + description + "The IPv4 address of the neighbor node."; + } + + leaf link-layer-address { + type yang:phys-address; + status deprecated; + description + "The link-layer address of the neighbor node."; + } + leaf origin { + type neighbor-origin; + status deprecated; + description + "The origin of this neighbor entry."; + } + } + } + + container ipv6 { + presence + "Present if IPv6 is enabled on this interface"; + config false; + status deprecated; + description + "Parameters for the IPv6 address family."; + + leaf forwarding { + type boolean; + default false; + status deprecated; + description + "Indicates whether IPv6 packet forwarding is enabled or + disabled on this interface."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) + Section 6.2.1, IsRouter"; + } + leaf mtu { + type uint32 { + range "1280..max"; + } + units "octets"; + status deprecated; + description + "The size, in octets, of the largest IPv6 packet that the + interface will send and receive."; + reference + "RFC 8200: Internet Protocol, Version 6 (IPv6) + Specification + Section 5"; + } + list address { + key "ip"; + status deprecated; + description + "The list of IPv6 addresses on the interface."; + + leaf ip { + type inet:ipv6-address-no-zone; + status deprecated; + description + "The IPv6 address on the interface."; + } + leaf prefix-length { + type uint8 { + range "0..128"; + } + mandatory true; + status deprecated; + description + "The length of the subnet prefix."; + } + leaf origin { + type ip-address-origin; + status deprecated; + description + "The origin of this address."; + } + leaf status { + type enumeration { + enum preferred { + description + "This is a valid address that can appear as the + destination or source address of a packet."; + } + enum deprecated { + description + "This is a valid but deprecated address that should + no longer be used as a source address in new + communications, but packets addressed to such an + address are processed as expected."; + } + enum invalid { + description + "This isn't a valid address, and it shouldn't appear + as the destination or source address of a packet."; + } + + enum inaccessible { + description + "The address is not accessible because the interface + to which this address is assigned is not + operational."; + } + enum unknown { + description + "The status cannot be determined for some reason."; + } + enum tentative { + description + "The uniqueness of the address on the link is being + verified. Addresses in this state should not be + used for general communication and should only be + used to determine the uniqueness of the address."; + } + enum duplicate { + description + "The address has been determined to be non-unique on + the link and so must not be used."; + } + enum optimistic { + description + "The address is available for use, subject to + restrictions, while its uniqueness on a link is + being verified."; + } + } + status deprecated; + description + "The status of an address. Most of the states correspond + to states from the IPv6 Stateless Address + Autoconfiguration protocol."; + reference + "RFC 4293: Management Information Base for the + Internet Protocol (IP) + - IpAddressStatusTC + RFC 4862: IPv6 Stateless Address Autoconfiguration"; + } + } + + list neighbor { + key "ip"; + status deprecated; + description + "A list of mappings from IPv6 addresses to + link-layer addresses. + + This list represents the Neighbor Cache."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6)"; + + leaf ip { + type inet:ipv6-address-no-zone; + status deprecated; + description + "The IPv6 address of the neighbor node."; + } + leaf link-layer-address { + type yang:phys-address; + status deprecated; + description + "The link-layer address of the neighbor node."; + } + leaf origin { + type neighbor-origin; + status deprecated; + description + "The origin of this neighbor entry."; + } + leaf is-router { + type empty; + status deprecated; + description + "Indicates that the neighbor node acts as a router."; + } + leaf state { + type enumeration { + enum incomplete { + description + "Address resolution is in progress, and the + link-layer address of the neighbor has not yet been + determined."; + } + enum reachable { + description + "Roughly speaking, the neighbor is known to have been + reachable recently (within tens of seconds ago)."; + } + enum stale { + description + "The neighbor is no longer known to be reachable, but + until traffic is sent to the neighbor no attempt + should be made to verify its reachability."; + } + enum delay { + description + "The neighbor is no longer known to be reachable, and + traffic has recently been sent to the neighbor. + Rather than probe the neighbor immediately, however, + delay sending probes for a short while in order to + give upper-layer protocols a chance to provide + reachability confirmation."; + } + enum probe { + description + "The neighbor is no longer known to be reachable, and + unicast Neighbor Solicitation probes are being sent + to verify reachability."; + } + } + status deprecated; + description + "The Neighbor Unreachability Detection state of this + entry."; + reference + "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) + Section 7.3.2"; + } + } + } + } +} diff --git a/standard/ietf/ietf-network-topology.yang b/standard/ietf/ietf-network-topology.yang new file mode 100644 index 0000000..67ab7cb --- /dev/null +++ b/standard/ietf/ietf-network-topology.yang @@ -0,0 +1,293 @@ +module ietf-network-topology { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-network-topology"; + prefix nt; + + import ietf-inet-types { + prefix inet; + reference + "RFC 6991: Common YANG Data Types"; + } + import ietf-network { + prefix nw; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + + organization + "IETF I2RS (Interface to the Routing System) Working Group"; + + contact + "WG Web: + WG List: + + Editor: Alexander Clemm + + + Editor: Jan Medved + + + Editor: Robert Varga + + + Editor: Nitin Bahadur + + + Editor: Hariharan Ananthakrishnan + + + Editor: Xufeng Liu + "; + + description + "This module defines a common base model for a network topology, + augmenting the base network data model with links to connect + nodes, as well as termination points to terminate links + on nodes. + + Copyright (c) 2018 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (https://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8345; + see the RFC itself for full legal notices."; + + revision 2018-02-26 { + description + "Initial revision."; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + + + + typedef link-id { + type inet:uri; + description + "An identifier for a link in a topology. The precise + structure of the link-id will be up to the implementation. + The identifier SHOULD be chosen such that the same link in a + real network topology will always be identified through the + same identifier, even if the data model is instantiated in + separate datastores. An implementation MAY choose to capture + semantics in the identifier -- for example, to indicate the + type of link and/or the type of topology of which the link is + a part."; + } + + typedef tp-id { + type inet:uri; + description + "An identifier for termination points on a node. The precise + structure of the tp-id will be up to the implementation. + The identifier SHOULD be chosen such that the same termination + point in a real network topology will always be identified + through the same identifier, even if the data model is + instantiated in separate datastores. An implementation MAY + choose to capture semantics in the identifier -- for example, + to indicate the type of termination point and/or the type of + node that contains the termination point."; + } + + grouping link-ref { + description + "This grouping can be used to reference a link in a specific + network. Although it is not used in this module, it is + defined here for the convenience of augmenting modules."; + leaf link-ref { + type leafref { + path "/nw:networks/nw:network[nw:network-id=current()/../"+ + "network-ref]/nt:link/nt:link-id"; + require-instance false; + } + description + "A type for an absolute reference to a link instance. + (This type should not be used for relative references. + In such a case, a relative path should be used instead.)"; + } + uses nw:network-ref; + } + + grouping tp-ref { + description + "This grouping can be used to reference a termination point + in a specific node. Although it is not used in this module, + it is defined here for the convenience of augmenting + modules."; + leaf tp-ref { + type leafref { + path "/nw:networks/nw:network[nw:network-id=current()/../"+ + "network-ref]/nw:node[nw:node-id=current()/../"+ + "node-ref]/nt:termination-point/nt:tp-id"; + require-instance false; + } + description + "A type for an absolute reference to a termination point. + (This type should not be used for relative references. + In such a case, a relative path should be used instead.)"; + } + uses nw:node-ref; + } + augment "/nw:networks/nw:network" { + description + "Add links to the network data model."; + list link { + key "link-id"; + description + "A network link connects a local (source) node and + a remote (destination) node via a set of the respective + node's termination points. It is possible to have several + links between the same source and destination nodes. + Likewise, a link could potentially be re-homed between + termination points. Therefore, in order to ensure that we + would always know to distinguish between links, every link + is identified by a dedicated link identifier. Note that a + link models a point-to-point link, not a multipoint link."; + leaf link-id { + type link-id; + description + "The identifier of a link in the topology. + A link is specific to a topology to which it belongs."; + } + container source { + description + "This container holds the logical source of a particular + link."; + leaf source-node { + type leafref { + path "../../../nw:node/nw:node-id"; + require-instance false; + } + description + "Source node identifier. Must be in the same topology."; + } + leaf source-tp { + type leafref { + path "../../../nw:node[nw:node-id=current()/../"+ + "source-node]/termination-point/tp-id"; + require-instance false; + } + description + "This termination point is located within the source node + and terminates the link."; + } + } + container destination { + description + "This container holds the logical destination of a + particular link."; + leaf dest-node { + type leafref { + path "../../../nw:node/nw:node-id"; + require-instance false; + } + description + "Destination node identifier. Must be in the same + network."; + } + leaf dest-tp { + type leafref { + path "../../../nw:node[nw:node-id=current()/../"+ + "dest-node]/termination-point/tp-id"; + require-instance false; + } + description + "This termination point is located within the + destination node and terminates the link."; + } + } + list supporting-link { + key "network-ref link-ref"; + description + "Identifies the link or links on which this link depends."; + leaf network-ref { + type leafref { + path "../../../nw:supporting-network/nw:network-ref"; + require-instance false; + } + description + "This leaf identifies in which underlay topology + the supporting link is present."; + } + leaf link-ref { + type leafref { + path "/nw:networks/nw:network[nw:network-id=current()/"+ + "../network-ref]/link/link-id"; + require-instance false; + } + description + "This leaf identifies a link that is a part + of this link's underlay. Reference loops in which + a link identifies itself as its underlay, either + directly or transitively, are not allowed."; + } + } + } + } + augment "/nw:networks/nw:network/nw:node" { + description + "Augments termination points that terminate links. + Termination points can ultimately be mapped to interfaces."; + + list termination-point { + key "tp-id"; + description + "A termination point can terminate a link. + Depending on the type of topology, a termination point + could, for example, refer to a port or an interface."; + leaf tp-id { + type tp-id; + description + "Termination point identifier."; + } + list supporting-termination-point { + key "network-ref node-ref tp-ref"; + description + "This list identifies any termination points on which a + given termination point depends or onto which it maps. + Those termination points will themselves be contained + in a supporting node. This dependency information can be + inferred from the dependencies between links. Therefore, + this item is not separately configurable. Hence, no + corresponding constraint needs to be articulated. + The corresponding information is simply provided by the + implementing system."; + leaf network-ref { + type leafref { + path "../../../nw:supporting-node/nw:network-ref"; + require-instance false; + } + description + "This leaf identifies in which topology the + supporting termination point is present."; + } + leaf node-ref { + type leafref { + path "../../../nw:supporting-node/nw:node-ref"; + require-instance false; + } + description + "This leaf identifies in which node the supporting + termination point is present."; + } + leaf tp-ref { + type leafref { + path "/nw:networks/nw:network[nw:network-id=current()/"+ + "../network-ref]/nw:node[nw:node-id=current()/../"+ + "node-ref]/termination-point/tp-id"; + require-instance false; + } + description + "Reference to the underlay node (the underlay node must + be in a different topology)."; + } + } + } + } + } diff --git a/standard/ietf/ietf-network.yang b/standard/ietf/ietf-network.yang new file mode 100644 index 0000000..f6b05e8 --- /dev/null +++ b/standard/ietf/ietf-network.yang @@ -0,0 +1,192 @@ +module ietf-network { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-network"; + prefix nw; + + import ietf-inet-types { + prefix inet; + reference + "RFC 6991: Common YANG Data Types"; + } + + organization + "IETF I2RS (Interface to the Routing System) Working Group"; + + contact + "WG Web: + WG List: + + Editor: Alexander Clemm + + + Editor: Jan Medved + + + Editor: Robert Varga + + + Editor: Nitin Bahadur + + + Editor: Hariharan Ananthakrishnan + + + Editor: Xufeng Liu + "; + + description + "This module defines a common base data model for a collection + of nodes in a network. Node definitions are further used + in network topologies and inventories. + + Copyright (c) 2018 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (https://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8345; + see the RFC itself for full legal notices."; + + revision 2018-02-26 { + description + "Initial revision."; + reference + "RFC 8345: A YANG Data Model for Network Topologies"; + } + + typedef node-id { + type inet:uri; + description + "Identifier for a node. The precise structure of the node-id + will be up to the implementation. For example, some + implementations MAY pick a URI that includes the network-id + as part of the path. The identifier SHOULD be chosen + such that the same node in a real network topology will + always be identified through the same identifier, even if + the data model is instantiated in separate datastores. An + implementation MAY choose to capture semantics in the + identifier -- for example, to indicate the type of node."; + } + typedef network-id { + type inet:uri; + description + "Identifier for a network. The precise structure of the + network-id will be up to the implementation. The identifier + SHOULD be chosen such that the same network will always be + identified through the same identifier, even if the data model + is instantiated in separate datastores. An implementation MAY + choose to capture semantics in the identifier -- for example, + to indicate the type of network."; + } + + grouping network-ref { + description + "Contains the information necessary to reference a network -- + for example, an underlay network."; + leaf network-ref { + type leafref { + path "/nw:networks/nw:network/nw:network-id"; + require-instance false; + } + description + "Used to reference a network -- for example, an underlay + network."; + } + } + + grouping node-ref { + description + "Contains the information necessary to reference a node."; + leaf node-ref { + type leafref { + path "/nw:networks/nw:network[nw:network-id=current()/../"+ + "network-ref]/nw:node/nw:node-id"; + require-instance false; + } + description + "Used to reference a node. + Nodes are identified relative to the network that + contains them."; + } + uses network-ref; + } + + container networks { + description + "Serves as a top-level container for a list of networks."; + list network { + key "network-id"; + description + "Describes a network. + A network typically contains an inventory of nodes, + topological information (augmented through the + network-topology data model), and layering information."; + leaf network-id { + type network-id; + description + "Identifies a network."; + } + container network-types { + description + "Serves as an augmentation target. + The network type is indicated through corresponding + presence containers augmented into this container."; + } + list supporting-network { + key "network-ref"; + description + "An underlay network, used to represent layered network + topologies."; + leaf network-ref { + type leafref { + path "/nw:networks/nw:network/nw:network-id"; + require-instance false; + } + description + "References the underlay network."; + } + } + + list node { + key "node-id"; + description + "The inventory of nodes of this network."; + leaf node-id { + type node-id; + description + "Uniquely identifies a node within the containing + network."; + } + list supporting-node { + key "network-ref node-ref"; + description + "Represents another node that is in an underlay network + and that supports this node. Used to represent layering + structure."; + leaf network-ref { + type leafref { + path "../../../nw:supporting-network/nw:network-ref"; + require-instance false; + } + description + "References the underlay network of which the + underlay node is a part."; + } + leaf node-ref { + type leafref { + path "/nw:networks/nw:network/nw:node/nw:node-id"; + require-instance false; + } + description + "References the underlay node itself."; + } + } + } + } + } + } diff --git a/standard/ietf/ietf-yang-types.yang b/standard/ietf/ietf-yang-types.yang new file mode 100644 index 0000000..ee58fa3 --- /dev/null +++ b/standard/ietf/ietf-yang-types.yang @@ -0,0 +1,474 @@ +module ietf-yang-types { + + namespace "urn:ietf:params:xml:ns:yang:ietf-yang-types"; + prefix "yang"; + + organization + "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; + + contact + "WG Web: + WG List: + + WG Chair: David Kessens + + + WG Chair: Juergen Schoenwaelder + + + Editor: Juergen Schoenwaelder + "; + + description + "This module contains a collection of generally useful derived + YANG data types. + + Copyright (c) 2013 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 6991; see + the RFC itself for full legal notices."; + + revision 2013-07-15 { + description + "This revision adds the following new data types: + - yang-identifier + - hex-string + - uuid + - dotted-quad"; + reference + "RFC 6991: Common YANG Data Types"; + } + + revision 2010-09-24 { + description + "Initial revision."; + reference + "RFC 6021: Common YANG Data Types"; + } + + /*** collection of counter and gauge types ***/ + + typedef counter32 { + type uint32; + description + "The counter32 type represents a non-negative integer + that monotonically increases until it reaches a + maximum value of 2^32-1 (4294967295 decimal), when it + wraps around and starts increasing again from zero. + + Counters have no defined 'initial' value, and thus, a + single value of a counter has (in general) no information + content. Discontinuities in the monotonically increasing + value normally occur at re-initialization of the + management system, and at other times as specified in the + description of a schema node using this type. If such + other times can occur, for example, the creation of + a schema node of type counter32 at times other than + re-initialization, then a corresponding schema node + should be defined, with an appropriate type, to indicate + the last discontinuity. + + The counter32 type should not be used for configuration + schema nodes. A default statement SHOULD NOT be used in + combination with the type counter32. + + In the value set and its semantics, this type is equivalent + to the Counter32 type of the SMIv2."; + reference + "RFC 2578: Structure of Management Information Version 2 + (SMIv2)"; + } + + typedef zero-based-counter32 { + type yang:counter32; + default "0"; + description + "The zero-based-counter32 type represents a counter32 + that has the defined 'initial' value zero. + + A schema node of this type will be set to zero (0) on creation + and will thereafter increase monotonically until it reaches + a maximum value of 2^32-1 (4294967295 decimal), when it + wraps around and starts increasing again from zero. + + Provided that an application discovers a new schema node + of this type within the minimum time to wrap, it can use the + 'initial' value as a delta. It is important for a management + station to be aware of this minimum time and the actual time + between polls, and to discard data if the actual time is too + long or there is no defined minimum time. + + In the value set and its semantics, this type is equivalent + to the ZeroBasedCounter32 textual convention of the SMIv2."; + reference + "RFC 4502: Remote Network Monitoring Management Information + Base Version 2"; + } + + typedef counter64 { + type uint64; + description + "The counter64 type represents a non-negative integer + that monotonically increases until it reaches a + maximum value of 2^64-1 (18446744073709551615 decimal), + when it wraps around and starts increasing again from zero. + + Counters have no defined 'initial' value, and thus, a + single value of a counter has (in general) no information + content. Discontinuities in the monotonically increasing + value normally occur at re-initialization of the + management system, and at other times as specified in the + description of a schema node using this type. If such + other times can occur, for example, the creation of + a schema node of type counter64 at times other than + re-initialization, then a corresponding schema node + should be defined, with an appropriate type, to indicate + the last discontinuity. + + The counter64 type should not be used for configuration + schema nodes. A default statement SHOULD NOT be used in + combination with the type counter64. + + In the value set and its semantics, this type is equivalent + to the Counter64 type of the SMIv2."; + reference + "RFC 2578: Structure of Management Information Version 2 + (SMIv2)"; + } + + typedef zero-based-counter64 { + type yang:counter64; + default "0"; + description + "The zero-based-counter64 type represents a counter64 that + has the defined 'initial' value zero. + + A schema node of this type will be set to zero (0) on creation + and will thereafter increase monotonically until it reaches + a maximum value of 2^64-1 (18446744073709551615 decimal), + when it wraps around and starts increasing again from zero. + + Provided that an application discovers a new schema node + of this type within the minimum time to wrap, it can use the + 'initial' value as a delta. It is important for a management + station to be aware of this minimum time and the actual time + between polls, and to discard data if the actual time is too + long or there is no defined minimum time. + + In the value set and its semantics, this type is equivalent + to the ZeroBasedCounter64 textual convention of the SMIv2."; + reference + "RFC 2856: Textual Conventions for Additional High Capacity + Data Types"; + } + + typedef gauge32 { + type uint32; + description + "The gauge32 type represents a non-negative integer, which + may increase or decrease, but shall never exceed a maximum + value, nor fall below a minimum value. The maximum value + cannot be greater than 2^32-1 (4294967295 decimal), and + the minimum value cannot be smaller than 0. The value of + a gauge32 has its maximum value whenever the information + being modeled is greater than or equal to its maximum + value, and has its minimum value whenever the information + being modeled is smaller than or equal to its minimum value. + If the information being modeled subsequently decreases + below (increases above) the maximum (minimum) value, the + gauge32 also decreases (increases). + + In the value set and its semantics, this type is equivalent + to the Gauge32 type of the SMIv2."; + reference + "RFC 2578: Structure of Management Information Version 2 + (SMIv2)"; + } + + typedef gauge64 { + type uint64; + description + "The gauge64 type represents a non-negative integer, which + may increase or decrease, but shall never exceed a maximum + value, nor fall below a minimum value. The maximum value + cannot be greater than 2^64-1 (18446744073709551615), and + the minimum value cannot be smaller than 0. The value of + a gauge64 has its maximum value whenever the information + being modeled is greater than or equal to its maximum + value, and has its minimum value whenever the information + being modeled is smaller than or equal to its minimum value. + If the information being modeled subsequently decreases + below (increases above) the maximum (minimum) value, the + gauge64 also decreases (increases). + + In the value set and its semantics, this type is equivalent + to the CounterBasedGauge64 SMIv2 textual convention defined + in RFC 2856"; + reference + "RFC 2856: Textual Conventions for Additional High Capacity + Data Types"; + } + + /*** collection of identifier-related types ***/ + + typedef object-identifier { + type string { + pattern '(([0-1](\.[1-3]?[0-9]))|(2\.(0|([1-9]\d*))))' + + '(\.(0|([1-9]\d*)))*'; + } + description + "The object-identifier type represents administratively + assigned names in a registration-hierarchical-name tree. + + Values of this type are denoted as a sequence of numerical + non-negative sub-identifier values. Each sub-identifier + value MUST NOT exceed 2^32-1 (4294967295). Sub-identifiers + are separated by single dots and without any intermediate + whitespace. + + The ASN.1 standard restricts the value space of the first + sub-identifier to 0, 1, or 2. Furthermore, the value space + of the second sub-identifier is restricted to the range + 0 to 39 if the first sub-identifier is 0 or 1. Finally, + the ASN.1 standard requires that an object identifier + has always at least two sub-identifiers. The pattern + captures these restrictions. + + Although the number of sub-identifiers is not limited, + module designers should realize that there may be + implementations that stick with the SMIv2 limit of 128 + sub-identifiers. + + This type is a superset of the SMIv2 OBJECT IDENTIFIER type + since it is not restricted to 128 sub-identifiers. Hence, + this type SHOULD NOT be used to represent the SMIv2 OBJECT + IDENTIFIER type; the object-identifier-128 type SHOULD be + used instead."; + reference + "ISO9834-1: Information technology -- Open Systems + Interconnection -- Procedures for the operation of OSI + Registration Authorities: General procedures and top + arcs of the ASN.1 Object Identifier tree"; + } + + typedef object-identifier-128 { + type object-identifier { + pattern '\d*(\.\d*){1,127}'; + } + description + "This type represents object-identifiers restricted to 128 + sub-identifiers. + + In the value set and its semantics, this type is equivalent + to the OBJECT IDENTIFIER type of the SMIv2."; + reference + "RFC 2578: Structure of Management Information Version 2 + (SMIv2)"; + } + + typedef yang-identifier { + type string { + length "1..max"; + pattern '[a-zA-Z_][a-zA-Z0-9\-_.]*'; + pattern '.|..|[^xX].*|.[^mM].*|..[^lL].*'; + } + description + "A YANG identifier string as defined by the 'identifier' + rule in Section 12 of RFC 6020. An identifier must + start with an alphabetic character or an underscore + followed by an arbitrary sequence of alphabetic or + numeric characters, underscores, hyphens, or dots. + + A YANG identifier MUST NOT start with any possible + combination of the lowercase or uppercase character + sequence 'xml'."; + reference + "RFC 6020: YANG - A Data Modeling Language for the Network + Configuration Protocol (NETCONF)"; + } + + /*** collection of types related to date and time***/ + + typedef date-and-time { + type string { + pattern '\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?' + + '(Z|[\+\-]\d{2}:\d{2})'; + } + description + "The date-and-time type is a profile of the ISO 8601 + standard for representation of dates and times using the + Gregorian calendar. The profile is defined by the + date-time production in Section 5.6 of RFC 3339. + + The date-and-time type is compatible with the dateTime XML + schema type with the following notable exceptions: + + (a) The date-and-time type does not allow negative years. + + (b) The date-and-time time-offset -00:00 indicates an unknown + time zone (see RFC 3339) while -00:00 and +00:00 and Z + all represent the same time zone in dateTime. + + (c) The canonical format (see below) of data-and-time values + differs from the canonical format used by the dateTime XML + schema type, which requires all times to be in UTC using + the time-offset 'Z'. + + This type is not equivalent to the DateAndTime textual + convention of the SMIv2 since RFC 3339 uses a different + separator between full-date and full-time and provides + higher resolution of time-secfrac. + + The canonical format for date-and-time values with a known time + zone uses a numeric time zone offset that is calculated using + the device's configured known offset to UTC time. A change of + the device's offset to UTC time will cause date-and-time values + to change accordingly. Such changes might happen periodically + in case a server follows automatically daylight saving time + (DST) time zone offset changes. The canonical format for + date-and-time values with an unknown time zone (usually + referring to the notion of local time) uses the time-offset + -00:00."; + reference + "RFC 3339: Date and Time on the Internet: Timestamps + RFC 2579: Textual Conventions for SMIv2 + XSD-TYPES: XML Schema Part 2: Datatypes Second Edition"; + } + + typedef timeticks { + type uint32; + description + "The timeticks type represents a non-negative integer that + represents the time, modulo 2^32 (4294967296 decimal), in + hundredths of a second between two epochs. When a schema + node is defined that uses this type, the description of + the schema node identifies both of the reference epochs. + + In the value set and its semantics, this type is equivalent + to the TimeTicks type of the SMIv2."; + reference + "RFC 2578: Structure of Management Information Version 2 + (SMIv2)"; + } + + typedef timestamp { + type yang:timeticks; + description + "The timestamp type represents the value of an associated + timeticks schema node at which a specific occurrence + happened. The specific occurrence must be defined in the + description of any schema node defined using this type. When + the specific occurrence occurred prior to the last time the + associated timeticks attribute was zero, then the timestamp + value is zero. Note that this requires all timestamp values + to be reset to zero when the value of the associated timeticks + attribute reaches 497+ days and wraps around to zero. + + The associated timeticks schema node must be specified + in the description of any schema node using this type. + + In the value set and its semantics, this type is equivalent + to the TimeStamp textual convention of the SMIv2."; + reference + "RFC 2579: Textual Conventions for SMIv2"; + } + + /*** collection of generic address types ***/ + + typedef phys-address { + type string { + pattern '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'; + } + + description + "Represents media- or physical-level addresses represented + as a sequence octets, each octet represented by two hexadecimal + numbers. Octets are separated by colons. The canonical + representation uses lowercase characters. + + In the value set and its semantics, this type is equivalent + to the PhysAddress textual convention of the SMIv2."; + reference + "RFC 2579: Textual Conventions for SMIv2"; + } + + typedef mac-address { + type string { + pattern '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'; + } + description + "The mac-address type represents an IEEE 802 MAC address. + The canonical representation uses lowercase characters. + + In the value set and its semantics, this type is equivalent + to the MacAddress textual convention of the SMIv2."; + reference + "IEEE 802: IEEE Standard for Local and Metropolitan Area + Networks: Overview and Architecture + RFC 2579: Textual Conventions for SMIv2"; + } + + /*** collection of XML-specific types ***/ + + typedef xpath1.0 { + type string; + description + "This type represents an XPATH 1.0 expression. + + When a schema node is defined that uses this type, the + description of the schema node MUST specify the XPath + context in which the XPath expression is evaluated."; + reference + "XPATH: XML Path Language (XPath) Version 1.0"; + } + + /*** collection of string types ***/ + + typedef hex-string { + type string { + pattern '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'; + } + description + "A hexadecimal string with octets represented as hex digits + separated by colons. The canonical representation uses + lowercase characters."; + } + + typedef uuid { + type string { + pattern '[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-' + + '[0-9a-fA-F]{4}-[0-9a-fA-F]{12}'; + } + description + "A Universally Unique IDentifier in the string representation + defined in RFC 4122. The canonical representation uses + lowercase characters. + + The following is an example of a UUID in string representation: + f81d4fae-7dec-11d0-a765-00a0c91e6bf6 + "; + reference + "RFC 4122: A Universally Unique IDentifier (UUID) URN + Namespace"; + } + + typedef dotted-quad { + type string { + pattern + '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}' + + '([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'; + } + description + "An unsigned 32-bit number expressed in the dotted-quad + notation, i.e., four octets written as decimal numbers + and separated with the '.' (full stop) character."; + } +} diff --git a/standard_changed/ieee802-dot1q-psfp.yang b/standard_changed/ieee802-dot1q-psfp.yang new file mode 100644 index 0000000..16d8fef --- /dev/null +++ b/standard_changed/ieee802-dot1q-psfp.yang @@ -0,0 +1,676 @@ +module ieee802-dot1q-psfp { + namespace urn:ieee:std:802.1Q:yang:ieee802-dot1q-psfp; + prefix psfp; + import ietf-yang-types { + prefix yang; + } + import ieee802-types { + prefix ieee802; + } + import ieee802-dot1q-types { + prefix dot1q-types; + } + import ieee802-dot1q-bridge { + prefix dot1q; + } + import ieee802-dot1q-stream-filters-gates { + prefix sfsg; + } + organization + "IEEE 802.1 Working Group"; + contact + "WG-URL: http://www.ieee802.org/1/ + WG-EMail: stds-802-1-L@ieee.org + + Contact: IEEE 802.1 Working Group Chair + Postal: C/O IEEE 802.1 Working Group + IEEE Standards Association + 445 Hoes Lane + P.O. Box 1331 + Piscataway + NJ 08855-1331 + USA + + E-mail: STDS-802-1-L@IEEE.ORG"; + description + "This module provides management of 802.1Q bridge components that + support Per Stream Filtering and Policing (PSFP)."; + + revision 2020-07-07 { + description + "Published as part of IEEE Std 802.1Qcw. + Initial version."; + reference + "IEEE Std 802.1Qcw - Bridges and Bridged Networks — Amendment: + YANG Data Models for Scheduled Traffic, Frame Preemption, and + Per-Stream Filtering and Policing."; + } + + feature psfp { + description + "Per Stream Filtering and Policing supported."; + reference + "IEEE Std 802.1Q-2018"; + } + + identity set-gate-and-ipv { + base dot1q-types:type-of-operation; + description + "The StreamGateState parameter specifies a desired state, open + or closed, for the stream gate, and the IPV parameter specifies + a desired value of the IPV associated with the stream. On + execution, the StreamGateState and IPV parameter values are used + to set the operational values of the stream gate state and + internal priority specification parameters for the stream. After + TimeInterval ticks has elapsed since the completion of the + previous stream gate control operation in the stream gate + control list, control passes to the next stream gate control + operation. The optional IntervalOctetMax parameter specifies the + maximum number of MSDU octets that are permitted to pass the + gate during the specified TimeInterval. If the IntervalOctetMax + parameter is omitted, there is no limit on the number of octets + that can pass the gate."; + reference + "8.6.5.1.2 of IEEE Std 802.1Q-2018"; + } + + grouping stream-gate-control-entries { + description + "A GateControlEntry consists of an operation name, followed by + four parameters associated with the operation. The first + parameter is a gateStatesValue; the second parameter is an IPV + value; the third parameter is a timeIntervalValue; and the + fourth parameter is an IntervalOctetMaxValue. + IntervalOctetMaxValue is optional."; + uses dot1q-types:base-gate-control-entries { + refine "gate-control-entry/operation-name" { + must ". = 'psfp:set-gate-and-ipv'"; + } + refine "gate-control-entry/time-interval-value" { + must "(. <= ../../../../supported-interval-max )"; + } + augment "gate-control-entry" { + description + "Augment gate-control-entry from base-gate-control-entries + with parameters gate-states-value, ipv-spec and + interval-octet-max."; + leaf gate-state-value { + type sfsg:gate-state-value-type; + mandatory true; + description + "The PSFPgateStatesValue indicates the desired gate state, + open or closed, for the stream gate."; + reference + "12.31.3.2.1 of IEEE Std 802.1Q-2018"; + } + leaf ipv-spec { + type sfsg:ipv-spec-type; + mandatory true; + description + "The IPV value indicates the IPV to be associated with + frames that pass the gate."; + reference + "12.31.3.2.3 of IEEE Std 802.1Q-2018"; + } + leaf interval-octet-max { + type uint32; + description + "An unsigned integer, denoting a IntervalOctetMax in MSDU + octets"; + reference + "12.31.3.2.5 of IEEE Std 802.1Qcw"; + } + } + } + } + + augment + "/dot1q:bridges"+ + "/dot1q:bridge"+ + "/dot1q:component"+ + "/sfsg:stream-filters"+ + "/sfsg:stream-filter-instance-table" { + description + "Augment the Bridge component Stream filter by frame counters."; + leaf matching-frames-count { + type yang:counter64; + config false; + description + "A count of frames matching both the stream_handle and + priority specifications."; + reference + "8.6.5.1 of IEEE Std 802.1Q-2018"; + } + leaf passing-frames-count { + type yang:counter64; + config false; + description + "A count of frames that passed the stream gate."; + reference + "8.6.5.1 of IEEE Std 802.1Q-2018"; + } + leaf not-passing-frames-count { + type yang:counter64; + config false; + description + "A count of frames that did not pass the stream gate."; + reference + "8.6.5.1 of IEEE Std 802.1Q-2018"; + } + leaf red-frames-count { + type yang:counter64; + config false; + description + "A count of frames that were discarded as a result of the + operation of the flow meter."; + reference + "8.6.5.1 of IEEE Std 802.1Q-2018"; + } + leaf passing-sdu-count { + type yang:counter64; + config false; + description + "A count of frames that passed the Maximum SDU size filter."; + reference + "8.6.5.1 of IEEE Std 802.1Q-2018"; + } + leaf not-passing-sdu-count { + type yang:counter64; + config false; + description + "A count of frames that did not pass the Maximum SDU size + filter."; + reference + "8.6.5.1 of IEEE Std 802.1Q-2018"; + } + leaf flow-meter-instance-id { + type uint32; + description + "Flow meter instance that is associated with the stream filter."; + reference + "8.6.5.5 of IEEE Std 802.1Qcr + 12.31.2.6 of IEEE Std 802.1Qcr"; + } + leaf flow-meter-enable { + type boolean; + description + "If it is set to TRUE, flow-meter-ref identifies the flow meter + instance associated with the stream filter. If it is set to FALSE, no + flow meter instance is associated with the stream filter."; + reference + "8.6.5.5 of IEEE Std 802.1Qcr + 12.31.2.6 of IEEE Std 802.1Qcr"; + } + } + augment + "/dot1q:bridges/dot1q:bridge/dot1q:component/sfsg:stream-gates" { + description + "Augment the Bridge component Stream Gates by maximum control + list limits, as used for PTP-controlled open and close + transitions"; + leaf supported-list-max { + type uint32; + description + "The maximum value supported by this Bridge component of the + AdminControlListLength and OperControlListLength parameters. + It is available for use by schedule computation software to + determine the Bridge component’s control list capacity prior + to computation. The object may optionally be read-only."; + reference + "12.31.1.4 of IEEE Std 802.1Q-2018"; + } + container supported-cycle-max { + description + "The maximum value supported by this Bridge component of the + AdminCycleTime and OperCycleTime parameters. The object may + optionally be read-only."; + reference + "12.31.1.5 of IEEE Std 802.1Qcw"; + uses ieee802:rational-grouping; + } + leaf supported-interval-max { + type uint32; + description + "The maximum value supported by this Bridge component of the + TimeIntervalValue parameter. The object may optionally + be read-only."; + reference + "12.31.1.6 of IEEE Std 802.1Qcw"; + } + } + augment + "/dot1q:bridges"+ + "/dot1q:bridge"+ + "/dot1q:component"+ + "/sfsg:stream-gates"+ + "/sfsg:stream-gate-instance-table" { + description + "Augment the Bridge component Stream Gate instances by + a) operational gate states + b) operational IPV values + c) PTP controlled open and close transitions + d) Management for PTP controlled open and close transitions"; + leaf oper-gate-states { + type sfsg:gate-state-value-type; + config false; + description + "The current state of the gate. PSFPOperGateStates is set by + the List Execute state machine, and its initial value is + determined by the value of the PSFPAdminGateStates variable."; + reference + "12.31.3.2.1 of IEEE Std 802.1Q-2018 + 8.6.10.5 of IEEE Std 802.1Q-2018"; + } + leaf oper-ipv { + type sfsg:ipv-spec-type; + description + "The operational internal priority value specification."; + reference + "12.31.3.3 of IEEE Std 802.1Q-2018 + 8.6.10.7 of IEEE Std 802.1Q-2018 + 8.6.5.1.2 of IEEE Std 802.1Q-2018"; + } + + container admin-control-list { + must "(count(./gate-control-entry) <= ../../supported-list-max)" { + error-message "Number of elements in admin-control-list must + not be greater than supported-list-max"; + } + config true; + description + "The AdminControlList and OperControlList are ordered + lists containing AdminControlListLength or OperControlListLength + entries, respectively. Each entry represents a gate operation. + Each entry in the list is structured as a GateControlEntry."; + reference + "12.31.3.2 of IEEE Std 802.1Q-2018 + 12.31.3.2.2 of IEEE Std 802.1Q-2018 + 8.6.9.4.2 of IEEE Std 802.1Q-2018"; + uses stream-gate-control-entries; + } + + container oper-control-list { + must "(count(./gate-control-entry) <= ../../supported-list-max)" { + error-message "Number of elements in oper-control-list must + not be greater than supported-list-max"; + } + config false; + description + "The AdminControlList and OperControlList are ordered + lists containing AdminControlListLength or OperControlListLength + entries, respectively. Each entry represents a gate operation. + Each entry in the list is structured as a GateControlEntry."; + reference + "12.31.3.2 of IEEE Std 802.1Q-2018 + 12.31.3.2.2 of IEEE Std 802.1Q-2018 + 8.6.9.4.19 of IEEE Std 802.1Q-2018"; + uses stream-gate-control-entries; + } + + container admin-cycle-time { + /* IRT : removed invalid comparison between two rational-grouping: not numbers */ + /*must "(. <= ../../supported-cycle-max)" { + error-message "admin-cycle-time must not be greater than supported-cycle-max"; + }*/ + description + "The administrative value of the gating cycle for the Port. + This value can be changed by management, and is used by the + List Config state machine to set the value of OperCycleTime. + The AdminCycleTime variable is a rational number of seconds, + defined by an integer numerator and an integer denominator."; + reference + "12.29.1.3 of IEEE Std 802.1Q-2018 + 8.6.9.4.3 of IEEE Std 802.1Q-2018"; + uses ieee802:rational-grouping; + } + container oper-cycle-time { + /* IRT : removed invalid comparison between two rational-grouping: not numbers */ + /*must "(. <= ../../supported-cycle-max)" { + error-message "oper-cycle-time must not be greater than supported-cycle-max"; + }*/ + config false; + description + "The operational value of the gating cycle for the Port. This + variable is set dynamically from the AdminCycleTime variable + under the control of the List Config state machine + OperCycleTime is used by the Cycle Timer state machine to + enforce the cycle time for the Port. The OperCycleTime + variable is a rational number of seconds, defined by an + integer numerator and an integer denominator."; + reference + "12.29.1.3 of IEEE Std 802.1Q-2018 + 8.6.9.4.20 of IEEE Std 802.1Q-2018"; + uses ieee802:rational-grouping; + } + leaf admin-cycle-time-extension { + type uint32; + units "nanoseconds"; + description + "An integer number of nanoseconds, defining the maximum amount + of time by which the gating cycle for the Port is permitted to + be extended when a new cycle configuration is being installed. + This administrative value can be changed by management, and is + used by the List Config state machine to set the value of + OperCycleTimeExtension."; + reference + "8.6.9.4.4 of IEEE Std 802.1Q-2018"; + } + leaf oper-cycle-time-extension { + type uint32; + units "nanoseconds"; + config false; + description + "An integer number of nanoseconds, defining the maximum amount + of time by which the gating cycle for the Port is permitted to + be extended when a new cycle configuration is installed. This + operational value is set by the List Config state machine to + the value of AdminCycleTimeExtension. The value of + OperCycleTimeExtension is used by the SetCycleStartTime() + procedure."; + reference + "8.6.9.4.21 of IEEE Std 802.1Q-2018"; + } + container admin-base-time { + description + "The administrative value of base time, expressed as an IEEE + 1588 precision time protocol (PTP) timescale (see IEEE Std + 802.1AS-2011). This value can be changed by management, and is + used by the List Config state machine to set the value of + OperBaseTime."; + reference + "12.29.1.4 of IEEE Std 802.1Q-2018 + 8.6.9.4.1 of IEEE Std 802.1Q-2018"; + uses ieee802:ptp-time-grouping; + } + container oper-base-time { + config false; + description + "The operational value of base time, expressed as a PTP + timescale (see IEEE Std 802.1AS-2011). This variable is used + by the List Config state machine."; + reference + "12.29.1.4 of IEEE Std 802.1Q-2018 + 8.6.9.4.18 of IEEE Std 802.1Q-2018"; + uses ieee802:ptp-time-grouping; + } + leaf config-change { + type boolean; + description + "A Boolean variable that acts as a start signal to the List + Config state machine that the administrative variable values + for the Port are ready to be copied into their corresponding + operational variables. This variable is set TRUE by management + and is set FALSE by the List Config state machine."; + reference + "8.6.9.4.7 of IEEE Std 802.1Q-2018"; + } + container config-change-time { + config false; + description + "The time at which the administrative variables that determine + the cycle are to be copied across to the corresponding + operational variables, expressed as a PTP timescale. The value + of this variable is set by the SetConfigChangeTime() procedure + in the List Config state machine."; + reference + "12.29.1.4 of IEEE Std 802.1Q-2018 + 8.6.9.4.9 of IEEE Std 802.1Q-2018"; + uses ieee802:ptp-time-grouping; + } + leaf tick-granularity { + type uint32; + config false; + description + "Characteristics of an implementation’s cycle timer clock + (TickGranularity)."; + reference + "8.6.9.4.16 of IEEE Std 802.1Q-2018"; + } + container current-time { + config false; + description + "The current time maintained by the local system, expressed as + a PTP timescale (see IEEE Std 802.1AS-2011)."; + reference + "12.29.1.4 of IEEE Std 802.1Q-2018 + 8.6.9.4.10 of IEEE Std 802.1Q-2018"; + uses ieee802:ptp-time-grouping; + } + leaf config-pending { + type boolean; + config false; + description + "A Boolean variable, set TRUE by the List Config state machine + to signal that there is a new cycle configuration awaiting + installation. The variable is set FALSE when the List Config + state machine has installed the new configuration. The + variable is used by the SetCycleStartTime() procedure to + control the length of the cycle that immediately precedes the + first cycle that uses the new configuration values. This value + can be read by management."; + reference + "8.6.9.3 of IEEE Std 802.1Q-2018 + 8.6.9.4.8 of IEEE Std 802.1Q-2018"; + } + leaf config-change-error { + type yang:counter64; + config false; + description + "An error counter that is incremented if AdminBaseTime + specifies a time in the past, and the current schedule is + running."; + reference + "8.6.9.3.1 of IEEE Std 802.1Q-2018"; + } + leaf gate-closed-due-to-invalid-rx-enable { + type boolean; + default "false"; + description + "A value of TRUE indicates that the GateClosedDueToInvalidRx + function is enabled; a value of FALSE indicates that the + GateClosedDueToInvalidRx function is disabled. The default + value of GateClosedDueToInvalidRxEnable is FALSE."; + reference + "8.6.5.1.2 of IEEE Std 802.1Q-2018"; + } + leaf gate-closed-due-to-invalid-rx { + type boolean; + default "false"; + description + "If GateClosedDueToInvalidRxEnable is TRUE, a value of TRUE in + GateClosedDueToInvalidRx indicates that all frames are dropped + (i.e., the gate behaves as if the operational stream gate + state is Closed). If GateClosedDueToInvalidRx is FALSE, it has + no effect. The default value of GateClosedDueToInvalidRx is + FALSE; if any frame is discarded because the gate is in the + Closed state, then GateClosedDueToInvalidRx is set TRUE."; + reference + "8.6.5.1.2 of IEEE Std 802.1Q-2018"; + } + leaf gate-closed-due-octets-exceeded-enable { + type boolean; + default "false"; + description + "A value of TRUE indicates that the + GateClosedDueToOctetsExceeded function is enabled; a value of + FALSE indicates that the GateClosedDueToOctetsExceeded + function is disabled. The default value of + GateClosedDueToOctetsExceed is FALSE."; + reference + "8.6.5.1.2 of IEEE Std 802.1Q-2018"; + } + leaf gate-closed-due-octets-exceeded { + type boolean; + default "false"; + description + "If GateClosedDueToOctetsExceededEnable is TRUE, a value of + TRUE in GateClosedDueToOctetsExceeded indicates that all + frames are dropped (i.e., the gate behaves as if the + operational stream gate state is Closed). If + GateClosedDueToOctetsExceeded is FALSE, it has no effect. The + default value of GateClosedDueToOctetsExceeded is FALSE; if + any frame is discarded because there are insufficient + IntervalOctetsLeft, then GateClosedDueToOctetsExceeded is set + TRUE."; + reference + "8.6.5.1.2 of IEEE Std 802.1Q-2018"; + } + } + augment "/dot1q:bridges/dot1q:bridge/dot1q:component" { + description + "Augment the Bridge component by Flow Meters."; + container flow-meters { + description + "This container comprises all flow meter related nodes."; + list flow-meter-instance-table { + must "(count(.) <= ../max-flow-meter-instances)" { + error-message "Number of elements in flow-meter-instance-table + must not be greater than max-flow-meter-instances."; + } + key "flow-meter-instance-id"; + description + "There is one Flow Meter Instance Table per Bridge + component. Each table row contains a set of parameters that + defines a single Flow Meter Instance. Tables can be created + or removed dynamically in implementations that support + dynamic configuration of Bridge components. Rows in the + table can be created or removed dynamically in + implementations that support dynamic configuration of flow + meters."; + reference + "12.31.4 of IEEE Std 802.1Q-2018"; + leaf flow-meter-instance-id { + type uint32; + mandatory true; + description + "An integer table index that allows the Flow Meter to be + referenced from Stream Filter Instance Table entries."; + reference + "8.6.5.1.3 of IEEE Std 802.1Q-2018"; + } + leaf committed-information-rate { + type uint64; + units "bits/second"; + mandatory true; + description + "Committed information rate (CIR), in bits per second."; + reference + "8.6.5.1.3 of IEEE Std 802.1Q-2018"; + } + leaf committed-burst-size { + type uint32; + units "octets"; + mandatory true; + description + "Committed burst size (CBS), in octets."; + reference + "8.6.5.1.3 of IEEE Std 802.1Q-2018"; + } + leaf excess-information-rate { + type uint64; + units "bits/second"; + mandatory true; + description + "Excess Information Rate (EIR), in bits per second."; + reference + "8.6.5.1.3 of IEEE Std 802.1Q-2018"; + } + leaf excess-burst-size { + type uint32; + units "octets"; + mandatory true; + description + "Excess burst size (EBS) per bandwidth profile flow, in + octets."; + reference + "8.6.5.1.3 of IEEE Std 802.1Q-2018"; + } + leaf coupling-flag { + type enumeration { + enum zero { + value 0; + description + "Uncoupled"; + } + enum one { + value 1; + description + "Coupled"; + } + } + mandatory true; + description + "Coupling flag (CF), which takes the value 0 or 1."; + reference + "8.6.5.1.3 of IEEE Std 802.1Q-2018"; + } + leaf color-mode { + type enumeration { + enum color-blind { + description + "Color-blind (i.e., the color of a frame is ignored + by the bandwidth profile algorithm)."; + } + enum color-aware { + description + "Color-aware (i.e., the color of a frame is considered + by the bandwidth profile algorithm)."; + } + } + mandatory true; + description + "Color mode (CM), which takes the value color-blind or + color-aware, as specified in Bandwidth Profile Parameters + and Algorithm in MEF 10.3."; + reference + "8.6.5.1.3 of IEEE Std 802.1Q-2018"; + } + leaf drop-on-yellow { + type boolean; + mandatory true; + description + "DropOnYellow, which takes the value TRUE or FALSE. A + value of TRUE indicates that yellow frames are dropped + (i.e., discarded); a value of FALSE indicates that yellow + frames will have the drop_eligible parameter set to TRUE."; + reference + "8.6.5.1.3 of IEEE Std 802.1Q-2018"; + } + leaf mark-all-frames-red-enable { + type boolean; + default "false"; + description + "MarkAllFramesRedEnable, which takes the value TRUE or + FALSE. A value of TRUE indicates that the MarkAllFramesRed + function is enabled; a value of FALSE indicates that the + MarkAllFramesRed function is disabled. The default value + of MarkAllFramesRedEnable is FALSE."; + reference + "8.6.5.1.3 of IEEE Std 802.1Q-2018"; + } + leaf mark-all-frames-red { + type boolean; + default "false"; + description + "MarkAllFramesRed, which takes the value TRUE or FALSE. If + MarkAllFramesRedEnable is TRUE, a value of TRUE in + MarkAllFramesRed indicates that all frames are dropped + (i.e., discarded). If MarkAllFramesRed is False, it has no + effect. The default value of MarkAllFramesRed is FALSE; if + the operation of the flow meter causes any frame to be + discarded, then MarkAllFramesRed is set TRUE."; + reference + "8.6.5.1.3 of IEEE Std 802.1Q-2018"; + } + } + leaf max-flow-meter-instances { + type uint32; + description + "The maximum number of Flow Meter instances supported by + this Bridge component. The object may optionally be read-only."; + reference + "12.31.1.3 of IEEE Std 802.1Q-2018"; + } + } + } +} diff --git a/standard_changed/ieee802-dot1q-sched.yang b/standard_changed/ieee802-dot1q-sched.yang new file mode 100644 index 0000000..c9ef3cc --- /dev/null +++ b/standard_changed/ieee802-dot1q-sched.yang @@ -0,0 +1,440 @@ +module ieee802-dot1q-sched { + namespace urn:ieee:std:802.1Q:yang:ieee802-dot1q-sched; + prefix sched; + import ietf-yang-types { + prefix yang; + } + import ieee802-types { + prefix ieee802; + } + import ieee802-dot1q-types { + prefix dot1q-types; + } + import ietf-interfaces { + prefix if; + } + import ieee802-dot1q-bridge { + prefix dot1q; + } + organization + "IEEE 802.1 Working Group"; + contact + "WG-URL: http://www.ieee802.org/1/ + WG-EMail: stds-802-1-L@ieee.org + + Contact: IEEE 802.1 Working Group Chair + Postal: C/O IEEE 802.1 Working Group + IEEE Standards Association + 445 Hoes Lane + P.O. Box 1331 + Piscataway + NJ 08855-1331 + USA + + E-mail: STDS-802-1-L@IEEE.ORG"; + description + "This module provides for management of IEEE Std 802.1Q Bridges + that support Scheduled Traffic Enhancements."; + + revision 2020-07-07 { + description + "Published as part of IEEE Std 802.1Qcw. + Initial version."; + reference + "IEEE Std 802.1Qcw - Bridges and Bridged Networks — Amendment: + YANG Data Models for Scheduled Traffic, Frame Preemption, and + Per-Stream Filtering and Policing."; + } + + feature scheduled-traffic { + description + "Enhancements for Scheduled Traffic supported."; + reference + "IEEE Std 802.1Q-2018"; + } + + identity set-gate-states { + base dot1q-types:type-of-operation; + description + "Operation to set the gate states."; + } + identity set-and-hold-mac { + base dot1q-types:type-of-operation; + description + "Operation to set and hold MAC."; + } + identity set-and-release-mac { + base dot1q-types:type-of-operation; + description + "Operation to set and release MAC."; + } + + grouping sched-gate-control-entries { + description + "A GateControlEntry consists of an operation name, + followed by up to 2 parameters associated with the + operation. The first parameter is a gateStatesValue; + the second parameter is a timeIntervalValue"; + uses dot1q-types:base-gate-control-entries { + refine "gate-control-entry/operation-name" { + must "(. = 'sched:set-gate-states') or + (. = 'sched:set-and-hold-mac') or + (. = 'sched:set-and-release-mac')"; + } + refine "gate-control-entry/time-interval-value" { + must "(. <= ../../../supported-interval-max )"; + } + augment "gate-control-entry" { + description + "Augment gate-control-entry from base-gate-control-entries + with parameter gate-states-value."; + leaf gate-states-value { + type uint8; + mandatory true; + description + "gateStatesValue is the gate states for this entry for the + Port. The gates are immediately set to the states in + gateStatesValue when this entry executes. The bits of the + octet represent the gate states for the corresponding + traffic classes; the most-significant bit corresponds to + traffic class 7, the least-significant bit to traffic class + 0. A bit value of 0 indicates closed; a bit value of 1 + indicates open."; + reference + "12.29.1.2.2 of IEEE Std 802.1Q-2018 + 8.6.8.4 of IEEE Std 802.1Q-2018"; + } + } + } + } + + augment "/if:interfaces/if:interface/dot1q:bridge-port" { + if-feature "scheduled-traffic"; + description + "Augment bridge-port with Scheduled Traffic configuration."; + + container gate-parameter-table { + description + "A table that contains the per-port manageable parameters for + traffic scheduling. For a given Port, an entry in the table + exists. All writable objects in this table must be persistent + over power up restart/reboot."; + reference + "12.29.1 of IEEE Std 802.1Q-2018 + 8.6.8.4 of IEEE Std 802.1Q-2018 + 8.6.9 of IEEE Std 802.1Q-2018"; + + list queue-max-sdu-table { + key "traffic-class"; + description + "A list containing a set of max SDU parameters, one for each + traffic class. All writable objects in this table must be + persistent over power up restart/reboot."; + reference + "12.29.1.1 of IEEE Std 802.1Q-2018 + 8.6.8.4 of IEEE Std 802.1Q-2018 + 8.6.9 of IEEE Std 802.1Q-2018"; + leaf traffic-class { + type dot1q-types:traffic-class-type; + description + "Traffic class"; + } + leaf queue-max-sdu { + type uint32; + default "0"; + description + "The value of the queueMaxSDU parameter for the traffic + class. A value of 0 is interpreted as the max SDU size + supported by the underlying MAC. The value must be retained + across reinitializations of the management system."; + reference + "12.29.1.1.1 of IEEE Std 802.1Q-2018 + 8.6.8.4 of IEEE Std 802.1Q-2018 + 8.6.9 of IEEE Std 802.1Q-2018"; + } + leaf transmission-overrun { + type yang:counter64; + default "0"; + config false; + description + "A counter of transmission overrun events, where a PDU is + still being transmitted by a MAC at the time when the + transmission gate for the queue closed."; + reference + "12.29.1.1.2 of IEEE Std 802.1Q-2018 + 8.6.8.4 of IEEE Std 802.1Q-2018 + 8.6.9 of IEEE Std 802.1Q-2018"; + } + } + leaf gate-enabled { + type boolean; + default "false"; + description + "The GateEnabled parameter determines whether traffic + scheduling is active (true) or inactive (false). The value + must be retained across reinitializations of the management + system."; + reference + "12.29.1 of IEEE Std 802.1Q-2018 + 8.6.8.2 of IEEE Std 802.1Q-2018 + 8.6.9.4.14 of IEEE Std 802.1Q-2018"; + } + leaf admin-gate-states { + type uint8; + default "255"; + description + "AdminGateStates is the administrative value of the initial + gate states for the Port. The bits of the octet represent + the gate states for the corresponding traffic classes; the + most-significant bit corresponds to traffic class 7, the + least-significant bit to traffic class 0. A bit value of 0 + indicates closed; a bit value of 1 indicates open. The value + must be retained across reinitializations of the management + system."; + reference + "12.29.1 of IEEE Std 802.1Q-2018 + 8.6.9.4.5 of IEEE Std 802.1Q-2018"; + } + leaf oper-gate-states { + type uint8; + config false; + description + "OperGateStates is the operational value of the current gate + states for the Port. The bits of the octet represent the + gate states for the corresponding traffic classes; the + most-significant bit corresponds to traffic class 7, the + least-significant bit to traffic class 0. A bit value of 0 + indicates closed; a bit value of 1 indicates open."; + reference + "12.29.1 of IEEE Std 802.1Q-2018 + 8.6.9.4.22 of IEEE Std 802.1Q-2018"; + } + container admin-control-list { + /* check removed to allow empty list (for example when TAS is not used on + a port that support it): + must "(count(./gate-control-entry) > 0)" { + error-message "admin-control-list empty."; + } */ + + /* check removed to allow not defining supported-list-max and gate-control-entry, + for example when TAS is not used on a port. + must "(count(./gate-control-entry) <= ../supported-list-max)" { + error-message "Number of elements in admin-control-list must + not be greater than supported-list-max"; + }*/ + config true; + description + "AdminControlList is the administrative value of the gate + control list for the Port. + The value must be retained across reinitializations of the + management system."; + reference + "12.29.1.2 of IEEE Std 802.1Q-2018 + 8.6.8.4 of IEEE Std 802.1Q-2018 + 8.6.9.4.2 of IEEE Std 802.1Q-2018"; + uses sched-gate-control-entries; + } + container oper-control-list { + must "(count(./gate-control-entry) > 0)" { + error-message "oper-control-list empty."; + } + must "(count(./gate-control-entry) <= ../supported-list-max)" { + error-message "Number of elements in oper-control-list must + not be greater than supported-list-max"; + } + config false; + description + "OperControlList is the operational value of the gate + control list for the Port."; + reference + "12.29.1.2 of IEEE Std 802.1Q-2018 + 8.6.8.4 of IEEE Std 802.1Q-2018 + 8.6.9.4.19 of IEEE Std 802.1Q-2018"; + uses sched-gate-control-entries; + } + container admin-cycle-time { + /* IRT : removed invalid comparison between two rational-grouping: not numbers */ + /*must "(. <= ../supported-cycle-max)" { + error-message "admin-cycle-time must not be greater than supported-cycle-max"; + }*/ + description + "AdminCycleTime specifies the administrative value of the + gating cycle time for the Port. + AdminCycleTime is a rational number of seconds, defined by + an integer numerator and an integer denominator. + The value must be retained across reinitializations of the + management system."; + reference + "12.29.1 of IEEE Std 802.1Q-2018 + 8.6.8.4 of IEEE Std 802.1Q-2018 + 8.6.9.4.3 of IEEE Std 802.1Q-2018"; + uses ieee802:rational-grouping; + } + container oper-cycle-time { + /* IRT : removed invalid comparison between two rational-grouping: not numbers */ + /*must "(. <= ../supported-cycle-max)" { + error-message "oper-cycle-time must not be greater than supported-cycle-max"; + }*/ + config false; + description + "OperCycleTime specifies the operational value of the gating + cycle time for the Port. + OperCycleTime is a rational number of seconds, defined by an + integer numerator and an integer denominator."; + reference + "12.29.1 of IEEE Std 802.1Q-2018 + 8.6.8.4 of IEEE Std 802.1Q-2018 + 8.6.9.4.20 of IEEE Std 802.1Q-2018"; + uses ieee802:rational-grouping; + } + leaf admin-cycle-time-extension { + type uint32; + units "nanoseconds"; + description + "An unsigned integer number of nanoseconds, defining the + maximum amount of time by which the gating cycle for the + Port is permitted to be extended when a new cycle + configuration is being installed. This is the administrative + value. + The value must be retained across reinitializations of the + management system."; + reference + "12.29.1 of IEEE Std 802.1Q-2018 + 8.6.9.4.4 of IEEE Std 802.1Q-2018"; + } + leaf oper-cycle-time-extension { + type uint32; + units "nanoseconds"; + config false; + description + "An unsigned integer number of nanoseconds, defining the + maximum amount of time by which the gating cycle for the + Port is permitted to be extended when a new cycle + configuration is being installed. This is the operational + value."; + reference + "12.29.1 of IEEE Std 802.1Q-2018 + 8.6.9.4.21 of IEEE Std 802.1Q-2018"; + } + container admin-base-time { + description + "The administrative value of the base time at which gating + cycles begin, expressed as an IEEE 1588 precision time + protocol (PTP) timescale. + The value must be retained across reinitializations of the + management system."; + reference + "12.29.1 of IEEE Std 802.1Q-2018 + 8.6.9.4.1 of IEEE Std 802.1Q-2018"; + uses ieee802:ptp-time-grouping; + } + container oper-base-time { + config false; + description + "The operational value of the base time at which gating + cycles begin, expressed as an IEEE 1588 precision time + protocol (PTP) timescale."; + reference + "12.29.1 of IEEE Std 802.1Q-2018 + 8.6.9.4.18 of IEEE Std 802.1Q-2018"; + uses ieee802:ptp-time-grouping; + } + leaf config-change { + type boolean; + description + "The ConfigChange parameter signals the start of a + configuration change when it is set to TRUE, indicating that + the administrative parameters for the Port are ready to be + copied into their corresponding operational parameters. This + should only be done when the various administrative + parameters are all set to appropriate values."; + reference + "12.29.1 of IEEE Std 802.1Q-2018 + 8.6.9.4.7 of IEEE Std 802.1Q-2018"; + } + container config-change-time { + config false; + description + "The time at which the next config change is scheduled to + occur."; + reference + "12.29.1 of IEEE Std 802.1Q-2018 + 8.6.9.4.9 of IEEE Std 802.1Q-2018"; + uses ieee802:ptp-time-grouping; + } + leaf tick-granularity { + type uint32; + config false; + description + "The granularity of the cycle time clock, represented as an + unsigned number of tenths of nanoseconds. + The value must be retained across reinitializations of the + management system."; + reference + "12.29.1 of IEEE Std 802.1Q-2018"; + } + container current-time { + config false; + description + "The current time as maintained by the local system."; + reference + "12.29.1 of IEEE Std 802.1Q-2018 + 8.6.9.4.10 of IEEE Std 802.1Q-2018"; + uses ieee802:ptp-time-grouping; + } + leaf config-pending { + type boolean; + config false; + description + "The value of the ConfigPending state machine variable. The + value is TRUE if a configuration change is in progress but + has not yet completed."; + reference + "12.29.1 of IEEE Std 802.1Q-2018 + 8.6.9.4.8 of IEEE Std 802.1Q-2018"; + } + leaf config-change-error { + type yang:counter64; + config false; + description + "A counter of the number of times that a re-configuration of + the traffic schedule has been requested with the old + schedule still running and the requested base time was in + the past."; + reference + "12.29.1 of IEEE Std 802.1Q-2018 + 8.6.9.3.1 of IEEE Std 802.1Q-2018"; + } + leaf supported-list-max { + type uint32; + description + "The maximum value supported by this Port for the + AdminControlListLength and OperControlListLength parameters. + It is available for use by schedule computation software to + determine the port’s control list capacity prior to + computation. The object may optionally be read-only."; + reference + "12.29.1.5 of IEEE Std 802.1Q-2018 + 8.6.9.4.21 of IEEE Std 802.1Q-2018"; + } + container supported-cycle-max { + description + "The maximum value supported by this Port of the + AdminCycleTime and OperCycleTime parameters. The object may + optionally be read-only."; + reference + "12.29.1.6 of IEEE Std 802.1Qcw"; + uses ieee802:rational-grouping; + } + leaf supported-interval-max { + type uint32; + description + "The maximum value supported by this Port of the + TimeIntervalValue parameter. The object may optionally + be read-only."; + reference + "12.29.1.7 of IEEE Std 802.1Qcw"; + } + } + } +}