<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY rfc2119 PUBLIC "" "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY rfc3031 PUBLIC "" "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.3031.xml">
<!ENTITY rfc3032 PUBLIC "" "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.3032.xml">
<!ENTITY rfc3985 PUBLIC "" "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.3985.xml">
<!ENTITY rfc4023 PUBLIC "" "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.4023.xml">
<!ENTITY rfc4090 PUBLIC "" "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.4090.xml">
<!ENTITY rfc4385 PUBLIC "" "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.4385.xml">
<!ENTITY rfc4446 PUBLIC "" "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.4446.xml">
<!ENTITY rfc4447 PUBLIC "" "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.4447.xml">
<!ENTITY rfc4448 PUBLIC "" "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.4448.xml">
<!ENTITY rfc4553 PUBLIC "" "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.4553.xml">
<!ENTITY rfc4664 PUBLIC "" "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.4664.xml">
<!ENTITY rfc4817 PUBLIC "" "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.4817.xml">
<!ENTITY rfc4875 PUBLIC "" "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.4875.xml">
<!ENTITY rfc5036 PUBLIC "" "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5036.xml">
<!ENTITY rfc5086 PUBLIC "" "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5086.xml">
<!ENTITY rfc5087 PUBLIC "" "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5087.xml">
<!ENTITY rfc5254 PUBLIC "" "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5254.xml">
<!ENTITY rfc5129 PUBLIC "" "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5129.xml">
<!ENTITY rfc5305 PUBLIC "" "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5305.xml">
<!ENTITY rfc5331 PUBLIC "" "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5331.xml">
<!ENTITY rfc5332 PUBLIC "" "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5332.xml">
<!ENTITY rfc5440 PUBLIC "" "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5440.xml">
<!ENTITY rfc5462 PUBLIC "" "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5462.xml">
<!ENTITY rfc5586 PUBLIC "" "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5586.xml">
<!ENTITY rfc5659 PUBLIC "" "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5659.xml">
<!ENTITY rfc5921 PUBLIC "" "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5921.xml">
<!ENTITY rfc5960 PUBLIC "" "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5960.xml">
<!ENTITY rfc6073 PUBLIC "" "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6073.xml">
<!ENTITY rfc6275 PUBLIC "" "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6275.xml">
<!ENTITY rfc6371 PUBLIC "" "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6371.xml">
<!ENTITY rfc6373 PUBLIC "" "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6373.xml">
<!ENTITY rfc6378 PUBLIC "" "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6378.xml">
<!ENTITY rfc6426 PUBLIC "" "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6426.xml">
<!ENTITY rfc6437 PUBLIC "" "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6437.xml">
<!ENTITY rfc6540 PUBLIC "" "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6540.xml">
<!ENTITY rfc6564 PUBLIC "" "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6564.xml">
<!ENTITY rfc6621 PUBLIC "" "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6621.xml">
<!ENTITY rfc6658 PUBLIC "" "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6658.xml">
<!ENTITY rfc6718 PUBLIC "" "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6718.xml">
<!ENTITY rfc6733 PUBLIC "" "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6733.xml">
<!ENTITY rfc6790 PUBLIC "" "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6790.xml">
<!ENTITY rfc7271 PUBLIC "" "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7271.xml">
<!ENTITY rfc7348 PUBLIC "" "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7348.xml">
<!ENTITY rfc7426 PUBLIC "" "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7426.xml">
<!ENTITY rfc7432 PUBLIC "" "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7432.xml">
<!ENTITY rfc7510 PUBLIC "" "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7510.xml">

<!ENTITY I-D.ietf-detnet-dp-alt PUBLIC "" "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-detnet-dp-alt.xml">
<!ENTITY I-D.ietf-detnet-problem-statement PUBLIC "" "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-detnet-problem-statement.xml">
<!ENTITY I-D.ietf-detnet-architecture PUBLIC "" "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-detnet-architecture.xml">
<!ENTITY I-D.ietf-mpls-residence-time SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-mpls-residence-time">

<!ENTITY I-D.ietf-6man-segment-routing-header PUBLIC "" "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-6man-segment-routing-header.xml">

]>

<?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="std"
     docName="draft-ietf-detnet-dp-sol-02"
         ipr="trust200902"
         submissionType="IETF">
  <front>
    <title abbrev="DetNet Data Plane Encapsulation">
     DetNet Data Plane Encapsulation</title>

  <author role="editor" fullname="Jouni Korhonen" initials="J." surname="Korhonen">
   <organization abbrev="Nordic">Nordic Semiconductor</organization>
   <address>
    <email>jouni.nospam@gmail.com</email>
   </address>
  </author>

  <author fullname="Loa Andersson" initials="L." surname="Andersson">
   <organization abbrev="Huawei">Huawei</organization>
   <address>
    <email>loa@pi.nu</email>
   </address>
  </author>
  
  <author fullname="Yuanlong Jiang" initials="Y." surname="Jiang">
   <organization abbrev="Huawei">Huawei</organization>
   <address>
    <email>jiangyuanlong@huawei.com</email>
   </address>
  </author>
  
  <author fullname="Norman Finn" initials="N."
      surname="Finn">
      <organization>Huawei</organization>
      <address>
          <postal>
              <street>3101 Rio Way</street>
              <city>Spring Valley</city>
              <code>91977</code>
              <region>CA</region>
              <country>USA</country>
          </postal>
          <email>norman.finn@mail01.huawei.com</email>
      </address>
  </author>

  <author fullname="Bal&aacute;zs Varga" initials="B." surname="Varga">
	<organization>Ericsson</organization>
	<address>
	 <postal>
	  <street>Konyves K&aacute;lm&aacute;n krt. 11/B</street>
	  <city>Budapest</city>
	  <country>Hungary</country>
	  <code>1097</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>Konyves K&aacute;lm&aacute;n krt. 11/B</street>
	  <city>Budapest</city>
	  <country>Hungary</country>
	  <code>1097</code>
	 </postal>
	 <email>janos.farkas@ericsson.com</email>
	</address>
	</author>

    <author fullname="Carlos J. Bernardos"
            initials="CJ."
            surname="Bernardos">
      <organization abbrev="UC3M">
        Universidad Carlos III de Madrid
      </organization>
      <address>
        <postal>
          <street>Av. Universidad, 30</street>
          <city>Leganes, Madrid</city>
          <code>28911</code>
          <country>Spain</country>
        </postal>
        <phone>+34 91624 6236</phone>
        <email>cjbc@it.uc3m.es</email>
        <uri>http://www.it.uc3m.es/cjbc/</uri>
      </address>
    </author>

    <author fullname="Tal Mizrahi" initials="T."
     surname="Mizrahi">
     <organization>Marvell</organization>
     <address>
      <postal>
       <street>6 Hamada st.</street>
       <city>Yokneam</city>
       <country>Israel</country>
      </postal>
      <email>talmi@marvell.com</email>
     </address>
    </author>

    <author initials='L.' surname="Berger" fullname='Lou Berger'>
      <organization abbrev="LabN">LabN Consulting, L.L.C.</organization>
      <address>
        <email>lberger@labn.net</email>
      </address>
    </author>
  <!--author fullname="Donald Fauntleroy Duck" initials="D. F." surname="Duck">
   <organization abbrev="Royal Bros.">Royal Bros.</organization>
   <address>
    <postal>
     <street>13 Paradise Road</street>
     <city>Duckburg</city>
     <region>Calisota</region>
     <country>USA</country>
    </postal>
   </address>
  </author-->
  <date />
  <workgroup>DetNet</workgroup>

  <abstract>
   <t>
    This document specifies Deterministic Networking data plane encapsulation solutions. The
    described data plane solutions can be applied over either IP or MPLS Packet Switched Networks.
   </t>
  </abstract>
  </front>

 <middle>
 <section title="Introduction" anchor="sec_intro">
  <t>
    Deterministic Networking (DetNet) is a service that can be offered by a network to DetNet flows.
    DetNet provides these flows extremely low packet loss rates and assured maximum end-to-end
    delivery latency.  General background and concepts of DetNet can be found in <xref
    target="I-D.ietf-detnet-architecture"/>.
  </t>
  <t>
    This document specifies the DetNet data plane and the on-wire encapsulation of DetNet flows. The
    specified encapsulation provides the building blocks to enable the DetNet service layer
    functions and allow flow identification as described in the DetNet Architecture. Two data plane
    definitions are given. 
     <list style="numbers">
		<t>MPLS-based: The enacapsulation resembles PseudoWires (PW) with an MPLS Packet Switched
           Network (PSN) <xref target="RFC3985"/><xref target="RFC4385"/>.
        </t>
        <t>Native-IP-based: The encapsulating protocol is IPv6 and the solution relies on IP header
           fields, existing and DetNet specific IPv6 eaxtension header options <xref target="RFC8200"/>.
		</t>
    </list>
    <list><t>[Editor's note: MPLS- and IPv6-based solutions are likely to be split into different
    documents.]</t></list>
  </t>
  <t>
    It is worth noting that while MPLS-based solution can transport IP packets a native-IP solution
    is meant for deployments where the DetNet service layer functions are provided at the IP-layer
    rather than the underlying transport network. The primary reason for this is the benefit gained
    by enabling the use of a normal application stack, where transport protocols such as TCP or UDP
    are directly encapsulated in IP.
  </t>
  <t>
    The DetNet transport layer functionality that provides congestion protection for DetNet flows
    is assumed to be in place in a DetNet node.
  </t>
  <t>
   Furthermore, this document also describes how DetNet flows are identified, how a DetNet
   Relay/Edge/Transit nodes work, and how the Packet Replication and Elimination function (PREF) is
   implemented with the two data plane solutions.
  </t>
  <t>
   This document does not define the associated control plane functions, or Operations,
   Administration, and Maintenance (OAM).  It also does not specify traffic handling capabilities
   required to deliver congestion protection and latency control for DetNet flows at the DetNet
   transport layer. 
  </t>
 </section>

 <section title="Terminology">
  <section title="Terms used in this document">
  <t>
   This document uses the terminology established in the DetNet architecture <xref
   target="I-D.ietf-detnet-architecture"/> and the DetNet Data Plane Solution Alternatives <xref
   target="I-D.ietf-detnet-dp-alt"/>.
  </t>
  <t>
   <list style="hanging" hangIndent="14">

    <t hangText="T-Label">A label used to identify the LSP used to
    transport a DetNet flow across an MPLS PSN, e.g., a hop-by-hop
    label used between label switching routers (LSR).</t>
    
    <t hangText="S-Label">A DetNet "service" label that is used between DetNet
    nodes that implment also the DetNet service layer functions. An S-Label is
    also used to identify a DetNet flow at DetNet service layer.</t>
	
    <!--t hangText="DetNet Label">
     A label that is used to identify a DetNet flow at DetNet service layer.</t--> 
	
    <t hangText="Flow Label">
     IPv6 header field that is used to identify a DetNet flow (together with the source IP address field).</t> 
    
    <t hangText="Local-ID">
     A DetNet Edge and Relay node internal construct that uniquely identifies a DetNet flow within a
     node and never appear on-wire. It may be used to select proper forwarding and/or DetNet
     specific service function.</t>

    <t hangText="PREF">
     A Packet Replication and Elimination Function (PREF) does the replication
     and elimination processing of DetNet flow packets in edge or relay
     nodes. The replication function is essentially the existing 1+1 protection
     mechanism. The elimination function reuses and extends the existing duplicate 
	 detection mechanism to operate over multiple (separate) DetNet member flows of a 
	 DetNet compound flow.</t>
    
    <t hangText="DetNet Control Word">
	  A control word used for sequencing and identifying duplaicate packets at the DetNet service
      layer. </t> 
    </list>
   </t>
  </section>

  <section title="Abbreviations">
  <t>
   The following abbreviations used in this document:
   <list style="hanging" hangIndent="14">
    <t hangText="AC">Attachment Circuit.</t>
    <t hangText="CE">Customer Edge equipment.</t>
    <t hangText="CoS">Class of Service.</t>
    <t hangText="CW">Control Word.</t>
    <t hangText="d-CW">DetNet Control Word.</t>
    <t hangText="DetNet">Deterministic Networking.</t>
    <t hangText="DF">DetNet Flow.</t>
    <t hangText="L2VPN">Layer 2 Virtual Private Network.</t>
    <t hangText="LSR">Label Switching Router.</t>
    <t hangText="MPLS">Multiprotocol Label Switching.</t>
    <t hangText="MPLS-TP">Multiprotocol Label Switching - Transport Profile.</t>
    <t hangText="MS-PW">Multi-Segment PseudoWire (MS-PW).</t>
    <t hangText="NSP">Native Service Processing.</t>
    <t hangText="OAM">Operations, Administration, and Maintenance.</t>
    <t hangText="PE">Provider Edge.</t>
    <t hangText="PREF">Packet Replication and Elimination Function.</t>
    <t hangText="PSN">Packet Switched Network.</t>
    <t hangText="PW">PseudoWire.</t>
    <t hangText="QoS">Quality of Service.</t>
    <t hangText="TSN">Time-Sensitive Network.</t>
   </list>
  </t>
  </section>

 </section>

 <section title="Requirements language">
  <t>
   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL",
   "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY",
   and "OPTIONAL" in this document are to be interpreted as
   described in <xref target="RFC2119"/>.
  </t>
 </section>

 <section title="DetNet data plane overview" anchor="sec_dt_dp">
  <t>
   This document describes how to use IP and/or MPLS to support a data plane method of flow
   identification and packet formwarding over layer-3. Two different cases are covered: (i) the
   inter-connect scenario, in which IEEE802.1 TSN is routed over a layer-3 network (i.e., to enlarge
   the layer-2 domain), and (ii) native connectivity between DetNet-aware end systems.
  </t>
  <t>
   <xref target="fig_8021_detnet"/> illustrates how DetNet can provide services for IEEE 802.1TSN
   end systems over a DetNet enabled network.  The edge nodes insert and remove required DetNet data
   plane encapsulation.  The 'X' in the edge and relay nodes represents a potential DetNet flow
   packet replication and elimination point.  This conceptually parallels L2VPN services, and could
   leverage existing related solutions as discussed below.
  </t>

  <figure align="center" anchor="fig_8021_detnet"
  title="IEEE 802.1TSN over DetNet">
  <artwork><![CDATA[
     TSN    |<---------- End to End DetNet Service ------>|  TSN
    Service |           Transit           Transit         | Service
TSN  (AC)   |        |<-Tunnel->|        |<-Tnl->|        |  (AC)  TSN
End    |    V        V     1    V        V   2   V        V   |    End
System |    +--------+          +--------+       +--------+   |  System
+---+  |    |   E1   |==========|   R1   |=======|   E2   |   |   +---+
|   |--|----|._X_....|..DetNet..|.._ _...|..DF3..|...._X_.|---|---|   |
|CE1|  |    |    \   |  Flow 1  |   X    |       |   /    |   |   |CE2|
|   |       |     \_.|...DF2....|._/ \_..|..DF4..|._/     |       |   |
+---+       |        |==========|        |=======|        |       +---+
    ^       +--------+          +--------+       +--------+       ^
    |        Edge Node          Relay Node       Edge Node        |
    |                                                             |
    |<----- Emulated Time Sensitive Networking (TSN) Service ---->|
]]>
</artwork>
</figure>

 <t>
  <xref target="fig_pw_detnet"/> illustrates how end to end MPLS-based DetNet service can be
  provided.  In this case, the end systems are able to send and receive DetNet flows.  For example,
  an end system sends data encapsulated in MPLS.  Like earlier the 'X' in the end systems, edge and
  relay nodes represents potential DetNet flow packet replication and elimination points. Here the
  relay nodes may change the underlying transport, for example tunneling IP over MPLS, or simply
  interconnect network segments.
 </t>

