<?xml version="1.0" encoding="iso-8859-1" ?>
<?rfc toc="yes" ?>
<?rfc symrefs="yes" ?>
<?rfc sortrefs="yes" ?>
<?rfc compact="yes" ?>
<?rfc subcompact="no" ?>

<rfc category="std" ipr="trust200902" docName="draft-xp-ippm-detnet-stamp-00" consensus="true" submissionType="IETF">

<front>
        <title abbrev="STAMP Extensions for DetNet"> STAMP Extensions for DetNet </title>
 
  <author fullname="Xiao Min" initials="X" surname="Min">
      <organization>ZTE Corp.</organization>
     <address>
       <postal>
         <street/>

         <!-- Reorder these if your country does things differently -->

         <city>Nanjing</city>

         <region/>

         <code/>

         <country>China</country>
       </postal>

       <phone>+86 18061680168</phone>

       <email>xiao.min2@zte.com.cn</email>

       <!-- uri and facsimile elements may also be added -->
     </address>
    </author>
	
  <author fullname="Shaofu Peng" initials="S" surname="Peng">
      <organization>ZTE Corp.</organization>
     <address>
       <postal>
         <street/>

         <!-- Reorder these if your country does things differently -->

         <city>Nanjing</city>

         <region/>

         <code/>

         <country>China</country>
       </postal>

       <phone/>

       <email>peng.shaofu@zte.com.cn</email>

       <!-- uri and facsimile elements may also be added -->
     </address>
    </author>

  <author fullname="Xiaoming He" initials="X." surname="He">
      <organization>China Telecom</organization>
     <address>
       <postal>
         <street/>

         <!-- Reorder these if your country does things differently -->

         <city>Guangzhou</city>

         <region/>

         <code/>

         <country>China</country>
       </postal>

       <phone/>

       <email>hexm4@chinatelecom.cn</email>

       <!-- uri and facsimile elements may also be added -->
     </address>
    </author>
	
    <date year="2024"/>
  
    <area>Routing</area>
    <workgroup>IPPM Working Group</workgroup>

    <keyword>Request for Comments</keyword>
    <keyword>RFC</keyword>
    <keyword>Internet Draft</keyword>
    <keyword>I-D</keyword>

    <abstract>
  <t> Deterministic Networking (DetNet) provides a capability for the delivery of data flows with extremely low packet loss rates and 
  bounded end-to-end delivery latency. The enabler to DetNet is a proper queue scheduling mechanism, such as timeslot based queueing 
  and forwarding mechanism, which requires every router along the DetNet path to collect the basic timeslot mapping relationship 
  between itself and its adjacent router. This document defines two Simple Two-Way Active Measurement Protocol (STAMP) TLVs, to acquire 
  the basic timeslot mapping relationship between the local router and its adjacent router. </t>
    </abstract>
    
</front>
  
