<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE rfc [
<!ENTITY nbsp "&#160;">
<!ENTITY zwsp "&#8203;">
<!ENTITY nbhy "&#8209;">
<!ENTITY wj "&#8288;">
]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<?rfc toc="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc iprnotified="no"?>
<?rfc strict="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" category="std" docName="draft-ietf-mpls-mna-detnet-00" ipr="trust200902" submissionType="IETF" obsoletes="" updates="" xml:lang="en" tocInclude="true" symRefs="true" sortRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.22.0 -->
  <front>
    <title abbrev="DetNet MNA">
    MPLS Network Action for Deterministic Networking</title>
    <seriesInfo name="Internet-Draft" value="draft-ietf-mpls-mna-detnet-00"/>

    <author fullname="Xueyan Song" initials="X." surname="Song">
      <organization>ZTE Corp.</organization>
      <address>
        <email>song.xueyan2@zte.com.cn</email>
      </address>
    </author>
	
    <author fullname="Greg Mirsky" initials="G." surname="Mirsky">
      <organization>Ericsson</organization>
      <address>
        <email>gregimirsky@gmail.com</email>
      </address>
    </author>

    <author fullname="Balazs Varga" initials="B." surname="Varga">
        <organization>Ericsson</organization>
        <address>
         <email>balazs.a.varga@ericsson.com</email>
        </address>
    </author>

    <author fullname="Rakesh Gandhi" initials="R." surname="Gandhi">
        <organization>Cisco Systems, Inc.</organization>
        <address>
         <email>rgandhi@cisco.com</email>
        </address>
    </author>

    <author fullname="Quan Xiong" initials="Q." surname="Xiong">
      <organization>ZTE Corp.</organization>
      <address>
        <email>xiong.quan@zte.com.cn</email>
      </address>
    </author>	
	
    <date/>
    <workgroup>MPLS</workgroup>
    <keyword>MNA</keyword>
    <keyword>DetNet</keyword>
    <keyword>Latency</keyword>
    <keyword>PREOF</keyword>
    <keyword>Flow-ID</keyword>
    <!-- Keywords will be incorporated into HTML output
        files in a meta tag but they have no effect on text or nroff
        output. If you submit your draft to the RFC Editor, the
        keywords will be used for the search engine. -->

  <abstract>
      <t>
	  This document specifies formats and mechanisms for using MPLS Network Actions (MNA)
	  to support Deterministic Networking (DetNet) services, including bounded latency, low
      loss and in-order delivery. It defines MPLS In-Stack and Post-Stack MNA for carrying 
	  DetNet-specific information, such as flow identification, sequence number, and latency
	  information, which are forwarded over an MPLS technology-based network domain. 
      </t>
    </abstract>
  </front>
  <middle>
    <section anchor="sec_intro" numbered="true" toc="default">
      <name>Introduction</name>
      <t>
     The DetNet work group has defined the Packet Replication Function (PRF) and Packet 
	 Elimination Function (PEF) to achieve extremely low packet loss. In general, 
	 usage of these per-packet replication and elimination functions may result 
	 in out-of-order delivery of frames/packets <xref target="RFC8655" format="default"/>. 
	 This characteristic of PRF/PEF has been identified by the IETF, and a Packet 
	 Ordering Function (POF) was defined <xref target="RFC9550" format="default"/>. The POF 
	 function is a DetNet service sub-layer function similar to PRF and PEF. 
	 All the DetNet service sub-layer functions are usually referred to as 
	 Packet Replication, Elimination, and Ordering Functions (PREOF).
      </t>
      <t>
     These DetNet service sub-layer-related functions require ordering 
	 information (e.g., sequence number). IETF DetNet WG has defined how 
	 sequencing information (i.e., sequence number) travels with DetNet packets 
	 using the d-CW <xref target="RFC8964" format="default"/> when PW (PseudoWire) technology 
	 is used with an MPLS Data Plane. 
      </t>
      <t>
     The DetNet forwarding sub-layer-related functions focus on ensuring the 
	 bounded latency requirements and may use packet-specific 
	 latency information during forwarding. No solution was defined for adding
	 such latency-specific information to the PW encapsulated DetNet 
	 packets. 
      </t>
     <t> This document presents MPLS MNA solutions for DetNet functions support. 
	 It follows the MPLS MNA requirements specified at <xref target="RFC9613"/> and 
     MPLS MNA In-Stack header specifid at <xref target="I-D.ietf-mpls-mna-hdr"/> and MNA 
	 Post-Stack header specified at <xref target="I-D.ietf-mpls-mna-ps-hdr"/> to support basic DetNet 
	 service and DetNet service with enhanced DetNet data plane requirements specified at 
     <xref target="I-D.ietf-detnet-scaling-requirements"/> .</t>
    </section>
    <!-- end of introduction -->