<figure align="center" anchor="fig_pw_detnet"
 title="MPLS-Based Native DetNet">
<artwork><![CDATA[
      DetNet                                             DetNet
      Service          Transit          Transit          Service
DetNet  |             |<-Tnl->|        |<-Tnl->|            | DetNet
End     |             V   1   V        V   2   V            | End
System  |    +--------+       +--------+       +--------+   | System
+---+   |    |   R1   |=======|   R2   |=======|   R3   |   |  +---+
|  X...DFa...|._X_....|..DF1..|.__ ___.|..DF3..|...._X_.|.DFa..|.X |
|CE1|========|    \   |       |   X    |       |   /    |======|CE2|
|   |   |    |     \_.|..DF2..|._/ \__.|..DF4..|._/     |   |  |   |
+---+        |        |=======|        |=======|        |      +---+
    ^        +--------+       +--------+       +--------+      ^
    |        Relay Node       Relay Node       Relay Node      |
    |                                                          |
    |<--------------- End to End DetNet Service -------------->|
]]></artwork>
</figure>


 <t>
  <xref target="fig_ip_detnet"/> illustrates how end to end IP-based DetNet service
  can be provided. In this case, the end systems are able to send and receive
  DetNet flows.  [Editor's note: TBD]  
 </t>

<figure align="center" anchor="fig_ip_detnet"
 title="IP-Based Native DetNet">
<artwork><![CDATA[
NOTE: This figures is TBD

      DetNet                                             DetNet
      Service          Transit          Transit          Service
DetNet  |             |<-Tnl->|        |<-Tnl->|            | DetNet
End     |             V   1   V        V   2   V            | End
System  |    +--------+       +--------+       +--------+   | System
+---+   |    |   R1   |=======|   R2   |=======|   R3   |   |  +---+
|  X...DFa...|        |       |        |       |        |     .|.X |
| H1|========|        |       |        |       |        |======| H2|
|   |   |    |        |       |        |       |        |   |  |   |
+---+        |        |=======|        |=======|        |      +---+
    ^        +--------+       +--------+       +--------+      ^
    |        Relay Node       Relay Node       Relay Node      |
    |                                                          |
    |<--------------- End to End DetNet Service -------------->|
]]></artwork>
</figure>
 
<section title="DetNet data plane encapsulation requirements">
 <t>
 Two major groups of scenarios can be distinguished which require flow
 identification during transport:
 </t>

 <t><list style="numbers">
  <t>DetNet function related scenarios:
  <list style="symbols">
   <t>Congestion protection and latency control: usage of allocated resources (queuing, policing, shaping).</t>
   <t>Explicit routes: select/apply the flow specific path.</t>
   <t>Service protection: recognize DetNet compound and member flows for replication an elimination.</t>
  </list>
    <list style="hanging">
	   <t hangText="Comment #12">
            I am not sure whether the correct architectural construct is flow
            or flow group. Flow suggests that sharing/aggregation is not allowed
            but whether this is allowed or not is an application specific issue.
           </t>
	   <t hangText="Discussion:">
            Agree that a flow group would be a better characterization. 
  	 </t>
	   <t hangText="Comment #13">
            I think that there needs to be some clarification as to whether FG is
            is understood by the DN system exclusively or whether there is an 
            expectation that it is understood by the underlay.
           </t>
	   <t hangText="Discussion:">
            Agree that more detail is needed here. DetNet aware nodes need to
	    understand flow groups. Underlay needs to be aware of flow groups at
	    the resource allocation level.
  	 </t>
	</list>
 </t>
 <t>OAM function related scenarios:
  <list style="symbols">
   <t>troubleshooting (e.g., identify misbehaving flows, etc.)</t>
   <t>recognize flow(s) for analytics (e.g., increase counters, etc.)</t>
   <t>correlate events with flows (e.g., volume above threshold, etc.)</t>
   <t>etc.</t>
  </list>
 </t>
 </list></t>
 <t>
  Each DetNet node (edge, relay and transit) use an internal/implementation specific local-ID of the
  DetNet-(compound)-flow in order to accomplish its role during transport. Recognizing the DetNet
  flow is more relaxed for edge and relay nodes, as they are fully aware of both the DetNet service
  and transport layers. The primary DetNet role of intermediate transport nodes is limited to
  ensuring congestion protection and latency control for the above listed DetNet functions.
 </t>
 <t>
  The DetNet data plane allows for the aggregation of DetNet flows, e.g., via MPLS hierarchical
  LSPs, to improved scaling.  When DetNet flows are aggregated, transit nodes may have limited
  ability to provide service on per-flow DetNet identifiers. Therefore, identifying each individual
  DetNet flow on a transit node may not be achieved in some network scenarios, but DetNet service
  can still be assured in these scenarios through resource allocation and control.
    <list style="hanging">
	   <t hangText="Comment #14">
           You could introduce the concept of a flow group identified into the
           packet. You may also include a flow id at a lower layer.
           </t>
	  <t hangText="Discussion:">
		  Agree on the identification properties. Adding a specific id into actual
		  on-wire formats is not necessarily needed.
	  </t>
	</list>
 </t>

 <t>
  On each DetNet node dealing with DetNet flows, an internal local-ID is assumed to determine what
  local operation a packet goes through. Therefore, local-IDs has to be unique on each edge and
  relay nodes. Local-ID is unambiguously bound to the DetNet flow. 
 </t>
 </section>

 <section title="Packet replication and elimination considerations">
  <t>
   DetNet service layer introduces packet replication and elimination functionality (PREF) for use
   in DetNet edge and relay node and end system packet processing.  PREF MAY be enabled in a DetNet
   node and the required processing is only applied to packets with  a positive flow identification
   at the DetNet service layer. PREF utilizes a sequence number carried within a DetNet flow
   packets.
  </t>
  <t>
   At a DetNet node level the output of the PREF elimination function is always a single packet.
   The output of the PREF replication function at a DetNet node level is always one or more packets
   (i.e., 1:M replication). The replicated packets MUST share the same d-CW i.e., the sequence
   number is the same for each member flow of the compound flow. The location and mechanism on the
   packet processing pipeline used for replication is implementation specific.
  </t>
  <t>
   The complex part of the DetNet PREF processing is tracking the history of received packets for
   multiple DetNet member flows. These ingress DetNet member flows (to a node) MUST have the same
   local-ID if they belong to the same DetNet (compound) flow and share the same sequence number
   counter and the history information. The location of the packet elimination on the packet
   processing pipeline is implementation specific.
  </t>
 </section>
 <section title="Packet reordering considerations">
  <t>     
   DetNet service layer introduces also packet reordering functionality for use in DetNet edge and
   relay node and end system packet processing. The reordering functionality MAY be enabled in a
   DetNet node. The reordeing functionality relies on a presence of sequence numbers in a DetNet
   (compound) flows. The reordering processing is only applied to packets with  a positive flow
   identification at the DetNet service layer.
  </t>
 </section>


</section>

<!-- ================================================================= -->
<!-- =================== General Encap considerations ================ -->
<!-- ================================================================= -->

<section title="DetNet encapsulation" anchor="dn-gen-encap-solution">

 <section title="End-system specific considerations">
  <t>
  Data-flows requiring DetNet service are generated and terminated on end-systems. Encapsulation depends on application and its preferences. In a DetNet (or even a TSN) domain the DN (TSN) functions use at most two flow parameters, namely Flow-ID and Seq.Number. However, an application may exchange further flow related parameters (e.g., time-stamp), which are not considered by DN functions. 
  </t>
  
  <t> Two types of end-systems are distinguished: 
  <list style="symbols">
	<t> L3 (IP) end-system: application over L3  </t>
	<t> L2 (Ethernet) end-system: application directly over L2 </t>
    </list>
  </t>
  
  <t> In case of Ethernet end-systems the application data is encapsulated directly in L2. From the DN domain perspective no upper layer protocols are visible. The Data-flow uses only Ethernet tag(s) and further flow specific parameters (if needed) are hidden inside the PDU. 
  </t>

  <t> The IP end-system scenario is different. Data-flows are encapsulated directly in L3 (i.e., IP) and the application may use further upper layer protocols (e.g., RTP). Many valid combinations exist, and it may be application specific how the IP header fields are used. Also, usage of further upper layer protocols depends on application requirements (e.g., time-stamp). Some examples for encoding of Flow-ID or Seq.Number attributes: IP address, IPv6-Flow-label, L4 ports, RTP-header, etc. 
  </t>

  <t> As a general rule, DetNet domains MUST be capable to forward any Data-flows and the DetNet domain MUST NOT intend to mandate end-system encapsulation format. 
  </t>

  <t> Furthermore, no application-level-proxy function is envisioned inside the DetNet domain, so end-systems peer with end-systems using the same application encapsulation format (see figure below):
    <list style="symbols">
	<t> L3 end-systems peer with L3 end-systems and </t>
	<t> L2 end-systems peer with L2 end-systems </t>
    </list> 
  </t>

  <figure title="End-systems and the DetNet domain" anchor="fig_es_connect">
  <artwork align="center"><![CDATA[
+-----+
|  X  |                               +-----+
+-----+                               |  X  |
| Eth |               ________        +-----+
+-----+     _____    /        \       | Eth |
       \   /     \__/          \___   +-----+
        \ /                        \ /
         0======== tunnel-1 ========0_
         |                             \
          \                             |
          0========= tunnel-2 =========0
         / \                        __/ \
  +-----+   \__     DetNet domain  /     \
  |  X  |      \         __       /       +-----+
  +-----+       \_______/  \_____/        |  X  |
  |  IP |                                 +-----+
  +-----+                                 |  IP |
                                          +-----+
  ]]>
    </artwork></figure>

 </section>

 <section title="DetNet domain specific considerations">

  <t> From connection type perspective three scenarios are distinguished:
    <list style="numbers">
	<t> Directly attached: end-system is directly connected to an edge node </t>
	<t> Indirectly attached: end-system is behind a (L2-TSN / L3-DetNet) sub-net  </t>
	<t> DN integrated: end-system is part of the DetNet domain  </t>
    </list>
  </t>
  
  <t> L3 end-systems may use any of these connection types, however L2 end-systems may use only the first two (directly or indirectly attached). DetNet domain MUST allow communication between any end-systems of the same type (L2-L2, L3-L3), independent of their connection type and DetNet capability. However directly attached and indirectly attached end-systems have no knowledge about the DetNet domain and its encapsulation format at all. See the figure below for L3 end-system scenarios.   
  </t>

  <figure title="Connection types of L3 end-systems" anchor="fig_es_con_types">
  <artwork align="center"><![CDATA[
                                   ____+----+
           +----+        _____    /    | ES3|
           | ES1|____   /     \__/     +----+___
           +----+    \ /                        \
                      +                          | 
              ____     \                        _/ 
+----+     __/    \     +__    DetNet domain   /
| ES2|____/  L2/L3 |___/   \         __     __/
+----+    \_______/         \_______/  \___/

  ]]>
    </artwork></figure>
  

 <section title="DetNet Bridging Service">
  
  <t> The simplest DetNet service is to provide bridging (i.e., tunneling for L2), where the connected hosts are in the same broadcast (BC) domain. Forwarding over the DetNet domain is based on L2 (MAC) addresses (i.e. dst-MAC), so L2 headers MUST be kept. For both IP and MPLS PSN a DetNet specific tunnel encapsulation MUST be introduced. 
  </t>

  <figure title="Encapsulation format for DetNet Bridging" anchor="fig_encap_DN_bridging">
  <artwork align="center"><![CDATA[
                     +------+
                     |  X   |
            +------+ +------+
            |  X   | |  IP  |
            +------+ +------+
End+system  |  L2  | |  L2  |
      +-----+======+-+======+--+======+-+======++
DetNet tunnel                  |  IP  | | MPLS |
                               +------+ +------+
                               |  L2  | |  L2  |
                               +------+ +------+

Examples

                               +------+ +------+
                               |  X   | |  X   |
            +------+ +------+  +------+ +------+
            |  X   | |  X   |  |  IP  | |  IP  |
            +------+ +------+  +------+ +------+
            |  L2  | |  L2  |  |  L2  | |  L2  |
           ++======+-+======+--+======+-+======++
            |  IP  | | MPLS |  |  IP  | | MPLS |
            +------+ +------+  +------+ +------+
            |  L2  | |  L2  |  |  L2  | |  L2  |
            +------+ +------+  +------+ +------+
  ]]>
    </artwork></figure>
  
  <t> As shown on the figure both L2 and L3 end-systems can be served by such a DetNet Bridging service.   
  </t>
  </section>

 <section title="DetNet Routing Service">

  <t>DetNet Routing service provides routing, therefore available only for L3 hosts that are in different BC domains. Forwarding over the DetNet domain is based on L3 (IP) addresses (i.e. dst-IP).
  </t>

  <section title="MPLS PSN">
  <t> In case of an MPLS PSN at the ingress/egress (i.e., PE nodes of DetNet domain) the IP packets are encapsulated in MPLS. The data-flow IP header MUST be preserved as-is. 
  </t>

  <figure title="Encapsulation format for DetNet Routing in MPLS PSN for L3 end-systems" anchor="fig_mpls_DN_routing">
  <artwork align="center"><![CDATA[
           +------+                         +------+
           |  X   |                         |  X   |
           +------+                         +------+
End+system |  IP  |                         |  IP  |
      -----+------+-------+======+---     --+======+--
DetNet                    | MPLS |          | MPLS |
                          +------+          +------+
                          |  L2  |          |  L2  |
                          +------+          +------+
  ]]>
    </artwork></figure>
  
  </section>

  <section title="IP PSN">
  <t> In case of an IP PSN the same tunneling concept can be used as for an MPLS PSN, but the tunnel is constructed by a new IP header (and possible upper layer fields). The data-flow IP header MUST be preserved as-is.   
  </t>

  <figure title="Encapsulation format for DetNet Routing in IP PSN for L3 end-systems" anchor="fig_ip_DN_routing">
  <artwork align="center"><![CDATA[
           +------+                         +------+
           |  X   |                         |  X   |
           +======+                         +------+
End-system |  IP  |                         |  IP  |
      -----+------+-------+======+---     --+======+--
DetNet                    |  IP  |          |  IP  |
                          +------+          +------+
                          |  L2  |          |  L2  |
                          +------+          +------+
  ]]>
    </artwork></figure>
  
  <t> DetNet IP header contains the IP addresses of the ingress/egress PE nodes of DetNet domain. The End-system IP header contains the IP addresses of the end-systems.    
  </t>

  <t> Note: In case of IP PSN one may consider avoiding the additional IP encapsulation, however there are many issues with such an approach. First, the DetNet nodes MUST be able to extract from the IP header (and maybe upper layers) the attributes required by DetNet functions (i.e. Flow-ID, Seq.Number). The challenge is that encoding of those attributes may be application specific, so DetNet nodes MUST be prepared to handle all application specific formats. Second, adding further fields (e.g., explicit path information) to an existing IP header may be impossible (e.g., due to security/encryption). Furthermore, DetNet domain IP-header format may collide with IP-header format used by the source of a flow. Implementing such an approach requires that source encapsulation is in-line with DetNet domain encapsulation format, however we do not intend to mandate end-systems' encapsulation format (see former text: As a general rule, DetNet domains MUST be capable to forward any Data-flows and the DetNet domain MUST NOT intend to mandate end-system encapsulation format.).   
  </t>
  
  </section>
  
  </section> <!-- -->
  </section>

  
<section title="DetNet Inter-Working Function (DN-IWF)">

<section title="Networks with multiple technology segments">

  <t> There are network scenarios, where the DetNet domain contains multiple technology segments (IP, MPLS) and all those segments are under the same administrative control. Furthermore, DetNet nodes may be interconnected via TSN segments.    
  </t>
  <t> An important aspect of DetNet network design is placement of DetNet functions across the domain. Designs based on segment-by-segment optimization can provide only suboptimal solutions. In order to achieve global optimum Inter-Working Functions (DN-IWF) can be placed at segment border nodes, which stich together DetNet flows across connected segments.    
  </t>
  <t> DN-IWF may ensure that flow attributes are correlated across segment borders. For example, there are two DetNet functions which require Seq.Numbers: (1) Elimination: removes duplications from flows and (2) IOD: ensures in-order-delivery of packet in a flow. Stitching flows together and correlating attributes means for example that replication of packets can happen in one segment and elimination of duplicates in a different one.   
  </t>

  <figure title="Optimal replication and elimination placement across technology segments example" anchor="fig_pref_xcrs_segments">
  <artwork align="center"><![CDATA[
                                   ______   
                         _____    /      \__ 
            ____        /     \__/          \___    ______
+----+   __/    +======+                        +==+      \     +----+
|src |__/  Seg1  )     |                        |  \  Seg3 \____| dst|
+----+  \_______+      \        Segment-2       |   \+_____/    +----+
                 \======+__                    _+===/
                           \         __     __/
                            \_______/  \___/


                                          +------------+
             +------------------E----+    |            |
+----+       |                  |    +----R---+        |          +----+
|src |-------R              +---+             |        E----------+ dst|
+----+       |              |                 E--------+          +----+
             +--------------R                 |
                            +-----------------+
  ]]>
    </artwork></figure>

