<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
<!-- generated by https://github.com/cabo/kramdown-rfc version 1.7.39 (Ruby 3.2.3) -->
<?rfc comments="yes"?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-yl-cats-data-model-08"
category="std" consensus="true" submissionType="IETF" updates="" tocInclude="true" sortRefs="true" symRefs="true"
version="3">
  <!-- xml2rfc v2v3 conversion 3.33.0 -->
  <front>
    <title abbrev="YANG Data Model for CATS">Data Model for Computing-Aware Traffic Steering (CATS)</title>
    <seriesInfo name="Internet-Draft" value="draft-yl-cats-data-model-08"/>
    
    <author initials="H." surname="Yao" fullname="Huijuan Yao">
      <organization>China Mobile</organization>
      <address>
        <postal>
          <street>No.32 XuanWuMen West Street</street>
          <city>Beijing</city>
          <code>100053</code>
          <country>China</country>
        </postal>
        <email>yaohuijuan@chinamobile.com</email>
      </address>
    </author>
    <author initials="C." surname="Lin" fullname="Changwang Lin">
      <organization>New H3C Technologies</organization>
      <address>
        <postal>
          <city>Beijing</city>
          <country>China</country>
        </postal>
        <email>linchangwang.04414@h3c.com</email>
      </address>
    </author>
    <author initials="Z." surname="Li" fullname="Zhenqiang Li">
      <organization>China Mobile</organization>
      <address>
        <postal>
          <country>China</country>
        </postal>
        <email>lizhenqiang@chinamobile.com</email>
      </address>
    </author>
    <author initials="Q." surname="Xiong" fullname="Quan Xiong">
      <organization>ZTE Corporation</organization>
      <address>
        <postal>
          <!-- <country>India</country> -->
        </postal>
        <email>xiong.quan@zte.com.cn</email>
      </address>
    </author>
    <author initials="L. M." surname="Contreras" fullname="Luis M. Contreras">
      <organization>Telefonica</organization>
      <address>
        <postal>
          <country>Spain</country>
        </postal>
        <email>luismiguel.contrerasmurillo@telefonica.com</email>
      </address>
    </author>
    <date year="2026"/>
    <area>Routing</area>
    <workgroup>CATS Working Group</workgroup>
    <keyword>CATS, YANG</keyword>
    <abstract>