<section numbered="true" toc="default">
      <name>Terminology</name>
      <section numbered="true" toc="default">
        <name>Terms Used in This Document</name>
        <t>
   This document uses the terminology established in the DetNet architecture
   <xref target="RFC8655" format="default"/>. The reader is assumed to be familiar with that 
   document and its terminology.
        </t>
      </section>
      <section numbered="true" toc="default">
        <name>Abbreviations</name>
        <t>
   The following abbreviations are used in this document:
        </t>
        <dl newline="false" spacing="normal" indent="14">
          <dt>DetNet</dt>
          <dd>Deterministic Networking</dd>
          <dt>Flow-ID</dt>
          <dd>Flow Identifier</dd>	  
          <dt>MNA</dt>
          <dd>MPLS Network Action</dd>
          <dt>NAI</dt>
          <dd>Network Action Indicator</dd>
          <dt>NAS</dt>
          <dd>Network Action Sub-Stack</dd>
          <dt>LSE</dt>
          <dd>Label Stack Entry</dd>
          <dt>PEF</dt>
          <dd>Packet Elimination Function</dd>
          <dt>POF</dt>
          <dd>Packet Ordering Function</dd>
          <dt>PREOF</dt>
          <dd>Packet Replication, Elimination and Ordering Functions</dd>
          <dt>PRF</dt>
          <dd>Packet Replication Function</dd>
          <dt>PSD</dt>
          <dd>Post-Stack Data</dd>
          <dt>SeqNum</dt>
          <dd>Sequence Number</dd>
        </dl>
      </section>
      <section numbered="true" toc="default">
        <name>Requirements Language</name>
        <t>
    The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
    "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
    "OPTIONAL" in this document are to be interpreted as described in
    BCP 14 <xref target="RFC2119" format="default"/> <xref target="RFC8174" format="default"/> when, and
    only when, they appear in all capitals, as shown here.
        </t>
      </section>
    </section>
    <!-- end of terminology -->

<!-- ===================================================================== -->

<section anchor="detnet-mna" numbered="true" toc="default">
      <name>DetNet-specific MNA</name>
      <t>
     Three information elements may be required during the 
	 forwarding of DetNet packets:
      </t>
      <ol spacing="normal" type="1"><li>
          <t>Flow identifier (Flow-ID)</t>
        </li>
        <li>
          <t>Sequence information (SeqNum)</t>
        </li>
        <li>
          <t>Latency information (LatencyInfo)</t>
        </li>
      </ol>
      <t>
     "1" and "2" are used by the DetNet service sub-layer (i.e., by PREOF). 
	 "1" and "3" are used by the DetNet forwarding sub-layer to ensure the 
	 bounded latency for a DetNet packet.
      </t>
      <t>
     The use of a DetNet-specific MNA solution allows using a single 
	 encapsulation format for all DetNet-specific parameters (Flow-ID, SeqNum, 
	 LatencyInfo) as MNA data, meaning that the Network Action Sub-stack (NAS) 
	 is carried as part of the MPLS label stack (i.e., In-Stack MNA solution).
     DetNet-specific MNA enables more fine-tuned, scalable handling of 
	 latency-bound requirements, with service protection natively in MPLS. 
      </t>
      <t>	  
	 This document introduces two options for DetNet-specific MNA: In-Stack
	 MPLS Network Action [see <xref target="I-D.ietf-mpls-mna-hdr"/>] and 
	 Post-Stack MPLS Network Action [see <xref target="I-D.ietf-mpls-mna-ps-hdr"/>]. 
      </t>
    </section>
    <!-- DetNet-specific MNA -->

