Skip to main content

A YANG Data Model for the Alternate Marking Method
draft-ydt-ippm-alt-mark-yang-01

Document Type Active Internet-Draft (individual)
Authors Thomas Graf , Minxue Wang , Giuseppe Fioccola , Tianran Zhou , Xiao Min , Guo Jun , Massimo Nilo , Liuyan Han
Last updated 2024-03-04
Replaces draft-gfz-ippm-alt-mark-yang, draft-wang-ippm-alt-mark-yang
RFC stream (None)
Intended RFC status (None)
Formats
Yang Validation 0 errors, 0 warnings
Stream Stream state (No stream defined)
Consensus boilerplate Unknown
RFC Editor Note (None)
IESG IESG state I-D Exists
Telechat date (None)
Responsible AD (None)
Send notices to (None)
draft-ydt-ippm-alt-mark-yang-01
IPPM                                                             T. Graf
Internet-Draft                                                  Swisscom
Intended status: Standards Track                                 M. Wang
Expires: 5 September 2024                                   China Mobile
                                                             G. Fioccola
                                                                 T. Zhou
                                                                  Huawei
                                                                  X. Min
                                                                  J. Guo
                                                         ZTE Corporation
                                                                 M. Nilo
                                                          Telecom Italia
                                                                  L. Han
                                                            China Mobile
                                                            4 March 2024

           A YANG Data Model for the Alternate Marking Method
                    draft-ydt-ippm-alt-mark-yang-01

Abstract

   Alternate-Marking Method is a technique used to perform packet loss,
   delay, and jitter measurements on in-flight packets.  This document
   defines a YANG data model for the Alternate Marking Method.

Status of This Memo

   This Internet-Draft is submitted in full conformance with the
   provisions of BCP 78 and BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF).  Note that other groups may also distribute
   working documents as Internet-Drafts.  The list of current Internet-
   Drafts is at https://datatracker.ietf.org/drafts/current/.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   This Internet-Draft will expire on 5 September 2024.

Copyright Notice

   Copyright (c) 2024 IETF Trust and the persons identified as the
   document authors.  All rights reserved.

Graf, et al.            Expires 5 September 2024                [Page 1]
Internet-Draft           yang-alternate-marking               March 2024

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents (https://trustee.ietf.org/
   license-info) in effect on the date of publication of this document.
   Please review these documents carefully, as they describe your rights
   and restrictions with respect to this document.  Code Components
   extracted from this document must include Revised BSD License text as
   described in Section 4.e of the Trust Legal Provisions and are
   provided without warranty as described in the Revised BSD License.

Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
     1.1.  Requirements Language . . . . . . . . . . . . . . . . . .   2
     1.2.  Conventions . . . . . . . . . . . . . . . . . . . . . . .   2
   2.  AltMark Tree Diagram  . . . . . . . . . . . . . . . . . . . .   3
   3.  AltMark Profile . . . . . . . . . . . . . . . . . . . . . . .   4
   4.  Alternate Marking Method YANG Data Model  . . . . . . . . . .   5
   5.  Security Considerations . . . . . . . . . . . . . . . . . . .  14
   6.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .  15
   7.  Acknowledgements  . . . . . . . . . . . . . . . . . . . . . .  15
   8.  Contributors  . . . . . . . . . . . . . . . . . . . . . . . .  15
   9.  References  . . . . . . . . . . . . . . . . . . . . . . . . .  15
     9.1.  Normative References  . . . . . . . . . . . . . . . . . .  15
     9.2.  Informative References  . . . . . . . . . . . . . . . . .  16
   Appendix A.  An Example of MPLS Alternate Marking YANG Model  . .  17
     A.1.  MPLS AltMark Tree Diagram . . . . . . . . . . . . . . . .  17
     A.2.  MPLS Alternate Marking YANG Data Model  . . . . . . . . .  18
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .  25

1.  Introduction

   Alternate-Marking Method [RFC9341] [RFC9342] (AltMark) is a technique
   used to perform packet loss, delay, and jitter measurements on in-
   flight packets.  This document defines a YANG data model for the
   Alternate Marking Method.

1.1.  Requirements Language

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
   "OPTIONAL" in this document are to be interpreted as described in BCP
   14 [RFC2119] [RFC8174] when, and only when, they appear in all
   capitals, as shown here.

1.2.  Conventions

   The following terms are defined in [RFC7950] and are used in this
   specification:

Graf, et al.            Expires 5 September 2024                [Page 2]
Internet-Draft           yang-alternate-marking               March 2024

   *  augment

   *  data model

   *  data node

   The terminology for describing YANG data models is found in
   [RFC7950].

