<?xml version='1.0' encoding='UTF-8'?>

<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>

<rfc xmlns:xi="http://www.w3.org/2001/XInclude" category="info" docName="draft-ietf-detnet-mpls-over-ip-preof-11" number="9566" ipr="trust200902" submissionType="IETF" obsoletes="" updates="" xml:lang="en" tocInclude="true" consensus="true" symRefs="true" sortRefs="true" version="3">

  <front>
    <title abbrev="DetNet PREOF via MPLS over UDP/IP">
    Deterministic Networking (DetNet) Packet Replication, Elimination, and Ordering Functions (PREOF) via MPLS over UDP/IP</title>
    <seriesInfo name="RFC" value="9566"/>
    <author fullname="Balazs Varga" initials="B." surname="Varga">
      <organization>Ericsson</organization>
      <address>
        <postal>
          <street>Magyar Tudosok krt. 11.</street>
          <city>Budapest</city>
          <country>Hungary</country>
          <code>1117</code>
        </postal>
        <email>balazs.a.varga@ericsson.com</email>
      </address>
    </author>
    <author fullname="Janos Farkas" initials="J." surname="Farkas">
      <organization>Ericsson</organization>
      <address>
        <postal>
          <street>Magyar Tudosok krt. 11.</street>
          <city>Budapest</city>
          <country>Hungary</country>
          <code>1117</code>
        </postal>
        <email>janos.farkas@ericsson.com</email>
      </address>
    </author>
    <author fullname="Andrew G. Malis" initials="A." surname="Malis">
      <organization>Malis Consulting</organization>
      <address>
        <email>agmalis@gmail.com</email>
      </address>
    </author>

  <date month="April" year="2024"/>

  <area>RTG</area>
    <workgroup>DetNet</workgroup>

<keyword>DetNet</keyword>
<keyword>IP Data Plane</keyword>
<keyword>Service sub-layer</keyword>
<keyword>Replication</keyword>
<keyword>Elimination</keyword>
<keyword>Ordering</keyword>

    <abstract>
      <t>
     This document describes how the DetNet IP data plane can support the Packet
	 Replication, Elimination, and Ordering Functions (PREOF) built on 
	 the existing MPLS PREOF solution defined for the DetNet MPLS 
	 data plane and the mechanisms defined by MPLS-over-UDP technology.
      </t>
    </abstract>
  </front>
  <middle>
    <section anchor="sec_intro" numbered="true" toc="default">
      <name>Introduction</name>
      <t>
     The DetNet Working Group has defined Packet Replication (PRF), Packet 
	 Elimination (PEF), and Packet Ordering (POF) Functions 
	 (represented as PREOF) to provide 
	 service protection by the DetNet service sub-layer 
	 <xref target="RFC8655" format="default"/>. The PREOF service protection method relies on 
	 copies of the same packet sent over multiple maximally disjoint paths 
	 and uses sequencing information to eliminate duplicates. A possible 
	 implementation of PRF and PEF is described in 
	 <xref target="IEEE8021CB" format="default"/>, and the related YANG data model is defined 
	 in <xref target="IEEE8021CBcv" format="default"/>. A possible implementation of POF 
	 is described in <xref target="RFC9550" format="default"/>.	 
     <xref target="PREOF-scene" format="default"/> shows a DetNet flow on which PREOF 
	 are applied during forwarding from the source to the destination. 
      </t>
      <figure anchor="PREOF-scene">
        <name>PREOF Scenario in a DetNet Network</name>
        <artwork align="center" name="" type="" alt=""><![CDATA[
                                      +------------+
            +---------------E1---+    |            |
+---+       |               |    +---R3---+        |          +---+
|src|------R1           +---+             |        E3----O----+dst|
+---+       |           |                 E2-------+          +---+
            +----------R2                 |
                        +-----------------+

R: Replication Function (PRF)
E: Elimination Function (PEF)
O: Ordering Function (POF)
]]></artwork>
      </figure>
      <t>
     In general, the use of PREOF require sequencing information to
	 be included in the packets of a DetNet compound flow.  This can be done 
	 by adding a sequence number or timestamp as part of DetNet encapsulation.
	 Sequencing information is typically added once, at or close to the source.
      </t>
      <t>
     The DetNet MPLS data plane <xref target="RFC8964" format="default"/> specifies how 
	 sequencing information is encoded in the MPLS header. However, the DetNet 
	 IP data plane described in <xref target="RFC8939" format="default"/> does not specify how 
	 sequencing information can be encoded in the IP packet. This document 
	 provides sequencing information to DetNet IP nodes, so it results
     in an improved version of the DetNet IP data plane. As suggested by 
	 <xref target="RFC8938" format="default"/>, the solution uses existing standardized headers
	 and encapsulations. The improvement is achieved by reusing the DetNet 
	 MPLS-over-UDP/IP data plane <xref target="RFC9025" format="default"/> with the restriction 
	 of using zero F-Labels.	 
      </t>
    </section>

