<?xml version="1.0" encoding="iso-8859-1" ?>
<!--<!DOCTYPE rfc SYSTEM "rfc4748.dtd"> -->

<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
    <!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 rfc4026 PUBLIC '' 
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4026.xml'>
    <!ENTITY rfc7011 PUBLIC '' 
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.7011.xml'>
    <!ENTITY rfc8372 PUBLIC '' 
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.8372.xml'>
    <!ENTITY rfc6790 PUBLIC '' 
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.6790.xml'>
    <!ENTITY rfc8662 PUBLIC '' 
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.8662.xml'>
    <!ENTITY rfc8321 PUBLIC '' 
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.8321.xml'>
    <!ENTITY I-D.ietf-mpls-sfl-framework PUBLIC '' 
      'http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-mpls-sfl-framework.xml'>
    <!ENTITY I-D.bryant-mpls-sfl-control PUBLIC '' 
      'http://xml.resource.org/public/rfc/bibxml3/reference.I-D.bryant-mpls-sfl-control.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 I-D.ietf-mpls-spl-terminology PUBLIC '' 
      'http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-mpls-spl-terminology.xml'>
]>


<rfc category="std" ipr="trust200902" docName="draft-cheng-mpls-inband-pm-encapsulation-04">

<?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="Encap For MPLS PM with AMM"> Encapsulation For MPLS Performance Measurement with Alternate Marking Method </title>

  <author fullname="Weiqiang Cheng" initials="W" surname="Cheng">
      <organization>China Mobile</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></phone>

       <email>chengweiqiang@chinamobile.com</email>

       <!-- uri and facsimile elements may also be added -->
     </address>
    </author>

  <author fullname="Xiao Min" initials="X" surname="Min">
      <organization>ZTE</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></phone>

       <email>xiao.min2@zte.com.cn</email>

       <!-- uri and facsimile elements may also be added -->
     </address>
    </author>

  <author fullname="Tianran Zhou" initials="T" surname="Zhou">
      <organization>Huawei</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></phone>

       <email>zhoutianran@huawei.com</email>

       <!-- uri and facsimile elements may also be added -->
     </address>
    </author>
	
  <author fullname="Ximing Dong" initials="X" surname="Dong">
      <organization>FiberHome</organization>
     <address>
       <postal>
         <street></street>

         <!-- Reorder these if your country does things differently -->

         <city>Wuhan</city>

         <region></region>

         <code></code>

         <country>China</country>
       </postal>

       <phone></phone>

       <email>dxm@fiberhome.com</email>

       <!-- uri and facsimile elements may also be added -->
     </address>
    </author>
	
  <author fullname="Yoav Peleg" initials="Y" surname="Peleg">
      <organization>Broadcom</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>yoav.peleg@broadcom.com</email>

       <!-- uri and facsimile elements may also be added -->
     </address>
    </author>

    <date year="2020"/>
  
    <area>Routing</area>
    <workgroup>MPLS Working Group</workgroup>

    <keyword>Request for Comments</keyword>
    <keyword>RFC</keyword>
    <keyword>Internet Draft</keyword>
    <keyword>I-D</keyword>

    <abstract>
   <t> This document defines the encapsulation for MPLS performance measurement with alternate marking 
   method, which performs flow-based packet loss, delay, and jitter measurements on live traffic.</t>
     </abstract>
    
</front>
  