2.  AltMark Tree Diagram

   Tree diagrams used in this document follow the notation defined in
   [RFC8340].

   The AltMark model is organized as shown in the following figure.
   Each AltMark profile associates with one flow and the corresponding
   AltMark information.

   The "altmark-info" is a container for all the read only information
   that assists monitoring systems in the interpretation of the AltMark
   data.

     module: ietf-alt-mark
     +--ro altmark-info
     |  +--ro timestamp-type?
     |  +--ro available-interface*          [if-name]
     |     +--ro if-name                    if:interface-ref
     +--rw altmark-profiles
        +--rw admin-config
        |  +--rw enabled?                   boolean
        +--rw altmark-profile               [profile-name]
           +--rw profile-name               string
           +--rw filter
           |  +--rw filter-type?            altmark-filter-type
           |  +--rw ace-name?            -> /acl:acls/acl/aces/ace/name
               +--rw protocol-type?             altmark-protocol-type
               +--rw node-action                altmark-node-action
               +--rw period?                    uint64
               +--rw flow-mon-id?               uint32
               +--rw measurement-mode?          altmark-measurement-mode
               +--rw enable-loss-measurement?   boolean
               +--rw enable-delay-measurement?  boolean

   In the "altmark-profiles", the "enabled" is an administrative
   configuration.  When set to true, AltMark configuration is enabled
   for the system.  Meanwhile, the AltMark data-plane functionality is
   enabled.

Graf, et al.            Expires 5 September 2024                [Page 3]
Internet-Draft           yang-alternate-marking               March 2024

   The "filter" is used to identify a flow, where the AltMark data can
   be applied.  There may be multiple filter types.  ACL [RFC8519] is a
   common way to specify a flow.  The AltMark profile can associate with
   an ACE(Access Control Entry).  AltMark actions MUST be driven by the
   accepted packets, when the matched ACE "forwarding" action is
   "accept".

   The AltMark data can be encapsulated into multiple protocols, e.g.,
   IPv6 [RFC9343], SRH [I-D.fz-spring-srv6-alt-mark], and MPLS
   [I-D.ietf-mpls-inband-pm-encapsulation].  Additional protocol
   extensions are reported in [I-D.ietf-ippm-alt-mark-deployment] The
   "protocol-type" is used to indicate the protocol for the AltMark
   application.  For example, if the "protocol-type" is IPv6, the
   AltMark marking node will encapsulate the associated flow with the
   IPv6 [RFC9343] format.

3.  AltMark Profile

   The AltMark data is expected to be read and exported or locally
   aggregated at every node that the flow traverses within the AltMark
   domain.  The "altmark-profile" contains the detailed information for
   the AltMark data.  The information includes:

   *  profile-name: it is the unique identifier for each AltMark profile

   *  filter: it is used to identify a flow, where the AltMark data can
      be applied

   *  protocol-type: it is used to indicate the protocol for the AltMark
      application

   *  node-action: indicates the operation applied to the flow (e.g.
      marking AltMark header, read the AltMark data, or unmarking
      AltMark header).

   *  period: it indicates the AltMark period (see
      [I-D.ietf-ippm-alt-mark-deployment]).

   *  flow-mon-id: it is used to identify the monitored flow and to
      correlate the exported data of the same flow from multiple nodes
      and from multiple packets.

   *  measurement-mode: it specifies the measurement mode: hop-by-hop or
      end-to-end.

   *  enable-loss-measurement: if true, it enables loss measurements.

   *  enable-delay-measurement: if true, it enables delay measurements.

Graf, et al.            Expires 5 September 2024                [Page 4]
Internet-Draft           yang-alternate-marking               March 2024

   Note that users can augment this module.

