<?xml version="1.0" encoding="iso-8859-1" ?>
<!--<!DOCTYPE rfc SYSTEM "rfc4748.dtd"> -->

<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
    <!ENTITY I-D.ietf-sfc-multi-layer-oam PUBLIC '' 
      'http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-sfc-multi-layer-oam.xml'>
    <!ENTITY I-D.ietf-ippm-ioam-data PUBLIC '' 
      'http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-ippm-ioam-data.xml'>
    <!ENTITY I-D.ietf-ippm-ioam-direct-export PUBLIC '' 
      'http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-ippm-ioam-direct-export.xml'>
    <!ENTITY rfc8029 PUBLIC '' 
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.8029.xml'>
    <!ENTITY rfc4443 PUBLIC '' 
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4443.xml'>
    <!ENTITY rfc4884 PUBLIC '' 
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4884.xml'>
    <!ENTITY rfc8335 PUBLIC '' 
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.8335.xml'>
    <!ENTITY rfc2119 PUBLIC '' 
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml'>
    <!ENTITY rfc8174 PUBLIC '' 
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.8174.xml'>
    <!ENTITY rfc8126 PUBLIC '' 
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.8126.xml'>
    <!ENTITY rfc5905 PUBLIC '' 
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.5905.xml'>
    <!ENTITY rfc4302 PUBLIC '' 
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4302.xml'>
    <!ENTITY rfc4303 PUBLIC '' 
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4303.xml'>
]>


<rfc category="std" ipr="trust200902" docName="draft-xiao-ippm-ioam-conf-state-08">

<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>

<?rfc toc="yes"?>
<?rfc symrefs="yes" ?>
<?rfc sortrefs="yes" ?>
<?rfc compact="yes" ?>
<?rfc subcompact="no" ?>

<front>
  <title abbrev="Ping Enabled IOAM Capabilities"> Echo Request/Reply for Enabled In-situ OAM Capabilities </title>

  <author fullname="Xiao Min" initials="X" surname="Min">
      <organization>ZTE Corp.</organization>
     <address>
       <postal>
         <street></street>

         <!-- Reorder these if your country does things differently -->

         <city>Nanjing</city>

         <region></region>

         <code></code>

         <country>China</country>
       </postal>

       <phone>+86 25 88013062</phone>

       <email>xiao.min2@zte.com.cn</email>

       <!-- uri and facsimile elements may also be added -->
     </address>
    </author>

  <author fullname="Greg Mirsky" initials="G" surname="Mirsky">
      <organization>ZTE Corp.</organization>
     <address>
       <postal>
         <street></street>

         <!-- Reorder these if your country does things differently -->

         <city></city>

         <region></region>

         <code></code>

         <country>USA</country>
       </postal>

       <phone></phone>

       <email>gregimirsky@gmail.com</email>

       <!-- uri and facsimile elements may also be added -->
     </address>
    </author>

  <author fullname="Lei Bo" initials="L" surname="Bo">
      <organization>China Telecom</organization>
     <address>
       <postal>
         <street></street>

         <!-- Reorder these if your country does things differently -->

         <city>Beijing</city>

         <region></region>

         <code></code>

         <country>China</country>
       </postal>

       <phone>+86 10 50902903</phone>

       <email>leibo@chinatelecom.cn</email>

       <!-- uri and facsimile elements may also be added -->
     </address>
    </author>

    <date year="2021"/>
  
    <area>Transport</area>
    <workgroup>IPPM Working Group</workgroup>

    <keyword>Request for Comments</keyword>
    <keyword>RFC</keyword>
    <keyword>Internet Draft</keyword>
    <keyword>I-D</keyword>

    <abstract>
  <t> This document describes an extension to the echo request/reply mechanisms used in IPv6, MPLS and SFC environments, which can be
  used within an IOAM domain, allowing the IOAM encapsulating node to acquire the enabled IOAM capabilities of each IOAM transit node and/or 
  IOAM decapsulating node.</t>
    </abstract>
    
</front>
  