<section numbered="true" toc="default">
      <name>Terminology</name>
      <section numbered="true" toc="default">
        <name>Terms Used in This Document</name>
        <t>
   This document uses the terminology established in the DetNet architecture
   <xref target="RFC8655" format="default"/>, and it is assumed that the reader is
   familiar with that document and its terminology.
        </t>
      </section>
      <section numbered="true" toc="default">
        <name>Abbreviations</name>
        <t>
   The following abbreviations are used in this document:
        </t>
        <dl newline="false" spacing="normal" indent="14">
          <dt>DetNet</dt>
          <dd>Deterministic Networking</dd>
          <dt>PEF</dt>
          <dd>Packet Elimination Function</dd>
          <dt>POF</dt>
          <dd>Packet Ordering Function</dd>
          <dt>PREOF</dt>
          <dd>Packet Replication, Elimination, and Ordering Functions</dd>
          <dt>PRF</dt>
          <dd>Packet Replication Function</dd>
        </dl>
      </section>
</section>

<section anchor="req-on-pof" numbered="true" toc="default">
      <name>Requirements for Adding PREOF to DetNet IP</name>
      <t>
     The requirements for adding PREOF to DetNet IP are: 
      </t>
      <ul spacing="normal">
        <li>
          <t>to reuse existing DetNet data plane solutions (e.g., 
		 <xref target="RFC8964" format="default"/>, <xref target="RFC9025" format="default"/>), and</t>
        </li>
        <li>
          <t>to allow the DetNet service sub-layer for IP packet-switched 
		 networks with minimal implementation effort. </t>
        </li>
      </ul>
      <t>
     The described solution leverages MPLS header fields without 
	 requiring the support of the MPLS forwarding plane.
      </t>
    </section>