4.  Alternate Marking Method YANG Data Model

   <CODE BEGINS> file "ietf-AMM@2024-03-04.yang"
   module ietf-alt-mark {
     yang-version 1.1;
     namespace "urn:ietf:params:xml:ns:yang:ietf-alt-mark";
     prefix "altmark";

     import ietf-access-control-list {
       prefix "acl";
       reference
         "RFC 8519: YANG Data Model for Network Access Control
          Lists (ACLs)";
     }

     import ietf-interfaces {
       prefix "if";
       reference
         "RFC 8343: A YANG Data Model for Interface Management";
     }

     import ietf-lime-time-types {
       prefix "lime";
       reference
         "RFC 8532: Generic YANG Data Model for the Management of
          Operations, Administration, and Maintenance (OAM) Protocols
          That Use Connectionless Communications";
     }

     organization
       "IETF IPPM (IP Performance Metrics) Working Group";

     contact
       "WG Web: <https://datatracker.ietf.org/wg/ippm>
        WG List: <ippm@ietf.org>
        Author: thomas.graf@swisscom.com
            Author: wangminxue@chinamobile.com
        Author: giuseppe.fioccola@huawei.com
        Author: zhoutianran@huawei.com
            Author: xiao.min2@zte.com.cn
            Author: guo.jun2@zte.com.cn
            Author: massimo.nilo@telecomitalia.it
            Author: hanliuyan@chinamobile.com";

     description
       "This YANG module specifies a vendor-independent data

Graf, et al.            Expires 5 September 2024                [Page 5]
Internet-Draft           yang-alternate-marking               March 2024

        model for the Alternate Marking (AltMark).

        The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
        NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED',
        'MAY', and 'OPTIONAL' in this document are to be interpreted as
        described in BCP 14 (RFC 2119) (RFC 8174) when, and only when,
        they appear in all capitals, as shown here.

        Copyright (c) 2024 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 Revised 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 XXXX
        (https://www.rfc-editor.org/info/rfcXXXX); see the RFC itself
        for full legal notices.";

     revision 2024-03-04 {
       description "First revision.";
       reference "RFC XXXX: A YANG Data Model for Alternate-Marking";
     }

    /*
     * FEATURES
     */

     feature altmark
     {
       description
         "This feature indicated that the Alternate-Marking Method is
             supported.";
       reference
             "RFC 9341: Alternate-Marking Method;
              RFC 9342: Clustered Alternate-Marking Method";
     }

    /*
     * IDENTITIES
     */

     identity filter {
       description
         "Base identity to represent a filter. A filter is used to

Graf, et al.            Expires 5 September 2024                [Page 6]
Internet-Draft           yang-alternate-marking               March 2024

         specify the flow to which the AltMark method is applied.";
     }

     identity acl-filter {
       base filter;
       description
         "Apply ACL rules to specify the flow.";
     }

     identity protocol {
       description
         "Base identity to represent the protocol. It's used to
          indicate the protocol for the application of the AltMark
              method.";
     }

     identity ipv6 {
       base protocol;
       description
         "The AltMark method is applied to IPv6 protocol.";
       reference
         "RFC 9343: IPv6 Application of the Alternate-Marking Method";
     }

     identity srh  {
       base protocol;
       description
         "The AltMark method is applied to SRH.";
       reference
         "[I-D.fz-spring-srv6-alt-mark]: Application of the
             Alternate Marking Method to the Segment Routing Header";
     }

     identity mpls  {
       base protocol;
       description
         "The AltMark method is applied to MPLS.";
       reference
         "[I-D.ietf-mpls-inband-pm-encapsulation]: Application of the
             Alternate Marking Method to the MPLS Label Stack";
     }

     identity node-action {
       description
         "Base identity to represent the node actions. It's used to
          indicate what action the node will take.";
     }

Graf, et al.            Expires 5 September 2024                [Page 7]
Internet-Draft           yang-alternate-marking               March 2024

     identity action-marking {
       base node-action;
       description
         "It indicates that the node must mark the AltMark data field,
             according to the operations described in RFC 9341 and
             RFC 9342";
     }

     identity action-unmarking {
       base node-action;
       description
         "It indicates that the node must unmark the AltMark data field,
             according to the operations described in RFC 9341 and
             RFC 9342";
     }

     identity action-read {
       base node-action;
       description
         "It indicates the node only reads the AltMark data,
             according to the operations described in RFC 9341 and
             RFC 9342";
     }

     identity period {
       description
         "It indicates the AltMark Period.";
     }

     identity flow-mon-id {
       description
         "It indicates the FlowMonID.";
     }

     identity measurement-mode {
       description
         "It indicates the measurement mode.";
     }

     identity hbh-measurement {
       base measurement-mode;
       description
         "It indicates that hop-by-hop measurements can be enabled.";
     }

     identity e2e-measurement {
       base measurement-mode;
       description

Graf, et al.            Expires 5 September 2024                [Page 8]
Internet-Draft           yang-alternate-marking               March 2024

         "It indicates that end-to-end measurements can be enabled.";
     }

     identity enable-loss-measurement {
       description
         "It indicates that loss measurements are enabled.";
       }

      identity enable-delay-measurement {
       description
         "It indicates that delay measurements are enabled.";
       }

    /*
     * TYPE DEFINITIONS
     */

     typedef altmark-filter-type {
       type identityref {
         base filter;
       }
       description
         "It specifies a known type of filter.";
     }

     typedef altmark-node-action {
       type identityref {
         base node-action;
       }
       description
         "It specifies a node action.";
     }

     typedef altmark-protocol-type {
       type identityref {
         base protocol;
       }
       description
         "It specifies a known type of carrier protocol for the AltMark
          data.";
     }

     typedef altmark-measurement-mode {
       type identityref {
         base measurement-mode;
       }
       description
         "It specifies the measurement mode.";

Graf, et al.            Expires 5 September 2024                [Page 9]
Internet-Draft           yang-alternate-marking               March 2024

     }

    /*
     * GROUP DEFINITIONS
     */

     grouping altmark-filter {
       description "A grouping for AltMark filter definition";

       leaf filter-type {
         type altmark-filter-type;
         description "filter type";
       }

       leaf ace-name {
         when "derived-from-or-self(../filter-type,
             'altmark:acl-filter')";
         type leafref {
           path "/acl:acls/acl:acl/acl:aces/acl:ace/acl:name";
         }
         description "The Access Control Entry name is used to
         refer to an ACL specification.";
       }
     }

     grouping measurement-mode {
       description
         "A grouping for measurement mode.";

       leaf hbh-measurement {
         type boolean;
         default false;
         description
           "This object indicates that hop-by-hop measurements can be
                   enabled.";
       }

       leaf e2e-measurement {
         type boolean;
         default false;
         description
           "This object indicates that end-to-end measurements can be
                   enabled.";
       }
     }

     grouping altmark-setup {
       description

Graf, et al.            Expires 5 September 2024               [Page 10]
Internet-Draft           yang-alternate-marking               March 2024

         "A grouping for AltMark profile.";

       leaf node-action {
         type altmark-node-action;
         default action-read;
         description
           "This object indicates the action that the node needs to
            take, i.e. marking/read/unmarking.";
       }

       leaf period {
         type uint64;
         description
         "It specifies the AltMark marking period.";
       }

           leaf altmark-flowmonid {
         type uint32;
         description
         "It specifies the FlowMonID.
             A 20-bit flow identifier. The field is set at the marking node.
             The FlowMonID can be uniformly assigned by a central controller
             or algorithmically generated by the marking node.
             The latter approach cannot guarantee the uniqueness of the
             FlowMonID, yet the conflict probability is small due to the
             large space.
             FlowMonID is used to identify the flow and to correlate the
             exported data of the same flow from multiple nodes and from
             multiple packets.";
       }

           }

     grouping altmark-admin-config {
       description
         "AltMark top-level administrative configuration.";

       leaf enabled {
         type boolean;
         default false;
         description
           "This object is to control the availability of configuration.
            It MUST be true before anything in the
            /altmark/altmark-profile can be edited.
            If false, any configuration in place is not used.";
       }
     }

Graf, et al.            Expires 5 September 2024               [Page 11]
Internet-Draft           yang-alternate-marking               March 2024

    /*
     * DATA NODES
     */

     container AltMark {
       description "AltMark top level container";

       container altmark-info {
         config false;
         description
           "Describes information such as units or timestamp format
                   that assists monitoring systems in the interpretation of the
                   AltMark data.";

         leaf timestamp-type {
           type identityref {
             base lime:timestamp-type;
           }
           description
             "Type of timestamp, such as Truncated PTP or NTP.";
         }

         list available-interface {
           key "if-name";
           description
             "A list of available interfaces that support
                     Alternate-Marking.";
           leaf if-name {
             type if:interface-ref;
             description "This is a reference to the Interface name.";
           }
         }
       }

       container altmark-profiles {
         description
           "Contains the AltMark profiles.";

         container admin-config {
           description
             "Contains all the administrative configurations related to
              the AltMark functionalities";

           uses altmark-admin-config;
         }

         list altmark-profile {
         if-feature altmark;

Graf, et al.            Expires 5 September 2024               [Page 12]
Internet-Draft           yang-alternate-marking               March 2024

         key "profile-name";
         description
             "It describes the list of the AltMark profiles configured
                     on the node";
         leaf profile-name {
             type string{
               length "1..300";
             }
           description
               "Unique identifier for each AltMark profile.";
           }

         container filter {
             uses altmark-filter;
             description
               "The filter which is used to indicate the flow where
                           the AltMark is applied.";
           }

         leaf protocol-type {
             type altmark-protocol-type;
             description
               "This item is used to indicate the carrier protocol where
               the AltMark is applied.";
           }

           uses altmark-setup;

               uses measurement-mode;

           leaf enable-loss-measurement {
               type boolean;
                           default false;
               description
               "If true, it object indicates that loss measurements are
                           enabled.";
             }

           leaf enable-delay-measurement {
               type boolean;
               default false;
                           description
               "If true, it indicates that delay measurements are
                           enabled.";
             }

         }
        }

Graf, et al.            Expires 5 September 2024               [Page 13]
Internet-Draft           yang-alternate-marking               March 2024

       }
   }
   <CODE ENDS>