<middle>

  <section title="Introduction">

  <t> The Data Fields for In-situ OAM (IOAM) <xref target="I-D.ietf-ippm-ioam-data"/> defines data fields that record OAM information 
  within the packet while the packet traverses a particular network domain, which is called an IOAM domain. IOAM can be used to
  complement OAM mechanisms based on, e.g., ICMP or other types of probe packets, and IOAM mechanisms can be leveraged where mechanisms
  using, e.g., ICMP do not apply or do not offer the desired results.</t>

  <t> As specified in <xref target="I-D.ietf-ippm-ioam-data"/>, within the IOAM-domain, the IOAM data may be updated by network nodes that
  the packet traverses.  The device which adds an IOAM data container to the packet to capture IOAM data is called the "IOAM encapsulating
  node". In contrast, the device which removes the IOAM data container is referred to as the "IOAM decapsulating node".  Nodes within the 
  domain that are aware of IOAM data and read and/or write or process the IOAM data are called "IOAM transit nodes". Both the IOAM 
  encapsulating node and the decapsulating node are referred to as domain edge devices, which can be hosts or network devices.</t>

  <t> In order to add the correct IOAM data container to the packet, the IOAM encapsulating node needs to know the enabled IOAM capabilities 
  at the IOAM transit nodes and/or the IOAM decapsulating node as a whole, e.g., how many IOAM transit nodes will add tracing data, and 
  what kinds of data fields will be added. A centralized controller could be used in some IOAM deployments. The IOAM encapsulating node can 
  acquire these IOAM capabilities info from the centralized controller, through, e.g., Netconf/Yang, PCEP, or BGP. In the IOAM deployment 
  scenario where there is no centralized controller, Netconf/Yang or IGP may be used for the IOAM encapsulating node to acquire these IOAM 
  capabilities info, however, whether Netconf/Yang or IGP has some limitations as follows.
  
    <list style="symbols">
    <t>
    When Netconf/Yang is used in this scenario, each IOAM encapsulating node (including the host when it takes the role of an IOAM encapsulating 
	node) needs to implement a Netconf Client, each IOAM transit node and IOAM decapsulating node (including the host when it takes the role 
	of an IOAM decapsulating node) needs to implement a Netconf Server, the complexity can be an issue. Furthermore, each IOAM encapsulating node 
	needs to establish Netconf Connection with each IOAM transit node and IOAM decapsulating node, the scalability can be an issue.
    </t>
    <t>
    When IGP is used in this scenario, the IGP domain and an IOAM domain don't always have the same coverage. For example, when the IOAM 
	encapsulating node or the IOAM decapsulating node is a host, the availability can be an issue. Furthermore, it might be too challenging to 
	reflect IOAM capabilities at the IOAM transit node and/or the IOAM decapsulating node if these are controlled by a local policy depending on 
	the identity of the IOAM encapsulating node.
    </t>
    </list>
	
  </t>
  
  <t> This document describes an extension to the echo request/reply mechanisms used in IPv6, MPLS and SFC environments, which can be used within 
  an IOAM domain where no Centralized Controller exists, allowing the IOAM encapsulating node to acquire the enabled IOAM capabilities of each IOAM 
  transit node and/or IOAM decapsulating node.</t>
  
  <t> The following documents contain references to the echo request/reply mechanisms used in IPv6, MPLS and SFC environments:
  
    <list style="symbols">
    <t>
    <xref target="RFC4443"/> ("Internet Control Message Protocol (ICMPv6) for the Internet Protocol Version 6 (IPv6) Specification"), 
	<xref target="RFC4884"/> ("Extended ICMP to Support Multi-Part Messages") and <xref target="RFC8335"/> ("PROBE: A Utility for Probing 
	Interfaces")
    </t>
    <t>
    <xref target="RFC8029"/> ("Detecting Multiprotocol Label Switched (MPLS) Data-Plane Failures")
    </t>
    <t>
    <xref target="I-D.ietf-sfc-multi-layer-oam"/> ("Active OAM for Service Function Chains in Networks")
    </t>
    </list>
	
  </t>
	 
  <t> This feature described in this document is assumedly applied to explicit path (strict or loose), because the precondition for this feature
  to work is that the echo request reaches each IOAM transit node as live traffic traverses.</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> BGP: Border Gateway Protocol</t>
    <t> E2E: Edge to Edge</t>
    <t> ICMP: Internet Control Message Protocol</t>
    <t> IGP: Interior Gateway Protocol</t>
    <t> IOAM: In-situ Operations, Administration, and Maintenance</t>
    <t> LSP: Label Switched Path</t>
    <t> MPLS: Multi-Protocol Label Switching</t>
	<t> MBZ: Must Be Zero</t>
	<t> MTU: Maximum Transmission Unit</t>
    <t> NTP: Network Time Protocol</t>
    <t> OAM: Operations, Administration, and Maintenance</t>
    <t> PCEP: Path Computation Element (PCE) Communication Protocol</t>
    <t> POSIX: Portable Operating System Interface</t>	
    <t> POT: Proof of Transit</t>
    <t> PTP: Precision Time Protocol</t>
    <t> SFC: Service Function Chain</t>
    <t> TTL: Time to Live</t>	
    </section>
	
   </section>

  <section title="IOAM Capabilities Formats">

    <section title="IOAM Capabilities Query TLV in the Echo Request">

	<t> In echo request IOAM Capabilities Query uses TLV (Type-Length-Value tuple) which have the following format:</t>
	 
     <figure anchor="Figure_1" title="IOAM Capabilities Query TLV in the Echo Request">
     <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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type = IOAM Capabilities Query|            Length             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
.                                                               .
.                    List of Namespace-IDs                      .
.                                                               .
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     ]]>     </artwork>
     </figure>
        
     <t> When this TLV is present in the echo request sent by an IOAM encapsulating node, it means that the IOAM encapsulating node requests
	 the receiving node to reply with its enabled IOAM capabilities. If there is no IOAM capability to be reported by the receiving node, then
	 this TLV SHOULD be ignored by the receiving node, which means the receiving node SHOULD send echo reply without IOAM capabilities or no
	 echo reply, in the light of whether the echo request includes other TLV than IOAM Capabilities Query TLV. List of Namespace-IDs MAY be
	 included in this TLV of the echo request. In that case, the IOAM encapsulating node requests only the IOAM capabilities that match one of
	 the Namespace-IDs. The Namespace-ID has the same definition as what's specified in <xref target="I-D.ietf-ippm-ioam-data"/>.</t> 
	 
     <t> Type is set to the value that identifies it as an IOAM Capabilities Query TLV.</t>
	 
     <t> Length is the length of the TLV's Value field in octets, including a List of Namespace-IDs.</t>	
	 
     <t> Value field of this TLV is zero-padded to align to a 4-octet boundary.</t>	
	 
	</section> 
   
    <section title="IOAM Capabilities Response TLV in the Echo Reply">

	<t> In echo reply IOAM Capabilities Response uses TLV which have the following format:</t>
	 
     <figure anchor="Figure_2" title="IOAM Capabilities Response TLV in the Echo Reply">
     <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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type = IOAM Capabilities Resp |            Length             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