</section>
<section title="DN-IWF related considerations">

  <t> The ultimate goal of DN-IWF is to (1) match and (2) translate segment specific flow attributes. The DN-IWF ensures that segment specific attributes comprise per domain unique attributes for the whole DetNet domain. This characteristic can ensure that DetNet functions can be based on per domain attributes and not per segment attributes.   
  </t>  

  <t> The two DetNet specific attributes have the following characteristics:
  <list style="symbols">
   <t> Flow-ID: it is same in all packets of a flow </t>
   <t> Seq.Number: it is different packet-by-packet </t>
  </list>
  </t>  

  <t> For the Flow-ID the DN-IWF can implement a static mapping. The situation is more complicated for Seq.Number as it is different packet-by-packet, so it may need more sophisticated translation unless its format is exactly the same in the two technology segments. In this later case the DN-IWF can simple copy the Seq.Number field between the tunneling encapsulation of the two technology segments.  
  </t>  
  
  <t> In case of three technology segments (IP, MPLS and TSN) three DN-IWF functions can be specified. In the rest of this section the focus is on the (1) IP - MPLS network scenario. Note: the use-cases are out-of-scope for (2) TSN - IP, (3) TSN - MPLS. Note2: incompatible format of Seq.Number with TSN.
  </t>

  <t> Simplest implementation of DN-IWF is provided if the flow attributes have the same format. Such a common denominator of the tunnel encapsulation format is the pseudowire encapsulation over both IP and MPLS.
  </t>
  
  <figure title="FIGURE Placeholder PW over X" anchor="fig_pwox_enc">
  <artwork align="center"><![CDATA[
Placeholder
  ]]>
    </artwork></figure>