5.  Security Considerations

   Alternate Marking [RFC9341] and Multipoint Alternate Marking
   [RFC9342] analyze different security concerns and related solutions.
   These aspects are valid and applicable also to this document.  In
   particular the fundamental security requirement is that Alternate
   Marking MUST only be applied in a specific limited domain, as also
   mentioned in [RFC8799].

   The YANG module specified in this document defines a schema for data
   that is designed to be accessed via network management protocols such
   as NETCONF [RFC6241] or RESTCONF [RFC8040].  The lowest NETCONF layer
   is the secure transport layer, and the mandatory-to-implement secure
   transport is Secure Shell (SSH) [RFC6242].  The lowest RESTCONF layer
   is HTTPS, and the mandatory-to-implement secure transport is TLS
   [RFC8446].

   The Network Configuration Access Control Model (NACM) [RFC8341]
   provides the means to restrict access for particular NETCONF or
   RESTCONF users to a preconfigured subset of all available NETCONF or
   RESTCONF protocol operations and content.

   There are a number of data nodes defined in this YANG module.  These
   data nodes may be considered sensitive or vulnerable in some network
   environments.  Write operations (e.g., edit-config) to these data
   nodes without proper protection can have a negative effect on network
   operations.  These are the subtrees and data nodes and their
   sensitivity/vulnerability:

   *  /altmark/altmark-profiles/admin-config

   The items in the container above include the top level administrative
   configurations related to the AltMark functionalities.  Unexpected
   changes to these items could lead to the AltMark function disruption
   and/ or misbehavior of the AltMark.

   *  /altmark/altmark-profiles/altmark-profile

   The entries in the container above include the AltMark profile
   configurations which indirectly create or modify the device
   configurations.  Unexpected changes to these entries could lead to
   the mistake of the AltMark behavior for the corresponding flows.