<t>This document defines a YANG data model for the management of Computing-Aware Traffic Steering (CATS) systems.</t>
    </abstract>
  </front>
  <middle>

    <section anchor="introduction">
      <name>Introduction</name>
      <t><xref target="I-D.ietf-cats-framework"/> introduces a framework for Computing-Aware Traffic Steering (CATS).
      This document defines a YANG data model for managing the CATS system. The model extends the "ietf-routing"
      YANG model defined in <xref target="RFC8349"/>, is agnostic to specific protocol extensions, and conforms to the framework
      definition to serve as a critical diagnostic or control mechanism.</t>
      <section anchor="terminology">
        <name>Terminology</name>
      <t>The following terms as defined in <xref target="I-D.ietf-cats-framework"/> are used:</t>
      <ul spacing="normal">
        <li>
          <t>CS-ID: CATS Service ID.</t>
        </li>
        <li>
          <t>CSCI-ID: CATS Service Contact Instance ID.</t>
        </li>
        <li>
          <t>C-SMA: CATS Service Metric Agent.</t>
        </li>
        <li>
          <t>C-NMA: CATS Network Metric Agent.</t>
        </li>
        <li>
          <t>C-PS: CATS Path Selector.</t>
        </li>
        <li>
          <t>C-TC: CATS Traffic Classifier.</t>
        </li>
      </ul>
      <t>The new defined terms:</t>
      <ul spacing="normal">
        <li>
          <t>C-CIB: CATS Computing Information Base, as shown in <xref target="fig-cats-sys-arch"/>, responsible for
          maintaining CATS network computing information. Provides basic data for the C-SMA.</t>
        </li>
        <li>
          <t>C-NIB: CATS Network Information Base, as shown in <xref target="fig-cats-sys-arch"/>, responsible for
          maintaining CATS network information. Provides basic data for the C-NMA.</t>
        </li>
      </ul>
      </section>
      <section anchor="conventions">
        <name>Conventions Used in This Document</name>
        <t>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 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when, they appear in all
   capitals, as shown here.</t>
      </section>
      <section anchor="tree-diagrams">
        <name>Tree Diagrams</name>
        <t>Tree diagrams used in this document follow the notation defined in <xref target="RFC8340"/>.</t>
      </section>
      <section anchor="prefixes">
        <name>Prefixes in Data Node Names</name>
        <t>In this document, names of data nodes, actions, and other data model objects are often used
        without a prefix, as long as it is clear from the context in which YANG module each name is defined.
        Otherwise, names are prefixed using the standard prefix associated with the corresponding YANG module,
        as shown in <xref target="tab-prefixes"/>.</t>
        <table anchor="tab-prefixes">
          <name>Prefixes and Corresponding YANG Modules</name>
          <thead>
            <tr>
              <th align="left">Prefix</th>
              <th align="left">YANG module</th>
              <th align="left">Reference</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left">ip</td>
              <td align="left">ietf-ip</td>
              <td align="left">
                <xref target="RFC8344"/></td>
            </tr>
            <tr>
              <td align="left">rt</td>
              <td align="left">ietf-routing</td>
              <td align="left">
                <xref target="RFC8349"/></td>
            </tr>
            <tr>
              <td align="left">cats</td>
              <td align="left">ietf-cats</td>
              <td align="left">
                <xref target="design-of-cats-data-model"/></td>
            </tr>
            <tr>
              <td align="left">yang</td>
              <td align="left">ietf-yang-types</td>
              <td align="left">
                <xref target="RFC9911"/></td>
            </tr>
            <tr>
              <td align="left">inet</td>
              <td align="left">ietf-inet-types</td>
              <td align="left">
                <xref target="RFC9911"/></td>
            </tr>
          </tbody>
        </table>
      </section>
    </section>
    <section anchor="cats-system-overview">
      <name>CATS System Overview</name>
       <t>As defined in <xref target="I-D.ietf-cats-framework"/>, the CATS framework structure consists of the C-SMA
   (responsible for maintaining service metrics), the C-NMA (responsible for maintaining network metrics),
   the C-PS (responsible for maintaining forwarding table entries), and the C-TC (responsible for traffic
   classification), as shown in <xref target="fig-cats-sys-arch"/>.</t>
       <t>The C-CIB and C-NIB are defined in the management plane.</t>
      <figure anchor="fig-cats-sys-arch">
        <name>CATS System Architecture</name>
        <artwork><![CDATA[
      +----------------------------------+           +-------+
      | Management                       |           |       |
      | Plane   +------+----------+      |<=========>| C-SMA |
      |         |      |          |      |           |       |
      |         |   +--v---+   +--v---+  |           +--+----+
      |         |   |C-CIB |   |C-NIB |  |              |
      |         |   +---^--+   +--^---+  |              |
      |         |       |         |      |              |
      +---------|-------|---------|------+              |
      | Control |   +---v--+   +--v---+  |              |
      | Plane   |   |C-SMA |   |C-NMA |  |              |
      |         |   +------+   +------+  |              |
      |         |                        |              |
      |         |   +-------+            |              |
      |         +-->| C-PS  |            |              |
      |             +-------+            |              |
      +----------------------------------+              |
        /\                    /\                        |
        ||                    ||                        |
        \/                    \/                        |
+----------------+  +-----------------------+           |
|CATS Forwarder1 |  |CATS Forwarder2        |           |
|    +------+    |  |    +------+------+    |           +--------+
|    | C-TC |    |  |    | C-TC | C-PS |    |<=========>| +--------+
|    +------+    |  |    +------+--+---+    |           | |Service |
|                |  |              |        |           | |Contact |
+----------------+  |              |        |           +-|Instance|
                    |          +---+---+    |             +--------+
                    |          |       |    |                 |
                    |      +---+--+ +--+--+ |           +--------+
                    |      |C-SMA | |C-NMA| |           | +--------+
                    |      +------+ +-----+ |           | |Service |
                    +-----------------------+           +-|Instance|
                                                          +--------+

]]></artwork>
      </figure>
    </section>
    <section anchor="design-of-cats-data-model">
      <name>Design of CATS Data Model</name>
      <section anchor="model-scope">
      <name>Scope of Model</name>
      <t>The model covers CATS systems as described in <xref target="I-D.ietf-cats-framework"/>.
      This model can be used to manage CATS systems.</t>
      <t>The operational state data and statistics can be retrieved by this model. The subscription
      and push mechanism defined in <xref target="RFC8639"/> and <xref target="RFC8641"/> can be implemented by the user to
      subscribe to notifications on the data nodes in this model.</t>
      <t>The model contains all the basic configuration parameters to operate the CATS system.
      Depending on the implementation choices, some systems might not allow some of the advanced
      parameters to be configurable.</t>
      <t>Occasionally-implemented parameters are modeled as optional features in this model.
      This model can be extended, and it has been structured in a way that such extensions
      can be conveniently made.</t>
      </section>
      <section anchor="specification">
        <name>Specification</name>
        <t>This model imports from and augments the "ietf-routing" YANG model defined in <xref target="RFC8349"/>.
        Both configuration branch and state branch of <xref target="RFC8349"/> are augmented. The configuration
        branch covers node base and policy configuration. The container 'cats' is the top level
        container in this data model. The operational state data is combined with the associated
        configuration data in the same hierarchy <xref target="RFC8407"/>.</t>
      </section>
      <section anchor="model-structure">
        <name>Model Structure</name>
        <t>This document defines a YANG data model for the management of CATS corresponding data.
        The data model is applicable to the CATS system architecture in <xref target="fig-cats-sys-arch"/>.</t>
        <t>The CATS YANG model includes basic CATS objects, traffic-classifier objects,
        and service-metric objects. The model also includes YANG notifications.</t>
        <ul spacing="normal">
          <li>
            <t>The CATS base table provides interfaces for the functionality of the C-PS component,
            which can be used for communication between the Control Plane and the C-SMA, as well as
            for the interface between the Control Plane and the CATS Forwarder.</t>
          </li>
          <li>
            <t>The CATS traffic-classifier table provides interfaces for the functionality of the C-TC
            component, which can be used for communication between the Control Plane and the CATS Forwarder.
            The Control Plane can distribute directly CATS traffic-classifier table to the CATS Forwarder,
            allowing the CATS Forwarder to proactively select paths according to forwarding policies.</t>
          </li>
          <li>
            <t>The CATS service-metric table provides interfaces for the C-SMA component, which can be
            used for communication between the Control Plane and the CATS Forwarder, as well as for
            transmitting service metric information from the C-SMA to the Control Plane. It is also
            used for forwarding service metric information from the Control Plane to the CATS Forwarder.</t>
          </li>
          <li>
            <t>The CATS notification definitions are used by the management layer component and can be utilized
            for the CATS Forwarder to report events to the Control Plane.</t>
          </li>
        </ul>
        <t>The full tree diagram of the "ietf-cats" YANG module is provided in <xref target="full-tree"/>.
           And the <xref target="fig-yang-org-hier"/> is overall tree structure of the CATS YANG module:</t>
        <figure anchor="fig-yang-org-hier">
          <name>Yang Organization and Hierarchy</name>
          <artwork><![CDATA[
 module: ietf-cats
   augment /rt:routing:
     +--rw cats
        +--rw base
        |     ...
        |  
        +--rw traffic-classifiers
        |     ...
        |
        +--rw service-metrics
        |     ...
        |
        +---n metric-limit-exceeded
        |     ...
        +---n metric-limit-recovered
        |     ...
        +---n flow-limit-exceeded
        |     ...
        +---n flow-limit-recovered
              ...
          ]]></artwork>
        </figure>
        <section anchor="cats-base">
         <name>CATS Base</name>
           <figure anchor="fig-yang-base-tree">
             <name>Base Configuration Tree View</name>
             <artwork><![CDATA[
        +--rw base
        |  +--rw enable?              boolean
        |  +--rw update-interval?     uint32
        |  +--rw metric-limits?       uint32
        |  +--rw flow-limits?         uint32
        |  +--rw flow-timeout?        uint32
        |  +--rw notify-interval?     uint32
        |  +--rw service-policy* [cs-id]
        |     +--rw cs-id             cs-id
        |     +--rw policy-type?      enumeration
            ]]></artwork>
           </figure>
           <t>In the base shown in <xref target="fig-yang-base-tree"/>, you can set
           the 'enable' attribute to enable/disable CATS function on
           a per-device basis. When set to false, the CATS function component is shut down.</t>
           <t>You can set the 'update-interval' parameter to determine the interval at which
           the C-SMA notifies the C-PS of metric changes. The default value for this interval is 30 seconds.</t>
           <t>You can set the maximum number of metric table entries by configuring 'metric-limits'.</t>
           <t>You can set the maximum number of flow tables by configuring 'flow-limits'.</t>
           <t>When flow tables have been inactive for a long period of time, it is necessary to age
           out the stale state entries. This can be achieved by configuring 'flow-timeout' to control
           the aging time of flow tables.</t>
           <t>To prevent notification flooding when limits are reached and unreached in quick
           succession (flapping), you can configure 'notify-interval' to set the minimum time
           between consecutive notifications. The default value is 10 seconds.</t>
           <t>You can set the 'service-policy' table for traffic steering, which includes affinity-based,
           service-metric-based, network-metric-based, and combined service-metric and network-metric-based
           steering.</t>
        </section>
        <section anchor="cats-tc">
         <name> CATS Traffic-classifier</name>
           <figure anchor="fig-yang-tc-tree">
             <name>Traffic-classifier Tree View</name>
             <artwork><![CDATA[
        +--rw traffic-classifiers 
        |  +--rw traffic-classifier* [cs-id]
        |     +--rw cs-id                cs-id
        |     +--rw description?         string
        |     +--rw server-port?         uint16
        |     +--rw protocol?            uint8
        |     +--ro matched-packets?     yang:zero-based-counter64
        |     +--ro matched-bytes?       yang:zero-based-counter64
            ]]></artwork>
           </figure>
           <t>The CATS traffic-classifier table is used to define the features of the service
           and to classify the traffic, as shown in <xref target="fig-yang-tc-tree"/>.</t>
           <t>The 'cs-id' is used to uniquely identify a CATS service, and the 'description'
           serves to document its content.</t>
           <t>The 'server-port' defines the application port for a CATS service. This port
           number matches the destination port in the IP packets of data flows destined for the service.</t>
           <t>The 'protocol' defines the application transport protocol for a CATS service.
           This protocol number matches the protocol in the IP packets of data flows destined for the service.</t>
           <t>The 'matched-packets' and 'matched-bytes' indicate the statistics of traffic
           matching the specified service.</t>
        </section>
        <section anchor="cats-sm">
         <name>CATS Service-metric</name>
           <figure anchor="fig-yang-sm-tree">
             <name>Service-metric Tree View</name>
             <artwork><![CDATA[
        +--rw service-metrics
        |  +--rw service-metric* [cs-id csci-id source-type]
        |     +--rw cs-id               cs-id
        |     +--rw csci-id             csci-id
        |     +--rw source-type         identityref
        |     +--rw priority?           uint8
        |     +--rw affinity?           uint8
        |     +--rw location?           inet:ip-address
        |     +--rw metrics
        |     |  +--rw metric* [metric-type]
        |     |     +--rw metric-type       identityref
        |     |     +--rw metric-value?     uint32
        |     +--ro forwarded-packets?      yang:zero-based-counter64
        |     +--ro forwarded-bytes?        yang:zero-based-counter64
            ]]></artwork>
           </figure>
           <t>The CATS service-metric table is used to control the delivery service metrics
           on the control plane, as shown in <xref target="fig-yang-sm-tree"/>,
           thereby generating the forwarding table on the forwarding
           plane in conjunction with network metrics.</t>
           <t>The 'cs-id' is used to uniquely identify a CATS service, and the 'csci-id' is
           used to represent an instance of that service. The 'source-type' indicates the source
           protocol of this service metric information, such as a static protocol.</t>
           <t>The 'priority' indicates the priority of different service instances of the same
           service, and the 'affinity' indicates the affinity between this service and its
           service site.</t>
           <t>The 'location' indicates the IP address of the service site where this service
           instance resides. And the 'metrics' indicates different types of service metric values.</t>
           <t>The 'forwarded-packets' and 'forwarded-bytes' indicate the statistics of traffic
           forwarded by the specified service metric entry.</t>
        </section>
        <section anchor="cats-notify">
         <name>CATS Notify</name>
           <figure anchor="fig-yang-notify-tree">
             <name>Notify Tree View</name>
             <artwork><![CDATA[
        +---n metric-limit-exceeded
        |  +--ro timestamp      yang:date-and-time
        |  +--ro message        string
        +---n metric-limit-recovered
        |  +--ro timestamp      yang:date-and-time
        |  +--ro message        string
        +---n flow-limit-exceeded
        |  +--ro timestamp      yang:date-and-time
        |  +--ro message        string
        +---n flow-limit-recovered
           +--ro timestamp      yang:date-and-time
           +--ro message        string
            ]]></artwork>
           </figure>
           <t>Four notifications are defined to alert operators when metric or flow entry limits
           are exceeded or recovered:</t>
           <ul>
             <li><t>metric-limit-exceeded: Sent when the number of metric entries exceeds the
             configured maximum.</t></li>
             <li><t>metric-limit-recovered: Sent when the number of metric entries returns to or
             falls below the configured maximum.</t></li>
             <li><t>flow-limit-exceeded: Sent when the number of flow entries exceeds the configured
             maximum.</t></li>
             <li><t>flow-limit-recovered: Sent when the number of flow entries returns to or falls
             below the configured maximum.</t></li>
           </ul>
           <t>Each notification carries a timestamp indicating when the event occurred and a
           human-readable message that includes the configured maximum limit, as shown in
           <xref target="fig-yang-notify-tree"/>. Having separate notifications for each event
           type allows operators to better parse and route specific events. To prevent
           notification flooding caused by rapid state changes (flapping), the 'notify-interval'
           parameter in the base configuration can be used to set the minimum time between
           consecutive notifications.</t>
        </section>
      </section>
    </section>
    <section anchor="cats-yang-module">
        <name>CATS YANG Module</name>
        <sourcecode type="yang" markers="true" name="ietf-cats@2026-06-25.yang"><![CDATA[
module ietf-cats {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:ietf-cats";
  prefix cats;

  import ietf-routing {
    prefix rt;
    reference
      "RFC 8349: A YANG Data Model for Routing
                 Management (NMDA Version)";
  }

  import ietf-inet-types {
    prefix inet;
    reference
      "RFC 9911: Common YANG Data Types, Section 4";
  }

  import ietf-yang-types {
    prefix yang;
    reference
      "RFC 9911: Common YANG Data Types, Section 3";
  }

  organization
    "IETF Computing-Aware Traffic Steering (CATS) Working Group";

  contact
    "WG Web:  https://datatracker.ietf.org/group/cats
     WG List: CATS <mailto:cats@ietf.org>

     Editor:  Huijuan Yao
              <mailto:yaohuijuan@chinamobile.com>
     Editor:  Changwang Lin
              <mailto:linchangwang.04414@h3c.com>
     Editor:  Zhenqiang Li
              <mailto:lizhenqiang@chinamobile.com>
     Editor:  Quan Xiong
              <mailto:xiong.quan@zte.com.cn>
     Editor:  Luis M. Contreras
              <mailto:luismiguel.contrerasmurillo@telefonica.com>";

  description
    "This module describes a YANG model for managing the CATS
     system.

     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) 2026 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).

     All revisions of IETF and IANA published modules can be found
     at the YANG Parameters registry group
     (https://www.iana.org/assignments/yang-parameters).

     This version of this YANG module is part of RFC XXXX; see the
     RFC itself for full legal notices.";

  revision 2026-06-25 {
    description
      "Initial Version";
    reference
      "RFC XXXX: YANG Data Model for CATS";
   }

  typedef cs-id {
    type union {
      type uint32;
      type inet:ipv4-address;
      type inet:ipv6-address;
    }
    description
      "This type defines the CATS Service ID (CS-ID),
       which uniquely identifies a service.";
    reference
      "draft-ietf-cats-framework: A Framework for Computing-Aware
                                  Traffic Steering (CATS)";
  }

  typedef csci-id {
    type union {
      type uint32;
      type inet:ipv4-address;
      type inet:ipv6-address;
    }
    description
      "This type defines the CATS Service Contact Instance ID
       (CSCI-ID), which uniquely identifies a service contact
       instance.";
    reference
      "draft-ietf-cats-framework: A Framework for Computing-Aware
                                  Traffic Steering (CATS)";
  }

  /*
   * Identities for source-type
   */
  identity source-type-base {
    description
      "Base identity for source types of service computing metrics.";
  }

  identity source-type-static {
    base source-type-base;
    description
      "Static configuration. This identity is used when the
       service metric information is configured statically
       (not learned from a dynamic protocol).";
  }

  /*
   * Identities for metric-type
   */
  identity metric-type-base {
    description
      "Base identity for service metric types.";
  }

  identity metric-delay {
    base metric-type-base;
    description
      "Transmission delay metric. The metric value is the delay
       time in milliseconds.";
  }

  identity metric-service-ratio {
    base metric-type-base;
    description
      "Service capacity ratio metric. The metric value is the
       current capacity percentage.";
  }

  identity metric-memory-ratio {
    base metric-type-base;
    description
      "Memory utilization metric. The metric value is the current
       memory utilization percentage.";
  }

  grouping service-policy-type {
    description
      "Service policy type";
    leaf policy-type {
      type enumeration {
        enum base-on-affinity {
          value 0;
          description "Base on affinity";
        }
        enum base-on-sm-only {
          value 1;
          description "Base on service metric only";
        }
        enum base-on-nm-only {
          value 2;
          description "Base on network metric only";
        }
        enum base-on-sm-nm {
          value 3;
          description 
            "Base on the combination of service metric and network
             metric";
        } 
      }
      description "Service policy type";
    }
  }

  augment "/rt:routing" {
    description
      "This augments the CATS configuration.";
    container cats {
      description
        "Support for the CATS configuration.";
      container base {
        description
          "CATS base configuration.";
        leaf enable {
          type boolean;
          description
            "Enable CATS";
        }
        leaf update-interval {
          type uint32;
          units "seconds";
          default "30";
          description
            "Update interval of CATS metric. A value of 0
             indicates that metrics are sent only when a
             significant change occurs and not on a periodic
             basis.";
        }
        leaf metric-limits {
          type uint32;
          description
            "The maximum number of metric table entries that
             can be maintained by the device. This limit prevents
             resource exhaustion. The actual maximum value is
             implementation-dependent and should be documented by the
             vendor. A value of 0 indicates no configured limit
             (subject to device capacity).";
        }
        leaf flow-limits {
          type uint32;
          description
            "The maximum number of flow table entries that
             can be maintained by the device. This limit prevents
             resource exhaustion. The actual maximum value is
             implementation-dependent and should be documented by the
             vendor. A value of 0 indicates no configured limit
             (subject to device capacity).";
        }
        leaf flow-timeout {
          type uint32;
          units "seconds";
          default "120";
          description
            "CATS flow timeout when no flow. A value of 0 means
             that the flow does not time out due to inactivity
             (i.e., infinite timeout), and must be terminated
             explicitly (e.g., via signaling or administrative
             action).";
        }
        leaf notify-interval {
          type uint32;
          units "seconds";
          default "10";
          description
            "The minimum interval between consecutive notifications.
             This is used to prevent notification flooding when
             limits are reached and unreached in quick succession
             (flapping). A value of 0 means notifications are
             sent immediately without rate limiting.";
        }
        list service-policy {
          key "cs-id";
          description
            "CATS service policy configuration for traffic steering.
             Each entry defines the policy type for a specific
             service identified by cs-id.";
          leaf cs-id {
            type cs-id;
            description
              "The CATS Service ID (CS-ID) that uniquely
               identifies a service. This identifier is used
               by clients to access the service.";
            reference
              "draft-ietf-cats-framework: A Framework for
                                          Computing-Aware Traffic
                                          Steering (CATS)";
          }
          uses service-policy-type;
        }
      }

      container traffic-classifiers {
        description
          "CATS traffic-classifier entries for classifying
           traffic by service. Each entry defines the matching
           criteria for a specific service identified by cs-id.";
        list traffic-classifier {
          key "cs-id";
          description
            "A traffic classifier entry for a specific service.
             The cs-id uniquely identifies the service to be
             classified.";
          leaf cs-id {
            type cs-id;
            description
              "The CATS Service ID (CS-ID) that uniquely
               identifies a service.";
            reference
              "draft-ietf-cats-framework: A Framework for
                                          Computing-Aware Traffic
                                          Steering (CATS)";
          }
          leaf description {
            type string;
            description
              "A human-readable description of this service
               (e.g., 'http', 'video-streaming').";
          }
          leaf server-port {
            type uint16;
            description
              "Server-port of the service, matches the
               destination port in the IP packets of data
               flows destined for the service.";
          }
          leaf protocol {
            type uint8;
            description
              "The IP protocol number of the service. This value
               matches the protocol field in the IP header of data
               flows destined for the service. Common values include:
               6 (Transmission Control Protocol), 17 (User Datagram
               Protocol), and 132 (Stream Control Transmission
               Protocol).";
            reference
              "IANA: Protocol Numbers Registry
                     <https://www.iana.org/assignments/
                     protocol-numbers/>";
          }
          leaf matched-packets {
            type yang:zero-based-counter64;
            config false;
            description
              "The number of packets matching the specified
               service.";
          }
          leaf matched-bytes {
            type yang:zero-based-counter64;
            config false;
            description
              "The number of bytes in packets matching the specified
               service.";
          }
        }
      }

      container service-metrics {
        description
          "CATS service metric entries for controlling
           delivery of service metrics from the control plane
           to the forwarding plane.";
        list service-metric {
          key "cs-id csci-id source-type";
          description
            "A service metric entry for a specific service
             instance. The combination of cs-id, csci-id,
             and source-type uniquely identifies a service
             metric entry.";
          leaf cs-id {
            type cs-id;
            description
              "The CATS Service ID (CS-ID) that uniquely
               identifies a service.";
            reference
              "draft-ietf-cats-framework: A Framework for
                                          Computing-Aware Traffic
                                          Steering (CATS)";
          }
          leaf csci-id {
            type csci-id;
            description
              "The CATS Service Contact Instance ID (CSCI-ID)
               that uniquely identifies a specific service contact
               instance.";
            reference
              "draft-ietf-cats-framework: A Framework for
                                          Computing-Aware Traffic
                                          Steering (CATS)";
          }
          leaf source-type {
            type identityref {
              base source-type-base;
            }
            description
              "The source type of the service computing metric.
               Indicates how the metric information was learned.
               The base identity 'source-type-base' can be extended
               by other modules to define additional source types.";
          }
          leaf priority {
            type uint8;
            description
              "The server priority. The smaller the value,
               the higher the priority (i.e., 0 is the highest
               priority). This convention follows common practice
               in networking protocols (e.g., IP precedence,
               administrative distance).";
          }
          leaf affinity {
            type uint8;
            description
              "The server affinity. The higher the value,
               the higher the affinity (i.e., 0 is the lowest
               affinity). This convention follows common practice
               for affinity or weight metrics in load balancing.";
          }
          leaf location {
            type inet:ip-address;
            description
              "The IPv4 or IPv6 address of the service site where
               this service contact instance resides. This address
               represents the logical location of the service in
               the network topology. CATS-enabled routers use this
               location information to compute network distances
               and make steering decisions based on proximity to
               the service instance.";
          }
          container metrics {
            description
              "Service metrics for the service contact instance.
               Each metric entry carries a metric type and its
               associated value.";
            list metric {
              key "metric-type";
              description "A service metric of a specific type.";
              leaf metric-type {
                type identityref {
                  base metric-type-base;
                }
                description
                  "The type of the service metric. The base identity
                   'metric-type-base' can be extended by other
                   modules to define additional metric types.";
                reference
                  "draft-ietf-cats-metric-definition: CATS Metrics
                                                      Definition";
              }
              leaf metric-value {
                type uint32;
                description "The value of the service metric.";
              }
            }
          }
          leaf forwarded-packets {
            type yang:zero-based-counter64;
            config false;
            description
              "The number of packets forwarded by the specified
               service";
          }
          leaf forwarded-bytes {
            type yang:zero-based-counter64;
            config false;
            description
              "The number of bytes in packets forwarded by the
               specified service";
          }
        }
      }
      notification metric-limit-exceeded {
        description
          "Event notification sent when the number of metric
           entries exceeds the configured maximum limit.";
        leaf timestamp {
          type yang:date-and-time;
          mandatory true;
          description
            "The time when the metric limit was exceeded.";
        }
        leaf message {
          type string;
          mandatory true;
          description
            "A human-readable message describing the event,
             including the configured maximum limit.";
        }
      }
      notification metric-limit-recovered {
        description
          "Event notification sent when the number of metric
           entries returns to or falls below the configured
           maximum limit after having exceeded it.";
        leaf timestamp {
          type yang:date-and-time;
          mandatory true;
          description
            "The time when the metric limit was recovered.";
        }
        leaf message {
          type string;
          mandatory true;
          description
            "A human-readable message describing the event,
             including the configured maximum limit.";
        }
      }
      notification flow-limit-exceeded {
        description
          "Event notification sent when the number of flow
           entries exceeds the configured maximum limit.";
        leaf timestamp {
          type yang:date-and-time;
          mandatory true;
          description
            "The time when the flow limit was exceeded.";
        }
        leaf message {
          type string;
          mandatory true;
          description
            "A human-readable message describing the event,
             including the configured maximum limit.";
        }
      }
      notification flow-limit-recovered {
        description
          "Event notification sent when the number of flow
           entries returns to or falls below the configured
           maximum limit after having exceeded it.";
        leaf timestamp {
          type yang:date-and-time;
          mandatory true;
          description
            "The time when the flow limit was recovered.";
        }
        leaf message {
          type string;
          mandatory true;
          description
            "A human-readable message describing the event,
             including the configured maximum limit.";
        }
      }
    }
  }
}
        ]]></sourcecode>
    </section>
    <section anchor="operational-considerations">
      <name>Operational Considerations</name>
      <t>This section provides operational considerations for implementing
      and deploying the CATS YANG data model.</t>
      <section anchor="installation-and-configuration">
        <name>Installation and Configuration</name>
        <t>When deploying the CATS YANG model, operators should configure the
        'update-interval' parameter to balance responsiveness against control
        plane load. The 'metric-limits' and 'flow-limits' parameters should be
        set based on expected service scale and available device resources.</t>
      </section>
      <section anchor="monitoring">
        <name>Monitoring</name>
        <t>The CATS YANG model provides read-only state data nodes for monitoring:
        'matched-packets' and 'matched-bytes' for traffic classification statistics,
        and 'forwarded-packets' and 'forwarded-bytes' for service forwarding
        statistics. The 'notify-interval' parameter helps prevent notification
        flooding during unstable conditions.</t>
      </section>
      <section anchor="migration-considerations">
        <name>Migration Considerations</name>
        <t>CATS can be incrementally deployed alongside traditional forwarding.
        The CATS model augments the ietf-routing model without replacing it,
        allowing for gradual migration.</t>
      </section>
    </section>
    <section anchor="security-considerations">
      <name>Security Considerations</name>
      <t>This section is modeled after the template described in Section 3.7.1
      of <xref target="RFC9907"/>.</t>

      <t>The "ietf-cats" YANG module defines a data model that is designed to be accessed
      via YANG-based management protocols, such as the Network Configuration Protocol
      (NETCONF) <xref target="RFC6241"/> and RESTCONF <xref target="RFC8040"/>.
      These YANG-based management protocols (1) have to use a secure transport layer
      (e.g., Secure Shell (SSH) <xref target="RFC4252"/>, TLS <xref target="RFC8446"/>,
      and QUIC <xref target="RFC9000"/>) and (2) have to use mutual authentication.</t>

      <t>The Network Configuration Access Control Model (NACM) <xref target="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.</t>

      <t>There are a number of data nodes defined in this YANG module
      that are writable/creatable/deletable (i.e., "config true", which is the default).
      All writable data nodes are likely to be sensitive or vulnerable in some network environments.
      Write operations (e.g., edit-config) and delete operations to these data nodes without
      proper protection or authentication can
      have a negative effect on network operations. The following subtrees and data nodes have particular
      sensitivities/vulnerabilities:</t>
      <ul spacing="normal">
        <li>
          <t>/cats:base/cats:enable</t>
        </li>
        <li>
          <t>/cats:base/cats:update-interval</t>
        </li>
        <li>
          <t>/cats:base/cats:metric-limits</t>
        </li>
        <li>
          <t>/cats:base/cats:flow-limits</t>
        </li>
        <li>
          <t>/cats:base/cats:flow-timeout</t>
        </li>
        <li>
          <t>/cats:base/cats:service-policy/cats:cs-id</t>
        </li>
        <li>
          <t>/cats:base/cats:service-policy/cats:policy-type</t>
        </li>
        <li>
          <t>/cats:traffic-classifiers/cats:traffic-classifier/cats:cs-id</t>
        </li>
        <li>
          <t>/cats:traffic-classifiers/cats:traffic-classifier/cats:description</t>
        </li>
        <li>
          <t>/cats:traffic-classifiers/cats:traffic-classifier/cats:server-port</t>
        </li>
        <li>
          <t>/cats:traffic-classifiers/cats:traffic-classifier/cats:protocol</t>
        </li>
        <li>
          <t>/cats:service-metrics/cats:service-metric/cats:cs-id</t>
        </li>
        <li>
          <t>/cats:service-metrics/cats:service-metric/cats:csci-id</t>
        </li>
        <li>
          <t>/cats:service-metrics/cats:service-metric/cats:source-type</t>
        </li>
        <li>
          <t>/cats:service-metrics/cats:service-metric/cats:priority</t>
        </li>
        <li>
          <t>/cats:service-metrics/cats:service-metric/cats:affinity</t>
        </li>
        <li>
          <t>/cats:service-metrics/cats:service-metric/cats:location</t>
        </li>
        <li>
          <t>/cats:service-metrics/cats:service-metric/cats:metrics/cats:metric/cats:metric-type</t>
        </li>
        <li>
          <t>/cats:service-metrics/cats:service-metric/cats:metrics/cats:metric/cats:metric-value</t>
        </li>
      </ul>
      <t>For these augmentations to ietf-routing.yang, the ability to delete, add,
      and modify CATS base configuration, traffic classifier configuration and service
      metric configuration would allow traffic to be misrouted.</t>

      <t>Some of the readable data nodes in this YANG module may be considered
      sensitive or vulnerable in some network environments. It is thus important to control
      read access (e.g., via get, get-config, or notification) to these data nodes.
      Specifically, the following subtrees and data nodes have particular sensitivities/vulnerabilities:</t>
      <ul spacing="normal">
        <li>
          <t>/cats:traffic-classifiers/cats:traffic-classifier/cats:matched-packets</t>
        </li>
        <li>
          <t>/cats:traffic-classifiers/cats:traffic-classifier/cats:matched-bytes</t>
        </li>
        <li>
          <t>/cats:service-metrics/cats:service-metric/cats:forwarded-packets</t>
        </li>
        <li>
          <t>/cats:service-metrics/cats:service-metric/cats:forwarded-bytes</t>
        </li>
        <li>
          <t>/cats:metric-limit-exceeded</t>
        </li>
        <li>
          <t>/cats:metric-limit-recovered</t>
        </li>
        <li>
          <t>/cats:flow-limit-exceeded</t>
        </li>
        <li>
          <t>/cats:flow-limit-recovered</t>
        </li>
      </ul>
      <t>Exposing the notification will expose the CATS table information of the network device.
      This may be undesirable due to the fact that such exposure may facilitate other attacks.
      Additionally, network operators MAY consider their CATS table information to be sensitive
      confidential data.</t>
      <t>All the security considerations for writable and readable data nodes defined
      in <xref target="RFC8349"/> apply to the augmentations described herein.</t>

      <t>There are no particularly sensitive RPC or action operations.</t>
    </section>
    <section anchor="iana-considerations">
      <name>IANA Considerations</name>
      <t>The IANA is requested to assign the following URI in the "IETF XML Registry"
      <xref target="RFC3688"/>:</t>
      <artwork type="ascii-art"><![CDATA[
   URI: urn:ietf:params:xml:ns:yang:ietf-cats
   Registrant Contact: The IESG.
   XML: N/A; the requested URI is an XML namespace.
      ]]></artwork>
      <t>This document registers the following YANG module in the "YANG Module Names"
      registry <xref target="RFC6020"/>:</t>
      <artwork type="ascii-art"><![CDATA[
   Name:  ietf-cats
   Maintained by IANA?  N
   Namespace:  urn:ietf:params:xml:ns:yang:ietf-cats
   Prefix:  cats
   Reference:  RFC XXXX
      ]]></artwork>
    </section>
    <!-- <section anchor="acknowledgements">
      <name>Acknowledgements</name>
    </section> -->
  </middle>
  <back>
    <references anchor="sec-combined-references">
      <name>References</name>
      <references anchor="sec-normative-references">
        <name>Normative References</name>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.3688.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6020.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8344.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8349.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8407.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8639.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8641.xml"/>
        <reference anchor="RFC9911" target="https://www.rfc-editor.org/info/rfc9911">
          <front>
            <title>Common YANG Data Types</title>
            <author initials="J." surname="Schoenwaelder" fullname="Juergen Schoenwaelder" role="editor">
              <organization/>
            </author>
            <date year="2025" month="December"/>
          </front>
          <refcontent>RFC 9911, DOI 10.17487/RFC9911</refcontent>
        </reference>
      </references>
      <references anchor="sec-informative-references">
        <name>Informative References</name>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4252.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6241.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8040.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8340.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8341.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8446.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9000.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9907.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml3/reference.I-D.ietf-cats-framework.xml"/>
      </references>
    </references>

    <section anchor="full-tree">
      <name>Full Tree</name>
      <artwork type="ascii-art"><![CDATA[
module: ietf-cats
  augment /rt:routing:
    +--rw cats
       +--rw base
       |  +--rw enable?            boolean
       |  +--rw update-interval?   uint32
       |  +--rw metric-limits?     uint32
       |  +--rw flow-limits?       uint32
       |  +--rw flow-timeout?      uint32
       |  +--rw notify-interval?   uint32
       |  +--rw service-policy* [cs-id]
       |     +--rw cs-id          cs-id
       |     +--rw policy-type?   enumeration
       +--rw traffic-classifiers
       |  +--rw traffic-classifier* [cs-id]
       |     +--rw cs-id              cs-id
       |     +--rw description?       string
       |     +--rw server-port?       uint16
       |     +--rw protocol?          uint8
       |     +--ro matched-packets?   yang:zero-based-counter64
       |     +--ro matched-bytes?     yang:zero-based-counter64
       +--rw service-metrics
       |  +--rw service-metric* [cs-id csci-id source-type]
       |     +--rw cs-id                cs-id
       |     +--rw csci-id              csci-id
       |     +--rw source-type          identityref
       |     +--rw priority?            uint8
       |     +--rw affinity?            uint8
       |     +--rw location?            inet:ip-address
       |     +--rw metrics
       |     |  +--rw metric* [metric-type]
       |     |     +--rw metric-type     identityref
       |     |     +--rw metric-value?   uint32
       |     +--ro forwarded-packets?   yang:zero-based-counter64
       |     +--ro forwarded-bytes?     yang:zero-based-counter64
       +---n metric-limit-exceeded
       |     +--ro timestamp      yang:date-and-time
       |     +--ro message        string
       +---n metric-limit-recovered
       |     +--ro timestamp      yang:date-and-time
       |     +--ro message        string
       +---n flow-limit-exceeded
       |     +--ro timestamp      yang:date-and-time
       |     +--ro message        string
       +---n flow-limit-recovered
              +--ro timestamp     yang:date-and-time
              +--ro message       string
      ]]></artwork>
    </section>

    <section anchor="contributors" numbered="false" toc="include" removeInRFC="false">
      <name>Contributors</name>
      <t>TBD</t>
      <!-- <contact initials="x." surname="xxx" fullname="xxxxxx">
        <organization>xxx</organization>
        <address>
          <postal>
            <country>xxx</country>
          </postal>
          <email>xxx</email>
        </address>
      </contact> -->
    </section>
  </back>

</rfc>