</section>


</section>

</section>

<!-- ================================================================= -->

<section title="MPLS-based DetNet data plane solution" anchor="dn-dt-solution">

 <section title="DetNet specific packet fields">
  <t>
   The DetNet data plane encapsulation MUST include two DetNet specific information elements in each
   packet of a DetNet flow: (1) a flow identification and (2) a sequence number. 
  </t>
  <t>
   The DetNet data plane encapsulation may consists further elements used for overlay tunneling, to
   distinguish between DetNet member flows of the same DetNet compound flow or to support OAM
   functions. 
  </t>
 </section>

  <section title="Data plane encapsulation" anchor="pwSolution">
   <t>
    <xref target="fig_pw_mpls"/> illustrates a DetNet data plane MPLS encapsulation.  The MPLS-based
    encapsulation of the DetNet flows is a good fit for the Layer-2 interconnect deployment cases
    (see <xref target="fig_8021_detnet"/>).  Furthermore, end to end DetNet service i.e., native
    DetNet deployment (see <xref target="fig_pw_detnet"/>) is also possible if DetNet end systems
    are capable of initiating and termination MPLS encapsulated packets. Transport of IP
    encapsulated DetNet flows, see <xref target="v6Solution"/>, over MPLS-based DetNet data plane is
    also possible.  Interworking between PW- and IPv6-based encapsulations is discussed further in
    <xref target="interwreck"/>.
   </t>
   <t> 
    The MPLS-based DetNet data plane encapsulation consists of: 
    <list style="symbols">
     <t>
      DetNet control word (d-CW) containing sequencing information for packet replication and
      duplicate elimination purposes. There MUST a separate sequence number space for each DetNet
      flow.</t>
     <t>
      DetNet Label that identifies a DetNet flow within a DetNet Edge or a Relay node. The DetNet
      label MUST be at the bottom of the label stack.</t>
     <t>
      An optional DetNet service lable (S-Label) that represents DetNet Service LSP used between
      DetNet Egde and/or Relay nodes.  One possible use of an S-Label is to identify DetNet member
      flows used to provide protection to a DetNet compound flow, perhaps even when both LSPs appear
      on the same link for some reason.</t>
    </list>
    </t>
    <t>
     One or more MPLS transport LSP label(s) (T-label) which may be a hop-by-hop label used between
     LSR and MUST appear higher in the label stack than S-labels. A top of stack T-label may be
     PHPed before arriving at a DetNet node. In general T-labels should be considered to be part of
     the underlying transport network rather the actual DetNet data plane encapsulation.
    </t>
 

  <figure title="Encapsulation of a DetNet flow in an MPLS(-TP) PSN" anchor="fig_pw_mpls">
  <artwork align="center"><![CDATA[
  DetNet MPLS-based encapsulation
                         
+---------------------------------+
|                                 |
|           DetNet Flow           |
|         Payload  Packet         |
|                                 |
+---------------------------------+ <--\
|       DetNet Control Word       |    |
+---------------------------------+    +--> DetNet data plane
|             S-Label             |    |    MPLS encapsulation 
+---------------------------------+ <--/
|           T-Label(s)            |
+---------------------------------+
|           Data-Link             |
+---------------------------------+
|           Physical              |
+---------------------------------+
]]>
    </artwork></figure>

  </section>
  <section title="DetNet control word">
  <t>
   A DetNet control word (d-CW) conforms to the Generic PW MPLS Control Word (PWMCW) defined in
   <xref target="RFC4385"/> and is illustrated in  <xref target="fig_detnet_cw"/>.  The upper nibble
   of the d-CW MUST be set to zero (0). The effective sequence number bit length is between 0 and 28
   bits, and configured either by a control plane or manually for each DetNet flow. The sequence
   number is aligned to the right (least significant bits) and unused bits MUST be set to zero (0).
   Each DetNet flow MUST have its own sequence number counter. The sequence number is incremented by
   one for each new packet.
  </t>
  <t>
   The d-CW MUST always be present in a packet. In a case the sequence number is not used (e.g., for
   DetNet-t-flows) the control plane or the manual configuration has to define zero (0) bit length
   seqeunce number and the value of the sequence number MUST be set to zero (0).
  </t>
    <figure title="DetNet Control Word" anchor="fig_detnet_cw">
    <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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|0 0 0 0|                Sequence Number                        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]>
    </artwork></figure>
  </section>
  <section title="Flow identification">   
   <t>
    DetNet flow identification at a DetNet service layer is realized by an S-label. It maps
    a Detnet flow to a specific d-CW in a DetNet node. The S-label used for flow identification MUST
    be bottom label of the label stack for a DetNet-s- or DetNet-st-flow and MUST precede the d-CW. 
   </t>
   <t>
    An S-label for a single DetNet flow does not need to be unique DetNet domain wide. As long
    as two or more different DetNet flows do not errorneously map to a same d-CW in a DetNet node
    the labels may vary. 
   </t>
  </section>
  
   <section title="Service layer considerations">
   <t>
    [Editor's note: quite a bit of unfinished and old text in the following sections.]
   </t>
   <t>
     The edge and relay node internal procedures of the PREF are implementation specific.  The order
     of a packet elimination or replication is out of scope in this specification. However, care
     should be taken that the replication function does not actually loopback packets as "replicas".
     Looped back packets include artificial delay when the node that originally initiated the packet
     receives it again. Also, looped back packets may make the network condition to look healthier
     than it actually is (in some cases link failures are not reflected properly because looped back
     packets make the situation appear better than it actually is). 
     <list style="hanging">
	   <t hangText="Comment #29:">
           SB> There needs to be some text about preventing a node ever receiving its
           own replicated packets. Indeed that would suggest that the flow
           id should be changed and replication should only take place on 
           configured flow IDs. I have a feeling that this would all be a lot safer if replication
           only happened at ingress and we managed the diversity of the paths.
          </t>
	  <t hangText="Discussion:">
		  Agree on hardening the loopback text considerations.
	  </t>
     </list>
   </t>




   <section title="Edge node processing" anchor="sec_t_pe">
    <t>
     TBD.
    </t>
    <t>
     [Editor's note: Since we are not defining the inner workings and implementation of the DetNet
     Egde node - rather only what goes in and what comes out, and of course the on-wire details,
     then the figures shown in the coming section would not need to detail the inner architecture of
     a DetNet Node.]
    </t>

    <figure title="DetNet Edge Node processing" anchor="fig_detnet_edge">
    <artwork align="center"><![CDATA[
            +---------------------------------------+
            |           DetNet Edge Node            |
            +---------------------------------------+  
            |             |           |             |   
            |             |           |             |             
Client AC   |         +---o <-------> o             o<---------->
            |   Elim. |   |           |             |
<---------->o <-------|   |           +-------------+ 
            |         |   |           |             |
            |         +---o <-------> o             |
            |             |           |             o<---------->
            |             |       +-> o             |
            +-------------+       |   +-------------+
            |             |       |   |             |
Client AC   |             | Repl. |   |             |
<---------->o             o <-----X-> o             o<---------->
            |             | Elim.     |             |
            +-------------+           +-------------+
            |             |           |             |
Client AC   |             |           |             |
<---------->o             o <-------> o             o<---------->
            |             |           |             |
            +---------------------------------------+
]]>
    </artwork></figure>

    <t>
     An edge node participates to the packet replication and duplication elimination. Required
     processing is done within an extended forwarder function. In the case the native service
     processing (NSP) is IEEE 802.1CB <xref target="IEEE8021CB"/> capable, the packet replication
     and duplicate elimination MAY entirely be done in the NSP and bypassing the DetNet flow
     encapsulation and logic entirely, and thus is able to operate over unmodified implementation
     and deployment. The NSP approach works only between edge nodes and cannot make use of relay nodes
     (see <xref target="sec_s_pe"/>).
    <list style="hanging">
	   <t hangText="Comment #31">
		   SB> This would be a fine way to operate the PW system - edge to edge.
	   </t>
	   <t hangText="Discussion:">
		   When it comes to use of NSPs, agree. Also for "island interconnect" this is
		   a fine. However, when there is a need to do PREF in a middle, plain edge to edge
		   is not enough.
  	 </t>
	</list>
    </t>
    <t>
     The DetNet-aware extended forwarder selects the egress DetNet member flow based on the DetNet forwarding rules.
	 In both "normal AC" and "Packet AC"
     cases there may be no DetNet encapsulation header available yet as it is the case with relay nodes
     (see <xref target="sec_s_pe"/>).  It is the responsibility of the extended forwarder within the
     edge node to push the DetNet specific encapsulation (if not already present) to the packet before
     forwarding it to the appropriate egress DetNet member flow instance(s).
    <list style="hanging">
	   <t hangText="Comment #32">
	   SB> I am not convinced of the wisdom of having a mid-point node convert
           a flow into a DN flow, which is what you are implying here. This seems
           like an ingress function.
           </t>
	   <t hangText="Discussion:">
               OK. The text here has issues and seems to mix relay and edge.
  	 </t>
	</list>
     </t>

     <t>
      The extended forwarder MAY copy the sequencing information from the native DetNet packet into
      the DetNet sequence number field and vice versa. If there is no existing sequencing
      information available in the native packet or the forwarder chose not to copy it from the
      native packet, then the extended forwarder MUST maintain a sequence number counter for each
      DetNet flow (indexed by the DetNet flow identification).
    </t>
   </section>


   <section title="Relay node processing" anchor="sec_s_pe">
    <t>
     TBD.
    </t>
    <t>
     A DetNet Relay node participates to the packet replication and duplication
     elimination. This processing is done within an extended forwarder function.
     Whether an ingress DetNet member flow receives DetNet specific processing depends on how
     the forwarding is programmed.  For some DetNet member flows the relay node can act as a normal relay node
     and for some apply the DetNet specific processing (i.e., PREF).
    <list style="hanging">
	   <t hangText="Comment #34">
           SB> Again relay node is not a normal term, so am not sure what it does
            in the absence of a PREF function.
           </t>
	   <t hangText="Discussion:">
		   Relay node was a DetNet aware S-PE originally, which is not explicitly stated here anymore, thus
                   slightly confusing text here. The text here needs to clarify the roles of PREF and switching
		   functions. A DetNet relay is described in the architecture document. However, there is definitely
		   room for termonilogy and text improvements.
  	 </t>
	</list>
     </t>

     <t> It
     is also possible to
     treat the relay node as a transit node, see <xref target="Aggregation"/>.
     Again, this is
     entirely up to how the forwarding has been programmed.
    </t>
    <t>
     The DetNet-aware forwarder selects the egress DetNet member flow segment based on the flow identification.  
	 The mapping of ingress DetNet member flow segment to egress DetNet member flow segment may be
     statically or dynamically configured. Additionally the DetNet-aware
     forwarder does duplicate frame elimination based on the flow identification and
     the sequence number combination. The packet replication is
     also done within the DetNet-aware forwarder. During elimination and the
     replication process the sequence number of the DetNet member flow MUST
     be preserved and copied to the egress DetNet member flow.
    </t>

    <figure title="DetNet Relay Node processing" anchor="fig_detnet_relay">
    <artwork align="center"><![CDATA[
            +---------------------------------------+
            |          DetNet Relay Node            |
  Ingress   +---------------------------------------+
            |             |           |             |   Egress
            |             o---------> o--+  Elim.   | 
----------->o             |           |  +--------->o----------->
            |             |   +-----> o--+          |
  Ingress   +-------------+   |       +-------------+ 
            |             |   |       |             |   Egress
            |             |   |       |             |
----------->o             o --+   +-> o             o----------->
            |             |       |   |             |
  Ingress   +-------------+       |   +-------------+
            |             |       |   |             |   Egress
            |             | Repl. |   |             |
----------->o             o ------+-> o             o----------->
            |             |           |             |
  Ingress   +-------------+           +-------------+
            |             |           |             |   Egress
            |             |           |             |
----------->o             o --------> o             o----------->
            |             |           |             |
            +---------------------------------------+
]]>
    </artwork></figure>
    <t>
    <list style="hanging">
	   <t hangText="Comment #35">
           SB> Somewhere in the dp document there needs to be a note of the 
             requirement for interfaces to do fast exchange of counter state,
             and a note to those planning the network and designing the 
             control plane that they need to provide support for this.
             </t>
         <t hangText="Discussion:">
		 We kinf of agree but also think the above exchange or synchronization of
		 counter states is not in our scope to solve.
  	 </t>
	</list>
    </t>
    </section>
    <section title="End system processing" anchor="sec_end_system">
     <t>
       TBD.
     </t>
    </section>
   </section>
   <section title="Transport node considerations">
    <section title="Congestion protection">
     <t>
      TBD.
     </t>
    </section>
    <section title="Explicit routes">
     <t>
      TBD.
     </t>
    </section>
   </section>
 </section>
  
 <section title="IPv6-based DetNet data plane solution" anchor="v6Solution">
  <section title="Data plane encapsulation">
   <t>
    <xref target="fig_native_ip"/> illustrates a DetNet native IPv6 encapsulation.  The native IPv6
    encapsulation is meant for end to end Detnet service use cases, where the end stations are
    DetNet-aware (see <xref target="fig_ip_detnet"/>). Technically it is possible to use the
    IPv6 encapsulation to tunnel any traffic over a DetNet enabled network, which would make native
    IPv6 encapsulation also a valid data plane choice for an interconnect use case (see <xref
    target="fig_8021_detnet"/>).
   </t>

  <t>
   The native IPv6-based DetNet data plane encapsulation consists of:
   <list style="symbols">
    <t>
     IPv6 header as the transport protocol.</t>
    <t>
     IPv6 header Flow Label that is used to help to identify a DetNet flow (i.e., roughly an
     equivalent to an S-Label for the MPLS encapsulation). A Flow Label together with the IPv6
     source address uniquely identifies a DetNet flow.</t>
    </list>
    <list style="hanging">
	   <t hangText="Comment #21">
           SB> Have we validated that it is unconditionally safe to make this 
               assumption about the use of the FL?
           </t>
	   <t hangText="Discussion:">
           RFC6437 does not restrict such use and DetNet DP solution can always define their own use
           of flow label. It should be noted that a DetNet aware node will always contain new code
           and is not a load balancer.
  	 </t>
     </list>

    <list style="symbols">
     <t>
      Zero, one or two DetNet Destination Options containing sequencing information for packet
      replication and duplicate elimination function (PREF), and/or packet reordering purposes.  The
      DetNet Destination Option is equivalent to the DetNet Control Word. If PREF or packet
      reordering is not needed for the DetNet flow then no DetNet Destination Option is inserted
      into the IPv6 header.
     </t>
   </list>
  </t>

  <t>
   A DetNet-aware end station (a host) or an intermediate Detnet node initiating an (or adding a
   tunnelling) IPv6 packet is responsible for setting the Flow Label, adding the optional DetNet
   Destination Option(s) for DetNet-s- or DetNet-st-flows, and possibly adding a routing header such
   as the segment routing option (e.g., for pre-defined paths <xref
   target="I-D.ietf-6man-segment-routing-header"/>).  If a routing header is inserted into the IPv6
   packet for DetNet-s- or DetNet-st-flows then a second instance of the DetNet Destination Option MUST
   be added before the routing header (see Section 4.1 of <xref target="RFC8200"/>).
  </t>
  <t>
   A DetNet-aware end station (a host) or an intermediate node receiving an IPv6 packet destined to
   it and containing a DetNet Destination Option does the appropriate processing of the packet. This
   may involve packet duplication and elimination (PREF processing), terminating a tunnel or
   delivering the packet to the upper layers/Applications.
  </t>
   
   <figure title="Encapsulation of a native IPv6 DetNet-s- or DetNet-st-flow without a routing header" anchor="fig_native_ip">
    <artwork align="center"><![CDATA[
+---------------------------------+
|                                 |
|           DetNet Flow           |
|             Payload             |
|                                 |
/---------------------------------\
H   Optional DetNet DstOpt Hdr    H
\---------------------------------/
|          IPv6 header            |
|     (with set Flow label)       |
+---------------------------------+
]]>
    </artwork></figure>

  <t>
   <xref target="fig_native_ip2"/> illustrates an IPv6 packet for the case where a routing header
   has been added into the packet by a DetNet-aware end system (again assuming DetNet-s- or
   DetNet-st-flows). Note that the use of routing header such as the one with the segment routing
   option is not mandatory for explicit routes. Similar functionality can be arranged using other
   means as well (e.g., using policy routing or layer-2 means). 
  </t>


   <figure title="Encapsulation of a native IPv6 DetNet-s- or DetNet-st-flows with routing header"
   anchor="fig_native_ip2">
    <artwork align="center"><![CDATA[
+---------------------------------+
|                                 |
|           DetNet Flow           |
|             Payload             |
|                                 |
/---------------------------------\
H        DetNet DstOpt Hdr        H
\---------------------------------/
|          Routing header         |
/---------------------------------\
H        DetNet DstOpt Hdr        H
\---------------------------------/
|          IPv6 header            |
|     (with set Flow label)       |
+---------------------------------+
]]>
    </artwork></figure>

  <t>
   IPv6 extension headers can only be inserted by a node that initiated the IPv6 packet. IPv6
   extension headers, except for the Hop-by-Hop Option headers, can only be processed by an IPv6 node 
   that is identified by the Destination Address field of the IPv6 header (see Section 0 of <xref
   target="RFC8200"/>. Therefore, if a DetNet-aware end system only inserted the DetNet Destination
   Option into the IPv6 but e.g., a DetNet Edge node is configured to enforce an explicit route for
   the IPv6 packet using a source routing header, then it has no other possibility than add an outer
   tunneling IPv6 header with required extension headers in it. The processing of IPv6 packets in a
   DetNet Edge node is discussed further in <xref target="sec_ipv6_edge"/>.
  </t>


  </section>
  <section title="DetNet destination option">
  <t>
   A DetNet flow must carry sequencing information for packet replication and elimination
   function (PREF) purposes. This document specifies a new IPv6 Destination Option: the DetNet
   Destination Option for that purpose. The format of the option is illustrated in <xref
   target="fig_detnet_dstopt"/>.
  </t>

    <figure title="DetNet Destination Option" anchor="fig_detnet_dstopt">
    <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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     TBD1      |       4       |   0   |    28 bit sequence            
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   number                       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]>
    </artwork></figure>

  <t>
   The Option Type for the DetNet Destination Option is set to TBD1. [To be removed from the final
   version of the document: The Option Type MUST have the two most significant bits set to 10b]
  </t>
  <t>
   If an IPv6 packet gets dropped due the DetNet Service layer processing based on the DetNet
   Destination Option an ICMPv6 packet of any type MUST NOT be sent back to the source of the
   packet.
  </t>


   </section>
   <section title="Flow identification">
    <t>
     The DetNet flow identification is based on the IPv6 Flow Label and the source address
     combination. The two fields uniquelly identify the end to end native IPv6 encapsulated
     DetNet flow. Obviously, the identification fails if any intermediate node modifies
     either the source address or the Flow Label.
    <list style="hanging">
	 <t hangText="Comment #27">
	  SB> See earlier. If there are enough IPv6 addresses to address video
        fragments, why not DN flows? Then this problem goes away.
      </t>
	  <t hangText="Discussion:">
	   See the earlier comment #25 discussion. If nodes get their addressies via
	   DHCPv6 basically ruins this mechanism. Also the assumption for this to
	   work is that the node has a full /64 to use, which is not always the case.
	   Otherwise the idea is just fine.
  	 </t>
     </list>
    </t>
   </section>
   
   <section title="Service layer considerations">
    <t>
     [Editor's note: this section is TBD. It will detail the PREF functionality.]
     <list style="symbols">
      <t>
       PREF - requires both flow identification and sequence numbering.
      </t>
      <t>
       Packet reordeing - requires both flow identification and sequence numbering.
      </t>
     </list>
    </t>
    <t>
     A DetNet service layer processing can be done at each DetNet node that matches the IPv6
     header's Destination Address. Then, if the DetNet flow identification provides a positive match
     for the DetNet flow that the node has a service layer state installed e.g., for PREF or packet
     reordering purposes, further service layer processing takes place. In a case of PREF or packet
     reordering that means processing the DetNet Destination Option for the identified DetNet flow. 
    </t>
   <section title="Edge node processing" anchor="sec_ipv6_edge">
    <t>
     [Editor's note: This is the start of the IPv6 handling text - there are errors and bad
     language. The founding assumption is the use of source routing when intermediate nodes
     (relays/edges) need to modify packets. This is due the text in RFC8200 and the fact that
     without hph options only routing+dsthdr is usable with intermediates under strict RFC8200.. ]
    </t>
    <t>
     [Editor's note: Regrading the source routing and the "example" SRv6 approach. Current text is
     based on the assumption that intermediates cannot add/delete extension headers such as the
     SRv6. That said adding adding a header implies adding a tunneling outer IPv6 header and
     deleting a header implies a tunnel decapsulation. This is not probably desired due to the
     involved overhead and to be discussed whether it is possible/acceptable to just "process" the
     Application flow packets.]
    </t>
    <t>
     For a DetNet Edge node there are several scenarios that involve modifications to the DetNet
     flow IPv6 packets. The assumption is that a DetNet-aware end system has always set the IPv6
     header flow label properly for the flow identification purposes. A DetNet- or DetNet-t-flow
     does not include the DetNet Destination Option. Following cases have been identified:
     <list style="numbers">
      <t>
       A DetNet App-flow or a DetNet-t-flow packet arrives at an ingress DetNet Edge node and DetNet
       service layer functions are done only at DetNet Edge nodes. Possible explicit routes between
       edge nodes are arranged by other than IPv6 specific means.  </t>
      <t>
       A DetNet App-flow or a DetNet-t-flow packet arrives at an ingress DetNet Edge node and multiple
       DetNet Relay nodes may process DetNet flow packets before reaching an egress DetNet Edge
       node.  Explicit routes between edge nodes has to be arranged by IPv6 specific means.
      </t>
      <t>
       A DetNet-s- or a DetNet-st-flow packet arrives at an ingress DetNet Edge node and DetNet
       service layer functions are done only at DetNet Edge nodes. Possible explicit routes between
       edge nodes are arranged by other than IPv6 specific means.
      </t>
      <t>
       A DetNet-s- or a DetNet-st-flow packet arrives at an ingress DetNet Edge node and multiple
       DetNet Relay nodes may process DetNet flow packets before reaching an egress DetNet Edge
       node.  Explicit routes between edge nodes has to be arranged by IPv6 specific means.
      </t>
     </list>
    </t>
    <t>
     A generic DetNet IPv6 encapsulation for a DetNet flow packet between DetNet Edge nodes is shown
     in <xref target="fig_ipv6_edge"/>. Essentially every time an igress DetNet Edge node has to
     insert something into the DetNet flow packet it has to add an outer tunneling IPv6 header,
     which then contain possible additional extension headers.
    </t>
   <figure title="
    Encapsulation of a DetNet-flow IPv6 packet at the DetNet Edge node" anchor="fig_ipv6_edge">
    <artwork align="center"><![CDATA[
+---------------------------------+
|                                 |
|           DetNet Flow           |
|             Payload             |
|                                 |
+---------------------------------+
| Optional DetNet DstOpt Hdr (1)  |
+---------------------------------+
|        Inner IPv6 header        |
|    (with set Flow label) (1)    |
+---------------------------------+ <--+
|   Optional  Routing header      |    |
+---------------------------------+    |
| Optional DetNet DstOpt Hdr (2)  |    +-- Added/removed by
+---------------------------------+    |   DetNet Edge node
|        Outer  IPv6 header       |    |
|   (with set Flow label) (2)     |    |
+---------------------------------+ <--+
]]>
    </artwork></figure>

    <section title="Ingress DetNet Edge node processing">
    <t>
     Case 1) MAY require an addition of the DetNet Destination Option if packet reordering is
     requested at the egress DetNet Edge node. Otherwise, no modifications except rewriting the IPv6
     header flow label to the packet is done. If modifications are required then:
     <list style="symbols">
      <t>
       The outer IPv6 header is added with the Source Address set to the ingress DetNet Edge node
       address and the Destination Address set to the egress DetNet Edge node address.</t>
      <t>
       The flow label of the outer IPv6 header SHOULD be set to a value maintained by the edge node.
       </t>
      <t>
       The DetNet Destination Option with the edge node managed per DetNet flow sequence number
       value  is inserted into the outer IPv6 header.</t>
     </list>
    </t>
   <t>
    Case 2) requires an addition of the DetNet Destination Option unless neither packet reordeing or
    PREF is enable at any DetNet Edge/Relay node. A source routing header has to be added for the
    explicit route purposes.  An example of the source routing header is the Segment Routing header.
    The following modifications to DetNet flow IPv6 packets are required:
     <list style="symbols">
      <t>
       An outer IPv6 header is added with the Source Address set to the ingress DetNet Edge node
       address and the Destination Address set to the egress DetNet Edge node address.</t>
      <t>
       The flow label of the outer IPv6 header SHOULD be set to a value maintained by the edge node.
       </t>
      <t>
       The DetNet Destination Option with the edge node managed per DetNet flow sequence number
       value MAY be inserted into the outer IPv6 header. </t>
      <t>
       A source routing header with addresses of those DetNet Relay nodes that must be traversed is
       inserted into the outer IPv6 header.</t>
     </list>
   </t>
   <t>
    Case 3) ...[Editor's note: is it OK if the sequece number added here by the edge node has only
    local significance between the edge nodes and not end to end between end systems? ]
   </t>
   <t>
    Case 4) ...
   </t>
   </section>
   <section title="Engress DetNet Edge node processing">
   </section>

   </section>
   <section title="Relay node processing" anchor="sec_ipv6_relay">
    <t>
     TBD.
    </t>
   </section>
  <section title="End system processing">
    <t>
     TBD.
    </t>
   </section>
  </section>
  <section title="Transport node processing">
   <section title="Congestion protection">
   </section>
   <section title="Explicit routes">
   </section>
  </section>
 </section>
  
