<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rfc>
<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="3"?>
<?rfc tocindent="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<rfc category="std" docName="draft-ietf-netconf-udp-notif-25"
     ipr="trust200902" consensus="true" submissionType="IETF"
     xmlns:xi="http://www.w3.org/2001/XInclude">
  <front>
    <title abbrev="UDP-Notif">UDP-based Transport for Configured
    Subscriptions</title>

    <author fullname="Alex Huang Feng" initials="A." surname="Huang-Feng">
      <organization>INSA-Lyon</organization>
      <address>
        <postal>
          <street/>
          <city>Lyon</city>
          <region/>
          <code/>
          <country>France</country>
        </postal>
        <phone/>
        <facsimile/>
        <email>alex.huang-feng@insa-lyon.fr</email>
        <uri/>
      </address>
    </author>

    <author fullname="Pierre Francois" initials="P." surname="Francois">
      <organization>INSA-Lyon</organization>
      <address>
        <postal>
          <street/>
          <city>Lyon</city>
          <region/>
          <code/>
          <country>France</country>
        </postal>
        <phone/>
        <facsimile/>
        <email>pierre.francois@insa-lyon.fr</email>
        <uri/>
      </address>
    </author>

    <author fullname="Tianran Zhou" initials="T." surname="Zhou">
      <organization>Huawei</organization>
      <address>
        <postal>
          <street>156 Beiqing Rd., Haidian District</street>
          <city>Beijing</city>
          <region/>
          <code/>
          <country>China</country>
        </postal>
        <phone/>
        <facsimile/>
        <email>zhoutianran@huawei.com</email>
        <uri/>
      </address>
    </author>

    <author fullname="Thomas Graf" initials="T." surname="Graf">
      <organization>Swisscom</organization>
      <address>
        <postal>
          <street>Binzring 17</street>
          <city>Zuerich 8045</city>
          <region/>
          <code/>
          <country>Switzerland</country>
        </postal>
        <phone/>
        <facsimile/>
        <email>thomas.graf@swisscom.com</email>
        <uri/>
      </address>
    </author>

    <author fullname="Paolo Lucente" initials="P." surname="Lucente">
      <organization>NTT</organization>
      <address>
        <postal>
          <street>Siriusdreef 70-72</street>
          <city>Hoofddorp, WT 2132</city>
          <region/>
          <code/>
          <country>NL</country>
        </postal>
        <phone/>
        <facsimile/>
        <email>paolo@ntt.net</email>
        <uri/>
      </address>
    </author>

    <date day="29" month="January" year="2026"/>

    <workgroup>NETCONF</workgroup>

    <abstract>
      <t>This document describes a UDP-based transport for YANG notifications
      to collect data from network nodes within a controlled environment. A shim header is defined to
      facilitate the data streaming directly from a publishing process on a network
      device to telemetry receivers. Such a design enables higher frequency
      updates and less performance overhead on publisher and receiver processes compared to
      already established notification mechanisms. A YANG data model is also defined 
      for management of the described UDP-based transport.</t>
    </abstract>
  </front>

  <middle>
    <section title="Introduction">
      <t>The mechanism to support a subscription of a continuous and
      customized stream of updates from a YANG datastore <xref
      target="RFC8342"/> is defined in Subscribed Notifications <xref target="RFC8639"/>
      and YANG-Push <xref target="RFC8641"/>. 
      <!-- Requirements for
      Subscription to YANG Datastores are defined in <xref
      target="RFC7923"/>. -->
      </t>

      <t>Subscribed Notifications <xref target="RFC8639"/> separate the management and control
      of subscriptions from the transport used to deliver the data. Three transport mechanisms,
      namely <xref target="RFC8640">NETCONF transport</xref>, <xref
      target="RFC8650">RESTCONF transport</xref>, and <xref
      target="I-D.ietf-netconf-https-notif">HTTPS transport</xref> were
      defined for such notification messages.</t>

      <t>While powerful in their features, and general in their architecture,
      the currently available transport mechanisms need to be complemented to
      support data publications at high frequency with low overhead used within
			a controlled environment such as management networks. This is
      important for network nodes that feature a distributed architecture with sparse
      resources on components specialized for packet forwarding. The currently
      available transports are TCP-based requiring the maintenance of connections,
      states and retransmissions, which is not necessary for high-frequency continuous
      notification content, typically published directly from network processors on line cards.</t>

      <t>This document specifies a transport option for Configured Subscriptions as defined in 
      <xref target="RFC8639" section="2.5"/> that leverages UDP. Specifically, it facilitates the
      distributed data collection mechanism described in <xref
      target="I-D.ietf-netconf-distributed-notif"/>. In the case of publishing
      from multiple network processors on multiple line cards, centralized
      designs require data to be internally forwarded from those network
      processors to the push server, presumably on a route processor, which
      then combines the individual data items into a single consolidated
      stream. The centralized data collection mechanism can result in a
      performance bottleneck, especially when large amounts of data are
      involved.</t>

      <t>What is needed is a mechanism that allows for directly publishing
      from multiple network processors on line cards, without passing them
      through an additional processing stage for internal consolidation. The
      UDP-based transport allows for such a distributed data
      publishing approach:</t>

      <list style="symbols">
        <t>Firstly, a UDP approach reduces the burden of maintaining a large
        pool of active TCP connections at the receiver, notably in cases
        where it collects data from network processors on line cards from a
        large number of network nodes.</t>

        <t>Secondly, as no connection state needs to be maintained, UDP
        encapsulation could be implemented by the hardware of the
        publisher, which further improves performance.</t>

        <t>Ultimately, such advantages allow for a larger data analysis
        feature set, as more voluminous, finer grained data sets can be
        streamed to the receiver.</t>
      </list>

      <t>The transport described in this document can be used for transmitting
      notification messages over both IPv4 and IPv6. It is designed to be used
      in cases where packet loss is not a concern, such as the collection of statistical
      metrics that are exported periodically. This transport can be configured
      via NETCONF <xref target="RFC6241"/> or RESTCONF <xref target="RFC8040"/>.</t>

      <t>This document describes the notification mechanism. It is intended to
      be used in conjunction with <xref target="RFC8639"/>, extended by <xref
      target="I-D.ietf-netconf-distributed-notif"/>. Additionally, 
      this document defines a YANG data model for management of the UDP-based transport.
      The YANG module specified in this document is compliant with Network Management
      Datastore Architecture (NMDA) <xref target="RFC8342"/>.</t>

      <t><xref target="sec_ups_transport"/> details the
      notification mechanism and message format. <xref target="sec_options"/>
      describes the use of options in the notification message header. <xref
      target="sec_applicability"/> covers the applicability of the
      mechanism. <xref target="sec_dtls_udp_notif"/> describes a mechanism to
      secure the protocol in open networks. Finally, <xref target="yang-model-general"/>
      defines a YANG data model for management of the mechanism described in this document.</t>

    </section>

    <section title="Terminology">
      <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>

      <t>The following terms are used as defined in Subscribed Notifications <xref target="RFC8639"/>:</t>
      <ul>
        <li>Notification message</li>
        <li>Subscription</li>
        <li>Configured Subscription</li>
        <li>Subscriber</li>
        <li>Publisher</li>
        <li>Receiver</li>
      </ul>

      <t>The following term is used as defined in <xref target="I-D.ietf-netconf-distributed-notif"/>:</t>
      <ul>
        <li>Message Publisher ID</li>
      </ul>

      <t>This document defines the following term:</t>
      <ul>
        <li>Message ID: identifier of a message transported by the UDP-Notif protocol.
        More details are presented in <xref target="sec_ups_format"/>.</li>
      </ul>
    </section>

    <!-- <section anchor="sec_transport"
             title="Configured Subscription to UDP-Notif"> -->
      <!-- <t>This section describes how the proposed mechanism can be controlled
      using subscription channels based on NETCONF or RESTCONF.</t>

      <t>Configured subscriptions, as defined in <xref target="RFC8639" section="2.5">
      Subscribed Notifications</xref>, contain the transport configuration of all
      the receivers. This document introduces a receiver instance dedicated
      to UDP-Notif, specifying the IP address and port number used for sending UDP-Notif
      messages to the designated receivers.</t>

      <t>Note that receivers may not be already up and running when the
      configuration of the subscription takes effect on a monitored network
      node. The first message generated by the publisher MUST be a separate
      "subscription-started" notification to indicate to the receiver that the stream has started
      flowing. Then, the notifications can be sent immediately without delay.
      Subscription state notifications, defined in Section 2.7 of
      <xref target="RFC8639"/>, MUST be encapsulated in separate notification
      messages.</t>
      <t>Note also that publishers MAY NOT be aware of the capabilities supported by the receivers.
      </t> -->

    <!-- </section> -->

    <section anchor="sec_ups_transport" title="UDP-Based Transport">
      <t>This section specifies the UDP-Notif transport behavior. <xref
      target="sec_design"/> describes the general design of the solution.
      <xref target="sec_ups_format"/> specifies the UDP-Notif message format
      and <xref target="sec_encoding"/> describes the encoding of the message
      payload.</t>

      <section anchor="sec_design" title="Design Overview">
        <t>As specified in <xref target="RFC8639" section="2.6">Subscribed Notifications</xref>,
        the content of a YANG notification is encapsulated in a notification message, which is then
        encapsulated and carried using a transport protocol. <xref
        target="fig_ups_message"/> illustrates the structure of a UDP-Notif
        message:</t>

        <list style="symbols">
          <t>The Message Header contains information that facilitates the
          message transmission before deserializing the notification
          message.</t>

          <t>The Notification Message is the encoded content that is transported
          by the publication stream. The common encoding methods are listed
          in <xref target="sec_ups_format"/>. The structure of the
          notification message is defined in Section 2.6 of <xref
          target="RFC8639">Subscribed Notifications</xref>.
          <!-- and a YANG model has been proposed in <xref
          target="I-D.ahuang-netconf-notif-yang"/>.
          <xref target="I-D.ietf-netconf-notification-messages"/> proposes a
          structure to send bundled notifications in a single message. -->
          </t>
        </list>

        <figure anchor="fig_ups_message" title="UDP-Notif Message Overview">
            <artwork align="center"><![CDATA[
+-------+  +--------------+  +--------------+
|  UDP  |  |   Message    |  | Notification |
|       |  |   Header     |  | Message      |
+-------+  +--------------+  +--------------+
]]></artwork>
        </figure>

      <t>When a publisher starts streaming UDP-Notif messages, the first message
      generated by the publisher MUST be a separate "subscription-started" notification
      to indicate to the receiver that the stream has started
      flowing. Then, the notifications can be sent immediately without delay.
      Subscription state notifications, defined in Section 2.7 of
      <xref target="RFC8639"/>, MUST be encapsulated in separate notification
      messages.</t>

      <t>Note that receivers collecting UDP-Notif messages may not be already up and running when the
      configuration of the subscription takes effect on a monitored network
      node. 
      </t>
      <!-- <t>Note also that publishers MAY NOT be aware of the capabilities supported by the receivers.</t> -->
      </section>

      <section anchor="sec_ups_format"
               title="Format of the UDP-Notif Message Header">
        <t>The UDP-Notif message header contains information that facilitates
        the message transmission between the publisher and the receiver before
        deserializing the notification message. The data format is shown in <xref
        target="fig_ups_header"/>.</t>

        <figure anchor="fig_ups_header"
                title="UDP-Notif Message Header Format">
          <artwork align="center"><![CDATA[
  0                   1                   2                   3
  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
 +-----+-+-------+---------------+-------------------------------+
 | Ver |S|  MT   |  Header Len   |      Message Length           |
 +-----+-+-------+---------------+-------------------------------+
 |                     Message Publisher ID                      |
 +---------------------------------------------------------------+
 |                         Message ID                            |
 +---------------------------------------------------------------+
 ~                          Options                              ~
 +---------------------------------------------------------------+

]]></artwork>
        </figure>

        <t/>

        <t>The Message Header contains the following field:</t>

        <t><list style="symbols">
            <t>Ver indicates the UDP-Notif protocol header version. The values
            are allocated by the IANA registry <xref target="sec_iana_reg">"UDP-Notif
            Header Version"</xref>. The current header version number is 1.</t>

            <t>S-flag represents the space of media type specified in the MT field.
            When S-flag is not set, MT represents the standard media types as defined
            in the IANA registry <xref target="sec_iana_reg">"UDP-Notif media
            types"</xref>. When S-flag is set, MT represents a private space to
            be freely used for non-standard encodings. 
            <!-- Additionally, when S-flag is set and 
            the 16 private encoding values set in the MT field are not sufficient, the  
            Private Encoding Option defined in <xref target="sec_enc_opt"/>
            can be used together with the MT to define more encoding flavors.
            See <xref target="sec_enc_opt"/> for more details. -->
            </t>

            <t>MT is a 4-bit identifier that indicates the media type used for
            the notification message. When the S bit is not set, the following values apply:<list
                style="symbols">
                <t>0: Reserved, MUST NOT be used.</t>

                <t>1: application/yang-data+json <xref target="RFC8040"/></t>

                <t>2: application/yang-data+xml <xref target="RFC8040"/></t>

                <t>3: application/yang-data+cbor <xref target="RFC9254"/></t>
              </list></t>

            <t>Header Len (8-bit) records the length of the message header in octets,
            including both the fixed header and the options.</t>

            <t>Message Length (16-bit) records the total length of the UDP-Notif message
            within one UDP datagram, measured in octets, including the message
            header. When the notification message is segmented using the
            Segmentation Options defined in <xref target="sec_fragmentation"/>,
            the Message Length is the total length of the current 
            UDP-Notif segment, not the length of the entire notification 
            message.</t>

            <t>Message Publisher ID is a 32-bit identifier defined in <xref
            target="I-D.ietf-netconf-distributed-notif"/>. This identifier is
            locally unique to the publisher node. It identifies the software process
            generating the stream of UDP-Notif messages and allow the disambiguation
            of an information source. Message unicity is obtained from the conjunction of the Message
            Publisher ID and the Message ID field. If Message
            Publisher ID unicity is not preserved through the collection
            domain, the source IP address of the UDP datagram MUST be used
            in addition to the Message Publisher ID to identify the
            information source. If a transport layer relay is used, Message
            Publisher ID unicity must be preserved through the collection
            domain.</t>

            <t>The Message ID is increased monotonically by the publisher of
            UDP-Notif messages and MUST start at 1 with
            the first message. A publisher MUST use different Message IDs
            for different messages generated with the same Message
            Publisher ID. Note that the main purpose of the Message ID is to
            reconstruct messages which are segmented using the segmentation
            option described in <xref target="sec_fragmentation"/>.
            The Message ID values SHOULD be incremented by one for
            successive messages originated with the same Message Publisher ID,
            so that message loss can be detected at data collection. When the last value (2^32-1)
            of Message ID has been reached, the Message ID wraps around and
            restarts at 0.
            <!-- Different subscribers MAY share the same Message ID sequence. -->
            </t>

            <t>Options are a variable-length field in the TLV format. When the
            Header Length is larger than 12 octets, which is the length of the
            fixed header, Options TLVs follow directly after the fixed message
            header. Options are described in <xref target="sec_options"/>.</t>
          </list></t>

          <t>All the binary fields MUST be encoded in network byte order (big
          endian).</t>

        <t/>
      </section>

      <section anchor="sec_encoding" title="Data Encoding">
        <t>UDP-Notif message data can be encoded in XML, JSON or CBOR format.
        Additional encodings may be supported in the
        future. This can be accomplished by augmenting the subscription data
        model with additional identity statements used to refer to requested
        encodings. The new encoding can be registered in the IANA registry
        "UDP-Notif media types" following the procedure defined in
        <xref target="sec_iana_reg"/>.</t>

        <t>Subscribed Notifications <xref target="RFC8639"/> states that a transport MUST identify
        a default encoding. However, as per <xref target="Errata-6211"/>, Subscribed Notifications does not
        require to define a default encoding.
        <!-- A mechanism for the discovery of supported encodings is defined in <xref target="I-D.netana-netconf-yp-transport-capabilities"/>. -->
        </t>

        <t>Private encodings can be used by enabling the S-flag of the header. When the S-flag
        is set, the value of the MT field is left to be defined and agreed
        upon by the users of the private encoding. The MT field allows for 16
        private encodings when S-flag is set. 
        <!-- If users need more than 16 private encodings, 
        an option is defined in <xref target="sec_enc_opt"/> to be freely used to define more encoding flavors.
        Users defining a private encoding MAY use any combination of MT and private encoding option
        fitting their needs. -->
        </t>

        <t>The encoding of a message data is configured on a subscription basis and each
        subscription reference a receiver instance. Publishers
        MUST NOT be configured to send notification messages with more than one 
        encoding to the same receivers.</t>

      </section>
    </section>

    <section anchor="sec_options" title="Options">
      <t>All the options are defined with the format shown in
      <xref target="fig_ups_message_options"/>.</t>

      <t><figure anchor="fig_ups_message_options"
          title="Generic Option Format">
          <artwork align="center"><![CDATA[
  0                   1                   2                   3        
  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
 +---------------+---------------+--------------------------------
 |     Type      |    Length     |    Variable-length data       ~
 +---------------+---------------+--------------------------------]]></artwork>
        </figure></t>

      <t><list style="symbols">
          <t>Type: 1-octet describing the option type. The values of the Type field 
          are allocated by the IANA registry <xref target="sec_iana_reg">"UDP-Notif options
          types"</xref>.</t>

          <t>Length: 1-octet representing the total number of octets in the
          TLV, including the Type and Length fields.</t>

          <t>Variable-length data: 0 or more octets of data.</t>
        </list></t>

      <t>When more than one option are used in a UDP-Notif header, the segmentation option
      defined in <xref target="sec_fragmentation"/> MUST be placed first, if present.
      Placing the segmentation option first can simplify some implementations for both
      the publisher and the receiver, notably those assuming a fixed location for the
      segmentation option. Segmented messages where the segmentation option is not
      the first option MAY be discarded by the receiver.</t>

      <section anchor="sec_fragmentation" title="Segmentation Option">
        <t>The UDP payload length is limited to 65507 bytes (65535 - 28 bytes)
        for IPv4 and 65527 bytes (65535 - 8 bytes) for IPv6. Application-level headers will make the actual payload
				shorter. Even though binary encodings such as CBOR may not
				require more space than what is left, more voluminous encodings
				such as JSON and XML may suffer from this size limitation.
				Although IPv4 and IPv6 publishers can fragment outgoing packets
				exceeding their Maximum Transmission Unit (MTU), fragmented IP
				packets may not be desired for operational and performance
				reasons <xref target="BCP230"/>.</t>

        <t>Implementations MUST provide a configurable parameter to control the maximum size of a
        UDP-Notif segment. This parameter is defined as "max-segment-size" in the YANG module specified
        in <xref target="yang_module"/>.</t>

        <figure anchor="fig_frag_option" title="Segmentation Option Format">
          <artwork align="center"><![CDATA[
  0                   1                   2                   3
  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
 +---------------+---------------+-----------------------------+-+
 |     Type      |     Length    |        Segment Number       |L|
 +---------------+---------------+-----------------------------+-+
 ]]></artwork>
        </figure>

        <t>The <xref target="fig_frag_option">Segmentation Option</xref> is included when the message content
        is segmented into multiple segments. Different segments of one message
        share the same Message ID. The fields of this option are as follows:</t>

        <t><list style="symbols">
            <t>Type: indicates a Segmentation Option. The value is 1 for this option.</t>

            <t>Length: indicates the length of this option, in octets. It MUST be set
            to 4 octets.</t>

            <t>Segment Number: 15-bit value indicating the sequence number of
            the current segment. The first segment of a segmented message has
            a segment number value of 0. The segment number cannot wrap around.</t>

            <t>L: indicates whether the current segment is the
            last one of the message. When 0 is set, the current segment is not
            the last one. When 1 is set, the current segment is the last one,
            meaning that the total number of segments used to transport this
            message is the value of the current Segment Number + 1.</t>
          </list></t>

        <t>Implementations MUST NOT rely on IP
        fragmentation to carry large messages. Implementations
        MUST either restrict the size of individual
        messages to a value that will not lead to IP fragmentation as per <xref target="sec_message_size"/>,
        or support the segmentation option. In the latter case, the parameter "max-segment-size" MUST be set
        so that the size of a UDP-Notif segment and the size of the IP layer
        together do not exceed the MTU of the egress interface.</t>

        <t>When a message has multiple options and is segmented, all the options
        MUST be present on the first segment. The rest of segmented messages MAY
        include all the options. The segmentation option MUST be placed first
        in all segments.</t>

        <t>The receiver SHOULD support the reception of unordered segments.
        The implementation of the receiver SHOULD provide an option to discard
        the received segments if, after some time, one of the segments is still
        missing and the reassembly of the message is not possible. No retransmission
        of lost segments are expected from the publisher. If the receiver
        collects a segment more than once, the implementation SHOULD drop the
        duplicate segment.</t>

        <t>To reassemble segmented UDP-Notif messages, the receiver should first identify
        UDP-Notif segments belonging to the same message by using the combination of the Message
        Publisher ID and Message ID. The receiver SHOULD wait for all the segments before starting
        the reassembly process. Once all the segments are collected, the receiver should create a new
        UDP-Notif header with the same Ver, S-flag, MT, Message Publisher ID and Message ID values.
        When UDP-Notif options other than the segmentation option are present in the first segment, 
        these options need to be appended to the newly created UDP-Notif header.
        To reconstruct the original notification message, the receiver must concatenate the
        notification message of each UDP-Notif segments in an ascending order based
        on the Segment Number. The new concatenated notification message becomes the notification message
        of the newly created UDP-Notif message. The Header Length and Message Length are then updated
        accordingly.</t>

      </section>
    </section>

    <section anchor="sec_applicability" title="Applicability">
      <t>This section provides an applicability for the
      UDP-Notif mechanism, following the UDP Usage Guidelines in <xref
      section="3" sectionFormat="of" target="RFC8085"/>.</t>

      <t>According to <xref section="3.6" sectionFormat="of"
			target="RFC8085"/>, the mechanism falls in the category of UDP
			applications "designed for use within the network of a single
			network operator or on networks of an adjacent set of cooperating
			network operators, to be deployed in controlled environments".
			Implementations SHOULD thus follow the recommendations in place
			for such specific applications. We discuss recommendations on
			congestion control in <xref target="sec_congestion_control"/>,
      message size guidelines in <xref target="sec_message_size"/>,
      reliability considerations in <xref target="sec_reliability"/> and
			checksum guidelines in <xref target="sec_checksum"/>.</t>

      <t>The main use case of the UDP-Notif mechanism is the collection
			of statistical metrics for accounting purposes, where potential
			loss is not a concern, but should however be reported (such as
			IPFIX Flow Records exported with UDP <xref target="RFC7011"/>).
			Such metrics are typically exported in a periodical subscription
			as described in Section 3.1 of <xref target="RFC8641"/>.</t>

      <section anchor="sec_congestion_control" title="Congestion Control">
        <t>The above application falls into the category of applications
        performing transfer of large amounts of data and methods in
				Section 3.1.8 and 3.1.9 of <xref target="RFC8085"/> MUST be
				considered. The operator SHOULD enable Quality of Service (QoS)
				on the network between the publisher and receiver,
				pre-provision reserved capacity on a dedicated QoS class and
				ensure that the DSCP bits in the publisher, as defined in <xref section="2.3"
				sectionFormat="of" target="RFC8639"/>, are set accordingly.</t> 
								
				<t>As per <xref section="3" sectionFormat="of"
				target="RFC8085"/>, it is NOT RECOMMENDED to use the UDP-Notif
				mechanism over congestion-sensitive network paths. The only
				environments where UDP-Notif is expected to be used are managed
				networks.</t>

        <t>Implementation SHOULD NOT push unbounded volumes of
        traffic by default, and SHOULD require the users to explicitly
        configure such a mode of operation.</t>

        <t>Burst mitigation through packet pacing is RECOMMENDED.
				Disabling burst mitigation SHOULD require the users to
				explicitly configure such a mode of operation.</t>

        <t>Applications SHOULD monitor packet losses and provide means
				to the user for retrieving information on such losses. As
				described in <xref section="2.8" sectionFormat="of"
				target="RFC8639"/>, the publisher provides in
				"sent-event-records" the amount of sent notifications. The
				UDP-Notif Message ID can be used to deduce congestion based on
				packet loss detection. Hence the receiver can notify the
				publisher to use a lower streaming rate. The interaction to
				control the streaming rate on the publisher is out of the scope
				of this document.</t>
      </section>

      <section anchor="sec_message_size" title="Message Size">
        <t><xref section="3.2" sectionFormat="of" target="RFC8085"/>
				recommends not to rely on IP fragmentation for messages whose
				size result in IP packets exceeding the MTU along the path. The
				segmentation option of the current specification permits
				segmentation of the UDP-Notif message content without relying on
				IP fragmentation.</t>

        <t>It is RECOMMENDED that the size of a Notification Message is 
        small and segmentation does not result in segmenting the message
				into too many segments to avoid dropping the entire message when
				there is a lost segment.</t>
        
        <t>A receiver collecting segmented UDP-Notif messages SHOULD
				have a configurable parameter to discard segments when they
				exceed a certain amount of segments. The generation of too many
				segments by a publisher can be used as an abuse to require
				computation resources for reassembling large messages at the
				receiver.</t>
      </section>

      <section anchor="sec_reliability" title="Reliability">
        <t>As per <xref section="3.3" sectionFormat="of"
				target="RFC8085"/> guidelines, a receiver implementation MUST
				discard packets that were received but cannot be re-assembled as
				a complete message within a given amount of time. This time
				SHOULD be configurable.</t>
      </section>

      <section anchor="sec_checksum" title="Checksum">
        <t>As per <xref section="3.3" sectionFormat="of"
				target="RFC8085"/> guidelines the publisher and
				receiver applications SHOULD enable and use UDP checksum.</t>
      </section>
   </section>

    <section anchor="sec_dtls_udp_notif" title="Secured layer for UDP-Notif">
      <t>In unsecured networks, which are not authenticated and encrypted on
	    layers below transport, UDP-Notif messages MUST be 
      encrypted. This section presents a mechanism using DTLS
      <xref target="RFC6347"/><xref target="RFC9147"/> to secure
      UDP-Notif protocol. In addition to providing encryption, DTLS also
      ensures authentication and integrity protection, preventing attacks
      such as the injection of malicious packets.</t>

      <t>Implementations using DTLS to secure UDP-Notif messages MUST support DTLS
      1.2 <xref target="RFC6347"/> or later, and SHOULD support DTLS 1.3 <xref target="RFC9147"/>.
      No DTLS extensions are defined in this document.</t>

      <t>When this security layer is used, the publisher MUST always be a DTLS
      client, and the Receiver MUST always be a DTLS server. The Receivers
      MUST support accepting UDP-Notif Messages on the configured UDP port, but
      MAY be configurable to listen on a different port. The publisher MUST
      support sending UDP-Notif messages to the specified UDP port number, but MAY be
      configurable to send messages to a different port. The publisher MAY use
      any source UDP port for transmitting messages.</t>

      <section anchor="sec_session_lifecycle" title="Session Lifecycle">
        <t>This section describes the lifecycle of UDP-Notif messages when
        they are encrypted using DTLS.</t>

        <section title="DTLS Session Initiation">
          <t>The publisher initiates a DTLS connection by sending a DTLS
          ClientHello to the Receiver. Implementations MAY disable the denial
          of service countermeasures defined by DTLS 1.2 and DTLS 1.3 if a given deployment
          can ensure that DoS attacks are not a concern.</t>

          <t>In DTLS 1.3 when the denial of service countermeasures are implemented, the
          Receiver responds with a DTLS HelloRetryRequest containing a stateless cookie.
          The publisher sends then a second DTLS ClientHello message containing the received cookie.
          Details can be found in Section 5.1 of <xref target="RFC9147"/>.</t>

          <t>When DTLS is implemented, the publisher MUST NOT send any
          UDP-Notif messages before the DTLS handshake has successfully
          completed. Implementations MUST NOT use the early data mechanism
          (also known as 0-RTT data) defined in DTLS 1.3 <xref target="RFC9147"/>.</t>

          <t>Implementations MUST follow recommendations defined
          by <xref target="BCP195"/>. If other cipher suites than the ones recommended by
          <xref target="BCP195"/> are used, then implementations MUST NOT negotiate a
          cipher suite that employs NULL integrity or authentication algorithms.</t>

          <t>Where confidentiality protection with DTLS is required,
          implementations must negotiate a cipher suite that employs a
          non-NULL encryption algorithm.</t>
        </section>

        <section title="Publish Data">
          <t>When DTLS is used, all UDP-Notif messages MUST be published as
          DTLS "application_data". It is possible that multiple UDP-Notif
          messages are contained in one DTLS record, or that a publication
          message is transferred in multiple DTLS records. The application
          data is defined with the following ABNF <xref target="RFC5234"/>
          expression:</t>

          <t>APPLICATION-DATA = 1*UDP-NOTIF-FRAME</t>

          <t>UDP-NOTIF-FRAME = MSG-LEN SP UDP-NOTIF-MSG</t>

          <t>MSG-LEN = NONZERO-DIGIT *DIGIT</t>

          <t>SP = %d32</t>

          <t>NONZERO-DIGIT = %d49-57</t>

          <t>DIGIT = %d48 / NONZERO-DIGIT</t>

          <t>UDP-NOTIF-MSG is defined in <xref
          target="sec_ups_transport"/>.</t>

          <t>The publisher SHOULD attempt to avoid IP fragmentation by using
          the Segmentation Option in the UDP-Notif message.</t>
        </section>

        <section title="Session Termination">

          <t>A Publisher (DTLS client) MUST close the associated DTLS connection when 
          it does not expect to deliver further UDP-Notif messages. Before closing 
          the connection, the publisher MUST send a DTLS close_notify alert. After 
          sending close_notify, the publisher MAY close the DTLS 
          connection without waiting for a close_notify from the Receiver.
          Upon receiving a close_notify from the publisher, a Receiver MUST 
          respond with a close_notify if the DTLS connection is still open.
          </t>

          <t>When no data is received from a DTLS connection for an extended period 
          of time, the Receiver (DTLS server) MAY close the connection. 
          Implementations SHOULD use an inactivity timer with a default value of 10 
          minutes, unless an application-specific profile specifies otherwise. The 
          Receiver MUST attempt to initiate an exchange of close_notify alerts with 
          the publisher before closing the connection. Receivers that are
          unprepared to receive any more data MAY close the connection after
          sending the close_notify alert.</t>

          <t>Keeping a DTLS connection open after notifications are no longer 
          expected results in unnecessary retention of DTLS state and transport 
          resources, and therefore increases exposure to resource-exhaustion attacks.
          </t>

          <t>Although closure alerts are a component of TLS and so of DTLS,
          they, like all alerts, are not retransmitted by DTLS and so may be
          lost over an unreliable network.</t>
        </section>

        <section title="DTLS Fragmentation">
          <t>DTLS 1.2 <xref target="RFC6347"/> and DTLS 1.3 <xref target="RFC9147"/> states
          that DTLS message may be fragmented into
          multiple DTLS records. A DTLS message carrying a UDP-Notif message SHOULD fit within a
          single datagram to avoid DTLS fragmentation. Implementations SHOULD
          account for DTLS overhead when determining the maximum UDP-Notif
          notification message size.
          </t>
        </section>
      </section>
    </section>

    <section anchor="yang-model-general" title="A YANG Data Model for Management of UDP-Notif">

      <section title="YANG Module for configuring UDP-Notif" anchor="yang_module">
        <t>The YANG model described in <xref target="sec_yang_model"/> defines
        a new receiver instance for UDP-Notif transport. When this transport
        is used, four new leaves and a dtls container allow configuring
        UDP-Notif receiver parameters.</t>

        <t>The source address of the UDP-Notif message can be configured using the
        "source-address" leaf at the subscription level as defined in
        <xref target="RFC8639" section="2.5" sectionFormat="of"/> or by setting 
        the leaf "local-address" using the "ietf-udp-notif-transport" YANG module.
        When both are configured, the UDP-Notif message MUST use the address configured
        in the "local-address" leaf defined in the "ietf-udp-notif-transport" YANG module.
        </t>

        <t>The model defines the following YANG tree <xref target="RFC8340"/>:</t>
        <sourcecode type="yangtree"><![CDATA[
module: ietf-udp-notif-transport

  augment /sn:subscriptions/snr:receiver-instances
            /snr:receiver-instance/snr:transport-type:
    +--:(udp-notif)
       +--rw udp-notif-receiver
          +--rw remote-address         inet:host
          +--rw remote-port            inet:port-number
          +--rw local-address?         inet:ip-address
          |       {local-binding}?
          +--rw local-port?            inet:port-number
          |       {local-binding}?
          +--rw dtls! {dtls}?
          |  +--rw client-identity!
          |  |  +--rw (auth-type)
          |  |     +--:(certificate) {client-ident-x509-cert}?
          |  |     |     ...
          |  |     +--:(raw-public-key)
          |  |     |        {client-ident-raw-public-key}?
          |  |     |     ...
          |  |     +--:(tls12-psk) {client-ident-tls12-psk}?
          |  |     |     ...
          |  |     +--:(tls13-epsk) {client-ident-tls13-epsk}?
          |  |           ...
          |  +--rw server-authentication
          |  |  +--rw ca-certs! {server-auth-x509-cert}?
          |  |  |  +--rw (inline-or-truststore)
          |  |  |        ...
          |  |  +--rw ee-certs! {server-auth-x509-cert}?
          |  |  |  +--rw (inline-or-truststore)
          |  |  |        ...
          |  |  +--rw raw-public-keys! {server-auth-raw-public-key}?
          |  |  |  +--rw (inline-or-truststore)
          |  |  |        ...
          |  |  +--rw tls12-psks?        empty
          |  |  |       {server-auth-tls12-psk}?
          |  |  +--rw tls13-epsks?       empty
          |  |          {server-auth-tls13-epsk}?
          |  +--rw hello-params {tlscmn:hello-params}?
          |     +--rw tls-versions
          |     |  +--rw min?   identityref
          |     |  +--rw max?   identityref
          |     +--rw cipher-suites
          |        +--rw cipher-suite*
          |                tlscsa:tls-cipher-suite-algorithm
          +--rw enable-segmentation?   boolean
          +--rw max-segment-size?      uint16
  ]]></sourcecode>
      </section>

      <section anchor="sec_yang_model" title="YANG Module">
        <t>This YANG module is used to configure, on a publisher, a receiver
        willing to consume notification messages. This module augments the
        "ietf-subscribed-notif-receivers" module to define a UDP-Notif
        transport receiver. The grouping "udp-notif-receiver" defines
        the necessary parameters to configure the transport defined in this
        document using the generic "udp-client" grouping from the 
        "ietf-udp-client" module <xref target="I-D.ietf-netconf-udp-client-server"/>
        and the "tls-client-grouping" defined in the "ietf-tls-client" module
        <xref target="RFC9645"/>. It uses data types defined in <xref target="RFC6991"/>.</t>

        <sourcecode name="ietf-udp-notif-transport@2025-06-04.yang" type="yang" markers="true"><![CDATA[
module ietf-udp-notif-transport {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:ietf-udp-notif-transport";
  prefix unt;

  import ietf-subscribed-notifications {
    prefix sn;
    reference
      "RFC 8639: Subscription to YANG Notifications";
  }
  import ietf-subscribed-notif-receivers {
    prefix snr;
    reference
      "draft-ietf-netconf-https-notif: An HTTPS-based Transport
       for Configured Subscriptions";
  }
  import ietf-udp-client {
    prefix udpc;
    reference
      "draft-ietf-netconf-udp-client-server: YANG Grouping for
       UDP Clients and UDP Servers";
  }
  import ietf-tls-client {
    prefix tlsc;
    reference
      "RFC 9645: YANG Groupings for TLS Clients and TLS Servers";
  }

  organization
    "IETF NETCONF (Network Configuration) Working Group";
  contact
    "WG Web:   <http:/tools.ietf.org/wg/netconf/>
     WG List:  <mailto:netconf@ietf.org>

     Authors:  Tianran Zhou
               <mailto:zhoutianran@huawei.com>
               Thomas Graf
               <mailto:thomas.graf@swisscom.com>
               Pierre Francois
               <mailto:pierre.francois@insa-lyon.fr>
               Alex Huang Feng
               <mailto:alex.huang-feng@insa-lyon.fr>
               Paolo Lucente
               <mailto:paolo@ntt.net>";
  description
    "Defines a model for configuring UDP-Notif as a transport
     for configured subscriptions [RFC8639].

     Copyright (c) 2025 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.

     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 2025-06-04 {
    description
      "Initial revision";
    reference
      "RFC XXXX: UDP-based Transport for Configured Subscriptions";
  }

  /*
   * FEATURES
   */

  feature encode-cbor {
    description
      "Indicates that CBOR encoding of notification
       messages is supported.";
    reference
      "RFC 9254: CBOR Encoding of Data Modeled with YANG";
  }

  feature dtls {
    description
      "Indicates that DTLS encryption of UDP
       packets is supported. UDP-Notif mandates that, in
       unsecured networks, DTLS 1.2 or later MUST be supported,
       and DTLS 1.3 SHOULD be supported.";
    reference
      "RFC6347: Datagram Transport Layer Security Version 1.2,
       RFC 9147: The Datagram Transport Layer Security (DTLS)
       Protocol Version 1.3";
  }

  /*
   * IDENTITIES
   */  

  identity udp-notif {
    base sn:transport;
    base sn:configurable-encoding;
    description
      "UDP-Notif is used as transport for notification messages
        and state change notifications.";
  }

  identity encode-cbor {
    base sn:encoding;
    description
      "Encode data using CBOR.";
    reference
      "RFC 9254: CBOR Encoding of Data Modeled with YANG";
  }

  identity unsupported-max-segment-size {
    base sn:establish-subscription-error;
    base sn:modify-subscription-error;
    description
      "Error triggered when the specified value 'max-segment-size'
       is not supported by the publisher. An implementation may
       only support a subset of the uint16.";
    reference
      "RFC XXXX: UDP-based Transport for Configured Subscriptions";
  }

  grouping udp-notif-receiver {
    description
      "Provides a reusable identification of a UDP-Notif target
       receiver.";
    uses udpc:udp-client {
      refine "remote-port" {
        mandatory true;
      }
    }
    container dtls {
      if-feature "dtls";
      presence "dtls";
      uses tlsc:tls-client-grouping {
        // Remove keep-alives for DTLS
        refine "keepalives" {
          if-feature "not tlsc:tls-client-keepalives";
        }
      }
      description
        "Container for configuring DTLS parameters.";
    }
    leaf enable-segmentation {
      type boolean;
      default "true";
      description
        "When disabled, the publisher will not segment UDP-Notif
        messages. This may cause IP-layer fragmentation when
        messages are larger than the MTU. IP fragmentation is
        discouraged (RFC 8085, RFC 8900) and generally unsafe.
        Disabling is not recommended.";
    }
    leaf max-segment-size {
      type uint16;
      description
        "UDP-Notif provides a configurable max-segment-size to
         control the size of each segment (UDP-Notif header, with
         options, included).
         The publisher may trigger an 'unsupported-max-segment-size'
         error if the publisher does not support the configured
         value.";
    }
  }

  augment "/sn:subscriptions/snr:receiver-instances/"
        + "snr:receiver-instance/snr:transport-type" {
    case udp-notif {
      container udp-notif-receiver {
        description
          "The UDP-Notif receiver to send notifications to.";
        uses udp-notif-receiver;
      }
    }
    description
      "Augments the transport-type choice to include the 'udp-notif'
       transport.";
  }
}
]]></sourcecode>
      </section>
    </section>

    <section anchor="IANA" title="IANA Considerations">

      <t>This document defines new registries under a new registry group entitled
        "UDP-Notif Protocol", and updates the IETF XML and YANG module registries.</t>

      <section title="UDP-Notif Protocol Registry Group" anchor="sec_iana_reg">
        <t>This document requests IANA to create a new registry group called
        "UDP-Notif protocol". Under this registry group, three registries are 
        to be created as described in the following sections.</t>

        <section title="UDP-Notif Media Types Registry">

          <t>All UDP-Notif messages contain a 4-bit media type identifier, for which IANA
          is to create and maintain a new registry entitled "UDP-Notif Media Types" under the registry group "UDP-Notif Protocol". This
          document defines the following media type values:</t>

          <texttable title="Initial UDP-Notif Media Types Registry">
            <ttcol>Value</ttcol>
            <ttcol>Description</ttcol>
            <ttcol>Reference</ttcol>
            <c>0</c><c>Reserved</c><c>RFC-to-be</c>
            <c>1</c><c>media type application/yang-data+json</c><c>RFC8040</c>
            <c>2</c><c>media type application/yang-data+xml</c><c>RFC8040</c>
            <c>3</c><c>media type application/yang-data+cbor</c><c>RFC9254</c>
          </texttable>

          <t>Future assignments are to be made using the Standards Action
          process defined in <xref target="RFC8126" section="4.9"/>.
          Assignments consist of the value, a short description of the media type and the document reference (e.g., RFC number).</t>
        </section>
        
        <section title="UDP-Notif Option Types Registry">

          <t>UDP-Notif uses an 8-bit option type (see <xref target="sec_options"/>), for which IANA is
          to create and maintain a new registry entitled "UDP-Notif Option Types" under the registry group "UDP-Notif Protocol". This document defines the following option type values:</t>
          
          <texttable title="Initial UDP-Notif Option Types Registry">
            <ttcol>Value</ttcol>
            <ttcol>Description</ttcol>
            <ttcol>Reference</ttcol>
            <c>0</c><c>Reserved</c><c>RFC-to-be</c>
            <c>1</c><c>Segmentation Option</c><c>RFC-to-be</c>
          </texttable>

          <t>Future assignments are to be made using the Standards Action
          process defined in <xref target="RFC8126" section="4.9"/>.
          Assignments consist of the value, a short description of the option and the document reference (e.g., RFC number).</t>
        </section>
        <section title="UDP-Notif Header Version Registry">


          <t>UDP-Notif header uses a 3-bit header version, for which IANA is
          to create and maintain a new registry entitled "UDP-Notif Header Version" under the registry group "UDP-Notif Protocol". This document defines the following header version values:</t>
          
          <texttable title="Initial UDP-Notif Header Version Registry">
            <ttcol>Value</ttcol>
            <ttcol>Description</ttcol>
            <ttcol>Reference</ttcol>
            <c>0</c><c>UDP based Publication Channel for Streaming Telemetry</c><c>draft-ietf-netconf-udp-pub-channel-05</c>
            <c>1</c><c>UDP-based Transport for Configured Subscriptions</c><c>RFC-to-be</c>
          </texttable>
          <t>
            Note: There is an older specification of this transport protocol defined in
            <xref target="I-D.ietf-netconf-udp-pub-channel"/> that was deployed in some networks.
            To enable differentiating both protocols, different version numbers are used.
            The current specification replaces <xref target="I-D.ietf-netconf-udp-pub-channel"/> and uses 1 as its version,
            while the header defined in <xref target="I-D.ietf-netconf-udp-pub-channel"/> uses 0.
          </t>

          <t>Future assignments are to be made using the Standards Action
          process defined in <xref target="RFC8126" section="4.9"/>.
          Assignments consist of the value, a description of the header version and the document reference (e.g., RFC number).</t>
        </section>
      </section>

      <section title="URI">
        <t>IANA is also requested to register the following URI in the
				"ns" registry within the "IETF XML Registry" group <xref
				target="RFC3688"/>:</t>

        <figure>
            <artwork align="left"><![CDATA[
  URI: urn:ietf:params:xml:ns:yang:ietf-udp-notif-transport
  Registrant Contact: The IESG.
  XML: N/A; the requested URI is an XML namespace.]]></artwork>
          </figure>
      </section>

      <section title="YANG Module Name">
        <t>IANA is requested to register the following YANG module in
				the "YANG Module Names" registry <xref target="RFC6020"/> within
				the "YANG Parameters" registry group.</t>

        <figure>
            <artwork align="left"><![CDATA[
  Name: ietf-udp-notif-transport
  Maintained by IANA: N
  Namespace: urn:ietf:params:xml:ns:yang:ietf-udp-notif-transport
  Prefix: unt
  Reference: RFC-to-be]]></artwork>
        </figure>
      </section>
    </section>

    <section anchor="Implementation" title="Implementation Status">
      <t>Note to the RFC-Editor: Please remove this section before
      publishing.</t>

      <section anchor="OpenSourcePublisher" title="Open Source Publisher">
        <t>INSA Lyon implemented this document for a YANG Push publisher in an
        example implementation.</t>

        <t>The open source code can be obtained here: <xref
        target="INSA-Lyon-Publisher"/>.</t>
      </section>

      <section anchor="OpenSourceReceiver"
               title="Open Source Receiver Library">
        <t>INSA Lyon implemented this document for a YANG Push receiver as a
        library.</t>

        <t>The open source code can be obtained here: <xref
        target="INSA-Lyon-Receiver"/>.</t>
      </section>

      <section anchor="pmacct" title="Pmacct Data Collection">
        <t>The open source YANG push receiver library <xref
        target="INSA-Lyon-Receiver"/> has been integrated into
        the Pmacct open source Network Telemetry data collection <xref target="Paolo-Lucente-Pmacct"/>.</t>
      </section>

      <section anchor="Huawei" title="Huawei VRP">
        <t>Huawei implemented this document for a YANG Push publisher in their
        VRP platform.</t>
      </section>
	  
      <section anchor="SIXWIND" title="6WIND VSR">
        <t>6WIND implemented this document for a YANG Push publisher in their
        VSR platform.</t>
      </section>

      <section anchor="Cisco" title="Cisco IOS XR">
        <t>Cisco implemented this document for a YANG Push publisher in their
        IOS XR platform.</t>
      </section>
    </section>

    <section anchor="sec_security_considerations"
             title="Security Considerations">
      <t>As mentioned above, the proposed mechanism is designed to be
			used in controlled environments, as defined in <xref section="3.6"
			sectionFormat="of" target="RFC8085"/> also known as
			"limited domains", as defined in <xref target="RFC8799"/>.</t>
			
			<t>In order to protect the UDP transport session from off-path
			attacks, unicast reverse path forwarding <xref target="RFC8704"/>
			SHOULD be configured at the edges of the network between the
			publisher and receiver to prevent an application from IP spoofing.
			Further, as described in <xref section="5.1" sectionFormat="of"
			target="RFC8085"/>, the source port of the UDP transport session
			SHOULD be randomized where <xref target="RFC6056"/> can be taken
			as guidance.</t>
			
			<t><xref section="6" sectionFormat="of" target="RFC8085"/> states 
			that "UDP applications that need to protect their communications
			against eavesdropping, tampering, or message forgery, SHOULD
			employ end-to-end security services provided by other IETF
			protocols". Even though a security layer within controlled
			environments is not necessarly required, for networks that are
			not secured, a secure transport providing confidentiality,
			integrity protection, authentication, and replay protection MUST
			be implemented. A specification of UDP-Notif using DTLS 1.3 as its
			encryption layer is presented in <xref
			target="sec_dtls_udp_notif"/>.</t>

      <t>The following text uses the template described in Section 3.7 of
      <xref target="I-D.ietf-netmod-rfc8407bis"/>.</t>

      <t>The "ietf-udp-notif-transport" YANG module defines a data model that is
      designed to be accessed via YANG-based management protocols, such as
      NETCONF <xref target="RFC6241"/> and RESTCONF <xref target="RFC8040"/>. These protocols have to
      use a secure transport layer (e.g., SSH <xref target="RFC6242"/>, TLS <xref target="RFC8446"/>, and
      QUIC <xref target="RFC9000"/>) and 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). 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:</t>

      <ul>
        <li>The data nodes "remote-address", "remote-port", "local-address",
        and "local-port" in the "ietf-udp-notif-transport" module specify transport parameters
        for the recipient of UDP-Notif messages. Unauthorized modification of these transport
        parameters could redirect notifications to unintended recipients.</li>
      </ul>

      <t>This YANG module uses groupings from other YANG modules that
      define nodes that may be considered sensitive or vulnerable
      in network environments. Refer to the Security Considerations of
      <xref target="I-D.ietf-netconf-udp-client-server"/> and <xref target="RFC9645"/> for
      information as to which nodes may be considered sensitive or vulnerable in
      network environments.</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. The "ietf-udp-notif-transport" module does not define any readable node.</t> -->

      <!-- <t>Some of the RPC operations in this YANG module may be considered sensitive or
      vulnerable in some network environments. It is thus important to control access
      to these operations. The YANG module defined in this document does not define any RPC
      operations.</t> -->

    </section>


    <section title="Contributors">
      <figure>
        <artwork>