<section anchor="pof-alg" numbered="true" toc="default">
      <name>Adding PREOF to DetNet IP</name>
      <section anchor="preof-relations" numbered="true" toc="default">
        <name>Solution Basics</name>
        <t>
	  The DetNet IP encapsulation supporting the DetNet service sub-layer is based
	  on the "UDP tunneling" concept. The solution creates a set of underlay 
	  UDP/IP tunnels between an overlay set of DetNet relay nodes. 
        </t>
        <t>
	  At the edge of a PREOF-capable DetNet IP 
	  domain, the DetNet flow is encapsulated in a UDP packet containing the 
	  sequence number used by PREOF within the domain. This solution 
	  maintains the 6-tuple-based DetNet flow identification in DetNet transit 
	  nodes, which operate at the DetNet forwarding sub-layer between the DetNet
	  service sub-layer nodes; therefore, it is compatible with 
	  <xref target="RFC8939" format="default"/>. <xref target="PREOF-IP-basics" format="default"/> shows how the 
	  PREOF-capable DetNet IP data plane fits into the DetNet sub-layers.
        </t>
        <figure anchor="PREOF-IP-basics">
          <name>PREOF-Capable DetNet IP Data Plane</name>
          <artwork align="center" name="" type="" alt=""><![CDATA[
   DetNet          IP
      .
      .
+------------+
|  Service   | d-CW, Service-ID (S-Label)
+------------+
| Forwarding | UDP/IP Header
+------------+

               *d-CW: DetNet Control Word
]]></artwork>
        </figure>
      </section>

 <section anchor="pof-blocks" numbered="true" toc="default">
        <name>Encapsulation</name>
        <t>
     The PREOF-capable DetNet IP encapsulation builds on encapsulating 
	 DetNet pseudowire (PW) directly over UDP. That is, it combines DetNet MPLS
	 <xref target="RFC8964" format="default"/> with DetNet MPLS-in-UDP <xref target="RFC9025" format="default"/>,
	 without using any F-Labels, as shown in <xref target="PREOF-IP-encap" format="default"/>. 
	 DetNet flows are identified at the receiving DetNet service sub-layer 
	 processing node via the S-Label and/or the UDP/IP header information. 
	 Sequencing information for PREOF is provided by the DetNet Control Word 
	 (d-CW) per <xref target="RFC8964" format="default"/>. The S-Label is used to identify
	 both the DetNet flow and the DetNet App-flow type. The UDP tunnel is used
	 to direct the packet across the DetNet domain to the next DetNet service 
	 sub-layer processing node.
        </t>
        <figure anchor="PREOF-IP-encap">
          <name>PREOF-Capable DetNet IP Encapsulation</name>
          <artwork align="center" name="" type="" alt=""><![CDATA[
+---------------------------------+
|                                 |
|         DetNet App-Flow         |
|       (Original IP) Packet      |
|                                 |
+---------------------------------+ <--\
|       DetNet Control Word       |    |
+---------------------------------+    +--> PREOF-capable
|       Service-ID (S-Label)      |    |    DetNet IP data
+---------------------------------+    |    plane encapsulation
|            UDP Header           |    |
+---------------------------------+    |
|            IP Header            |    |
+---------------------------------+ <--/
|            Data-Link            |
+---------------------------------+
|             Physical            |
+---------------------------------+
]]></artwork>
        </figure>
      </section>

 <section anchor="PREOF-IP-proc" numbered="true" toc="default">
        <name>Packet Processing</name>
        <t>
     IP ingress and egress nodes of the PREOF-capable DetNet IP domain 
	 add and remove a DetNet service-specific d-CW and Service-ID (i.e., 
	 S-Label). Relay nodes can change Service-ID values when processing a 
	 DetNet flow, i.e., incoming and outgoing Service-IDs of a DetNet flow 
	 can be different. Service-ID values are provisioned per DetNet 
	 service via configuration, e.g., via the Controller Plane described in 
	 <xref target="RFC8938" format="default"/>. In some PREOF topologies, the node performing 
	 replication sends the packets to multiple nodes performing, e.g., PEF or POF, and 
	 the replication node can use different Service-ID values for the 
	 different member flows for the same DetNet service.
        </t>
        <t>
     Note that the Service-ID is a local ID on the receiver side that identifies 
	 the DetNet flow at the downstream DetNet service sub-layer receiver.
        </t>
      </section>

 <section anchor="aggr" numbered="true" toc="default">
        <name>Flow Aggregation</name>
        <t>
     Two methods can be used for flow aggregation:
        </t>
        <ul spacing="normal">
          <li>
            <t>aggregation using same UDP tunnel, and </t>
          </li>
          <li>
            <t>aggregation of DetNet flows as a new DetNet flow. </t>
          </li>
        </ul>
        <t>
     In the first method, the different DetNet pseudowires use the same UDP tunnel, so they 
	 are treated as a single (aggregated) flow at the forwarding sub-layer. At the 
	 service sub-layer, each flow uses a different Service-ID 
	 (see <xref target="PREOF-IP-encap" format="default"/>).
        </t>
        <t>
	 For the second method, an additional hierarchy is created by 
	 adding an additional Service-ID and d-CW tuple to the encapsulation. 
	 The Aggregate-ID is a special case of a Service-ID,
	 whose properties are known only at the aggregation and deaggregation 
	 end points. It is a property of the Aggregate-ID that it is followed by a 
	 d-CW followed by a Service-ID/d-CW tuple. 
	 <xref target="PREOF-IP-aggr" format="default"/> shows the encapsulation in the case of 
	 aggregation. 
        </t>
        <figure anchor="PREOF-IP-aggr">
          <name>Aggregating DetNet Flows as a New DetNet Flow</name>
          <artwork align="center" name="" type="" alt=""><![CDATA[
+---------------------------------+
|                                 |
|         DetNet App-Flow         |
|         Payload  Packet         |
|                                 |
+---------------------------------+ <--\
|       DetNet Control Word       |    |
+---------------------------------+    +--> PREOF-capable
|       Service-ID (S-Label)      |    |    DetNet IP data
+---------------------------------+    |    plane encapsulation
|       DetNet Control Word       |    |
+---------------------------------+    |
|      Aggregate-ID (A-Label)     |    |
+---------------------------------+    |
|           UDP Header            |    |
+---------------------------------+    |
|            IP Header            |    |
+---------------------------------+ <--/
|            Data-Link            |
+---------------------------------+
|             Physical            |
+---------------------------------+
]]></artwork>
        </figure>
        <t>
   The aggregation method is configured in the 
   aggregation/deaggregation nodes. 
        </t>
        <t>
   If several DetNet flows are aggregated in a single UDP tunnel, they all need 
   to follow the same path in the network. 
        </t>
      </section>

 <section anchor="PREOF-proc" numbered="true" toc="default">
        <name>PREOF Processing</name>
        <t>
     A node operating on a received DetNet flow at the DetNet service sub-layer 
	 uses the local context associated with a received Service-ID to determine 
	 which local DetNet operation(s) are applied to the received packet.  A unique Service-ID 
	 can be allocated and can be used to identify a DetNet flow 
	 regardless of which input interface or UDP tunnel receives the packet.
	 It is important to note that Service-ID values are driven by the receiver, 
	 not the sender.
        </t>
        <t>
	 The DetNet forwarding sub-layer is supported by the UDP tunnel and is 
	 responsible for providing resource allocation and explicit routes.
        </t>
        <t>
     The outgoing PREOF encapsulation and processing can be implemented 
	 via the provisioning of UDP and IP header information.
	 Note, when PRF is performed at the DetNet service sub-layer, 
	 there are multiple member flows, and each member flow requires  
	 its own Service-ID, UDP header information, and IP header information. The headers for 
	 each outgoing packet are formatted according to the configuration 
	 information, and the UDP Source Port value is set to uniquely identify
	 the DetNet flow. The packet is then handled as a PREOF-capable DetNet 
	 IP packet.
        </t>
        <t>
     The incoming PREOF processing can be implemented by assigning 
	 a Service-ID to the received DetNet flow and processing the information in the UDP and IP headers. The 
	 provisioned information is used to identify incoming App-flows based
	 on the combination of Service-ID and/or incoming encapsulation header
	 information.  
        </t>
      </section>

 <section anchor="PREOF-IP-domain" numbered="true" toc="default">
        <name>PREOF-Capable DetNet IP Domain</name>
        <t>
	 <xref target="PREOF-domain" format="default"/> shows using PREOF in a PREOF-capable DetNet
	 IP network, where service protection is provided end to end, and not only 
	 within sub-networks, as is depicted in <eref target="https://www.rfc-editor.org/rfc/rfc8939#figure-4" brackets="angle">Figure 4</eref> of <xref target="RFC8939" format="default"/>. 	 
        </t>
        <figure anchor="PREOF-domain">
          <name>PREOF-Capable DetNet IP Domain</name>
          <artwork align="center" name="" type="" alt=""><![CDATA[
          <---------- PREOF-capable DetNet IP --------------->
                                    ______
                          ____     /      \__
               ____      /     \__/          \____________
+----+      __/    \____/                                 \    +----+
|src |_____/                                               \___| dst|
+----+     \_______            DetNet network    __________/   +----+
                   \_______                    _/
                           \         __     __/
                            \_______/  \___/

                                       +------------+
             +---------------E1---+    |            |
+----+       |               |    +---R3---+        |          +----+
|src |------R1           +---+             |        E3----O----+ dst|
+----+       |           |                 E2-------+          +----+
             +----------R2                 |
                         +-----------------+
]]></artwork>
        </figure>
      </section>