<section title="Other DetNet data plane considerations">
 <section title="Class of Service">
   <t>
     Class and quality of service, i.e., CoS and QoS, are terms that are
     often used interchangeably and confused.  In the context of DetNet,
     CoS is used to refer to mechanisms that provide traffic forwarding
     treatment based on aggregate group basis and QoS is used to refer
     to mechanisms that provide traffic forwarding treatment based on a
     specific DetNet flow basis.  Examples of existing network level CoS
     mechanisms include DiffServ which is enabled by IP header
     differentiated services code point (DSCP) field <xref
     target="RFC2474"/> and MPLS label traffic class field <xref
     target="RFC5462"/>, and at Layer-2, by IEEE 802.1p priority code
     point (PCP).
   </t>
   <t>
     CoS for DetNet flows carried in PWs and MPLS is provided using the
     existing MPLS Differentiated Services (DiffServ) architecture <xref
     target="RFC3270"/>.  Both E-LSP and L-LSP MPLS DiffServ modes MAY
     be used to support DetNet flows.  The Traffic Class field (formerly
     the EXP field) of an MPLS label follows the definition of <xref
     target="RFC5462"/> and <xref target="RFC3270"/>.  The Uniform,
     Pipe, and Short Pipe DiffServ tunneling and TTL processing models
     are described in <xref target="RFC3270"/> and <xref
     target="RFC3443"/> and MAY be used for MPLS LSPs supporting DetNet
     flows. MPLS ECN MAY also be used as defined in ECN <xref
     target="RFC5129"/> and updated by <xref target="RFC5462"/>.
  </t>
  <t>
     CoS for DetNet flows carried in IPv6 is provided using the standard
     differentiated services code point (DSCP) field <xref
     target="RFC2474"/> and related mechanisms.  The 2-bit explicit
     congestion notification (ECN) <xref target="RFC3168"/> field MAY
     also be used.
  </t>
  <t>
    One additional consideration for DetNet nodes which support CoS
    services is that they MUST ensure that the CoS service classes do
    not impact the congestion protection and latency control mechanisms
    used to provide DetNet QoS.  This requirement is similar to
    requirement for MPLS LSRs to that CoS LSPs do not impact the
    resources allocated to TE LSPs via <xref target="RFC3473"/>.
  </t>
 </section>

 <section title="Quality of Service">
    <t>
     Quality of Service (QoS) mechanisms for flow specific traffic treatment typically includes a
     guarantee/agreement for the service, and allocation of resources to support the service.
     Example QoS mechanisms include discrete resource allocation, admission control, flow
     identification and isolation, and sometimes path control, traffic protection, shaping, policing
     and remarking. Example protocols that support QoS control include <xref
     target="RFC2205">Resource ReSerVation Protocol (RSVP)</xref> (RSVP) and RSVP-TE <xref
     target="RFC3209"/> and <xref target="RFC3473"/>.  The existing MPLS mechanisms defined to
     support CoS <xref target="RFC3270"/> can also be used to reserve resources for specific traffic
     classes. 
    </t>
    <t>
     In addition to explicit routes, and packet replication and elimination, described in <xref
     target="dn-dt-solution"/> above, DetNet provides zero congestion loss and bounded latency and
     jitter.  As described in <xref target="I-D.ietf-detnet-architecture"/>, there are different
     mechanisms that maybe used separately or in combination to deliver a zero congestion loss
     service.  These mechanisms are provided by the either the MPLS or IP layers, and may be
     combined with the mechanisms defined by the underlying network layer such as 802.1TSN.
    </t>
   <t>
     A baseline set of QoS capabilities for DetNet flows carried in PWs
     and MPLS can provided by MPLS with Traffic Engineering (MPLS-TE)
     <xref target="RFC3209"/> and <xref target="RFC3473"/>.  TE LSPs can
     also support explicit routes (path pinning).  Current service
     definitions for packet TE LSPs can be found in "Specification of
     the Controlled Load Quality of Service", <xref target="RFC2211"/>,
     "Specification of Guaranteed Quality of Service", <xref
     target="RFC2212"/>, and "Ethernet Traffic Parameters", <xref
     target="RFC6003"/>. Additional service definitions are expected in
     future documents to support the full range of DetNet services.
     In all cases, the existing label-based marking mechanisms defined
     for TE-LSPs and even E-LSPs are use to support the identification
     of flows requiring DetNet QoS.
   </t>
   <t>
     QoS for DetNet flows carried in IPv6 MUST be provided locally by
     the DetNet-aware hosts and routers supporting DetNet flows.  Such
     support will leverage the underlying network layer such as
     802.1TSN.  The traffic control mechanisms used to deliver QoS for
     IP encapsulated DetNet flows are expected to be defined in a future
     document.  From an encapsulation perspective, and as defined in
     <xref target="v6Solution"/>, the combination of the Flow Label
     together with the IP source address uniquely identifies a DetNet
     flow.
   </t>
   <t>
    Packets that are marked with a DetNet Class of Service value, but that have not been
    the subject of a completed reservation, can disrupt the QoS offered to properly
    reserved DetNet flows by using resources allocated to the reserved flows.  Therefore,
    the network nodes of a DetNet network MUST:
    
    <list style="symbols">
      <t>
          Defend the DetNet QoS by discarding or remarking (to a non-DetNet CoS)
          packets received that are not the subject of a completed reservation.
      </t><t>
          Not use a DetNet reserved resource, e.g. a queue or shaper reserved for
          DetNet flows, for any packet that does not carry a DetNet Class of Service
          marker.
      </t>
    </list>
  </t>
 </section>

 <section title="Cross-DetNet flow resource aggregation" anchor="Aggregation">
   <t>
     The ability to aggregate individual flows, and their associated
     resource control, into a larger aggregate is an important technique
     for improving scaling of control in the data, management and
     control planes.  This document identifies the traffic identification
     related aspects of aggregation of DetNet flows.  The resource
     control and management aspects of aggregation (including the
     queuing/shaping/policing implications) will be covered in other
     documents.  The data plane implications of aggregation are
     independent for PW/MPLS and IP encapsulated DetNet flows.
   </t>
   <t>
     DetNet flows transported via MPLS can leverage MPLS-TE's existing
     support for hierarchical LSPs (H-LSPs), see <xref
     target="RFC4206"/>.  H-LSPs are typically used to aggregate control
     and resources, they may also be used to provide OAM or protection
     for the aggregated LSPs.  Arbitrary levels of aggregation naturally
     falls out of the definition for hierarchy and the MPLS label stack
     <xref target="RFC3032"/>.  DetNet nodes which support aggregation
     (LSP hierarchy) map one or more LSPs (labels) into and from an
     H-LSP.  Both carried LSPs and H-LSPs may or may not use the TC
     field, i.e., L-LSPs or E-LSPs.  Such nodes will need to ensure that
     traffic from aggregated LSPs are placed (shaped/policed/enqueued)
     onto the H-LSPs in a fashion that ensures the required DetNet
     service is preserved.
   </t>
   <t>
     DetNet flows transported via IP have more limited aggregation
     options, due to the available traffic flow identification fields of
     the IP solution.  One available approach is to manage the resources
     associated with a DSCP identified traffic class and to map (remark)
     individually controlled DetNet flows onto that traffic class.  This
     approach also requires that nodes support aggregation ensure that
     traffic from aggregated LSPs are placed (shaped/policed/enqueued)
     in a fashion that ensures the required DetNet service is preserved.
    <list style="hanging">
	   <t hangText="Comment #38">
	   SB> I am sure we can do better than this with SR, or the use of
            routing techniques that map certain addresses to certain paths.
           </t>
	   <t hangText="Discussion:">
		   --
  	 </t>
	</list>
   </t>
   <t>
     In both the MPLS and IP cases, additional details of the traffic control
     capabilities needed at a DetNet-aware node may be covered in the
     new service descriptions mentioned above or in separate future
     documents.  Management and control plane mechanisms will also need
     to ensure that the service required on the aggregate flow (H-LSP or
     DSCP) are provided, which may include the  discarding or remarking
     mentioned in the previous sections.
   </t>
 </section>

 <section title="Bidirectional traffic">
  <t>
    Some DetNet applications generate bidirectional traffic.  Using MPLS
    definitions <xref target="RFC5654"/> there are associated bidirectional flows, and co-routed bidirectional flows.
    MPLS defines a point-to-point associated bidirectional LSP as
    consisting of two unidirectional point-to-point LSPs, one from A to
    B and the other from B to A, which are regarded as providing
    a single logical bidirectional transport path.  This would be
    analogous of standard IP routing, or PWs running over two reciprocal
    unidirection LSPs.  MPLS defines a point-to-point co-routed
    bidirectional LSP as an associated bidirectional LSP which satisfies
    the additional constraint that its two unidirectional component
    LSPs follow the same path (in terms of both nodes
    and links) in both directions.  An important property of co-routed bidirectional LSPs
    is that their unidirectional component LSPs share fate.  In both
    types of bidirectional LSPs, resource allocations may differ in each
    direction.  The concepts of associated bidirectional flows  and
    co-routed bidirectional flows can be applied to DetNet flows as well
    whether IPv6 or MPLS is used.
  </t>
  <t>
    While the IPv6 and MPLS data planes must support bidirectional DetNet flows, there
    are no special bidirectional features with respect to the data plane
    other than need for the two directions take the same paths.
    Fate sharing and associated vs co-routed bidirectional flows can be
    managed at the control level.
    Note,
    that there is no stated requirement for bidirectional DetNet flows
    to be supported using the same IPv6 Flow Labels or MPLS Labels in each direction.
    Control mechanisms will need to support such bidirectional flows for
    both IPv6 and MPLS, but such mechanisms are out of scope of this
    document.  An example control plane solution for MPLS can be found
    in <xref target="RFC7551"/>.
  </t>
 </section>

 <!-- section title="Packet replication and elimination function">
     <t>
         [editor's note: collect details of the PREF here. Potential topics to discuss relate to
         constraints to input packets and what the expected output is. Some examples include: the
         input packets must have the same PW Label (in a case of PWs) to enable the PREF, no
         loopback for replicated packets, input and output PW labels do not need to be the same.
         Also, add text regarding native IPv6 encapsulation. There the PW label is replaced with
         source address + flow label combination, and the Control Word is replaced with the DetNet
         Destination Option.. etc]
     </t>
 </section-->

 <section title="Layer 2 addressing and QoS Considerations">
    <t>
        The Time-Sensitive Networking (TSN) Task Group of the IEEE 802.1 Working Group have
        defined (and are defining) a number of amendments to <xref target="IEEE8021Q">IEEE 802.1Q</xref>
        that provide zero congestion loss and bounded latency in bridged networks.
        <xref target="IEEE8021CB">IEEE 802.1CB</xref> defines packet replication and elimination
        functions that should prove both compatible with and useful to, DetNet networks.
    </t><t>
        As is the case for DetNet, a Layer 2 network node such as a bridge may need to
        identify the specific DetNet flow to which a packet belongs in order to provide the
        TSN/DetNet QoS for that packet.  It also will likely need a CoS marking, such as the
        priority field of an IEEE Std 802.1Q VLAN tag, to give the packet proper service.
    </t><t>
        Although the flow identification methods described in <xref target="IEEE8021CB">IEEE 802.1CB</xref>
        are flexible, and in fact, include IP 5-tuple identification methods, the baseline
        TSN standards assume that every Ethernet frame belonging to a TSN stream
        (i.e. DetNet flow) carries a multicast destination MAC address that is unique to that
        flow within the bridged network over which it is carried.  Furthermore,
        <xref target="IEEE8021CB">IEEE 802.1CB</xref> describes three methods by which a packet
        sequence number can be encoded in an Ethernet frame.
    </t><t>
        Ensuring that the proper Ethernet VLAN tag priority and destination MAC address
        are used on a DetNet/TSN packet may require further clarification of the customary
        L2/L3 transformations carried out by routers and edge label switches.  Edge nodes
        may also have to move sequence number fields among Layer 2, PW, and IPv6 encapsulations.
    </t>
 </section>
 <section title="Interworking between MPLS- and IPv6-based encapsulations" anchor="interwreck">
  <t>
   [Editor's note: add considerations for interworking between MPLS-based and native IPv6-based
   DetNet encapsuations.]
  </t>
 </section>
 <section title="IPv4 considerations">
  <t>
   [Editor's note: The fact is that there are and will be deployments using IPv4. Neglecting it
   entirely is not feasible.]
  </t>
 </section>