<middle>

  <section title="Introduction">

   <t> <xref target="RFC8321"/> describes a passive performance measurement method, which can be used 
   to measure packet loss, delay, and jitter on live traffic. Since this method is based on marking 
   consecutive batches of packets, the method is often referred to as Alternate Marking Method.</t>
   
   <t> <xref target="RFC8372"/> discusses the desired capabilities for MPLS flow identification, in 
   order to perform a better in-band performance monitoring of user data packets. Synonymous Flow Label 
   (SFL), which is introduced in <xref target="I-D.ietf-mpls-sfl-framework"/>, is identified as a method 
   of accomplishing MPLS flow identification. This document employs a method, other than SFL, to accomplish 
   MPLS flow identification. The method described in this document is simple and flexible, furthermore, it 
   complies with the current MPLS forwarding paradigm.</t>
   
   <t> On one hand, the method described in this document is complementary to the SFL method 
   <xref target="I-D.ietf-mpls-sfl-framework"/> <xref target="I-D.bryant-mpls-sfl-control"/>, the former 
   targets at hop-by-hop performance measurement, and the latter targets at end-to-end performance measurement, 
   furthermore, the former supports the application scenario where Flow-ID is applied to MPLS LSP and MPLS VPN 
   synchronously, and the latter doesn't support this kind of application scenario. On the other hand, the method 
   described in this document is complementary to the In-situ OAM method <xref target="I-D.ietf-ippm-ioam-data"/> 
   <xref target="I-D.ietf-ippm-ioam-direct-export"/>, the former doesn't introduce any new header but the latter 
   introduces a new In-situ OAM header, furthermore, the former allows the network nodes to report the refined data 
   (e.g. calculated performance metrics) associated with a specified flow, nevertheless the latter requests the 
   network nodes to report the data (e.g. ingress interface and egress interface) associated with a specified packet. </t>
   
   <t> This document defines the encapsulation for MPLS performance measurement with alternate marking 
   method, which performs flow-based packet loss, delay, and jitter measurements on live traffic.</t>

   <section title="Conventions Used in This Document">
   
    <section title="Abbreviations">
    <t> ELC: Entropy Label Capability</t>
    <t> ERLD: Entropy Readable Label Depth</t>
    <t> FLC: Flow-ID Label Capability</t>
    <t> FRLD: Flow-ID Readable Label Depth</t>
    <t> LSP: Label Switched Path</t>
    <t> MPLS: Multi-Protocol Label Switching</t>
    <t> NMS: Network Management System</t>
    <t> PM: Performance Measurement</t>
    <t> PW: PseudoWire</t>
    <t> SFL: Synonymous Flow Label</t>
    <t> SID: Segment ID</t>
    <t> SR: Segment Routing</t>
    <t> TC: Traffic Class</t>
    <t> TTL: Time to Live</t>
    <t> VC: Virtual Channel</t>
    <t> VPN: Virtual Private Network</t>
    </section>
       
    <section title="Requirements Language">
	<t> The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",   "SHOULD", "SHOULD NOT", 
	"RECOMMENDED", "NOT RECOMMENDED", "MAY", and   "OPTIONAL" in this document are to be interpreted 
	as described in BCP 14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when, they 
	appear in all capitals, as shown here.</t>
    </section>
	
   </section>
       
  </section>

  <section title="Flow-based PM Encapsulation in MPLS">

	<t> Flow-based MPLS performance measurement encapsulation with alternate marking method has the 
	following format:</t>
	 
     <figure anchor="Figure_1" title="Flow-based PM Encapsulation in MPLS">
     <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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|          Extension Label (15)         |  TC |S|      TTL      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     Flow-ID Label Indicator (TBA1)    |  TC |S|      TTL      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|             Flow-ID Label             |  TC |S|      TTL      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     ]]>
     </artwork>
     </figure>
        
    <t>
	Flow-ID Label Indicator is an Extended Special Purpose Label (eSPL), which is combined with the 
	Extension Label (XL, value 15) to form a Composite Special Purpose Label (cSPL), as defined in 
	<xref target="I-D.ietf-mpls-spl-terminology"/>. Flow-ID Label Indicator is defined in this document 
	as value TBA1. 
	</t>
    <t>
	Analogous to Entropy Label Indicator <xref target="RFC6790"/>, the TC and TTL for the Extension Label 
	and the Flow-ID Label Indicator SHOULD follow the same field values of that label immediately preceding 
	the Extension Label, otherwise, the TC and TTL for the Extension Label and the Flow-ID Label Indicator 
	MAY be different values if it is known that the Extension Label will not be exposed as the top label at 
	any point along the LSP. The S bit for the Extension Label and the Flow-ID Label Indicator MUST be zero.
	</t>
    <t>
	Flow-ID Label is used as MPLS flow identification <xref target="RFC8372"/>, its value should be unique 
	within the administrative domain. Flow-ID values can be allocated by an external NMS or a controller, 
	based on measurement object instance such as LSP or PW. There is a one-to-one mapping between Flow-ID 
	and flow. The specific method on how to allocate the Flow-ID values is described in Section 4.
	</t>
    <t>
	Analogous to Entropy Label <xref target="RFC6790"/>, the Flow-ID Label can be placed at either the bottom 
	or the middle of the MPLS label stack, and the Flow-ID Label MAY appear multiple times in a label stack. 
	Section 2.1 of this document provides several examples to illustrate how to apply Flow-ID Label in a label 
	stack. Again analogous to Entropy Label, the TTL for the Flow-ID Label MUST be zero to ensure that it is not 
	used inadvertently for forwarding, the TC for the Flow-ID Label may be any value, the S bit for the Flow-ID 
	Label depends on whether or not there are more labels in the label stack.
	</t>
    <t>
	Besides flow identification, a color-marking field is also necessary for alternate marking method. To 
	achieve the purpose of coloring the MPLS traffic, the current practice when writing this document is to reuse 
	the Flow-ID Label's TC, i.e., using TC's highest order two bits (called double-marking methodology <xref target="RFC8321"/>) 
	as color-marking bits. Alternatively, allocating multiple Flow-ID Labels to the same flow may be used for the 
	purpose of alternate marking.
	</t>
	 
	<section title="Examples for Applying Flow-ID Label in a label stack">
		 
    <t> Three examples on different layout of Flow-ID Label (4 octets) are illustrated as follows:</t>
	
    <t> (1) Layout of Flow-ID Label when applied to MPLS LSP.</t>
		 
     <figure anchor="Figure_2" title="Applying Flow-ID to MPLS LSP">
     <artwork align="center">
     <![CDATA[
+----------------------+
|          LSP         |
|         Label        |
+----------------------+
|       Extension      | <--+
|         Label        |    |
+----------------------+    |--- cSPL
|     Flow-ID Label    |    |
|       Indicator      | <--+
+----------------------+
|        Flow-ID       |
|         Label        |
+----------------------+
|          VPN         |
|         Label        |
+----------------------+ <= Bottom of stack
|                      |
|        Payload       |
|                      |
+----------------------+
     ]]>
     </artwork>
     </figure>
        
    <t> (2) Layout of Flow-ID Label when applied to MPLS VPN traffic.</t>
		 
     <figure anchor="Figure_3" title="Applying Flow-ID to MPLS VPN">
     <artwork align="center">
     <![CDATA[
+----------------------+
|          LSP         |
|         Label        |
+----------------------+
|          VPN         |
|         Label        |
+----------------------+
|       Extension      | <--+
|         Label        |    |
+----------------------+    |--- cSPL
|     Flow-ID Label    |    |
|       Indicator      | <--+
+----------------------+
|        Flow-ID       |
|         Label        |
+----------------------+ <= Bottom of stack
|                      |
|        Payload       |
|                      |
+----------------------+
     ]]>
     </artwork>
     </figure>
        
    <t> (3) Layout of Flow-ID Label when applied to both MPLS LSP and MPLS VPN traffic.</t>
		 
     <figure anchor="Figure_4" title="Applying Flow-ID to both MPLS LSP and MPLS VPN">
     <artwork align="center">
     <![CDATA[
+----------------------+
|          LSP         |
|         Label        |
+----------------------+
|       Extension      | <--+
|         Label        |    |
+----------------------+    |--- cSPL
|     Flow-ID Label    |    |
|       Indicator      | <--+
+----------------------+
|        Flow-ID       |
|         Label        |
+----------------------+
|          VPN         |
|         Label        |
+----------------------+
|       Extension      | <--+
|         Label        |    |
+----------------------+    |--- cSPL
|     Flow-ID Label    |    |
|       Indicator      | <--+
+----------------------+
|        Flow-ID       |
|         Label        |
+----------------------+ <= Bottom of stack
|                      |
|        Payload       |
|                      |
+----------------------+
     ]]>
     </artwork>
     </figure>
	
     <t> Note that here VPN label can be MPLS PW label, MPLS Ethernet VPN label or MPLS IP VPN label, and 
	 it's also called VC label as defined in <xref target="RFC4026"/>.</t>
     <t> Also note that for this example the two Flow-ID values appearing in a label stack MUST be different, 
	 that is to say, Flow-ID Label applied to MPLS LSP and Flow-ID Label applied to MPLS VPN share the same 
	 value space.</t>
	 
    </section>
  </section> 

  <section title="Procedures of Encapsulation, Look-up and Decapsulation"> 
  
    <t>
    The procedures for Flow-ID label encapsulation, look-up and decapsulation are summarized as follows:
    <list style="symbols">
    <t>
    The ingress node inserts the Extension Label, the Flow-ID Label Indicator, alongside with the Flow-ID 
	label, into the MPLS label stack. At the same time, the ingress node sets the color-marking field, as 
	needed by alternate-marking technique, and sets the Flow-ID value, as defined in this document.
    </t>
    <t>
    The transit nodes look up the Flow-ID label with the help of the Extension Label and the Flow-ID Label 
	Indicator, and transmit the collected information to an external NMS or a controller, which includes 
	the values of the block counters and the timestamps of the marked packets, along with the value of the 
	Flow-ID, referring to the procedures of alternate marking method.
    </t>
    <t>
    The egress node pops the Extension Label and the Flow-ID Label Indicator, alongside with the Flow-ID 
	label, from the MPLS label stack. This document doesn't introduce any new procedure regarding to the 
	process of the decapsulated packet.
    </t>
    </list>
    </t>
  
  </section>
  
  <section title="Procedures of Flow-ID allocation"> 
  
    <t>
    There are two ways of allocating Flow-ID, one way is to allocate Flow-ID by manual trigger from the network 
	operator, and the other way is to allocate Flow-ID by automatic trigger from the ingress node, details are as follows:
    <list style="symbols">
    <t>
    In the case of manual trigger, the network operator would manually input the characteristics (e.g. IP five 
	tuples and IP DSCP) of the measured IP traffic flow, then the NMS or the controller would generate one or two 
	Flow-IDs based on the input from the network operator, and provision the ingress node with the characteristics 
	of the measured IP traffic flow and the corresponding allocated Flow-ID(s).
    </t>
    <t>
    In the case of automatic trigger, the ingress node would identify the IP traffic flow entering the measured path, 
	export the characteristics of the identified IP traffic flow to the NMS or the controller by IPFIX <xref target="RFC7011"/>, 
	then the NMS or the controller would generate one or two Flow-IDs based on the export from the ingress node, and 
	provision the ingress node with the characteristics of the identified IP traffic flow and the corresponding allocated Flow-ID(s).
    </t>
    </list>
    </t>
    <t>
    The policy pre-configured at the NMS or the controller decides whether one Flow-ID or two Flow-IDs would be generated. 
	If the performance measurement on VPN traffic is enabled, then one Flow-ID applied to MPLS VPN would be generated; 
	if the performance measurement on LSP tunnel is enabled, then one Flow-ID applied to MPLS LSP would be generated; 
	if both of them are enabled, then two Flow-IDs respectively applied to MPLS VPN and MPLS LSP would be generated.
    </t>
    <t>
    Whether using manual trigger or using automatic trigger, the NMS or the controller MUST guarantee every generated 
	Flow-ID is unique within the administrative domain.
    </t>
  
  </section>
  
  <section title="FLC and FRLD Considerations">
  
  <t> Analogous to the Entropy Label Capability (ELC) defined in Section 5 of <xref target="RFC6790"/>, and the 
  Entropy Readable Label Depth (ERLD) defined in Section 4 of <xref target="RFC8662"/>, the Flow-ID Label 
  Capability (FLC) and the Flow-ID Readable Label Depth (FRLD) are defined in this document. Both FLC and FRLD have 
  the similar semantics with ELC and ERLD to a router, except that the Flow-ID is used in its flow identification 
  function while the Entropy is used in its load-balancing function.</t>
  
  <t> The ingress node MUST insert each Flow-ID Label at an appropriate depth, which ensures the node that needs to 
  process the Flow-ID Label has the FLC. How the ingress node knows the Flow-ID Label processing node has the FLC is 
  outside the scope of this document.</t>
  
  <t> The ingress node SHOULD insert each Flow-ID Label within an appropriate FRLD, which is the minimum FRLD of 
  all on-path nodes that needs to read and use the Flow-ID Label in question. How the ingress node knows the 
  appropriate FRLD for each Flow-ID Label is outside the scope of this document.</t>
  
  <t> When SR paths are used as transport, the label stack grows as the number of on-path segments increases, if 
  the number of on-path segments is high, that may become a challenge for the Flow-ID Label to be placed within an 
  appropriate FRLD. In order to overcome this potential challenge, an implementation MAY provide flexibility to 
  the ingress node to place Flow-ID Label between SID labels, i.e., multiple identical Flow-ID Labels at different 
  depths MAY be interleaved with SID labels, when that happens a sophisticated network planning may be needed and 
  it's beyond the scope of this document.</t>
   
  </section>
  
  <section title="Security Considerations">
  <t> This document introduces the performance measurement domain that is the scope of a Flow-ID Label. 
  The Flow-ID Label Indicator and Flow-ID Label MUST NOT be signaled and distributed outside one performance 
  measurement domain. Improper configuration so that the Flow-ID Label being passed from one domain to another 
  would likely result in potential Flow-ID conflicts. </t>

  <t> To prevent packets carrying Flow-ID Label from leaking from one domain to another, the domain boundary 
  nodes SHOULD deploy some policies (e.g., ACL) to filter out the packets.  Specifically, in the sending end, 
  the domain boundary node SHOULD filter out the packets that carry the Flow-ID Label Indicator and are sent 
  to other domain; in the receiving end, the domain boundary node SHOULD drop the packets that carry the 
  Flow-ID Label Indicator and are from other domains.</t>
  </section>
  
  <section title="IANA Considerations"> 
  <t> In the Special-Purpose MPLS Label Values registry defined in <xref target="SP-MPLS-Label"/>, a new Extended 
  Special-Purpose MPLS Label Value for Flow-ID Label Indicator is requested from IANA as follows:</t>
     <texttable anchor="Table_1" title="New Extended Special-Purpose MPLS Label Value for Flow-ID Label Indicator">

         <ttcol align="left">Extended Special-Purpose MPLS Label Value</ttcol>

         <ttcol align="left">Description</ttcol>
		 
         <ttcol align="left">Semantics Definition</ttcol>

         <ttcol align="left">Reference</ttcol>

         <c>TBA1</c>

         <c>Flow-ID Label Indicator</c>

         <c>Section 2</c>

         <c>This Document</c>

     </texttable>
  </section>

  <section title="Acknowledgements">
  <t> The authors would like to acknowledge Loa Andersson, Tarek Saad, Stewart Bryant, Rakesh Gandhi, Greg Mirsky, 
  Aihua Liu, Shuangping Zhan and Ming Ke for their careful review and very helpful comments.</t>
  </section>  
  
</middle>
  
<back>

    <references title="Normative References">
	 &rfc2119;
     &rfc8174;
     <reference anchor="SP-MPLS-Label" target="https://www.iana.org/assignments/mpls-label-values/mpls-label-values.xml">
        <front>
          <title>Special-Purpose MPLS Label Values</title>
          <author/>
          <date year="2019"/>
        </front>
     </reference>
    </references>
	
    <references title="Informative References">
	 &rfc8321;
	 &rfc4026;
	 &rfc7011;
	 &rfc8372;
	 &rfc6790;
	 &rfc8662;
	 &I-D.ietf-mpls-sfl-framework;
	 &I-D.bryant-mpls-sfl-control;
	 &I-D.ietf-ippm-ioam-data;
	 &I-D.ietf-ippm-ioam-direct-export;
	 &I-D.ietf-mpls-spl-terminology;
    </references>

</back>
</rfc>