<section anchor="detnet-mna-isd" numbered="true" toc="default">
      <name>MPLS In-Stack Encoding for DetNet </name>
      <section anchor="detnet-nases" numbered="true" toc="default">
        <name>DetNet-specific NASes</name>
        <t>
       The MPLS MNA encapsulation is used between DetNet Relay nodes.
        </t>
        <t>
       DetNet-specific parameters used during forwarding are: (1) Flow-ID, 
	   (2) SeqNum and (3) LatencyInfo. For each of them, a specific NAS can 
	   be defined to carry the related variable in an MPLS MNA network:
        </t>
        <ol spacing="normal" type="1"><li>
            <t>PREOF-specific NAS (e.g., SeqNum)</t>
          </li>
          <li>
            <t>Latency-specific NAS (e.g., LatencyClass)</t>
          </li>
          <li>
            <t>Flow-specific NAS (i.e., Flow-ID)</t>
          </li>
        </ol>
        <t>
       Note: DetNet aggregate flows can be described with the same set of 
	   parameters.
        </t>
        <t>
       DetNet functions use these NASes as follows:
        </t>
        <ul spacing="normal">
          <li>
            <t>DetNet PREOF requires Flow-ID+SeqNum parameters. They are used 
		    only at DetNet Relay nodes implementing the service sub-layer.</t>
          </li>
          <li>
            <t>DetNet latency-bound related functions use Flow-ID+LatencyInfo, 
		    to select proper queuing hop-by-hop along the transmission 
			path. They are used at DetNet Transit nodes to implement the 
			forwarding sub-layer.</t>
          </li>
        </ul>
        <t>
       Using these NASes in DetNet scenarios results in the following MPLS 
	   encapsulation format example that ensures placing all DetNet parameters 
	   in the NASes:
        </t>
        <ul spacing="normal">
          <li>
            <t>LSP(s) = F-Label(s): used for describing the forwarding path.</t>
          </li>
          <li>
            <t>MNA Sub-Stack Indicator.</t>
          </li>
          <li>
            <t>NAS-3: (NAI: Flow-ID, Ancillary Data (AD): i.e., Flow-ID).</t>
          </li>
          <li>
            <t>NAS-2: (NAI: Latency, Ancillary Data (AD): e.g., LatencyClass).</t>
          </li>
          <li>
            <t>NAS-1: (NAI: SeqNum, Ancillary Data (AD): i.e., SeqNum (16/28 bits)).</t>
          </li>
          <li>
            <t>Payload.</t>
          </li>
        </ul>
        <t>
       Note that using PW (S-Label) in the label stack is optional, it is not 
	   prevented by the method described in this document and is not shown in 
	   the above example.
        </t>
      </section>
      <!-- end of DetNet-specific NASes -->
 <section anchor="detnet-nas-char" numbered="true" toc="default">
        <name>Characteristics of DetNet NASes</name>
        <t>
	   Characteristics of the DetNet-specific NASes are as follows: 
        </t>
        <ul spacing="normal">
          <li>
            <t>Encoding a Network Action: Different Operation Codes are used 
		    for the above DetNet-specific NASes.</t>
          </li>
          <li>
            <t>Scope is encoded implicitly, all DetNet NAIs (Network Action 
		    Indicator) have a predefined scope.
            </t>
            <ul spacing="normal">
              <li>
                <t>All DetNet-specific NAIs use "Select" mode, so the use of these 
			     NAIs may be restricted for DetNet-aware nodes if the operator 
				 intends to do so.</t>
              </li>
              <li>
                <t>Optional scope for the NAIs:
                </t>
                <ul spacing="normal">
                  <li>
                    <t>NAI: Flow-ID can have a Hop-by-hop (HBH) scope.</t>
                  </li>
                  <li>
                    <t>NAI: Latency can have a Hop-by-hop (HBH) scope.</t>
                  </li>
                  <li>
                    <t>NAI: SeqNum can have an Ingress-to-Egress (I2E) scope.</t>
                  </li>
                </ul>
              </li>
            </ul>
          </li>
          <li>
            <t>Recognition action:
            </t>
            <ul spacing="normal">
              <li>
                <t>NAI: Flow-ID is used for flow identification, and this NAI 
			     MUST be ignored if unrecognized.</t>
              </li>
              <li>
                <t>NAI: Latency is used by every node along the path that 
			     performs a latency-related action (e.g., queuing). This NAI MUST 
				 be ignored if unrecognized.</t>
              </li>
              <li>
                <t>NAI: SegNum is used only by the last node on the path defined 
			     by the F-Label(s) that performs the PREOF action. This NAI MUST 
				 be ignored if unrecognized.</t>
              </li>
            </ul>
          </li>
          <li>
            <t>Encoding of Post-Stack Data: N/A for these NASes.</t>
          </li>
        </ul>
        <t>
	   By using the "Select" mode for the DetNet-specific NASes, the network 
	   operation can emulate the MS-PW (Multi-Segment PW) pop-push 
	   characteristics on the S-Label. There is no need to define
	   the whole forwarding graph across the MPLS network at the ingress. Furthermore, 
	   the "Select" mode allows the payload is an MPLS packet using the same 
	   label stack (as used by the MNA).
        </t>
      </section>
      <!-- end of Characteristics -->
 <section anchor="detnet-nas-example" numbered="true" toc="default">
        <name>Examples of DetNet NASes in MPLS In-Stack</name>			
        <t>
	  The figures show some possible DetNet-specific NAS formats and their usage.
        </t>
        <t>
	  DetNet Latency NAS: Format-B provides enough bits to encode, e.g., several 
	  LatencyClass-es. For longer latency-related parameters (e.g., timestamps) 
	  Format C/C+D can be used.
        </t>
    <figure anchor="latency-example-fig">
        <name>The short DetNet Latency Information (e.g., several 
	  LatencyClass-es) Encoding Using LSE Format B</name>
        <artwork name="" type="" align="left" alt="">
    <![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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |              Label (MNA bSPL)         | TC  |S|      TTL      |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | Opcode=TBA1 |   Data (Latency Info)   |R|IHS|S| Res |U|  NASL |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

       ]]></artwork>
       </figure>
        <t>
	  DetNet SeqNum NAS: Depending on the location of the SeqNum parameter 
	  within the MNA part of the MPLS stack, a Format B+C/C/C+D is necessary 
	  (which contains 28/16 bits of the SeqNum). In these formats, there are unused 
	  "Data bits" to carry additional FLAGs related to the SeqNum
        </t>
      <figure anchor="seqnum-example-fig">
        <name>An Example of the DetNet Sequence Number Encoding Using LSE Formats B and C</name>
        <artwork name="" type="" align="left" alt=""><![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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |              Label (MNA bSPL)         | TC  |S|      TTL      |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | Opcode=TBA2 |   Data (SeqNum)         |R|IHS|S| Res |U| NASL=1|
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | Opcode=TBA2 |   Data (cont.)                |S| Data  | NAL=0 |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
       ]]></artwork>
       </figure>
       
        <t>
	  DetNet Flow-ID NAS: Depending on the location of the Flow-ID, a Format 
	  C/B+C is necessary (which contains 20 bits of the ID).
        </t>
      <figure anchor="flow-id-example-fig">
        <name>An Example of the DetNet Flow Identifier Encoding Using LSE Formats B and C</name>
        <artwork name="" type="" align="left" alt=""><![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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |              Label (MNA bSPL)         | TC  |S|      TTL      |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | Opcode=TBA3 |   Data (Flow-ID)        |R|IHS|S| Res |U| NASL=1|
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | Opcode=TBA3 |   Data (cont.)                |S|  Data | NAL=0 |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
       ]]></artwork>
       </figure>
       
        <t>
	  <xref target="param-example-fig"/> below shows an MNA that contains all the 
	  DetNet-specific NASes. MNA-6 contains the DetNet Latency parameter being 
	  encoded in Format-B. MNA-7 contains the DetNet Flow-ID, and a 20-bit Flow-ID
	  is encoded in Format C. MNA-8 contains the DetNet SeqNum in Format C with 
	  a 16-bit sequence number.
        </t>
    <figure anchor="param-example-fig">
        <name>An Example of the Combined DetNet Parameters Encoding Using MNA</name>
        <artwork name="" type="" align="left" alt=""><![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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              Label (MNA bSPL)         | TC  |S|      TTL      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Opcode=TBA1 |   Data (Latency Info)   |R|IHS|S| Res |U| NASL=2|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Opcode=TBA3 |   Data (Flow-ID)              |S| (FID) | NAL=0 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Opcode=TBA2 |   Data (SeqNum)               |S|  0    | NAL=0 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
       ]]></artwork>
       </figure>
       
      </section>
      <!-- end of Examples -->
 <section anchor="detnet-nas-aggr" numbered="true" toc="default">
        <name>Aggregation Example</name>
        <t>
	  <xref target="aggr-param-example-fig"/> shows an aggregation example where multiple DetNet 
	  flows are aggregated in a single aggregate. NAS-A part contains the 
	  aggregate specific DetNet NASes, and NAS-F contains the flow-specific 
	  NASes of the data packet.
        </t>
      <figure anchor="aggr-param-example-fig">
        <name>An Example of the DetNet Aggregate Flow Parameters Encoding Using MNA</name>
        <artwork name="" type="" align="left" alt=""><![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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              Label (MNA bSPL)         | TC  |S|      TTL      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Opcode=TBA1 | Data (Aggr-Latency-Info)|R|IHS|S| Res |U| NASL=2|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Opcode=TBA3 | Data (Aggr-Flow-ID)           |S| (FID) | NAL=0 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Opcode=TBA2 | Data (Aggr-SeqNum)            |S|   0   | NAL=0 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              Label (MNA bSPL)         | TC  |S|      TTL      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Opcode=TBA1 |   Data (Latency Info)   |R|IHS|S| Res |U| NASL=2|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Opcode=TBA3 |   Data (Flow-ID)              |S| (FID) | NAL=0 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Opcode=TBA2 |   Data (SeqNum)               |S|  0    | NAL=0 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
       ]]></artwork>
       </figure>
       
        <t> Note1: Opcodes are to be allocated by IANA during the standardization.
        </t>
        <t> Note2: Aggregation re-uses the same Options code points for the 
	    aggregated and specific flows. The interpretation is based on the 
		order of NASes. During the de-aggregation of flows, the MNA containing 
		the aggregate parameters is removed from the label stack (popped).
        </t>
      </section>
      <!-- end of Aggregation -->
    </section>	  
	  
 <section anchor="detnet-mna-psd" numbered="true" toc="default">
        <name>MPLS Post-Stack Encoding for DetNet</name>
 	    <t>
	    When the latency guarantee of a DetNet network is of the end-to-end (E2E) 
		forwarding type, for the hop-by-hop (hbh) forwarding type that carries longer 
		latency information, the carrying of latency information changes with the 
		number of hops. In such cases, it is recommended to use PSD encapsulation.
		The opcode of DetNet used in MPLS In-Stack is reused for indication of PSD presence. 
        </t>
    <figure anchor="psd-latency-example-fig">
        <name>PSD presence for DetNet Latency Encoding Using LSE Format B</name>
        <artwork name="" type="" align="left" alt="">
    <![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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |              Label (MNA bSPL)         | TC  |S|      TTL      |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | Opcode=TBA1 |           Data          |1|IHS|S| Res |U| NASL=0|
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
       ]]></artwork>
       </figure>       
        
		<t>Opcode: In-Stack Opcode for DetNet action, requires allocation by IANA.
		The PSD flag bit with P=1 is represented by the PSD encoding. The scope field
		specifies the operation processing method of IHS. 
		</t>
		
		<t>
	  <xref target="psd-param-example-fig"/> shows an example of a PSD in which DetNet 
	  flow information is encoded in the MPLS Post-Stack NAS. The latency information 
	  may be variable in case of Hop-by-Hop processing in DetNet networks. In this example,
	  it's assumed to have two NSIs to carry latency information (i.e., timestamps). 
	  The Flow-ID field length is 20 bits, and the length of SeqNum is 28 bits carried in two NAIs.	  
        </t>
      <figure anchor="psd-param-example-fig">
        <name>An Example of the DetNet Flow Parameters Encoding in MPLS Post-Stack</name>
        <artwork name="" type="" align="left" alt=""><![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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              Label (MNA bSPL)         | TC  |S|      TTL      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Opcode=TBA1 |           Data          |1|IHS|S| Res |U| NASL=0|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                 Label                       |1|               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|firstNi|Version| PS-HDR-LEN    | TYPE = MNA-POST-STACK-HDR = 1 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Opcode=TBA1 |R|R|  PS-NAL=4   |    Data (Latency Info)  |NAL=1|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                       Data (Cont.)                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Opcode=TBA3 |R|R|   Data (Flow-ID)                      |NAL=0|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Opcode=TBA2 |R|R|   Data (SeqNum)                       |NAL=1|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                       Data (Cont.)                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
       ]]></artwork>
       </figure>
 
        <t>The first NAS in the Post-Stack is used to encapsulate the PSD header, indicating 
		the total length, version, and type of the PSD header, and complies with 
		<xref target="I-D.ietf-mpls-mna-ps-hdr"/>. 
		</t>		

        <t>Opcode: The R bit is reserved, and PS-NAL is used to indicate the size of the NAS 
		corresponding to DetNet network operations.	
		</t>
		<t> The Flow-ID Opcode identifies a DetNet flow at the receiving DetNet service 
		sub-layer processing node. The SeqNum Opcode identifies the sequence number per 
		DetNet-App flow, i.e., DetNet service. The Sequence Number field lengths MUST be 
		supported 0 bits, 16 bits and 28 bits. The Latency Opcode identifies the service 
		type of DetNet flows or the latency information carried in MPLS networks. The 
		detailed information for latency format is for further study.		
        </t>	
      </section>
      <!-- end of PSD -->	  	  