.                                                               .
.                      List of Sub-TLVs                         .
.                                                               .
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     ]]>     </artwork>
     </figure>

     <t> When this TLV is present in the echo reply sent by an IOAM transit node and/or an IOAM decapsulating node, it means that the IOAM
	 function is enabled at this node, and this TLV contains the enabled IOAM capabilities of the sender. A list of Sub-TLVs which contains 
	 the IOAM capabilities SHOULD be included in this TLV of the echo reply. Note that the IOAM encapsulating node or the IOAM decapsulating
	 node can also be an IOAM transit node.</t>
	 
     <t> Type is set to the value that identifies it as an IOAM Capabilities Response TLV.</t>
	 
     <t> Length is the length of the TLV's Value field in octets, including a List of Sub-TLVs.</t>
	 
     <t> Value field of this TLV or any Sub-TLV is zero-padded to align to a 4-octet boundary. Based on the data fields for IOAM, specified
	 in <xref target="I-D.ietf-ippm-ioam-data"/> and <xref target="I-D.ietf-ippm-ioam-direct-export"/>, six kinds of Sub-TLVs are defined 
	 in this document. The same type of the sub-TLV MAY be in the IOAM Capabilities Response TLV more than once only if with a different 
	 Namespace-ID. Note that the IOAM encapsulating node may receive both IOAM Pre-allocated Tracing Capabilities sub-TLV and IOAM Incremental 
	 Tracing Capabilities sub-TLV in the process of traceroute, which means both pre-allocated tracing node and incremental tracing node are 
	 on the same path, or some node supports both pre-allocated tracing and incremental tracing, the behavior of the IOAM encapsulating node 
	 in this scenario is outside the scope of this document.</t>
	 
	<section title="IOAM Pre-allocated Tracing Capabilities sub-TLV">
		 
     <figure anchor="Figure_3" title="IOAM Pre-allocated Tracing Capabilities Sub-TLV">
     <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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|Sub-type = Pre-allocated trace |            Length             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|               IOAM-Trace-Type                 |    Reserved   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|         Namespace-ID          |          Egress_MTU           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  Egress_if_id (short or wide format)         ......           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     ]]>     </artwork>
     </figure>
        
     <t> When this sub-TLV is present in the IOAM Capabilities Response TLV, it means that the sending node is an IOAM transit node and IOAM 
	 tracing function is enabled at this IOAM transit node.</t> 
	 
     <t> Sub-type is set to the value that identifies it as an IOAM Pre-allocated Tracing Capabilities sub-TLV.</t>
	 
     <t> Length is the length of the sub-TLV's Value field in octets. If Egress_if_id is in the short format, which is 16 bits long, it MUST
	 be set to 10. If Egress_if_id is in the wide format, which is 32 bits long, it MUST be set to 12.</t>
	 
     <t> IOAM-Trace-Type field has the same definition as what's specified in section 5.4 of <xref target="I-D.ietf-ippm-ioam-data"/>.</t>
	 
     <t> Reserved field is reserved for future use and MUST be set to zero.</t>

     <t> Namespace-ID field has the same definition as what's specified in section 5.3 of <xref target="I-D.ietf-ippm-ioam-data"/>, it should
	 be one of the Namespace-IDs listed in the IOAM Capabilities Query TLV of echo request.</t>
	 
     <t> Egress_MTU field has 16 bits and specifies the MTU of the egress direction out of which the sending node would forward the received
	 echo request, it should be the MTU of the egress interface or the MTU between the sending node and the downstream IOAM transit node.</t>
	 
     <t> Egress_if_id field has 16 bits (in short format) or 32 bits (in wide format) and specifies the identifier of the egress interface
	 out of which the sending node would forward the received echo request.</t>
	 
    </section>
	 
	<section title="IOAM Incremental Tracing Capabilities sub-TLV">
		 
     <figure anchor="Figure_4" title="IOAM Incremental Tracing Capabilities Sub-TLV">
     <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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Sub-type = Incremental trace  |            Length             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|               IOAM-Trace-Type                 |     Reserved  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|         Namespace-ID          |          Egress_MTU           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  Egress_if_id (short or wide format)         ......           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     ]]>     </artwork>
     </figure>
        
     <t> When this sub-TLV is present in the IOAM Capabilities Response TLV, it means that the sending node is an IOAM transit node and IOAM 
	 tracing function is enabled at this IOAM transit node.</t> 
	 
     <t> Sub-type is set to the value that identifies it as an IOAM Incremental Tracing Capabilities sub-TLV.</t>
	 
     <t> Length is the length of the sub-TLV's Value field in octets. If Egress_if_id is in the short format, which is 16 bits long, it MUST
	 be set to 10. If Egress_if_id is in the wide format, which is 32 bits long, it MUST be set to 12.</t>
	 
     <t> IOAM-Trace-Type field has the same definition as what's specified in section 5.4 of <xref target="I-D.ietf-ippm-ioam-data"/>.</t>

     <t> Reserved field is reserved for future use and MUST be set to zero.</t>
	 
     <t> Namespace-ID field has the same definition as what's specified in section 5.3 of <xref target="I-D.ietf-ippm-ioam-data"/>, it should
	 be one of the Namespace-IDs listed in the IOAM Capabilities Query TLV of echo request.</t>
	 
     <t> Egress_MTU field has 16 bits and specifies the MTU of the egress direction out of which the sending node would forward the received
	 echo request, it should be the MTU of the egress interface or the MTU between the sending node and the downstream IOAM transit node.</t>
	 
     <t> Egress_if_id field has 16 bits (in short format) or 32 bits (in wide format) and specifies the identifier of the egress interface
	 out of which the sending node would forward the received echo request.</t>
	 
    </section>
	 	 
    <section title="IOAM Proof of Transit Capabilities sub-TLV">
		 
     <figure anchor="Figure_5" title="IOAM Proof of Transit Capabilities Sub-TLV">
     <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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  Sub-type = POT Capabilities  |            Length             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|        Namespace-ID           | IOAM-POT-Type |P|SoR|Reserved |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     ]]>     </artwork>
     </figure>
        
     <t> When this sub-TLV is present in the IOAM Capabilities Response TLV, it means that the sending node is an IOAM transit node and IOAM 
	 proof of transit function is enabled at this IOAM transit node.</t> 

     <t> Sub-type is set to the value that identifies it as an IOAM Proof of Transit Capabilities sub-TLV.</t>
	 
     <t> Length is the length of the sub-TLV's Value field in octets and MUST be set to 4.</t>
	 
     <t> Namespace-ID field has the same definition as what's specified in section 5.3 of <xref target="I-D.ietf-ippm-ioam-data"/>, it should
	 be one of the Namespace-IDs listed in the IOAM Capabilities Query TLV of echo request.</t>
	 
     <t> IOAM-POT-Type field and P bit have the same definition as what's specified in section 5.5 of <xref target="I-D.ietf-ippm-ioam-data"/>.
	 If the IOAM encapsulating node receives IOAM-POT-Type and/or P bit values from an IOAM transit node that are different from its own, 
	 then the IOAM encapsulating node MAY choose to abandon the proof of transit function or to select one kind of IOAM-POT-Type and P bit, 
	 it's based on the policy applied to the IOAM encapsulating node.</t>
	 
     <t> SoR field has two bits, which means the size of "Random" and "Cumulative" data that are specified in section 5.5 of <xref target=
	 "I-D.ietf-ippm-ioam-data"/>. This document defines SoR as follow:
	 <list>	
     <t> 0b00 means 64-bit "Random" and 64-bit "Cumulative" data.</t>
	 <t> 0b01~0b11: Reserved for future standardization</t>
	 </list>
	 </t>
     <t> Reserved field is reserved for future use and MUST be set to zero.</t>

    </section>
	
    <section title="IOAM Edge-to-Edge Capabilities sub-TLV">
		 
     <figure anchor="Figure_6" title="IOAM Edge-to-Edge Capabilities Sub-TLV">
     <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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  Sub-type = E2E Capabilities  |            Length             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|        Namespace-ID           |         IOAM-E2E-Type         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|TSF|TSL|       Reserved        |              MBZ              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     ]]>     </artwork>
     </figure>
        
     <t> When this sub-TLV is present in the IOAM Capabilities Response TLV, it means that the sending node is an IOAM decapsulating node and 
	 IOAM edge-to-edge function is enabled at this IOAM decapsulating node. That is to say, if the IOAM encapsulating node receives this sub-TLV,
	 the IOAM encapsulating node can determine that the node which sends this sub-TLV is an IOAM decapsulating node.</t> 

     <t> Sub-type is set to the value that identifies it as an IOAM Edge-to-Edge Capabilities sub-TLV.</t>
	 
     <t> Length is the length of the sub-TLV's Value field in octets and MUST be set to 8.</t>

	 <t> Namespace-ID field has the same definition as what's specified in section 5.3 of <xref target="I-D.ietf-ippm-ioam-data"/>, it should
	 be one of the Namespace-IDs listed in the IOAM Capabilities Query TLV of echo request.</t>
	 
     <t> IOAM-E2E-Type field has the same definition as what's specified in section 5.6 of <xref target="I-D.ietf-ippm-ioam-data"/>.</t>
	 
     <t> TSF field specifies the timestamp format used by the sending node. This document defines TSF as follow:
	 <list>	
	 <t> 0b00: PTP timestamp format</t>
	 <t> 0b01: NTP timestamp format</t>
	 <t> 0b10: POSIX timestamp format</t>
	 <t> 0b11: Reserved for future standardization</t>
	 </list>
	 </t>
	 
     <t> TSL field specifies the timestamp length used by the sending node. This document defines TSL as follow.
	 <list>	
	 <t> When the TSF field is set to 0b00, which indicates the PTP timestamp format, the values of the TSL field are interpreted as follows:</t>
	 <t> 0b00: 64-bit PTPv1 timestamp as defined in IEEE1588-2008 <xref target="IEEE1588v2"/></t>
	 <t> 0b01: 80-bit PTPv2 timestamp as defined in IEEE1588-2008 <xref target="IEEE1588v2"/></t>
	 <t> 0b10~0b11: Reserved for future standardization</t>
	 </list>
	 <list>	
	 <t> When the TSF field is set to 0b01, which indicates the NTP timestamp format, the values of the TSL field are interpreted as follows:</t>
	 <t> 0b00: 32-bit NTP timestamp as defined in NTPv4 <xref target="RFC5905"/></t>
	 <t> 0b01: 64-bit NTP timestamp as defined in NTPv4 <xref target="RFC5905"/></t>
	 <t> 0b10: 128-bit NTP timestamp as defined in NTPv4 <xref target="RFC5905"/></t>
	 <t> 0b11: Reserved for future standardization</t>
	 </list>
	 <list>	
	 <t> When the TSF field is set to 0b10 or 0b11, the TSL field would be ignored.</t>
	 </list>
	 </t>
	 
     <t> Reserved field is reserved for future use and MUST be set to zero.</t>

    </section> 
	
	<section title="IOAM DEX Capabilities sub-TLV">
		 
     <figure anchor="Figure_7" title="IOAM DEX Capabilities Sub-TLV">
     <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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  Sub-type = DEX Capabilities  |            Length             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|               IOAM-Trace-Type                 |    Reserved   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|         Namespace-ID          |           Reserved            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     ]]>     </artwork>
     </figure>
        
     <t> When this sub-TLV is present in the IOAM Capabilities Response TLV, it means that the sending node is an IOAM transit node and the IOAM DEX
	 function is enabled at this IOAM transit node.</t> 
	 
     <t> Sub-type is set to the value that identifies it as an IOAM DEX Capabilities sub-TLV.</t>
	 
     <t> Length is the length of the sub-TLV's Value field in octets and MUST be set to 8.</t>
	 
     <t> IOAM-Trace-Type field has the same definition as what's specified in section 3.2 of <xref target="I-D.ietf-ippm-ioam-direct-export"/>.</t>

     <t> Namespace-ID field has the same definition as what's specified in section 3.2 of <xref target="I-D.ietf-ippm-ioam-direct-export"/>, it should
	 be one of the Namespace-IDs listed in the IOAM Capabilities Query TLV of echo request.</t>
	 	 
     <t> Reserved field is reserved for future use and MUST be set to zero.</t>
	 
    </section>	
	
	<section title="IOAM End-of-Domain sub-TLV">
		 
     <figure anchor="Figure_8" title="IOAM End of Domain Sub-TLV">
     <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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   Sub-type = End of Domain    |            Length             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|        Namespace-ID           |             MBZ               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     ]]>     </artwork>
     </figure>
        
     <t> When this sub-TLV is present in the IOAM Capabilities Response TLV, it means that the sending node is an IOAM decapsulating node. 
	 That is to say, if the IOAM encapsulating node receives this sub-TLV, the IOAM encapsulating node can determine that the node which 
	 sends this sub-TLV is an IOAM decapsulating node. When the IOAM Edge-to-Edge Capabilities sub-TLV is present in the IOAM Capabilities Response
	 TLV sent by the IOAM decapsulating node, the IOAM End-of-Domain sub-TLV doesn't need to be present in the same IOAM Capabilities Response TLV, 
	 otherwise the End-of-Domain sub-TLV MUST be present in the IOAM Capabilities Response TLV sent by the IOAM decapsulating node.  Both the 
	 IOAM Edge-to-Edge Capabilities sub-TLV and the IOAM End-of-Domain sub-TLV can be used to indicate that the sending node is an IOAM
	 decapsulating node. It's recommended to include only the IOAM Edge-to-Edge Capabilities sub-TLV if IOAM edge-to-edge function is
	 enabled at this IOAM decapsulating node.</t> 
	 
     <t> Sub-type is set to the value that identifies it as an IOAM End of Domain sub-TLV.</t>
	 
     <t> Length is the length of the sub-TLV's Value field in octets and MUST be set to 4.</t>

	 <t> Namespace-ID field has the same definition as what's specified in section 5.3 of <xref target="I-D.ietf-ippm-ioam-data"/>, it should
	 be one of the Namespace-IDs listed in the IOAM Capabilities Query TLV of echo request.</t>
	 
    </section> 
	
   </section> 
  </section> 

  <section title="Operational Guide"> 
  
  <t> Once the IOAM encapsulating node is triggered to acquire the enabled IOAM capabilities of each IOAM transit node and/or IOAM decapsulating 
  node, the IOAM encapsulating node will send echo requests that include the IOAM Capabilities Query TLV. First with TTL equal to 1 to reach the 
  nearest node, which may be an IOAM transit node or not. Then with TTL equal to 2 to reach the second nearest node, which also may be an IOAM 
  transit node or not. And further, increasing by 1 the TTL every time the IOAM encapsulating node sends a new echo request, until the IOAM 
  encapsulating node receives an echo reply sent by the IOAM decapsulating node, which should contain the IOAM Capabilities Response TLV
  including the IOAM Edge-to-Edge Capabilities sub-TLV or the IOAM End-of-Domain sub-TLV. Alternatively, if the IOAM encapsulating node knows
  exactly all the IOAM transit nodes and/or IOAM decapsulating node beforehand, once the IOAM encapsulating node is triggered to acquire the 
  enabled IOAM capabilities, it can send an echo request to each IOAM transit node and/or IOAM decapsulating node directly, without TTL 
  expiration.</t>
  
  <t> The IOAM encapsulating node may be triggered by the device administrator, the network management system, the network controller, or
  even the live user traffic. The specific triggering mechanisms are outside the scope of this document.</t>
  
  <t> Each IOAM transit node and/or IOAM decapsulating node that receives an echo request containing the IOAM Capabilities Query TLV will send an
  echo reply to the IOAM encapsulating node, and within the echo reply, there should be an IOAM Capabilities Response TLV containing one or more
  sub-TLVs. The IOAM Capabilities Query TLV contained in the echo request would be ignored by the receiving node that is unaware of IOAM.</t>
  
  </section>
  
  <section title="Security Considerations">
  
  <t> Queries and responses about the state of an IOAM domain should be processed only from a trusted source. An unauthorized query MUST be 
  discarded by an implementation that supports this specification. Similarly, unsolicited echo response with the IOAM Capabilities TLV MUST be 
  discarded. Authentication of echo request/reply that includes the IOAM Capabilities TLV is one of methods of the integrity protection. 
  Implementations could also provide a means of filtering based on the source address of the received echo request/reply. The integrity protection 
  for IOAM capabilities information collection can also be achieved using mechanisms in the underlay data plane. For example, if the underlay is 
  an IPv6 network, IP Authentication Header <xref target="RFC4302"/> or IP Encapsulating Security Payload Header <xref target="RFC4303"/> can be 
  used to provide integrity protection.</t>
  
  <t> Information about the state of the IOAM domain collected in the IAOM Capabilities TLV is confidential. An implementation can use secure 
  transport to provide privacy protection. For example, if the underlay is an IPv6 network, confidentiality can be achieved using the IP Encapsulating 
  Security Payload Header <xref target="RFC4303"/>.</t>
  
  </section>
  
  <section title="IANA Considerations"> 
  <t> This document requests the following IANA Actions.</t>
  
  <t> IANA is requested to create a registry group named "In-Situ OAM (IOAM) Capabilities Parameters".</t>

  <t> This group will include the following registries:</t>
  
       <t><list style="symbols">
           <t>IOAM SoR Capability</t>
           <t>IOAM TSF+TSL Capability</t>
       </list></t>
  
  <t> New registries in this group can be created via RFC Required process as per <xref target="RFC8126"/>.</t>
  
  <t> The subsequent sub-sections detail the registries herein contained.</t>
  
  <t> Considering the TLVs/sub-TLVs defined in this document would be carried in different kinds of Echo Request/Reply message, such as 
  ICMPv6 or LSP Ping, it is intended that the registries for Type and sub-Type would be requested in subsequent documents.</t>
  
  <section title="IOAM SoR Capability Registry">
    <t> This registry defines 4 code points for the IOAM SoR Capability field for identifying the size of "Random" and "Cumulative" data 
	as explained in section 5.5 of <xref target="I-D.ietf-ippm-ioam-data"/>. The following code points are defined in this draft:</t>
	
        <figure>
          <artwork><![CDATA[
   SoR        Description
   ----       -----------
   0b00       64-bit "Random" and 64-bit "Cumulative" data
        ]]></artwork>
        </figure>

    <t> 0b01 - 0b11 are available for assignment via RFC Required process as per <xref target="RFC8126"/>.</t>
  </section>
  
  <section title="IOAM TSF+TSL Capability Registry">
    <t> This registry defines 3 code points for the IOAM TSF Capability field for identifying the timestamp format as explained in section 
	6 of <xref target="I-D.ietf-ippm-ioam-data"/>.</t>
	
	   <t><list style="symbols">
           <t> When the code point for the IOAM TSF Capability field equals 0b00 which means PTP timestamp format, this registry defines 2 
		   code points for the IOAM TSL Capability field for identifying the timestamp length.</t>
  
           <t> When the code point for the IOAM TSF Capability field equals 0b01 which means NTP timestamp format, this registry defines 3 
		   code points for the IOAM TSL Capability field for identifying the timestamp length.</t>
       </list></t>
	
	<t> The following code points are defined in this draft:</t>
	
        <figure>
          <artwork><![CDATA[
   TSF        TSL         Description
   ----       ----        -----------
   0b00                   PTP Timestamp Format
              0b00        64-bit PTPv1 timestamp
              0b01        80-bit PTPv2 timestamp
   0b01                   NTP Timestamp Format
              0b00        32-bit NTP timestamp
              0b01        64-bit NTP timestamp
              0b10        128-bit NTP timestamp
   0b10                   POSIX Timestamp Format
        ]]></artwork>
        </figure>
		
    <t> Unassigned code points of TSF+TSL are available for assignment via RFC Required process as per <xref target="RFC8126"/>.</t>
  </section>
  
  </section>

  <section title="Acknowledgements">
  <t> The authors would like to acknowledge Tianran Zhou, Dhruv Dhody, Frank Brockners and Cheng Li for their careful review and helpful 
  comments.</t>
  <t> The authors appreciate the f2f discussion with Frank Brockners on this document.</t>
  <t> The authors would like to acknowledge Tommy Pauly and Ian Swett for their good suggestion and guidance.</t>
  </section>  
  
</middle>
  
<back>

    <references title="Normative References">
	 &rfc2119;
     &rfc8174;
     &rfc8126;
     &rfc5905;	 
	 &I-D.ietf-ippm-ioam-data;
	 &I-D.ietf-ippm-ioam-direct-export;
     <reference anchor="IEEE1588v2"
                 target="http://standards.ieee.org/findstds/standard/1588-2008.html">
        <front>
          <title>IEEE Std 1588-2008 - IEEE Standard for a Precision Clock
          Synchronization Protocol for Networked Measurement and Control
          Systems</title>
          <author>
            <organization>Institute of Electrical and Electronics
            Engineers</organization>
          </author>
          <date year="2008"/>
        </front>
        <seriesInfo name="" value="IEEE Std 1588-2008"/>
     </reference>
    </references>

	<references title="Informative References">
	 &rfc8029;
     &rfc4443;
     &rfc4884;
     &rfc8335;
     &rfc4302;
     &rfc4303;
	 &I-D.ietf-sfc-multi-layer-oam;
    </references>
	
</back>
</rfc>