</section>

<section anchor="ctrl-mngmnt-PREOF-IP" numbered="true" toc="default">
      <name>Control and Management Plane Parameters</name>
      <t>
     The information needed to identify individual and aggregated DetNet flows
	 is summarized as follows:
      </t>
      <ul spacing="normal">
        <li>
          <t>Service-ID information to be mapped to UDP/IP flows. Note that, for 
	     example, a single Service-ID can map to multiple sets of UDP/IP 
		 information when PREOF is used.</t>
        </li>
        <li>
          <t>IPv4 or IPv6 Source Address field.</t>
        </li>
        <li>
          <t>IPv4 or IPv6 source address prefix length, where a zero
         (0) value effectively means that the address field is
         ignored.</t>
        </li>
        <li>
          <t>IPv4 or IPv6 Destination Address field.</t>
        </li>
        <li>
          <t>IPv4 or IPv6 destination address prefix length, where a
         zero (0) effectively means that the address field is
         ignored.</t>
        </li>
        <li>
          <t>IPv6 Flow Label field.</t>
        </li>
        <li>
          <t>IPv4 Protocol field being equal to "UDP". </t>
        </li>
        <li>
          <t>IPv6 (last) Next Header field being equal to "UDP".</t>
        </li>
        <li>
          <t>For the IPv4 Type of Service and IPv6 Traffic Class
         fields:
          </t>
          <ul spacing="normal">
            <li>
              <t>Whether or not the Differentiated Services Code Point (DSCP) field is used in flow identification,
				as the use of the DSCP field for flow identification is optional.</t>
            </li>
            <li>
              <t>If the DSCP field is used to identify a flow, then the flow
				identification information (for that flow) includes a list of
				DSCPs used by the given DetNet flow.</t>
            </li>
          </ul>
        </li>
        <li>
          <t>UDP Source Port. Support for both exact and wildcard matching is
         required. Port ranges can optionally be used.</t>
        </li>
        <li>
          <t>UDP Destination Port. Support for both exact and wildcard matching is
         required. Port ranges can optionally be used.</t>
        </li>
        <li>
          <t>For end systems, an optional maximum IP packet size
         that should be used for that outgoing DetNet IP flow.</t>
        </li>
      </ul>
      <t>
      This information is provisioned per DetNet flow via
      configuration, e.g., via the Controller Plane.
      </t>
      <t>
     Ordering of the set of information used to identify an individual 
	 DetNet flow can, for example, be used to 
	 provide a DetNet service for a specific UDP flow, with unique Source and 
	 Destination Port field values, while providing a different service for the
	 aggregate of all other flows with that same UDP Destination Port value.
      </t>
      <t>
     The minimum set of information for the configuration of the DetNet service 
	 sub-layer is summarized as follows:
      </t>
      <ul spacing="normal">
        <li>
          <t>App-flow identification information </t>
        </li>
        <li>
          <t>Sequence number length</t>
        </li>
        <li>
          <t>Type of PREOF to be executed on the DetNet flow</t>
        </li>
        <li>
          <t>Service-ID(s) used by the member flows</t>
        </li>
        <li>
          <t>Associated forwarding sub-layer information</t>
        </li>
        <li>
          <t>Service aggregation information</t>
        </li>
      </ul>
      <t>
     The minimum set of information for the configuration of the DetNet forwarding 
	 sub-layer is summarized as follows: 
      </t>
      <ul spacing="normal">
        <li>
          <t>UDP tunnel-specific information </t>
        </li>
        <li>
          <t>Traffic parameters</t>
        </li>
      </ul>
      <t>
	 These parameters are defined in the DetNet flow and service information model
	 <xref target="RFC9016" format="default"/> and the DetNet YANG model.
      </t>
      <t>
     Note: this document focuses on the use of MPLS-over-UDP/IP encapsulation throughout an 
	 entire DetNet IP network, making MPLS-based DetNet Operations, Administration, and Maintenance (OAM) techniques applicable
	 <xref target="RFC9546" format="default"/>.
	 Using the described encapsulation only for a portion of a DetNet IP network 
	 that handles PREOF would complicate OAM.
      </t>
    </section>

