<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<?rfc toc="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc iprnotified="no"?>
<?rfc strict="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<rfc category="info"
     docName="draft-ietf-detnet-mpls-over-ip-preof-06"
         ipr="trust200902"
         submissionType="IETF">
  <front>
    <title abbrev=" PREOF DetNet IP">
    Deterministic Networking (DetNet): DetNet PREOF via MPLS over UDP/IP</title>

  <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>
	
<!--
    <author fullname="James Bond" initials="J." surname="Bond">
      <organization>MI6</organization>
      <address>
        <email>james@bond.com</email>
      </address>
    </author>
-->

  <date />
  <workgroup>DetNet</workgroup>

  <abstract>
   <t>
     This document describes how DetNet IP data plane can support the Packet
	 Replication, Elimination, and Ordering Functions (PREOF) built on 
	 the existing MPLS PREOF solution defined for DetNet MPLS 
	 Data Plane and the mechanisms defined by MPLS-over-UDP technology.
   </t>
  </abstract>
  </front>

 <middle>
 <section title="Introduction" anchor="sec_intro">
  <t>
     The DetNet Working Group has defined Packet Replication (PRF), Packet 
	 Elimination (PEF) and Packet Ordering (POF) functions to provide 
	 service protection by the DetNet service sub-layer 
	 <xref target="RFC8655"/>. 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 the PRF and PEF functions is described in 
	 <xref target="IEEE8021CB"/> and the related YANG data model is defined 
	 in <xref target="IEEEP8021CBcv"/>. A possible implementation of POF 
	 function is described in <xref target="I-D.ietf-detnet-pof"/>.	 
     <xref target="PREOF-scene"/> shows a DetNet flow on which PREOF functions 
	 are applied during forwarding from the source to the destination. 
  </t>  

 <figure title="PREOF scenario in a DetNet network" anchor="PREOF-scene">
 <artwork align="center"><![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 functions require sequencing information to
	 be included in the packets of a DetNet compound flow.  This can be done 
	 by adding a sequence number or time stamp 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"/> specifies how 
	 sequencing information is encoded in the MPLS header. However, the DetNet 
	 IP data plane described in <xref target="RFC8939"/> does not specify how 
	 sequencing information can be encoded in the IP header. This documents 
	 provides sequencing information to DetNet IP nodes by re-using the DetNet 
	 MPLS over UDP/IP data plane <xref target="RFC9025"/> with the restriction 
	 of using zero F-labels.	 
  </t>

</section> <!-- end of introduction -->

<section title="Terminology">
 <section title="Terms Used in This Document">
  <t>
   This document uses the terminology established in the DetNet architecture
   <xref target="RFC8655"/>, and the reader is assumed
   to be familiar with that document and its terminology.
  </t>
 </section>

 <section title="Abbreviations">
  <t>
   The following abbreviations are used in this document:
   <list style="hanging" hangIndent="14">
    <t hangText="DetNet">Deterministic Networking.</t>
    <t hangText="PEF">Packet Elimination Function.</t>
    <t hangText="POF">Packet Ordering Function.</t>
	<t hangText="PREOF">Packet Replication, Elimination and Ordering Functions.</t>
    <t hangText="PRF">Packet Replication Function.</t>
   </list>
  </t>
 </section>

 <section title="Requirements Language">
  <t>
    The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
    "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
    "OPTIONAL" in this document are to be interpreted as described in
    BCP 14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and
    only when, they appear in all capitals, as shown here.
  </t>
 </section>
</section>  <!-- end of terminology -->

<!-- ===================================================================== -->

<section anchor="req-on-pof" title="Requirements for adding PREOF to DetNet IP">
  <t>
     The requirements for adding PREOF to DetNet IP are: 
	 <list style="symbols">
         <t>to reuse existing DetNet data plane solutions (e.g., 
		 <xref target="RFC8964"/>, <xref target="RFC9025"/>). </t>
         <t>to allow the DetNet service sub-layer for IP packet switched 
		 networks with minimal implementation effort. </t>
     </list>
  </t>
  <t>
     The described solution practically gains from MPLS header fields without 
	 requiring the support of the MPLS forwarding plane.
  </t>
</section>  <!-- end of requirements -->


<section anchor="pof-alg" title="Adding PREOF to DetNet IP">
 <section anchor="preof-relations" title="Solution Basics"> 
    <t>
	  The DetNet IP encapsulation supporting 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 an UDP packet containing the 
	  sequence number used by PREOF functions 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"/>. <xref target="PREOF-IP-basics"/> shows how the 
	  PREOF capable DetNet IP data plane fits into the DetNet sub-layers.
    </t>
	
 <figure title="PREOF capable DetNet IP data plane" anchor="PREOF-IP-basics">
 <artwork align="center"><![CDATA[
	
   DetNet          IP
      .
      .
+------------+
|  Service   | d-CW, Service-ID (S-label)
+------------+
| Forwarding | UDP/IP Header
+------------+
]]>
 </artwork></figure>
	
 </section>  <!-- end of Solution basics -->

 <section anchor="pof-blocks" title="Encapsulation">
  <t>
     The PREOF capable DetNet IP encapsulation builds on encapsulating 
	 DetNet PW directly over UDP. That is, it combines DetNet MPLS
	 <xref target="RFC8964"/> with DetNet MPLS-in-UDP <xref target="RFC9025"/>,
	 without using any F-Labels as shown in <xref target="PREOF-IP-encap"/>. 
	 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) as per <xref target="RFC8964"/>. 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 title="PREOF capable DetNet IP encapsulation" anchor="PREOF-IP-encap">
 <artwork align="center"><![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>  <!-- end of Encapsulation -->

 <section anchor="PREOF-IP-proc" title="Packet Processing">
  <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, i.e., via the Controller Plane described in 
	 <xref target="RFC8938"/>. 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 Service-IDs is a local ID on the receiver side providing identification 
	 of the DetNet flow at the downstream DetNet service sub-layer receiver.
  </t>
 </section>  <!-- end of Packet processing -->

 <section anchor="aggr" title="Flow Aggregation">
  <t>
     Two methods can be used for flow aggregation:
	 <list style="symbols">
         <t>aggregation using same UDP tunnel, </t>
		 <t>aggregating DetNet flows as a new DetNet flow. </t>
	 </list>  
  </t>
  <t>
     In the first case, the different DetNet PWs 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.
  </t>
  <t>
	 For the second option, an additional hierarchy is created thanks to an 
	 additional Service-ID and d-CW tuple added to the encapsulation. 
	 The Aggregate-ID is a special case of a Service-ID,
	 whose properties are known only at the aggregation and de-aggregation 
	 end points. It is a property of the Aggregate-ID that it is followed by a 
	 d-CW followed by an Service-ID/d-CW tuple. 
	 <xref target="PREOF-IP-aggr"/> shows the encapsulation in case of 
	 aggregation. 
  </t>

 <figure title="Aggregating DetNet flows as a new DetNet flow" anchor="PREOF-IP-aggr">
 <artwork align="center"><![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>
  
 </section>  <!-- end of Flow Aggregation -->

 <section anchor="PREOF-proc" title="PREOF Processing">
  <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 received packet.  A Service-ID 
	 can be allocated to be unique and enabling DetNet flow identification 
	 regardless of which input interface or UDP tunnel the packet is received.
	 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  
	 their own Service-ID, UDP 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 via the provisioning 
	 of received Service-ID, UDP and IP header information. 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>  <!-- end of PREOF procedures -->


 <section anchor="PREOF-IP-domain" title="PREOF capable DetNet IP domain">
  <t>
	 <xref target="PREOF-domain"/> shows using PREOF in a PREOF capable DetNet
	 IP network. 
  </t>
 <figure title="PREOF capable DetNet IP domain" anchor="PREOF-domain">
 <artwork align="center"><![CDATA[


          <---------- PREOF capable DetNet IP --------------->
                                    ______
                          ____     /      \__
               ____      /     \__/          \____________
+----+      __/    \____/                                 \    +----+
|src |_____/                                               \___| dst|
+----+     \_______            DetNet network    __________/   +----+
                   \_______                    _/
                           \         __     __/
                            \_______/  \___/

                                       +------------+
             +---------------E1---+    |            |
+----+       |               |    +---R3---+        |          +----+
|src |------R1           +---+             |        E3----O----+ dst|
+----+       |           |                 E2-------+          +----+
             +----------R2                 |
                         +-----------------+
]]>
 </artwork></figure>

 </section>  <!-- end of PREOF capable DetNet IP domain -->

</section>  <!-- end of Adding PREOF to DetNet IP -->


<section anchor="ctrl-mngmnt-PREOF-IP" title="Control and Management Plane Parameters">
  <t>
     The information needed to identify individual and aggregated DetNet flows
	 is summarized as follows:
     <list style="symbols">
      <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>
      <t>IPv4 or IPv6 source address field.</t>
      <t>IPv4 or IPv6 source address prefix length, where a zero
         (0) value effectively means that the address field is
         ignored.</t>
      <t>IPv4 or IPv6 destination address field.</t>
      <t>IPv4 or IPv6 destination address prefix length, where a
         zero (0) effectively means that the address field is
         ignored.</t>
      <t>IPv6 flow label field.</t>
      <t>IPv4 protocol field set to "UDP". </t>
      <t>IPv6 next header field set to "UDP".</t>
      <t>For the IPv4 Type of Service and IPv6 Traffic Class
         Fields:
              <list style="symbols">
                <t>Whether or not the DSCP field is used in flow identification
				as the use of the DSCP field for flow identification is optional.</t>
                <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>
              </list></t>
      <t>UDP Source Port. Support for both exact and wildcard matching is
         required. Port ranges can optionally be used.</t>
      <t>UDP Destination Port. Support for both exact and wildcard matching is
         required. Port ranges can optionally be used.</t>
      <t>For end systems, an optional maximum IP packet size
         that should be used for that outgoing DetNet IP flow.</t>
      </list>
      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:
      <list style="symbols">
        <t>App-flow identification information. </t>
        <t>Sequence number length.</t>
        <t>PREOF + related Service-ID(s).</t>
        <t>Associated forwarding sub-layer information.</t>
        <t>Service aggregation information.</t>
     </list>
  </t>
  <t>
     The minimum set of information for the configuration of the DetNet forwarding 
	 sub-layer is summarized as follows: 
      <list style="symbols">
        <t>UDP tunnel specific information. </t>
        <t>Traffic parameters.</t>
     </list>
  </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 OAM techniques applicable.
	 Using the described encapsulation only for a portion of a DetNet IP network 
	 that handles the PREOF functionality would complicate OAM.
  </t>

</section>  <!-- end of PREOF-IP management -->


<!-- ===================================================================== -->


<section title="Security Considerations">
  <t>
     There are no new DetNet related security considerations introduced by 
	 this solution.
  </t>
</section>


<section anchor="iana" title="IANA Considerations">
  <t>
   This document makes no IANA requests.
  </t>
</section>

<section anchor="acks" title="Acknowledgements">
 <t>
   Authors extend their appreciation to Stewart Bryant, Pascal Thubert, David Black, 
   Shirley Yangfan and Greg Mirsky for their insightful comments and productive 
   discussion that helped to improve the document.
  </t>
</section>

</middle>

<back>
  <references title="Normative References">
   <?rfc include="reference.RFC.2119"?>
   <?rfc include="reference.RFC.8174"?>
   <?rfc include="reference.RFC.8655"?>
   <?rfc include="reference.RFC.8938"?>
   <?rfc include="reference.RFC.8939"?>
   <?rfc include="reference.RFC.8964"?>
   <?rfc include="reference.RFC.9025"?>
  </references>
  <references title="Informative References">
   <?rfc include="reference.I-D.ietf-detnet-pof"?>
   <reference anchor="IEEE8021CB" 
			target="https://standards.ieee.org/standard/802_1CB-2017.html">
        <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="DOI" value="10.1109/IEEESTD.2017.8091139" />
   </reference>
   <reference anchor="IEEEP8021CBcv"
              target="https://www.ieee802.org/1/files/private/cv-drafts/d1/802-1CBcv-d1-2.pdf">
        <front>
          <title>FRER YANG Data Model and Management Information Base Module</title>
          <author initials="S." surname="Kehrer" fullname="Stephan Kehrer">
            <organization>IEEE 802.1</organization>
          </author>
          <date month="March" year="2021"/>
        </front>
        <seriesInfo name="IEEE P802.1CBcv /D1.2" value="P802.1CBcv"/>
        <format type="PDF" target="https://www.ieee802.org/1/files/private/cv-drafts/d1/802-1CBcv-d1-2.pdf"/>
   </reference>
  </references>
 </back>
</rfc>