Graf, et al.            Expires 5 September 2024               [Page 14]
Internet-Draft           yang-alternate-marking               March 2024

6.  IANA Considerations

   IANA is requested to assign a new URI from the IETF XML Registry
   [RFC3688].  The following URI is suggested:

           URI: urn:ietf:params:xml:ns:yang:ietf-altmark
           Registrant Contact: The IESG.
           XML: N/A; the requested URI is an XML namespace.

   This document also requests a new YANG module name in the YANG Module
   Names registry [RFC7950] with the following suggestion:

           name: ietf-altmark
           namespace: urn:ietf:params:xml:ns:yang:ietf-altmark
           prefix: altmark
           reference: RFC XXXX

7.  Acknowledgements

   TBD

8.  Contributors

   TBD

9.  References

9.1.  Normative References

   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
              Requirement Levels", BCP 14, RFC 2119,
              DOI 10.17487/RFC2119, March 1997,
              <https://www.rfc-editor.org/info/rfc2119>.

   [RFC3688]  Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688,
              DOI 10.17487/RFC3688, January 2004,
              <https://www.rfc-editor.org/info/rfc3688>.

   [RFC6241]  Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed.,
              and A. Bierman, Ed., "Network Configuration Protocol
              (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011,
              <https://www.rfc-editor.org/info/rfc6241>.

   [RFC7950]  Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language",
              RFC 7950, DOI 10.17487/RFC7950, August 2016,
              <https://www.rfc-editor.org/info/rfc7950>.

Graf, et al.            Expires 5 September 2024               [Page 15]
Internet-Draft           yang-alternate-marking               March 2024

   [RFC8040]  Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF
              Protocol", RFC 8040, DOI 10.17487/RFC8040, January 2017,
              <https://www.rfc-editor.org/info/rfc8040>.

   [RFC8174]  Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
              2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
              May 2017, <https://www.rfc-editor.org/info/rfc8174>.

   [RFC9341]  Fioccola, G., Ed., Cociglio, M., Mirsky, G., Mizrahi, T.,
              and T. Zhou, "Alternate-Marking Method", RFC 9341,
              DOI 10.17487/RFC9341, December 2022,
              <https://www.rfc-editor.org/info/rfc9341>.

   [RFC9342]  Fioccola, G., Ed., Cociglio, M., Sapio, A., Sisto, R., and
              T. Zhou, "Clustered Alternate-Marking Method", RFC 9342,
              DOI 10.17487/RFC9342, December 2022,
              <https://www.rfc-editor.org/info/rfc9342>.

9.2.  Informative References

   [I-D.fz-spring-srv6-alt-mark]
              Fioccola, G., Zhou, T., Cociglio, M., Mishra, G. S., wang,
              X., and G. Zhang, "Application of the Alternate Marking
              Method to the Segment Routing Header", Work in Progress,
              Internet-Draft, draft-fz-spring-srv6-alt-mark-08, 8
              February 2024, <https://datatracker.ietf.org/doc/html/
              draft-fz-spring-srv6-alt-mark-08>.

   [I-D.ietf-ippm-alt-mark-deployment]
              Fioccola, G., Zhou, T., Graf, T., Nilo, M., and L. Zhang,
              "Alternate Marking Deployment Framework", Work in
              Progress, Internet-Draft, draft-ietf-ippm-alt-mark-
              deployment-00, 3 January 2024,
              <https://datatracker.ietf.org/doc/html/draft-ietf-ippm-
              alt-mark-deployment-00>.

   [I-D.ietf-mpls-inband-pm-encapsulation]
              Cheng, W., Min, X., Zhou, T., Dai, J., and Y. Peleg,
              "Encapsulation For MPLS Performance Measurement with
              Alternate Marking Method", Work in Progress, Internet-
              Draft, draft-ietf-mpls-inband-pm-encapsulation-10, 27
              February 2024, <https://datatracker.ietf.org/doc/html/
              draft-ietf-mpls-inband-pm-encapsulation-10>.

   [RFC6242]  Wasserman, M., "Using the NETCONF Protocol over Secure
              Shell (SSH)", RFC 6242, DOI 10.17487/RFC6242, June 2011,
              <https://www.rfc-editor.org/info/rfc6242>.

Graf, et al.            Expires 5 September 2024               [Page 16]
Internet-Draft           yang-alternate-marking               March 2024

   [RFC8340]  Bjorklund, M. and L. Berger, Ed., "YANG Tree Diagrams",
              BCP 215, RFC 8340, DOI 10.17487/RFC8340, March 2018,
              <https://www.rfc-editor.org/info/rfc8340>.

   [RFC8341]  Bierman, A. and M. Bjorklund, "Network Configuration
              Access Control Model", STD 91, RFC 8341,
              DOI 10.17487/RFC8341, March 2018,
              <https://www.rfc-editor.org/info/rfc8341>.

   [RFC8446]  Rescorla, E., "The Transport Layer Security (TLS) Protocol
              Version 1.3", RFC 8446, DOI 10.17487/RFC8446, August 2018,
              <https://www.rfc-editor.org/info/rfc8446>.

   [RFC8519]  Jethanandani, M., Agarwal, S., Huang, L., and D. Blair,
              "YANG Data Model for Network Access Control Lists (ACLs)",
              RFC 8519, DOI 10.17487/RFC8519, March 2019,
              <https://www.rfc-editor.org/info/rfc8519>.

   [RFC8799]  Carpenter, B. and B. Liu, "Limited Domains and Internet
              Protocols", RFC 8799, DOI 10.17487/RFC8799, July 2020,
              <https://www.rfc-editor.org/info/rfc8799>.

   [RFC9343]  Fioccola, G., Zhou, T., Cociglio, M., Qin, F., and R.
              Pang, "IPv6 Application of the Alternate-Marking Method",
              RFC 9343, DOI 10.17487/RFC9343, December 2022,
              <https://www.rfc-editor.org/info/rfc9343>.

Appendix A.  An Example of MPLS Alternate Marking YANG Model

   An example of MPLS Alternate Marking YANG Model is provided as below.

A.1.  MPLS AltMark Tree Diagram

   This section presents a simplified graphical representation of the
   data model using a YANG tree diagram [RFC8340].

Graf, et al.            Expires 5 September 2024               [Page 17]
Internet-Draft           yang-alternate-marking               March 2024

module: ietf-alternate-marking
  +--rw configuration
     +--rw alternate-marking
     |  +--rw admin-config
     |  |  +--rw oam-status?   enumeration
     |  |  +--rw label?        uint32
     |  +--rw altmark-profiles
     |     +--rw altmark-profile* [profile-name]
     |        +--rw profile-name                string
     |        +--rw altmark-flowmonid?          uint32
     |        +--rw node-action?                enumeration
     |        +--rw measurement-mode?           altmark-measurement-mode
     |        +--rw period?                     alternate-marking-period
     |        +--rw protocol-type?              altmark-protocol-type
     |        +--rw enable-loss-measurement?    enumeration
     |        +--rw enable-delay-measurement?   enumeration
     |        +--rw filter
     |           +--rw (filter-type)
     |              +--:(acl)
     |                 +--rw acl-name?   string
     +--rw state
        +--rw altmark-info
           +--rw timestamp-type?         timestamp-type
           +--rw available-interfaces
              +--rw interface* [ifname]
                 +--rw ifname    string

A.2.  MPLS Alternate Marking YANG Data Model

   <CODE BEGINS> file "ietf-alternate-marking@2024-03-04.yang"
   module ietf-alternate-marking {
     yang-version "1.1";
     namespace "urn:ietf:params:xml:ns:yang:ietf-alternate-marking";

     prefix alternate-marking;

     organization
       "IETF IPPM (IP Performance Measurement) Working Group";

     contact
       "WG Web:   <http://datatracker.ietf.org/group/ippm/>
        WG List:  <mailto:ippm@ietf.org>

        Author:   Thomas Graf
                  <mailto:thomas.graf@swisscom.com>
        Author:   Minxue Wang
                  <mailto:wangminxue@chinamobile.com>

Graf, et al.            Expires 5 September 2024               [Page 18]
Internet-Draft           yang-alternate-marking               March 2024

        Author:   Giuseppe Fioccola
                  <mailto:giuseppe.fioccola@huawei.com>
        Author:   Tianran Zhou
                  <mailto:zhoutianran@huawei.com>
        Author:   Xiao Min
                  <mailto:xiao.min2@zte.com.cn>
        Author:   Jun Guo
                  <mailto:guo.jun2@zte.com.cn>
        Author:   Massimo Nilo
                  <mailto:massimo.nilo@telecomitalia.it>
        Author:   Liuyan Han
                  <mailto:hanliuyan@chinamobile.com>";

     description
       "This document defines a YANG data model used for alternate
        marking method.

        This YANG model conforms to the Network Management
        Datastore Architecture (NMDA) as described in RFC 8342.

        Copyright (c) 2024 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 Revised 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 XXXX;
        see the RFC itself for full legal notices.

        The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
        NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED',
        'MAY', and 'OPTIONAL' in this document are to be interpreted as
        described in BCP 14 (RFC 2119) (RFC 8174) when, and only when,
        they appear in all capitals, as shown here.";

     revision 2024-03-04 {
       description 'First draft.'
                   ;
       reference 'RFC XXXX: A YANG Data Model for Alternate '
               + 'Marking Method.'
                   ;
     }

     typedef alternate-marking-period {

Graf, et al.            Expires 5 September 2024               [Page 19]
Internet-Draft           yang-alternate-marking               March 2024

       type enumeration {
         enum 1s {
           value 1;
           description "Alternate marking period is 1s.";
         }
         enum 5s {
           value 2;
           description "Alternate marking period is 5s.";
         }
         enum 10s {
           value 3;
           description "Alternate marking period is 10s.";
         }
         enum 30s {
           value 4;
           description "Alternate marking period is 30s.";
         }
         enum 60s {
           value 5;
           description "Alternate marking period is 60s.";
         }
         enum 5min {
           value 6;
           description "Alternate marking period is 5min.";
         }
         enum 15min {
           value 7;
           description "Alternate marking period is 15min.";
         }

       }
           default 30s;
       description "Alternate Marking period, including
                   1s,5s,10s,30s,60s,5min,15min(default:30s).";
     }

     typedef altmark-protocol-type {
       type enumeration {
         enum ipv6 {
           value 0;
           description "IPv6.";
         }

         enum mpls {
           value 1;
           description "MPLS.";
         }

Graf, et al.            Expires 5 September 2024               [Page 20]
Internet-Draft           yang-alternate-marking               March 2024

       }
       description "Alternate Marking protocol type.";
     }

     typedef altmark-measurement-mode {
       type enumeration {
         enum e2e {
           value 0;
                   description "E2E.";
         }

         enum trace {
           value 1;
                   description "HBH.";
         }

       }
         description "Alternate Marking measurement mode";
     }

     typedef timestamp-type {
       type enumeration {
         enum ptp {
           value 1;
                   description "PTP.";
         }

         enum ntp {
           value 2;
                   description "NTP.";
         }

       }
         description "timestamp type";
     }

     container configuration {
       description "Configuration of alternate marking model Info.";
       container alternate-marking {
         description "alternate-marking flow configuration.";
         container admin-config {
           description "Global configuration.";
           leaf oam-status {
             type enumeration {
               enum disable {
                 value 0;
                 description "Disable OAM.";
               }

Graf, et al.            Expires 5 September 2024               [Page 21]
Internet-Draft           yang-alternate-marking               March 2024

               enum enable {
                 value 1;
                 description "Enable OAM.";
               }

             }

             default disable;
             description "The status of global OAM function.";
           }

           leaf label {
             type uint32 {
               range "18..239" {
                 description "The range of the label.";
               }

             }

             default 18;
                     description "The label ranges from 18 to 239(default:18).";

           }

         }
         container altmark-profiles {
          description "Alternate Marking profiles.";
           list altmark-profile {
             key profile-name;
             leaf profile-name {
               type string {
                 length 1..300;

               }

               description "Instance name.";
             }

             leaf altmark-flowmonid {
               type uint32 {
                 range 1..1048575 {
                   description "The range of flow id.";
                 }

               }
               description "The flow id to identify a specific flow,ranges from 1 to 1048575.";
             }

Graf, et al.            Expires 5 September 2024               [Page 22]
Internet-Draft           yang-alternate-marking               March 2024

             leaf node-action {
               type enumeration {
                 enum disable {
                   value 0;
                   description "The status of flow alternate marking is disable.";
                 }

                 enum enable {
                   value 1;
                   description "The status of flow alternate marking is enable.";
                 }

               }

               default enable;
               description "The status of flow alternate marking,including enable and disable(default:enable).";
             }

             leaf measurement-mode {
               type altmark-measurement-mode;

               description "The measure type of in-suit OAM,including e2e and trace(default:e2e).";
             }

             leaf period {
               type alternate-marking-period;

               default 30s;
               description "The period of flow coloring,including 1s,5s,10s,30s,60s,5min and 15min(default:30s).";
             }

             leaf protocol-type {
               type altmark-protocol-type;
               description " The carrier protocol where the AltMark is applied.";

             }

             leaf enable-loss-measurement {
               type enumeration {
                 enum disable {
                   value 0;
                   description "Disable LM.";
                 }

                 enum enable {
                   value 1;
                   description "Enable LM.";
                 }

Graf, et al.            Expires 5 September 2024               [Page 23]
Internet-Draft           yang-alternate-marking               March 2024

               }

               description "Loss measurement status,including enable and disable(default:disable).";
             }

             leaf enable-delay-measurement {
               type enumeration {
                 enum disable {
                   value 0;
                   description "Disable DM.";
                 }

                 enum enable {
                   value 1;
                   description "Enable DM.";
                 }

               }

               default disable;
               description "Delay measurement status,including enable and disable(default:disable).";

             }

             container filter {
               choice filter-type {
                 mandatory true;
                 description "Choose one flow type from ip and TE tunnel.";
                 case acl {
                   leaf acl-name {
                     type string {
                       length 1..31;

                     }

                     description "The Access Control Entry name is used to refer to an ACL specification.";
                   }

                 }

               }
               description "Choose one flow type from ip and TE tunnel.";

             }
               description "list.";
           }

         }

Graf, et al.            Expires 5 September 2024               [Page 24]
Internet-Draft           yang-alternate-marking               March 2024

       }

       container state {
         container altmark-info {
             leaf timestamp-type {
               type timestamp-type;
               description "Timestamp type.";

             }

             container available-interfaces {
              description "available interfaces.";
               list interface {
                 leaf ifname {
                   type string {
                     length 1..31;

                   }

                   description "The interface name of interface-list.";
                 }

                 key ifname;
                             description "list.";
               }

             }
          description "info.";

         }
          description "state.";

       }

     }
    }
   <CODE ENDS>

Authors' Addresses

   Thomas Graf
   Swisscom
   Binzring 17
   CH-8045 Zurich
   Switzerland
   Email: thomas.graf@swisscom.com

Graf, et al.            Expires 5 September 2024               [Page 25]
Internet-Draft           yang-alternate-marking               March 2024

   Minxue Wang
   China Mobile
   No.32 Xuanwumen west street
   Beijing
   100053
   China
   Email: wangminxue@chinamobile.com

   Giuseppe Fioccola
   Huawei
   Palazzo Verrocchio, Centro Direzionale Milano 2
   20054 Segrate (Milan)
   Italy
   Email: giuseppe.fioccola@huawei.com

   Tianran Zhou
   Huawei
   156 Beiqing Rd.
   Beijing
   100095
   China
   Email: zhoutianran@huawei.com

   Xiao Min
   ZTE Corporation
   Nanjing
   China
   Email: xiao.min2@zte.com.cn

   Jun Guo
   ZTE Corporation
   Nanjing
   China
   Email: guo.jun2@zte.com.cn

   Massimo Nilo
   Telecom Italia
   Via Reiss Romoli, 274
   10148 Torino
   Italy
   Email: massimo.nilo@telecomitalia.it

Graf, et al.            Expires 5 September 2024               [Page 26]
Internet-Draft           yang-alternate-marking               March 2024

   Liuyan Han
   China Mobile
   No.32 Xuanwumen west street
   Beijing
   100053
   China
   Email: hanliuyan@chinamobile.com

Graf, et al.            Expires 5 September 2024               [Page 27]