<!-- ===================================================================== -->


<section numbered="true" toc="default">
      <name>Security Considerations</name>
      <t> 
	  Security considerations for DetNet are covered in the DetNet Architecture 
	  <xref target="RFC8655"/>, DetNet Data Plane Framework <xref target="RFC8938"/> 
	  and DetNet Security Considerations <xref target="RFC9055"/>. MPLS security considerations 
	  are covered in <xref target="RFC8964"/>, <xref target="RFC3031"/>, <xref target="RFC3032"/>. 
      These security considerations also apply to this document. The MNA security considerations 
	  speicified at <xref target="I-D.ietf-mpls-mna-hdr"/>, <xref target="I-D.ietf-mpls-mna-ps-hdr"/> 
	  and <xref target="RFC9789"/> are also applicable to the procedures defined in this document.
	  </t>
    </section>
    <section anchor="iana" numbered="true" toc="default">
      <name>IANA Considerations</name>
      <t>
	  This document requests new IANA-managed code-points for DetNet encoded in MPLS In-Stack adn Post-Stack. IANA 
	  maintains the "Network Action Opcodes" registry when created from IANA request in 
	  <xref target="I-D.ietf-mpls-mna-hdr"/>. IANA is requested to allocate new values for MPLS 
	  Network Action Opcode for DetNet Action from this registry:
      </t>
            <table anchor="detnet-opcode-table" align="center">
        <name>DetNet MNA Opcode</name>
        <thead>
          <tr>
            <th align="left">Opcode Value</th>
            <th align="left">Description</th>	
            <th align="left">In-Stack and Post-Stack, In-Stack only, Post-Stack only</th>				
            <th align="left">Reference</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td align="left">TBA1</td>
            <td align="left">Latency Information</td>	
            <td align="left">In-Stack and Post-Stack</td>			
            <td align="left">This&nbsp;document</td>
          </tr>
          <tr>
            <td align="left">TBA2</td>
            <td align="left">Sequence Number</td>
            <td align="left">In-Stack and Post-Stack</td>	
            <td align="left">This&nbsp;document</td>
          </tr>
          <tr>
            <td align="left">TBA3</td>
            <td align="left">Flow Identifier</td>
            <td align="left">In-Stack and Post-Stack</td>	
            <td align="left">This&nbsp;document</td>
          </tr>
         </tbody>
      </table>

    </section>
    <section anchor="acks" numbered="true" toc="default">
      <name>Acknowledgements</name>
    <t>
       Authors extend their appreciation to Adrian Farrel, Lou Berger, 
	   Joel Halpern, Janos Farkas, Ferenc Fejes, Tony Li, Tarek Saad, Jie Dong, 
	   Shaofu Peng and Loa Andersson for their insightful comments and contributions.
    </t>
    </section>
  </middle>
  <back>
  <references>
     <name>References</name>	  
	  <references>
      <name>Normative References</name>	  
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8655.xml"/>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8964.xml"/>
        <xi:include href="https://datatracker.ietf.org/doc/bibxml3/draft-ietf-mpls-mna-hdr.xml"/>
        <xi:include href="https://datatracker.ietf.org/doc/bibxml3/draft-ietf-mpls-mna-ps-hdr.xml"/>
	  </references>
	  <references>
      <name>Informative References</name>
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.9550.xml"/>	
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.3031.xml"/>	
		<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.3032.xml"/>	
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8938.xml"/>	
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.9055.xml"/>	
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.9613.xml"/>	
        <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.9789.xml"/>	
        <xi:include href="https://datatracker.ietf.org/doc/bibxml3/draft-ietf-detnet-scaling-requirements.xml"/>	
	  </references>		
  </references>
  
  </back>
</rfc>