Guangying Zheng
Huawei
101 Yu-Hua-Tai Software Road
Nanjing
Jiangsu,
China
Email: zhengguangying@huawei.com

Yunan Gu
Huawei
Beijing
China
Email: guyunan@huawei.com
</artwork>
      </figure>
    </section>

    <section anchor="Acknowledgements" title="Acknowledgements">
      <t>The authors of this documents would like to thank Lucas Aubard,
			Alexander Clemm, Benoit Claise, Ebben Aries, Eric Voit,
			Huiyang Yang, Kent Watsen, Mahesh Jethanandani, Marco Tollini,
			Hannes Tschofenig, Michael Tuxen, Rob Wilton, Sean Turner,
			Stephane Frenot, Timothy Carey, Tim Jenkins, Tom Petch, 
			Joseph Touch, Andy Bierman, Carsten Bormann, Mohamed Boucadair,
			Weiqiang Cheng, Giuseppe Fioccola, Camilo Cardona, Qiufang Ma,
			James Cumming and Qin Wu for their constructive suggestions for
			improving this document.</t>
    </section>
  </middle>

  <back>
    <references title="Normative References">

      <xi:include href="https://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
      <xi:include href='https://xml.resource.org/public/rfc/bibxml/reference.RFC.3688.xml'/>
      <xi:include href='https://xml.resource.org/public/rfc/bibxml/reference.RFC.5234.xml'/>
      <xi:include href="https://xml.resource.org/public/rfc/bibxml/reference.RFC.6020.xml"/>
      <xi:include href="https://xml.resource.org/public/rfc/bibxml/reference.RFC.6347.xml"/>
      <xi:include href="https://xml.resource.org/public/rfc/bibxml/reference.RFC.6991.xml"/>
      <xi:include href="https://xml.resource.org/public/rfc/bibxml/reference.RFC.8085.xml"/>
      <xi:include href="https://xml.resource.org/public/rfc/bibxml/reference.RFC.8126.xml"/>
      <xi:include href="https://xml.resource.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
      <xi:include href="https://xml.resource.org/public/rfc/bibxml/reference.RFC.8341.xml"/>
      <xi:include href="https://xml.resource.org/public/rfc/bibxml/reference.RFC.8342.xml"/>
      <xi:include href="https://xml.resource.org/public/rfc/bibxml/reference.RFC.8639.xml"/>
      <xi:include href="https://xml.resource.org/public/rfc/bibxml/reference.RFC.8640.xml"/>
      <xi:include href="https://xml.resource.org/public/rfc/bibxml/reference.RFC.8650.xml"/>
      <xi:include href="https://xml.resource.org/public/rfc/bibxml/reference.RFC.9254.xml"/>
      <xi:include href="https://xml.resource.org/public/rfc/bibxml/reference.RFC.9147.xml"/>
      <xi:include href="https://xml.resource.org/public/rfc/bibxml/reference.RFC.9645.xml"/>
      <xi:include href='https://bib.ietf.org/public/rfc/bibxml-ids/reference.I-D.ietf-netconf-https-notif.xml'/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml-ids/reference.I-D.ietf-netconf-distributed-notif.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml-ids/reference.I-D.ietf-netconf-udp-client-server.xml"/>
    </references>

    <references title="Informative References">
      <!-- <?rfc include="http://xml.resource.org/public/rfc/bibxml-ids/reference.I-D.ietf-netconf-notification-messages.xml"?> -->
      <!-- <?rfc include="http://xml.resource.org/public/rfc/bibxml-ids/reference.I-D.ahuang-netconf-notif-yang.xml"?> -->
      <!-- <?rfc include="https://xml.resource.org/public/rfc/bibxml-ids/reference.I-D.netana-netconf-yp-transport-capabilities.xml"?> -->
      <!-- <?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.7923.xml"?> -->

      <xi:include href="https://bib.ietf.org/public/rfc/bibxml9/reference.BCP.0195.xml"/>
      <xi:include href="https://bib.ietf.org/public/rfc/bibxml9/reference.BCP.0230.xml"/>
      <xi:include href="https://xml.resource.org/public/rfc/bibxml-ids/reference.I-D.ietf-netconf-udp-pub-channel.xml"/>
      <xi:include href='https://bib.ietf.org/public/rfc/bibxml-ids/reference.I-D.ietf-netmod-rfc8407bis.xml'/>
      <xi:include href="https://xml.resource.org/public/rfc/bibxml/reference.RFC.6056.xml"/>
      <xi:include href="https://xml.resource.org/public/rfc/bibxml/reference.RFC.6241.xml"/>
      <xi:include href="https://xml.resource.org/public/rfc/bibxml/reference.RFC.6242.xml"/>
      <xi:include href="https://xml.resource.org/public/rfc/bibxml/reference.RFC.7011.xml"/>
      <xi:include href="https://xml.resource.org/public/rfc/bibxml/reference.RFC.7951.xml"/>
      <xi:include href="https://xml.resource.org/public/rfc/bibxml/reference.RFC.8040.xml"/>
      <xi:include href="https://xml.resource.org/public/rfc/bibxml/reference.RFC.8446.xml"/>
      <xi:include href="https://xml.resource.org/public/rfc/bibxml/reference.RFC.8641.xml"/>
      <xi:include href="https://xml.resource.org/public/rfc/bibxml/reference.RFC.8340.xml"/>
      <xi:include href="https://xml.resource.org/public/rfc/bibxml/reference.RFC.8704.xml"/>
      <xi:include href="https://xml.resource.org/public/rfc/bibxml/reference.RFC.8799.xml"/>
      <xi:include href="https://xml.resource.org/public/rfc/bibxml/reference.RFC.9000.xml"/>

      <reference anchor="INSA-Lyon-Publisher"
                 target="https://github.com/network-analytics/udp-notif-scapy">
        <front>
          <title>INSA Lyon, YANG Push publisher example implementation</title>

          <author/>

          <date/>
        </front>
      </reference>

      <reference anchor="INSA-Lyon-Receiver"
                 target="https://github.com/network-analytics/udp-notif-c-collector">
        <front>
          <title>INSA Lyon, YANG Push receiver library implementation</title>

          <author/>

          <date/>
        </front>
      </reference>

      <reference anchor="Paolo-Lucente-Pmacct"
                 target="https://github.com/pmacct/pmacct">
        <front>
          <title>Paolo Lucente, Pmacct open source Network Telemetry Data
          Collection</title>

          <author/>

          <date/>
        </front>
      </reference>

      <reference anchor="Errata-6211"
                 target="https://www.rfc-editor.org/errata/eid6211">
        <front>
          <title>Errata 6211</title>
          <author initials="Kent" surname="Watsen">
            <organization/>
          </author>
          <date year="2024"/>
        </front>
      </reference>
    </references>

    <section anchor="example" title="UDP-Notif Examples">
      <t>This non-normative section shows two examples of how the the
      "ietf-udp-notif-transport" YANG module can be used to configure a <xref
      target="RFC8639"/> based publisher to send notifications to a receiver
      and an example of a YANG Push notification message using UDP-Notif
      transport protocol.</t>

      <section anchor="example_no_dtls"
               title="Configuration for UDP-Notif transport with DTLS disabled">
        <t>This example shows how UDP-Notif can be configured without DTLS
        encryption. It illustrates the definition of two receivers, one uses an
        IPv4 as its destination address and another uses IPv6. The IPv4 receiver
        is bound to the subscription.</t>

        <figure>
            <artwork align="left"><![CDATA[
=============== NOTE: '\' line wrapping per RFC 8792 ================

<?xml version='1.0' encoding='UTF-8'?>
<subscriptions xmlns="urn:ietf:params:xml:ns:yang:ietf-subscribed-no\
tifications">
  <subscription>
    <id>6666</id>
    <datastore xmlns="urn:ietf:params:xml:ns:yang:ietf-yang-push"
      xmlns:ds="urn:ietf:params:xml:ns:yang:ietf-datastores">ds:oper\
ational</datastore>
    <datastore-xpath-filter xmlns="urn:ietf:params:xml:ns:yang:ietf-\
yang-push"
      xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces">/if:int\
erfaces/interface</datastore-xpath-filter>
    <transport xmlns:unt="urn:ietf:params:xml:ns:yang:ietf-udp-notif\
-transport">unt:udp-notif</transport>
    <encoding>encode-json</encoding>
    <receivers>
      <receiver>
        <name>subscription-specific-receiver</name>
        <receiver-instance-ref xmlns="urn:ietf:params:xml:ns:yang:ie\
tf-subscribed-notif-receivers">ipv4-udp-notif-receiver</receiver-ins\
tance-ref>
        <state>active</state>
      </receiver>
    </receivers>
    <periodic xmlns="urn:ietf:params:xml:ns:yang:ietf-yang-push">
      <period>6000</period>
    </periodic>
  </subscription>
  <receiver-instances xmlns="urn:ietf:params:xml:ns:yang:ietf-subscr\
ibed-notif-receivers">
    <receiver-instance>
      <name>ipv4-udp-notif-receiver</name>
      <udp-notif-receiver xmlns="urn:ietf:params:xml:ns:yang:ietf-ud\
p-notif-transport">
        <remote-address>192.0.2.1</remote-address>
        <remote-port>12345</remote-port>
        <enable-segmentation>true</enable-segmentation>
        <max-segment-size>9000</max-segment-size>
      </udp-notif-receiver>
    </receiver-instance>
    <receiver-instance>
      <name>ipv6-udp-notif-receiver</name>
      <udp-notif-receiver xmlns="urn:ietf:params:xml:ns:yang:ietf-ud\
p-notif-transport">
        <remote-address>2001:db8:abcd:12::1</remote-address>
        <remote-port>12345</remote-port>
        <enable-segmentation>true</enable-segmentation>
        <max-segment-size>9000</max-segment-size>
      </udp-notif-receiver>
    </receiver-instance>
  </receiver-instances>
</subscriptions>
  ]]></artwork>
          </figure>
      </section>

      <section anchor="example_dtls"
               title="Configuration for UDP-Notif transport with DTLS enabled">
        <t>This example shows how UDP-Notif can be configured with DTLS
        encryption.</t>

        <figure>
            <artwork align="left"><![CDATA[
=============== NOTE: '\' line wrapping per RFC 8792 ================

<?xml version='1.0' encoding='UTF-8'?>
<subscriptions xmlns="urn:ietf:params:xml:ns:yang:ietf-subscribed-no\
tifications">
  <subscription>
    <id>6666</id>
    <datastore xmlns="urn:ietf:params:xml:ns:yang:ietf-yang-push"
      xmlns:ds="urn:ietf:params:xml:ns:yang:ietf-datastores">ds:oper\
ational</datastore>
    <datastore-xpath-filter xmlns="urn:ietf:params:xml:ns:yang:ietf-\
yang-push"
      xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces">/if:int\
erfaces/interface</datastore-xpath-filter>
    <transport xmlns:unt="urn:ietf:params:xml:ns:yang:ietf-udp-notif\
-transport">unt:udp-notif</transport>
    <encoding>encode-json</encoding>
    <receivers>
      <receiver>
        <name>subscription-specific-receiver-def</name>
        <receiver-instance-ref xmlns="urn:ietf:params:xml:ns:yang:ie\
tf-subscribed-notif-receivers">udp-notif-receiver-dtls</receiver-ins\
tance-ref>
        <state>active</state>
      </receiver>
    </receivers>
    <periodic xmlns="urn:ietf:params:xml:ns:yang:ietf-yang-push">
      <period>6000</period>
    </periodic>
  </subscription>
  <receiver-instances xmlns="urn:ietf:params:xml:ns:yang:ietf-subscr\
ibed-notif-receivers">
    <receiver-instance>
      <name>udp-notif-receiver-dtls</name>
      <udp-notif-receiver xmlns="urn:ietf:params:xml:ns:yang:ietf-ud\
p-notif-transport">
        <remote-address>2001:db8:abcd:12::1</remote-address>
        <remote-port>12345</remote-port>
        <dtls>
          <client-identity>
            <tls13-epsk>
              <inline-definition>
                <key-format xmlns:ct="urn:ietf:params:xml:ns:yang:ie\
tf-crypto-types">ct:octet-string-key-format</key-format>
                <cleartext-symmetric-key>BASE64VALUE=</cleartext-sym\
metric-key>
              </inline-definition>
              <external-identity>example_external_id</external-ident\
ity>
              <hash>sha-256</hash>
              <context>example_context_string</context>
              <target-protocol>8443</target-protocol>
              <target-kdf>12345</target-kdf>
            </tls13-epsk>
          </client-identity>
          <server-authentication>
            <ca-certs>
              <inline-definition>
                <certificate>
                  <name>Server Cert Issuer #1</name>
                  <cert-data>BASE64VALUE=</cert-data>
                </certificate>
                <certificate>
                  <name>Server Cert Issuer #2</name>
                  <cert-data>BASE64VALUE=</cert-data>
                </certificate>
              </inline-definition>
            </ca-certs>
            <ee-certs>
              <inline-definition>
                <certificate>
                  <name>My Application #1</name>
                  <cert-data>BASE64VALUE=</cert-data>
                </certificate>
                <certificate>
                  <name>My Application #2</name>
                  <cert-data>BASE64VALUE=</cert-data>
                </certificate>
              </inline-definition>
            </ee-certs>
            <raw-public-keys>
              <inline-definition>
                <public-key>
                  <name>corp-fw1</name>
                  <public-key-format xmlns:ct="urn:ietf:params:xml:n\
s:yang:ietf-crypto-types">ct:subject-public-key-info-format</public-\
key-format>
                  <public-key>BASE64VALUE=</public-key>
                </public-key>
                <public-key>
                  <name>corp-fw2</name>
                  <public-key-format xmlns:ct="urn:ietf:params:xml:n\
s:yang:ietf-crypto-types">ct:subject-public-key-info-format</public-\
key-format>
                  <public-key>BASE64VALUE=</public-key>
                </public-key>
              </inline-definition>
            </raw-public-keys>
            <tls13-epsks/>
          </server-authentication>
        </dtls>
        <enable-segmentation>true</enable-segmentation>
        <max-segment-size>9000</max-segment-size>
      </udp-notif-receiver>
    </receiver-instance>
  </receiver-instances>
</subscriptions>
]]></artwork>
          </figure>
      </section>

      <section anchor="example_yp_message"
               title="YANG Push message with UDP-Notif transport protocol">
        <t>This example shows how UDP-Notif is used as a transport protocol to
        send a "push-update" notification <xref target="RFC8641"/> encoded in
        JSON <xref target="RFC7951"/>.</t>

        <t>Assuming the publisher needs to send the JSON payload showed in
        <xref target="fig_ex_json_payload"/>, the UDP-Notif transport is
        encoded following the <xref target="fig_udp_notif_ex"/>. The UDP-Notif
        message is then encapsulated in a UDP datagram.</t>

        <figure anchor="fig_ex_json_payload"
            title="JSON Payload to be sent">
            <artwork align="center"><![CDATA[
{
    "ietf-notification:notification": {
        "eventTime": "2024-02-10T08:00:11.22Z",
        "ietf-yang-push:push-update": {
            "id": 1011,
            "datastore-contents": {
                "ietf-interfaces:interfaces": [
                    {
                        "interface": {
                            "name": "eth0",
                            "oper-status": "up"
                        }
                    }
                ]
            }
        }
    }
}
  ]]></artwork>
          </figure>

        <figure anchor="fig_udp_notif_ex"
            title="UDP-Notif transport message">
            <artwork align="center"><![CDATA[
  0                   1                   2                   3
  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
 +-----+-+-------+---------------+-------------------------------+
 |Ver=1|0|  MT=1 | Header_Len=12 |      Message_Length=230       |
 +-----+-+-------+---------------+-------------------------------+
 |                   Message Publisher ID=2                      |
 +---------------------------------------------------------------+
 |                      Message ID=1563                          |
 +---------------------------------------------------------------+
 |              YANG Push JSON payload (Len=218 octets)          |
 |{"ietf-notification:notification":{"eventTime":"2024-02-10T08:0|
 |0:11.22Z","ietf-yang-push:push-update":{"id":1011,"datastore-co|
 |ntents":{"ietf-interfaces:interfaces":[{"interface":{"name":"et|
 |h0","oper-status":"up"}}]}}}}                                  |
 +---------------------------------------------------------------+
  ]]></artwork>
          </figure>
      </section>
    </section>
  </back>
</rfc>