<section numbered="true" toc="default">
      <name>Security Considerations</name>
      <t>
     There are no new DetNet-related security considerations introduced by 
	 this solution. Security considerations of DetNet MPLS <xref target="RFC8964" format="default"/> and 
     DetNet MPLS over UDP/IP <xref target="RFC9025" format="default"/> apply.

      </t>
    </section>
    <section anchor="iana" numbered="true" toc="default">
      <name>IANA Considerations</name>
      <t>
   This document has no IANA actions.
      </t>
    </section>
  </middle>
  <back>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
	<xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8655.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8938.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8939.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8964.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9016.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9025.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9546.xml"/>
      </references>
      <references>
        <name>Informative References</name>

        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9550.xml"/>

        <reference anchor="IEEE8021CB">
          <front>
            <title>IEEE Standard for Local and metropolitan area
          networks -- Frame Replication and Elimination for Reliability
            </title>
            <author>
              <organization>IEEE</organization>
            </author>
            <date month="October" year="2017"/>
          </front>
          <seriesInfo name="IEEE Std" value="802.1CB-2017"/>
          <seriesInfo name="DOI" value="10.1109/IEEESTD.2017.8091139"/>
        </reference>
        <reference anchor="IEEE8021CBcv">
          <front>
            <title>IEEE Standard for Local and metropolitan area networks -- Frame Replication and Elimination for Reliability - Amendment 1: Information Model, YANG Data Model, and Management Information Base Module</title>
            <author>
              <organization>IEEE</organization>
            </author>
            <date month="February" year="2022"/>
          </front>
          <refcontent>Amendment to IEEE Std 802.1CB-2017</refcontent>
          <seriesInfo name="IEEE Std" value="802.1CBcv-2021"/>
          <seriesInfo name="DOI" value="10.1109/IEEESTD.2022.9715061"/>
        </reference>
      </references>
   </references>
     <section anchor="acks" numbered="false" toc="default">
      <name>Acknowledgements</name>
      <t>
   Authors extend their appreciation to <contact fullname="Stewart Bryant"/>, <contact fullname="Pascal Thubert"/>, <contact fullname="David Black"/>, 
   <contact fullname="Shirley Yangfan"/>, and <contact fullname="Greg Mirsky"/> for their insightful comments and productive 
   discussion that helped to improve the document.
      </t>
    </section>
  </back>
</rfc>
