module ieee802-dot1ax-drni { yang-version 1.1; namespace "urn:ieee:std:802.1AX:yang:ieee802-dot1ax-drni"; prefix dot1ax-drni; import ieee802-dot1ax-types { prefix ax; } import ieee802-dot1ax-linkagg { prefix dot1ax; } import ieee802-types { prefix ieee; } import ietf-yang-types { prefix yang; } import ietf-interfaces { prefix if; } 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 45 Hoes Lane Piscataway, NJ 08854 USA E-mail: stds-802-1-chairs@ieee.org"; description "This YANG module describes the configuration model for a Distributed Resilient Network Interface (DRNI) as specified in 802.1AX. Copyright (C) IEEE (2025). This version of this YANG module is part of IEEE Std 802.1AX; see the standard itself for full legal notices."; revision 2025-09-30 { description "Published as part of IEEE Std 802.1AXdz-2025. The following reference statement identifies each referenced IEEE Standard as updated by applicable amendments."; reference "IEEE Std 802.1AX-2020 Link Aggregation: IEEE Std 802.1AXdz-2025."; } typedef irp-state { type bits { bit reserved-1 { position 1; description "Reserved for future use. It is set to 0 on transmit and ignored on receipt."; } bit reserved-2 { position 2; description "Reserved for future use. It is set to 0 on transmit and ignored on receipt."; } bit short-timeout { position 3; description "The Short_Timeout flag indicates the Timeout control value in use by the DRCP Receive machine on this IRP. Short Timeout is encoded as a 1; Long Timeout is encoded as a 0."; } bit synchronization { position 4; description "When the Sync flag is TRUE (1), the DRCP Receive machine has determined the Neighbor DRNI System has a compatible configuration for forming a DRNI."; } bit irc-data { position 5; description "When the IRC_Data flag is TRUE (1), the transfer of Up and Down frames is permitted on the IRC."; } bit drni { position 6; description "The DRNI flag is TRUE (1) when this DRNI System is paired with another DRNI System and FALSE (0) otherwise."; } bit defaulted { position 7; description "When the Defaulted flag is TRUE (1), the DRCP Receive machine is using default operational Neighbor information. When FALSE (0), the operational Neighbor information in use has been received in a DRCPDU."; } bit expired { position 8; description "When the Expired flag is TRUE (1), the DRCP Receive machine is in the EXPIRED state."; } } description "IRP state values as transmitted in DRCPDUs. Administrative control over the values of Short_Timeout and IRC_Data is allowed. The remaining bits are read-only."; reference "7.4.1.1.24, 9.6.2.3, Figure 9-13 of IEEE Std 802.1AX"; } grouping drni-mask { description "Specifies the contents of a bit mask indexed by CID."; leaf-list cid-str { type string { pattern '(0|[1-9][0-9]{0,3})' + '((-(0|[1-9][0-9]{0,3})' + '(%(0|[1-9][0-9]{0,3}))?)?)' + '(,' + '(0|[1-9][0-9]{0,3})' + '((-(0|[1-9][0-9]{0,3})' + '(%(0|[1-9][0-9]{0,3}))?)?)' + ')*'; } default "0-4095"; description "A comma separated list of single CID values (x), CID ranges (x-y), or ranges with an increment (x-y%z). For example, the string '0,10-13,100-110%4' sets the bits in the mask corresponding to CIDs 0,10,11,12,13,100,104,108. Some special cases are: 'x-y%z' where x+z>y is the same as 'x'. 'x-y%0' is the same as 'x'. 'x-y%1' is the same as 'x-y'. 'x-y%2' sets the bit for all even CIDs in the range when x is even, and for all odd CIDs when x is odd. Although the pattern allows values of x, y, and z in the range 0-9999, resulting CID values greater than 4095 have no effect on the mask. Specified as a list of strings, so that long strings can be broken into several shorter strings. The default sets all bits in the mask."; } leaf invert-mask { type boolean; default "false"; description "When true the specified mask is inverted: each zero replaced with a one, and each one replaced with a zero."; } } augment "/if:interfaces/if:interface/dot1ax:lag" { description "Augmentation parameters only for Aggregators with DRNI enabled."; container drni { presence "When present, this Aggregator is enabled for DRNI"; description "Aggregator parameters to support a Distributed Resilient Network Interface"; leaf irp-name { type if:interface-ref; mandatory true; description "Interface Name (if:name) of the Port supporting the Intra-Relay Port (IRP) of this DRNI Gateway."; reference "7.4.1.1.23 of IEEE Std 802.1AX"; } leaf drni-aggregator-key { type uint16 { range "1..65535"; } description "The Aggregator Key value to be used by the Aggregator supporting this DRNI Gateway (and the Aggregation Ports assigned to this DRNI Gateway) when paired with a neighbor DRNI System via the IRC. The default value is the Aggregator's Actor_Admin_Aggregator_Key value."; reference "7.4.1.1.15 of IEEE Std 802.1AX"; } leaf drni-aggregator-system { type ieee:mac-address; default "00-00-00-00-00-00"; description "The Aggregator System value to be used by the Aggregator supporting this DRNI Gateway (and the Aggregation Ports assigned to this DRNI Gateway) when paired with a neighbor DRNI System via the Intra-Relay Connection (IRC)."; reference "7.4.1.1.13 of IEEE Std 802.1AX"; } leaf drni-aggregator-system-priority { type uint16; default "0"; description "The Aggregator System Priority value to be used by the Aggregator supporting this DRNI Gateway (and the Aggregation Ports assigned to this DRNI Gateway) when paired with a neighbor DRNI System via the IRC."; reference "7.4.1.1.14 of IEEE Std 802.1AX"; } leaf drcp-protocol-da { type ax:bridge-reserved-addresses; must ". = 'nearest-customer-bridge' or . = 'nearest-bridge' or . = 'nearest-non-tpmr-bridge'" { error-message "Invalid protocol address"; } default "nearest-non-tpmr-bridge"; description "A 6-octet read-write MAC Address value specifying the Destination Address for Distributed Relay Control PDUs transmitted on the Intra-Relay Port. Valid addresses are the nearest-customer-bridge, nearest-bridge, and nearest-non-tpmr-bridge group addresses. The default value is the nearest-non-tpmr-bridge group address."; reference "7.4.1.1.12, 9.6.1.1 of IEEE Std 802.1AX"; } leaf home-admin-irp-state { type irp-state { bit short-timeout { position 3; description "The Short_Timeout flag indicates the Timeout control value in use by the DRCP Receive machine on this IRP. Short Timeout is encoded as a 1; Long Timeout is encoded as a 0."; } bit irc-data { position 5; description "When the IRC_Data flag is TRUE (1), the transfer of Up and Down frames is permitted on the IRC."; } } default "short-timeout irc-data"; description "Provides administrative control over the values of the Short_Timeout and IRC-Data state."; reference "7.4.1.1.24, 9.6.2.3, Figure 9-13 of IEEE Std 802.1AX"; } leaf home-oper-irp-state { type irp-state; config false; description "A string of 8 bits, corresponding to the current operational value of IRP_State as transmitted in DRCPDUs."; reference "7.4.1.1.25, 9.6.2.3, Figure 9-13 of IEEE Std 802.1AX"; } leaf home-cscd-gateway-control { type boolean; default "true"; description "When TRUE, allows the DRNI Gateway Port selection to be based on the CSCD parameters that control the Aggregator Port selection."; reference "7.4.1.1.16 of IEEE Std 802.1AX"; } leaf home-dr-client-gateway-control { type boolean; default "true"; description "When TRUE, allows the Distributed Relay Client to determine whether to forward frames through the DRNI Gateway Port."; reference "7.4.1.1.17 of IEEE Std 802.1AX"; } leaf home-gateway-algorithm { type identityref { base ax:distribution-algorithm; } default "ax:unspecified"; description "Identifies the algorithm used by the DRNI Gateway to assign frames to a Gateway Conversation ID. 8.2 provides the IEEE 802.1 OUI (00-80-C2) Gateway Algorithm encodings. Default is the value for an unspecified distribution algorithm."; reference "7.4.1.1.6 of IEEE Std 802.1AX"; } container home-gateway-conv-service-map { if-feature "ax:sid-map"; description "Data structure to map Service Identifiers to Conversation Identifiers. Each entry consists of a Conversation ID (CID) and a list of zero or more Service Identifiers (SIDs) that map to it. Frames with Service IDs not contained in the map are not mapped to any Gateway Conversation ID and are discarded."; reference "7.4.1.1.20, 6.6.3.1 of IEEE Std 802.1AX"; uses ax:service-map; } leaf home-gateway-conv-service-digest { type binary; config false; description "The MD5 Digest of the home-gateway-conv-service-map. The value is NULL (AAAAAAAAAAAAAAAAAAAAAA== in base64) when the distribution algorithm specified by agg-port-algorithm does not use the home-gateway-conv-service-map."; reference "7.4.1.1.21 of IEEE Std 802.1AX"; } container gateway-enable-mask { description "A vector of Boolean values, with one value for each possible Gateway Conversation ID. A 1 indicates that frames associated with that Gateway Conversation ID are allowed to pass through this Gateway Port, and a 0 indicates that such frames are not allowed to pass. Default value is all bits set to 1."; reference "7.4.1.1.18, 9.5.3.5, 9.6.5 of IEEE Std 802.1AX"; uses drni-mask; } container gateway-preference-mask { description "A vector of Boolean values, with one value for each possible Gateway Conversation ID. A 1 indicates that this Gateway Port is the preferred Gateway when both DRNI Gateways have the Gateway Conversation ID enabled in the gateway-available-mask, and a 0 indicates that it is not preferred. Default value is all bits set to 1."; reference "7.4.1.1.19, 9.5.3.5, 9.6.5 of IEEE Std 802.1AX"; uses drni-mask; } container gateway-available-mask { config false; description "A vector of Boolean values, with one value for each possible Gateway Conversation ID. A 1 indicates that this Gateway Port is eligible to be selected to pass that Gateway Conversation ID, and a 0 indicates that it is not eligible."; reference "7.4.1.1.22, 9.5.3.5, 9.6.5 of IEEE Std 802.1AX"; uses drni-mask; } container neighbor { config false; description "Operational values for the DRNI neighbor obtained from DRCPDUs."; leaf oper-irp-state { type irp-state; description "A string of 8 bits, corresponding to the current operational value of IRP_State as transmitted in DRCPDUs."; reference "7.4.1.1.26, 9.6.2.3, Figure 9-13 of IEEE Std 802.1AX"; } leaf system { type ieee:mac-address; description "The MAC Address portion of the System Identifier of the Neighbor DRNI System (connected via the Intra-Relay Port). "; reference "7.4.1.1.29 of IEEE Std 802.1AX"; } leaf system-priority { type uint16; description "The priority portion of the System Identifier of the Neighbor DRNI System (connected via the Intra-Relay Port)."; reference "7.4.1.1.30 of IEEE Std 802.1AX"; } leaf drni-key { type uint16; description "The DRNI key value received from the Neighbor DRNI System (connected via the Intra-Relay Port)."; reference "7.4.1.1.31 of IEEE Std 802.1AX"; } leaf aggregator-algorithm { type identityref { base ax:distribution-algorithm; } description "The Port algorithm used by the Neighbor Aggregator to assign frames to Port Conversation IDs."; reference "7.4.1.1.33 of IEEE Std 802.1AX"; } leaf aggregator-conv-service-digest { type binary; description "The MD5 Digest of the Neighbor Aggregator's Admin_Conv_Service_Map. Obtained from the Home Aggregator State TLV last received from the Neighbor DRNI System."; reference "7.4.1.1.34 of IEEE Std 802.1AX"; } leaf aggregator-conv-link-digest { type binary; description "The MD5 Digest of the Neighbor Aggregator's Admin_Conv_Link_Map. Obtained from the Home Aggregator State TLV (9.6.2.4) last received from the Neighbor DRNI System."; reference "7.4.1.1.35 of IEEE Std 802.1AX"; } leaf partner-system-priority { type uint16; description "The priority portion of the System Identifier of the Neighbor Aggregator's Partner."; reference "7.4.1.1.36 of IEEE Std 802.1AX"; } leaf partner-system { type ieee:mac-address; description "The MAC Address portion of the System Identifier of the Neighbor Aggregator's Partner."; reference "7.4.1.1.37 of IEEE Std 802.1AX"; } leaf partner-aggregator-key { type uint16; description "The operational key value of the Neighbor Aggregator's Partner."; reference "7.4.1.1.38 of IEEE Std 802.1AX"; } leaf cscd-state { type bits { bit reserved-1 { position 0; description "Bit 1 is reserved for future use. It is set to 0 and ignored on receipt."; } bit reserved-2 { position 1; description "Bit 2 is reserved for future use. It is set to 0 and ignored on receipt."; } bit reserved-3 { position 2; description "Bit 3 is reserved for future use. It is set to 0 and ignored on receipt."; } bit cscd_gateway_control { position 3; description "CSCD_Gateway_Control is encoded in bit 4. When this flag is TRUE, the DRNI Gateway is configured to minimize forwarding data frames on the IRC by selecting the DRNI Gateway and Aggregator Ports for forwarding any given Conversation ID to be in the same DRNI System."; } bit discard_wrong_conversation { position 4; description "Discard_Wrong_Conversation is encoded in bit 5. The Aggregator's Discard_Wrong_Conversation value."; } bit differ_conv_link_digests { position 5; description "Differ_Conv_Link_Digests is encoded in bit 6. This flag is TRUE when the Aggregator's Actor_Conv_Link_Digest matches the Aggregator's Partner_Conv_Link_Digest."; } bit differ_conv_service_digests { position 6; description "Differ_Conv_Service_Digests is encoded in bit 7. This flag is TRUE when the Aggregator's Actor_Conv_Service_Digest matches the Aggregator's Partner_Conv_Service_Digest."; } bit differ_port_algorithms { position 7; description "Differ_Port_Algorithms is encoded in bit 8. The Aggregator's differPortAlgorithms flag is TRUE when the Aggregator's Actor_Port_Algorithm matches the Aggregator's Partner_Port_Algorithm."; } } description "8 bits, corresponding to the Aggregator_CSCD_State in the Neighbor_Aggregator_State variable. The first three bits (the least significant bits of CSCD_State) are reserved; the fourth bit corresponds to the Neighbor's value for Home_Admin_CSCD_Gateway_Control; the fifth bit corresponds to the Neighbor Aggregator's operational value for Discard_Wrong_Conversation; and the sixth, seventh, and eighth bits correspond to the Neighbor Aggregator's operational value for differConvLinkDigests, differConvServiceDigests, and differPortAlgorithms, respectively, (the most significant bits of CSCD_State)."; reference "7.4.1.1.39 of IEEE Std 802.1AX"; } leaf-list active-links { type uint16; description "A list of the operational Link_Numbers of Aggregation Ports that are currently active (i.e., collecting) on the Neighbor's Aggregator. An empty list indicates that there are no Aggregation Ports active. Each integer value in the list carries an aAggPortOperLinkNumber attribute value."; reference "7.4.1.1.40 of IEEE Std 802.1AX"; } leaf gateway-algorithm { type identityref { base ax:distribution-algorithm; } description "The gateway algorithm used by the Neighbor DRNI Gateway to assign frames to Gateway Conversation IDs."; reference "7.4.1.1.41 of IEEE Std 802.1AX"; } leaf gateway-conv-service-digest { type binary; description "The MD5 Digest of the Neighbor DRNI Gateway's the Home_Admin_Gateway_Conv_Service_Map. Obtained from Gateway_Conv_Service_Digest in the Neighbor_Gateway_State TLV last received from the Neighbor DRNI System."; reference "7.4.1.1.42 of IEEE Std 802.1AX"; } container gateway-available-mask { description "A vector of Boolean values, with one value for each possible Gateway Conversation ID. A 1 indicates that the Neighbor DRNI Gateway Port is eligible to be selected to pass that Gateway Conversation ID, and a 0 indicates that it is not eligible."; reference "7.4.1.1.43 of IEEE Std 802.1AX"; uses drni-mask; } container gateway-preference-mask { description "A vector of Boolean values, with one value for each possible Gateway Conversation ID. A 1 indicates that the Neighbor DRNI Gateway Port is the preferred Gateway when both DRNI Gateways have the Gateway Conversation ID enabled in the gateway-available-mask, and a 0 indicates that it is not preferred."; reference "7.4.1.1.44 of IEEE Std 802.1AX"; uses drni-mask; } } } } augment "/if:interfaces/if:interface/if:statistics" + "/dot1ax:lag-stats" { when '../../dot1ax:lag/dot1ax-drni:drni' { description "Applies to Aggregators with DRNI present."; } description "Augment interface statistics with DRNI statistics."; container drni-stats { description "Contains DRNI specific statistics."; leaf drcpdus-rx { type yang:counter64; description "The number of valid DRCPDUs received on this Intra-Relay Port."; reference "7.4.1.1.45 of IEEE Std 802.1AX"; } leaf illegal-rx { type yang:counter64; description "The number of frames received on this Intra-Relay Port that carry the DRCP EtherType value, but contain a badly formed PDU."; reference "7.4.1.1.46, 9.6.1.4 of IEEE Std 802.1AX"; } leaf drcpdus-tx { type yang:counter64; description "The number of valid DRCPDUs transmitted on this Intra-Relay Port."; reference "7.4.1.1.47 of IEEE Std 802.1AX"; } } } }