<middle>

  <section title="Introduction">
  
  <t> Deterministic Networking (DetNet) provides a capability for the delivery of data flows with extremely low packet loss rates and 
  bounded end-to-end delivery latency.  DetNet is for networks that are under a single administrative control or within a closed group 
  of administrative control.  <xref target="RFC8578"/> presents the DetNet use cases and <xref target="RFC8655"/> provides the overall 
  architecture for DetNet. </t>
  
  <t> <xref target="I-D.peng-detnet-packet-timeslot-mechanism"/> specifies a queue scheduling mechanism that can be used for DetNet.  To 
  make the TQF mechanism work, it's required for every hop router along the DetNet path to collect the basic timeslot mapping 
  relationship between itself and its adjacent router. The basic timeslot mapping relationship is not related to any individual flow, but to 
  a network topological properties (such as the beginning time of the period configured by each node, link propagation delay, etc). </t>
  
  <t> The Simple Two-Way Active Measurement Protocol (STAMP) provides a capability for the measurement of various performance metrics in 
  IP networks.  <xref target="RFC8762"/> defines the STAMP base functionalities and <xref target="RFC8972"/> specifies the use of optional 
  STAMP extensions that use Type-Length-Value (TLV) encoding.</t>
  
  <t> STAMP test packets are transmitted along an IP path between a Session-Sender and a Session-Reflector.  The IP path can be either a 
  single-hop path or a multi-hop path, depending on the application scenario of STAMP.</t>
  
  <t> This document defines two STAMP TLVs, to acquire the timeslot mapping relationship between the local router 
  and its adjacent router, i.e., the mapping direction is from the local router to its adjacent router.</t>
  
  </section>
  
  <section title="Conventions">
  
  <section title="Requirements Language">  
	<t> The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",   "SHOULD", "SHOULD NOT", "RECOMMENDED", 
	"NOT RECOMMENDED", "MAY", and   "OPTIONAL" in this document are to be interpreted as described in BCP 14 
	<xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when, they appear in all capitals, as shown here.</t>	
  </section>
  
  <section title="Abbreviations">
      <t> DetNet: Deterministic Networking</t>
      <t> OP: Orchestration Period</t>
      <t> OPL: Orchestration Period Length</t>
      <t> STAMP: Simple Two-Way Active Measurement Protocol</t>
      <t> TLV: Type-Length-Value</t>
      <t> TQF: Timeslot based Queueing and Forwarding</t>
  </section>
  
  </section>
  
  <section title="TLVs for DetNet">
  
    <section title="Timeslot Mapping TLV">
  
  <t> The Timeslot Mapping TLV enables collection of the mapping relationship of timeslots between the Session-Sender and the Session-Reflector. 
  The timeslot mapping is based on a specific orchestration period at both the Session-Sender and the Session-Reflector, and the timeslot mapping 
  may be different among different orchestration periods.</t>
  
  <figure anchor="Figure_1" title="Timeslot Mapping TLV">
  <artwork align="left"> <![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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|STAMP TLV Flags|   Type=TBD1   |         Length=20             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|               Orchestration Period Length (OPL)               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   Session-Sender Slot Length  |     Session-Sender Slot X     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                Session-Sender Trans-Deviation E               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Session-Reflector Slot Length |   Session-Reflector Slot Y    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|Reflector's Slot Remaining Time|  Return Code  |   Reserved    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]>  </artwork>
  </figure>

  <t>The fields are defined as follows:
    <list style="symbols">
    <t>
    STAMP TLV Flags: The STAMP TLV Flags follow the procedures described in <xref target="RFC8972"/>.
    </t>
    <t>
    Type: Type (value TBD1) for the Timeslot Mapping TLV.
    </t>
    <t>
    Length: A two-octet field, set equal to the length of the Value field in octets. The length is 20 octets.
    </t>
    <t>
    Orchestration Period Length: A four-octet field that characterizes the orchestration period in microsecond 
	at the Session-Sender. The Session-Reflector uses this period as a key to match the TQF scheduling instance.
    </t>
    <t>
    Session-Sender Slot Length: A two-octet field that characterizes the Session-Sender timeslot in microsecond.
    </t>
    <t>
    Session-Sender Slot X: A two-octet field that characterizes the Session-Sender timeslot number (X) for which 
	the Session-Sender queries the mapping relationship.
    </t>
    <t>
    Session-Sender Trans-Deviation E: A four-octet field that characterizes the time difference in microsecond 
	between the begin of timeslot (X) and the time sending the STAMP packet, i.e., E = sending time - X.begin. 
	This field may be zero, positive, or negative.
    </t>
    <t>
    Session-Reflector Slot Length: A two-octet field that characterizes the Session-Reflector timeslot in microsecond.
    </t>
    <t>
    Session-Reflector Slot Y: A two-octet field that characterizes the Session-Reflector timeslot number (Y) for 
	which the Session-Reflector responds the mapping relationship.
    </t>
    <t>
    Reflector's Slot Remaining Time: A two-octet field that characterizes the time difference in microsecond between 
	the end of timeslot (X) of Session-Sender and the end of timeslot (Y) of Session-Reflector, where the end of timeslot 
	(X) equals to the time receiving the STAMP packet plus Session-Sender Slot Length and minus time difference (E). 
	This field may be zero, positive, or negative.
    </t>
    <t>
    Return Code: A one-octet field that identifies the OPL matching result at the Session-Reflector. It MUST be zeroed by 
	the Session-Sender on transmit and ignored by the Session-Reflector on receipt. The Session-Reflector MUST fill it with 
	values defined as follows.
    <list style="symbols">
    <t>
    0x01:  TQF instance for the specific OPL is supported
    </t>
    <t>
    0x02:  TQF instance for the specific OPL is not supported
    </t>
    <t>
    All other values are reserved for future use.
    </t>
    </list>	
    </t>
    <t>
    Reserved: A one-octet field that MUST be zeroed on transmission and ignored on receipt.
    </t>
	
    </list>	
  </t>
  
  <t> The STAMP Session-Sender that includes the Timeslot Mapping TLV sets the value of the OPL field based on which the timeslot 
  mapping is queried.  Also, the Session-Sender sets the values of the Session-Sender Slot Length field, the Session-Sender Slot X 
  field and the Session-Sender Trans-Deviation E field within the designated orchestration period. </t>
  
  <t> The STAMP Session-Reflector that received the test packet with the Timeslot Mapping TLV MUST include the Timeslot Mapping TLV 
  in the reflected test packet.  The Session-Reflector MUST set the values of the OPL, Session-Sender Slot Length, Session-Sender Slot 
  X, and Session-Sender Trans-Deviation E fields equal to the values of the corresponding fields from the test packet it has received.  
  Also, the Session-Reflector MUST set the values of the Session-Reflector Slot Length field, the Session-Reflector Slot Y field, and 
  the Reflector's Slot Remaining Time field within the designated orchestration period.  The Session-Reflector Slot Y is determined by 
  the expected time receiving the STAMP packet, which equals to the real time receiving the STAMP packet plus Session-Sender Slot Length 
  and minus time difference E. Besides, the Session-Reflector MUST set the value of the Return Code field to reflect the operational result. </t>
  
  <t> By the received Timeslot Mapping TLV in the reflected test packet, the Session-Sender can acquire the mapping relationship between 
  the timeslot number (X) at the Session-Sender and the timeslot number (Y) at the Session-Reflector, as well as Y's remaining time.  In 
  addition, the Session-Sender can figure out the mapping relationship between any other timeslot number (I) at the Session-Sender and the 
  timeslot number (J) at the Session-Reflector, by some calculations on the TLV fields' values.  The mathematical formula to derive the 
  timeslot mapping relationship between the Session-Sender's timeslot (I) and the Session-Reflector's timeslot (J) is outside the scope of 
  this document and may refer to <xref target="I-D.peng-detnet-packet-timeslot-mechanism"/>. </t>
  
    </section>
  
    <section title="Orchestration Period Mapping TLV">
  
  <t> The Orchestration Period Mapping TLV is an alternative to the Timeslot Mapping TLV, it also enables collection of the mapping relationship 
  of timeslots between the Session-Sender and the Session-Reflector.  The difference between the two TLVs is that the Timeslot Mapping TLV is 
  used when the timeslot number (X) is provisioned at the Session-Sender, and the Orchestration Period Mapping TLV is used when the timeslot 
  number (X) is not provisioned at the Session-Sender.</t>
  
  <figure anchor="Figure_2" title="Orchestration Period Mapping TLV">
  <artwork align="left"> <![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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|STAMP TLV Flags|   Type=TBD2   |         Length=16             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|               Orchestration Period Length (OPL)               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                Session-Sender Trans-Deviation E               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   Session-Sender Slot Length  | Session-Reflector Slot Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Reflector's OP Remaining Time |  Return Code  |   Reserved    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]>  </artwork>
  </figure>

  <t>The fields are defined as follows:
    <list style="symbols">
    <t>
    STAMP TLV Flags: The STAMP TLV Flags follow the procedures described in <xref target="RFC8972"/>.
    </t>
    <t>
    Type: Type (value TBD2) for the Orchestration Period Mapping TLV.
    </t>
    <t>
    Length: A two-octet field, set equal to the length of the Value field in octets. The length is 16 octets.
    </t>
    <t>
    Orchestration Period Length: A four-octet field that characterizes the orchestration period in microsecond at the 
	Session-Sender. The Session-Reflector uses this period as a key to match the Timeslot based Queueing and Forwarding 
	(TQF) scheduling instance.
    </t>
    <t>
    Session-Sender Trans-Deviation E: A four-octet field that characterizes the time difference in microsecond between 
	the begin of orchestration period and the time sending the STAMP packet, i.e., E = sending time - OP.begin. This 
	field may be zero, positive, or negative.
    </t>
    <t>
    Session-Sender Slot Length: A two-octet field that characterizes the Session-Sender timeslot in microsecond.
    </t>
    <t>
    Session-Reflector Slot Length: A two-octet field that characterizes the Session-Reflector timeslot in microsecond.
    </t>
    <t>
    Reflector's OP Remaining Time: A two-octet field that characterizes the time difference in microsecond between the end 
	of the orchestration period of Session-Sender and the end of orchestration period of Session-Reflector, where the end 
	of the orchestration period of Session-Sender equal to the time receiving the STAMP packet minus time difference E. 
	This field may be zero, positive, or negative.
    </t>
    <t>
    Return Code: A one-octet field that identifies the OPL matching result at the Session-Reflector. It MUST be zeroed by 
	the Session-Sender on transmit and ignored by the Session-Reflector on receipt. The Session-Reflector MUST fill it with 
	values defined as follows.
    <list style="symbols">
    <t>
    0x01:  TQF instance for the specific OPL is supported
    </t>
    <t>
    0x02:  TQF instance for the specific OPL is not supported
    </t>
    <t>
    All other values are reserved for future use.
    </t>
    </list>	
    </t>
    <t>
    Reserved: A one-octet field that MUST be zeroed on transmission and ignored on receipt.
    </t>
	
    </list>	
  </t>
  
  <t> The STAMP Session-Sender that includes the Orchestration Period Mapping TLV sets the value of the OPL field based on which the 
  timeslot mapping is queried.  Also, the Session-Sender sets the values of the Session-Sender Slot Length field and the Session-Sender 
  Trans-Deviation E field within the designated orchestration period. </t>
  
  <t> The STAMP Session-Reflector that received the test packet with the Orchestration Period Mapping TLV MUST include the Orchestration 
  Period Mapping TLV in the reflected test packet.  The Session-Reflector MUST set the values of the OPL, Session-Sender Slot Length, and 
  Session-Sender Trans-Deviation E fields equal to the values of the corresponding fields from the test packet it has received.  Also, the 
  Session-Reflector MUST set the values of the Session-Reflector Slot Length field and the Reflector's OP Remaining Time field within the 
  designated orchestration period.  Besides, the Session-Reflector MUST set the value of the Return Code field to reflect the operational 
  result. </t>
  
  <t> By the received Orchestration Period Mapping TLV in the reflected test packet, the Session-Sender can figure out the mapping relationship 
  between any timeslot number (I) at the Session-Sender and the timeslot number (J) at the Session-Reflector, by some calculations on the 
  TLV fields' values.  The mathematical formula to derive the timeslot mapping relationship between the Session-Sender's timeslot (I) and the 
  Session-Reflector's timeslot (J) is outside the scope of this document and may refer to <xref target="I-D.peng-detnet-packet-timeslot-mechanism"/>. </t>
  
    </section>
  
  </section>

  <section title="Security Considerations">
  
  <t> Security issues discussed in <xref target="RFC8762"/>, <xref target="RFC8972"/>, and <xref target="RFC9503"/> apply to 
  this document.</t>
  
  <t> Basic validation checks can be performed to mitigate the potential attacks, for example, the Orchestration Period Length 
  field of the Timeslot Mapping TLV and the Orchestration Period Mapping TLV is larger than the Session-Sender Slot Length field 
  of the two TLVs in the received STAMP packets at the Session-Reflector.</t>
  
  <t> The usage of STAMP extensions defined in this document is intended for deployment between two neighbouring nodes in a single 
  network administrative domain.  As such, the Session-Sender and Session-Reflector can be configured to check the source address 
  while the received STAMP packet carries the extensions defined in this document, and if it's determined the source address doesn't 
  belong to its adjacent nodes, the received STAMP packet MUST be dropped with a notification sent to the network management system.</t>
  
  </section>
  
  <section title="IANA Considerations"> 
  
  <t> From the "STAMP TLV Types" registry in the "Simple Two-way Active Measurement Protocol (STAMP) TLV Types" namespace, two new 
  values for the Timeslot Mapping TLV and the Orchestration Period Mapping TLV are requested from IANA as follows:</t>
  
  <figure>
  <artwork><![CDATA[
   +=======+=======================================+===========+
   | Value | Description                           | Reference |
   +=======+=======================================+===========+
   | TBD1  | Timeslot Mapping                      |This draft |
   +-------+---------------------------------------+-----------+
   | TBD2  | Orchestration Period Mapping          |This draft |
   +-------+---------------------------------------+-----------+			
  ]]></artwork>
  </figure>
  
  </section>

  <section title="Acknowledgements">
  <t> TBD. </t>
  </section>  
  
</middle>
  
<back>
    <references title="Normative References">
     <?rfc include="reference.RFC.2119"?>
     <?rfc include="reference.RFC.8174"?>
     <?rfc include="reference.RFC.8762"?>
     <?rfc include="reference.RFC.8972"?>
    </references>
	
    <references title="Informative References">
     <?rfc include="reference.RFC.8578"?>
     <?rfc include="reference.RFC.8655"?>
     <?rfc include="reference.RFC.9503"?>
     <?rfc include="reference.I-D.peng-detnet-packet-timeslot-mechanism"?>
    </references>	
</back>
</rfc>