</section>

<!-- ===================================================================== -->
 <section title="Time synchronization">
  <t>
    <list style="hanging">
	   <t hangText="Comment #39">
	   SB> This section should point the reader to RFC8169 (residence time
            in MPLS n/w. We need to consider if we need to introduce the same
            concept in IP.
           </t>
	   <t hangText="Discussion:">
		   Agree. For IP we could reference to PTPv2 or v3 over UDP/IP, since it measures
		   residence time among other things. 
  	 </t>
	</list>
   [Editor's note: describe a bit of issues and deployment considerations
   related to time-synchronization within DetNet. Refer to DT discussion and the
   slides that summarize different approaches and rough synchronization
   performance numbers.  Finally, scope time-synchronization solution outside
   data plane.]
  </t>


  <t>When DetNet is used, there is an underlying assumption that the
  applicaton(s) require clock synchronization such as the Precision Time Protocol
  (PTP) [IEEE1588]. The relay nodes may or may not utilize clock synchronization
  in order to provide zero congestion loss and controlled latency delivery.  In either case, there are a
  few possible approaches of
  how synchronization protocol packets are forwarded and handled by the
  network:</t>

  <t><list style="symbols">
      
    <t>
    PTP packets can be sent either as DetNet flows or as high-priority
    best effort packets.  Using DetNet for PTP packets requires careful
    consideration to prevent unwanted interactions between clock-synchronized
    network nodes and the packets that synchronize the clocks.
    </t>
    <t>PTP packets are sent as a normal DetNet flow through network nodes
    that are not time-synchronized: in this approach PTP
    traffic is forwarded as a DetNet flow, and as such it is forwarded in a
    way that allows a low delay variation. However, since intermediate nodes
    do not take part in the synchronization protocol, this approach provides
    a relatively low degree of accuracy.</t>

    <t>PTP with on-path support: in this approach PTP packets are sent as
    ordinary or as DetNet flows, and intermediate nodes take part in the protocol as
    Transparent Clocks or Boundary Clocks [IEEE1588]. The on-path PTP
    support by intermediate nodes provides a higher degree of accuracy than
    the previous approach. The actual accuracy depends on whether all
    intermediate nodes are PTP-capable, or only a subset of them.</t>
  
    <t>Time-as-a-service: in this approach accurate time is provided
    as-a-service to the DetNet source and destination, as well as the
    intermediate nodes. Since traffic between the source and destination is
    sent over a provider network, if the provider supports
    time-as-a-service, then accurate time can be provided to both the source
    and the destination of DetNet traffic. This approach can potentially
    provide the highest degree of accuracy.</t>

  </list></t>

  <t>It is expected that the latter approach will be the most common one,
  as it provides the highest degree of accuracy, and creates a layer
  separation between the DetNet data and the synchronization service.</t>

  <t>It should be noted that in all four approaches it is not recommended
  to use replication and elimination for synchronization packets; the
  replication/elimination approach may in some cases reduce the
  synchronization accuracy, since the observed path delay will be
  bivalent.
    <list style="hanging">
	   <t hangText="Comment #40">
           SB> I am not sure why we sould not use PREP. We should explain to the 
            reader.
           </t>
	   <t hangText="Discussion:">
		   Agree that a this can be opened a bit more in detail. The
		   issue is explained briefly in the last sentence but it
		   could be more clear.
  	 </t>
	</list>

  </t>

 </section>
<!-- ===================================================================== -->

<section title="Management and control considerations">
  <t>
   [Editor's note: This section needs to be different for MPLS and IPv6 solutions. Most solutions
   are technology dependant,]		 
  </t>
  <t>
    While management plane and control planes are traditionally
    considered separately, from the Data Plane perspective there is no
    practical difference based on the origin of flow provisioning
    information.  This document therefore does not distinguish between
    information provided by a control plane protocol, e.g., RSVP-TE <xref
    target="RFC3209"/> and <xref target="RFC3473"/>, or by a network
    management mechanisms, e.g., RestConf <xref target="RFC8040"/> and
    YANG <xref target="RFC7950"/>. 
 </t>
  <t>
   [Editor's note: This section is a work in progress.
   discuss here what kind of enhancements are needed for DetNet
   and specifically for PREF and DetNet zero congest loss and latency
   control. Need to cover both traffic control (queuing) and connection
   control (control plane).]
 </t>
 <section title="MPLS-based data plane">
  <section title="S-Label assignment and distribution">
   <t>
    [Editor's note: Outdated and MPLS specific.. and needs more work.]		 
   </t>
   <t>
    The DetNet S-Label distribution follows the same mechanisms specified for XYZ . The details of
    the control plane protocol solution required for the label distribution and the management of the
    label number space are out of scope of this document. 
   </t>
  </section>
  <section title="Explicit routes">
   <t>
    [Editor's note: Outdated.. and needs more work.]		 
   </t>
   <t>
    [TBD: based on MPLS TE and possibly IPv6 SR]
   </t>
  </section>
 </section>
 <section title="IPv6-based data plane">
  <section title="Flow Label assignment and distribution">
   <t>
   [Editor's note: Outdated and IPv6 Specific.. and needs more work.]		 
   </t>
   <t>
    The IPv6 Flow Label distribution and the label number space are out of scope of this document.
    However, it should be noted that the combination of the IPv6 source address and the IPv6 Flow
    Label is assumed to be unique within the DetNet-enabled network. Therefore, as long as each node
    is able to assign unique Flow Labels for the source address(es) it is using the DetNet-enabled
    network wide flow identification uniqueness is guaranteed. 
   </t>
  </section>
  <section title="Explicit routes">
   <t>
    [Editor's note: Outdated.. and needs more work.]		 
   </t>
   <t>
    [TBD: What we have there for IPv6 and explicit routes]
   </t>
  </section>
 </section>
 <section title="Packet replication and elimination">
  <t>
   [Editor's note: Outdated and at the functional level technology independent.. but needs more work.]		 
  </t>
  <t>
   The control plane protocol solution required for managing the PREF processing
   is outside the scope of this document.
  </t>
 </section>
 <section title="Congestion protection and latency control">
     <t>
         [TBD]
     </t>
 </section>
 <section title="Flow aggregation control">
     <t>
         [TBD]
     </t>
 </section>
</section>


<!-- ===================================================================== -->


<section title="Security considerations">
  <t>
   The security considerations of DetNet in general are discussed in
   <xref target="I-D.ietf-detnet-architecture"/>
   and <xref target="I-D.sdt-detnet-security"/>. Other security
   considerations will be added in a future version of
   this draft.
  </t>
</section>


<section anchor="iana" title="IANA considerations">
  <t>TBD.
  </t>
</section>

<section anchor="acks" title="Acknowledgements">
  <t>The author(s) ACK and NACK.
  </t>
  <t> The following people were part of the DetNet Data Plane Solution Design Team:
  <list style="bullets">
   <t>Jouni Korhonen</t>
   <t>J&aacute;nos Farkas</t>
   <t>Norman Finn</t>
   <t>Bal&aacute;zs Varga</t>
   <t>Loa Andersson</t>
   <t>Tal Mizrahi</t>
   <t>David Mozes</t>
   <t>Yuanlong Jiang</t>
   <t>Carlos J. Bernardos</t>
  </list></t>
  <t>
   The DetNet chairs serving during the DetNet Data Plane Solution Design Team:
   <list style="bullets">
    <t>Lou Berger</t>
    <t>Pat Thaler</t>
   </list></t>
</section>
</middle>

<back>
  <references title="Normative references">
   &rfc2119;
   <?rfc include="reference.RFC.2211"?>
   <?rfc include="reference.RFC.2212"?>
   <?rfc include="reference.RFC.2474"?>
   <?rfc include="reference.RFC.3168"?>
   <?rfc include="reference.RFC.3032"?>
   <?rfc include="reference.RFC.3209"?>
   <?rfc include="reference.RFC.3270"?>
   <?rfc include="reference.RFC.3443"?>
   <?rfc include="reference.RFC.3473"?>
   <?rfc include="reference.RFC.4206"?>
   <?rfc include="reference.RFC.5129"?>
   <?rfc include="reference.RFC.5462"?>
   <?rfc include="reference.RFC.6003"?>
   &rfc6073;
   &rfc4385;
   <?rfc include="reference.RFC.8200"?>
  </references>
  <references title="Informative references">
   <?rfc include="reference.RFC.2205"?>
   &rfc3985;
   <?rfc include="reference.RFC.5654"?>
   <?rfc include="reference.RFC.7551"?>
   <?rfc include="reference.RFC.7950"?>
   <?rfc include="reference.RFC.8040"?>
   &I-D.ietf-detnet-dp-alt;
   &I-D.ietf-detnet-architecture;
   &I-D.ietf-6man-segment-routing-header;

   <reference anchor='I-D.sdt-detnet-security'>
    <front>
     <title>Deterministic Networking (DetNet) Security Considerations,
		draft-sdt-detnet-security, work in progress
     </title>
     <author>
      <organization>Mizrahi, T., Grossman, E., Hacker, A., Das, S.</organization>
     </author>
     <date year='2017' />
    </front>
   </reference>

   <reference anchor='IEEE1588'>
    <front>
     <title>IEEE 1588 Standard for a Precision Clock Synchronization
     Protocol for Networked Measurement and Control Systems Version 2
     </title>
     <author>
      <organization>IEEE</organization>
     </author>
     <date year='2008' />
    </front>
   </reference>

   <reference anchor="IEEE8021Q"
     target="http://standards.ieee.org/about/get/">
    <front>
     <title>Standard for Local and metropolitan area networks--Bridges and Bridged Networks (IEEE Std 802.1Q-2014)</title>
     <author>
      <organization>IEEE 802.1</organization>
     </author>
     <date year="2014"/>
    </front>
    <format type="PDF" target="http://standards.ieee.org/about/get/"/>
   </reference>

   <reference anchor="IEEE8021CB"
    target="http://www.ieee802.org/1/files/private/cb-drafts/d2/802-1CB-d2-1.pdf">
    <front>
        <title>Draft Standard for Local and metropolitan area networks - Seamless Redundancy</title>
        <author initials="N. F." surname="Finn" fullname="Norman Finn">
            <organization>IEEE 802.1</organization>
        </author>
        <date month="December" year="2015"/>
    </front>
    <seriesInfo name="IEEE P802.1CB /D2.1" value="P802.1CB"/>
    <format type="PDF" target="http://www.ieee802.org/1/files/private/cb-drafts/d2/802-1CB-d2-1.pdf"/>
   </reference>

  </references>
 <section title="Example of DetNet data plane operation" anchor="sec_comb">
  <t>
   [Editor's note: Add a simplified example of DetNet data plane and how labels etc
   work in the case of MPLS-based PSN and utilizing PREF. The figure is subject
   to change depending on the further DT decisions on the label handling..]
  </t>
 </section>

 <section title="Example of pinned paths using IPv6">
  <t>
   TBD.
  </t>
 </section>

 </back>
</rfc>
