﻿<?xml version="1.0" encoding="UTF-8"?>
<!-- This template is for creating an Internet Draft using xml2rfc,
     which is available here: http://xml.resource.org. -->
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<!-- used by XSLT processors -->
<!-- For a complete list and description of processing instructions (PIs), 
     please see http://xml.resource.org/authoring/README.html. -->
<?rfc strict="yes" ?>
<!-- give errors regarding ID-nits and DTD validation -->
<!-- control the table of contents (ToC) -->
<?rfc toc="yes"?>
<!-- generate a ToC -->
<?rfc tocdepth="3"?>
<!-- the number of levels of subsections in ToC. default: 3 -->
<!-- control references -->
<?rfc symrefs="yes"?>
<!-- use symbolic references tags, i.e, [RFC2119] instead of [1] -->
<?rfc sortrefs="yes" ?>
<!-- sort the reference entries alphabetically -->
<!-- control vertical white space 
     (using these PIs as follows is recommended by the RFC Editor) -->
<?rfc compact="yes" ?>
<!-- do not start each main section on a new page -->
<?rfc subcompact="no" ?>
<!-- keep one blank line between list items -->
<!-- end of list of popular I-D processing instructions -->
<rfc category="std" docName="draft-song-multicast-telemetry-03" ipr="trust200902">
  <front>
    <title abbrev="Multicast Telemetry">
         Requirement and Solution for Multicast Traffic On-path Telemetry</title>

    <author fullname="Haoyu Song" initials="H." surname="Song">
      <organization>Futurewei Technologies</organization>
      <address>
        <postal>
          <street>2330 Central Expressway</street>
          <city>Santa Clara</city>
          <country>USA</country>
        </postal>
        <email>hsong@futurewei.com</email>
      </address>
    </author>
    
       <author fullname="Mike McBride" initials="M." surname="McBride">
      <organization>Futurewei Technologies</organization>
      <address>
        <postal>
          <street>2330 Central Expressway</street>
          <city>Santa Clara</city>
          <country>USA</country>
        </postal>
        <email>mmcbride@futurewei.com</email>
      </address>
    </author>
    
          <author fullname="Greg Mirsky" initials="G." surname="Mirsky">
      <organization>ZTE Corp.</organization>
      <address>
             <postal>
          <street></street>
          <city></city>
          <country></country>
        </postal>
        <email>gregimirsky@gmail.com</email>
      </address>
    </author>


    <date day="7" month="April" year="2020"/>

    <area>OPS</area>

    <workgroup>IPPM</workgroup>
    
    <!---->

    <keyword>Multicast, Telemetry</keyword>

    <abstract>
	    <t>This document discusses the requirement of on-path telemetry for multicast traffic.  
	       The existing solutions are examined and their issues are addressed 
	       with new modifications that adapt to the multicast scenario.</t>    
    </abstract>

    <note 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><xref target="RFC8174"></xref> when, and only when, they appear in all
   capitals, as shown here.</t>
    </note>
  </front>

  <middle>
    <section title="Introduction">
	    <t>Multicast traffic is an important traffic type in today's Internet. Multicast provides services that are
	       often real time (e.g., online meeting) or have strict QoS requirements (e.g., IPTV, Market Data). Multicast packet drop and 
	       delay can severely affect the application performance and user experience.</t>

            <t>It is important to monitor the performance of the multicast traffic. Existing OAM
	       techniques cannot gain direct and accurate information about the multicast traffic. New on-path telemetry 
	       techniques such as <xref target="I-D.brockners-inband-oam-data">In-situ OAM</xref> and 
	       <xref target="I-D.song-ippm-postcard-based-telemetry">Postcard-based Telemetry</xref> provide 
	       promising means to directly monitor the network experience of multicast traffic. However,
	       multicast traffic has some unique characteristics which pose some challenges on efficiently applying 
	       such techniques. </t>

            <t>This document describes the requirement for multicast traffic telemetry and shows
	       the issues of the existing on-path telemetry techniques. We then propose modifications 
               to make these techniques adapt to the multicast application.</t>	       
    </section>

    <section title="Requirements for Multicast Traffic Telemetry">
	    <t> Multicast traffic is forwarded through a multicast tree. With PIM and P2MP (MLDP, RSVP-TE) the forwarding
	    tree is established and maintained by the multicast routing protocol. With BIER, no state is created in the network
	    to establish a forwarding tree, instead, a bier header provides the necessary information for each packet to know
	    the egress points. Multicast packets are only replicated at each tree branch node for efficiency. </t>  

	    <t> There are several requirements for multicast traffic telemetry, a few of which are:</t>

	    <t><list style="symbols">
	       <t> Reconstruct and visualize the multicast tree through data plane monitoring.</t> 
         <t> Gather the multicast packet delay and jitter performance. </t>
	       <t> Find the multicast packet drop location and reason. </t>  
	       <t> Gather the VPN state and tunnel information in case of P2MP multicast. </t>
	    </list></t>  

	    <t> In order to meet these requirements,  we need the ability to directly monitor the multicast traffic and derive data from the multicast packets. The
	        conventional OAM mechanisms, such as multicast ping and trace, may not be sufficient to meet these requirements.</t>

    </section>

    <section title="Issues of Existing Techniques"> 
	    <t> On-path Telemetry techniques that directly retrieve data from multicast traffic's live network experience are ideal to
		address the above mentioned requirements. The representative techniques include  
	       <xref target="I-D.brockners-inband-oam-data">In-situ OAM (IOAM) Trace option</xref>, 
		   <xref target="I-D.ioamteam-ippm-ioam-direct-export">IOAM Direct Export (DEX) option</xref>, and 
	       <xref target="I-D.song-ippm-postcard-based-telemetry">Postcard-based Telemetry with Packet Marking(PBT-M)</xref>. However, 
	       unlike unicast, multicast poses some unique challenges to applying these techniques. </t>

            <t> Multicast packets are replicated at each branch node in the corresponding multicast tree. Therefore, there are 
                multiple copies of a packets in the network.</t>

	    <t> If the IOAM trace option is used for on-path data collection, the partial trace data will also be replicated into multiple copies.
	       	The end result is that each copy of the multicast packet has a complete trace, whereas most of the data is redundant. 
		Data redundancy introduces unnecessary header overhead, wastes network bandwidth, and complicates the data processing. 
                In case the multicast tree is large, and the path is long, the redundancy problem becomes severe. </t>

	    <t> The PBT solutions, including the IOAM DEX option and PBT-M, can be used to eliminate such data redundancy, because each node on the tree only sends a postcard covering local data. 
                However, they cannot track the tree branches properly so it can bring confusion about the multicast tree topology. 
	        For example, Node A has two branches, one to Node B and the other to node D, and Node B leads to Node C and Node D leads to Node E.
                From the received postcards, one cannot tell whether or not Node C(E) is the next hop of Node B(D).</t>

            <t> The fundamental reason for this problem is that there is not an identifier (either implicit or explicit) to correlate the 
		data on each branch. </t>    

    </section>

    <section title="Proposed Modifications to Existing Techniques">

	    <t>We propose two solutions to address the above issues. One is built on PBT and requires augmentation or modification to the instruction header of 
		   the IOAM Direct Export Option;
	       the other combines the IOAM trace option and PBT for an optimized solution.</t>

       <section title="Per-hop postcard using IOAM DEX">

	    <t>The straightforward way to mitigate PBT's multiple tree tracking weakness is to augment it with a branch identifier field. Note that this only works for
	       the IOAM DEX option but not for PBT-M because the IOAM DEX option uses an instruction header. To make the branch identifier globally unique, the branch node ID plus an
	       index is used. For example, if Node A has two branches, one to Node B and one to Node C, Node A will use [A, 0] as the branch identifier for the branch to
	       B, and [A, 1] for the branch to C. The identifier is unchanged for each multicast tree instance and carried with the multicast packet until the next branch node.
	       Each postcard needs to include the branch identifier in the export data. The branch identifier, along with the other fields such as flow ID and 
           sequence number, is sufficient for the data analyzer to reconstruct the topology of the multicast tree.</t>

            <t><xref target="figure_1"/> shows an example of this solution. "P" stands for the postcard packet. The square brackets contains the branch identifier. The curly
	       brace contains the telemetry data about a specific node. </t>

	     <t><figure anchor="figure_1" title="Per-hop Postcard">
		 <artwork><![CDATA[
              
      P:[A,0]{A}  P:[A,0]{B}  P:[B,1]{D} P:[B,0]{C} 
           ^            ^          ^        ^  
           :	        :          :        :       
           :            :          :        :     
           :            :          :      +-:-+     
           :            :          :      |   |
           :            :      +---:----->| C |--... 
         +-:-+        +-:-+    |   :      |   |     
         |   |        |   |----+   :      +---+     
         | A |------->| B |        :               
         |   |        |   |--+   +-:-+             
         +---+        +---+  |   |   |
                             +-->| D |--....
                                 |   |
                                 +---+
	      
	      ]]></artwork>
           </figure></t>
		   
		   
	   <t> Each branch fork node need to generate the branch index and include it in the IOAM DEX option header so the downstream
	       node can learn its branch index.</t>   

	   <t> <xref target="figure_5"/> shows that the branch index is carried as an optional field after the flow ID and sequence number optional fields
			in the IOAM DEX option header. A bit "M" in the Flags field is reserved to indicate the presence of 
			the branch index field. The "M" flag position will be determined later after the other flags are
			specified in <xref target="I-D.ioamteam-ippm-ioam-direct-export"/>. The size of the index field is subject to future study. </t>
			
		<t> If the size of the branch index is small (e.g., equal to or less than 8 bits), it is also possible to combine it with the flow ID
		    optional field (i.e., shorten the flow ID field and reserve the last few bits for the branch index).</t>
				
		   
<t><figure anchor="figure_5" title="Carry Branch Index in IOAM DEX option header">
		 <artwork><![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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |        Namespace-ID           |M|          Flags              |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |               IOAM-Trace-Type                 |   Reserved    |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                         Flow ID (optional)                    |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                     Sequence Number  (Optional)               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |B-index (opt)  |                Padding                        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
		   
]]></artwork>
           </figure></t>	
		
	   <t> Once a node gets the branch ID information from the upstream, it also need to carry this information in its 
	   telemetry data export postcards. </t> 

       <t>To avoid introducing a new type of data field to the IOAM DEX option header, we can encode the branch identifier
	      using the existing node ID data field. Currently, the node ID field occupies three octets. 
		  The simple solution is to shorten the node ID field so a number of bits can be saved to encode the branch index,
		  as shown in <xref target="figure_3"/>.</t>

<t><figure anchor="figure_3" title="Encode Branch Index with Node ID Method 1">
		 <artwork><![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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |   Hop_Lim     |              node_id          |  branch index |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
           </figure></t>
	
       <t>Another encoding method is to use the sum of the node ID and the branch index	as the new node ID,
	      as shown in <xref target="figure_4"/>. 
	      As long as the node IDs are assigned with large enough gap, the telemetry data analyzer can still 
		  successfully recover the original node ID and branch index. </t>

<t><figure anchor="figure_4" title="Encode Branch Index with Node ID Method 2">
		 <artwork><![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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |   Hop_Lim     |              node_id + branch index           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
           </figure></t>
				 
		   
       </section>



       <section title="Per-section postcard">	    

	       <t>The second solution is a combination of the IOAM trace mode and PBT. 
		       To avoid data redundancy at each branch node, the trace data accumulated, to that point, is exported
		by a postcard before the packet is replicated. In this case, each branch still needs to maintain some identifier to help correlate the postcards
		for each tree section. The natural way to accomplish this is to simply carry the branch node's data (including its ID) in the trace of each branch. This is also necessary
		because each replicated multicast packet can have different telemetry data pertaining to this particular copy (e.g., node delay, egress timestamp, and egress interface). 
		As a consequence,  the local data exported by each branch node can only contain partial data (e.g., ingress interface and ingress timestamp). </t>

	     <t><xref target="figure_2"/> shows an example in a segment of a multicast tree. Node B and D are two branch nodes and they will export a postcard covering the trace data
		for the previous section. The end node of each path will also need to export the data of the last section as a postcard.</t>

	     <t><figure anchor="figure_2" title="Per-section Postcard">
		 <artwork><![CDATA[

             P:{A,B'}            P:{B1,C,D'} 
                ^                     ^  
                :                     :
                :                     :
                :                     :    {D1}   
                :                     :    +--... 
                :        +---+      +---+  |
                :   {B1} |   |{B1,C}|   |--+ {D2}
                :    +-->| C |----->| D |-----... 
    +---+     +---+  |   |   |      |   |--+
    |   | {A} |   |--+   +---+      +---+  |
    | A |---->| B |                        +--...
    |   |     |   |--+   +---+             {D3} 
    +---+     +---+  |   |   |{B2,E}
                     +-->| E |--...
                    {B2} |   |
                         +---+
	      
	      ]]></artwork>
           </figure></t>
           
	   <t>There is no need to modify the IOAM trace mode header format. We just need to configure the branch node to export the postcard and refresh the IOAM header
	      and data.</t>	   

       </section>
    </section>

    <section title="Considerations for Different Multicast Protocols"> 
    
	    <t><xref target="RFC8487">MTRACEv2</xref> provides an active probing approach for the tracing of an IP multicast routing path. 
		    Mtrace can also provide information such as the packet rates 
    and losses, as well as other diagnostic information. New on-path telemetry techniques will enhance Mtrace, and other existing OAM solutions, with more granular
    and realtime network status data through direct measurements. There are various multicast protocols that are used to forward the multicast data. 
    Each will require their own unique on-path
    telemetry solution.</t>  

      <section title="Application in PIM">
      
      <t><xref target="RFC7761">PIM-SM</xref> is the most widely used multicast routing protocol deployed today. Of the various PIM modes (PIM-SM, 
      PIM-DM, BIDIR-PIM, PIM-SSM), PIM-SSM is the preferred method due to its simplicity and removal of network source discovery complexity. With all PIM modes,
      control plane state is established in the network in order to forward multicast UDP data packets. But with PIM-SSM, the discovery of multicast sources is performed outside
      of the network via HTTP, SDN, etc. IP Multicast packets fall within the range of 224.0.0.0 through 239.255.255.255. The telemetry solution will need to work within
      this address range and provide telemetry data for this UDP traffic. </t>

      <t>The proposed solutions for encapsulating the telemetry instruction header and metadata in IPv4/IPv6 UDP packets are described in 
	      <xref target="I-D.herbert-ipv4-udpencap-eh"></xref> and <xref target="I-D.ioametal-ippm-6man-ioam-ipv6-deployment"></xref>. </t>

      </section>

      <section title="Application in P2MP">

      <t>Multicast Label Distribution Protocol (MLDP) and P2MP RSVP-TE are commonly used within a Multicast VPN (MVPN) environment. MLDP provides extensions to LDP 
      to establish point-to-multipoint (P2MP) and multipoint-to-multipoint (MP2MP) label switched paths (LSPs) in MPLS networks. P2MP RSVP-TE provides extensions to 
      RSVP-TE for establish traffic-engineered P2MP LSPs in MPLS networks. The telemetry solution will need to be able to follow these P2MP paths.  
      The telemetry instruction header and data should be encapsulated into MPLS packets on P2MP paths. 
      A corresponding proposal is described in <xref target="I-D.song-mpls-extension-header"></xref>. </t>

      </section>

      <section title="Application in BIER">
	      <t> <xref target="RFC8279">BIER</xref> adds a new header to multicast packets and allows the multicast packets to be forwarded according to the header only. By 
	      eliminating the requirement of maintaining per multicast group state, BIER is more scalable than the traditional multicast solutions. </t>
	      
	      <t><xref target="I-D.ietf-bier-oam-requirements">OAM Requirements for BIER</xref> lists many of the requirements for OAM at the BIER layer which will help in the forming
	      of on-path telemetry requirements as well.
	      </t>
	      
	      <t>There is also current work to provide solutions for BIER forwarding in ipv6 networks. For instance, a solution, <xref target="I-D.xie-bier-ipv6-encapsulation">BIER 
	      in Non-MPLS IPv6 Networks</xref>, proposes a new bier Option Type codepoint from the "Destination Options and Hop-by-Hop Options" IPv6 sub-registry.  This is 
              similar to what IOAM proposes for IPv6 transport.</t> 

              <t>Depending on how the BIER header is encapsulated into packets with different transport protocols, the method to encapsulate the telemetry instruction header and metadata
	      also varies. It is also possible to make the instruction header and metadata a part of the BIER header itself, such as in a TLV.</t>

      </section>
    </section>

    <section anchor="Security" title="Security Considerations">
      <t>No new secuirty issues are identified other than those discovered by the IOAM and PBT drafts.</t>
    </section>

    <section anchor="IANA" title="IANA Considerations">
      <t>The document makes no request of IANA.</t>
    </section>
    
    <section anchor="Contributors" title="Contributors">
      <t>TBD</t>
    </section>

    <section anchor="Acknowledgments" title="Acknowledgments">
      <t>The authors would like to thank Frank Brockners, Tianran Zhou for the
   comments and advice.</t>
    </section>
  </middle>

  <back>
    <references title="Normative References">
      <?rfc include='reference.RFC.2119'?>
      <?rfc include='reference.RFC.8174'?>
      <?rfc include='reference.RFC.8279'?>
      <?rfc include='reference.RFC.4687'?>
      <?rfc include='reference.RFC.7761'?>
      <?rfc include='reference.RFC.8487'?>
    </references>

    <references title="Informative References">
	    <?rfc include='reference.I-D.brockners-inband-oam-data'?>
		<?rfc include='reference.I-D.ioamteam-ippm-ioam-direct-export'?>
	    <?rfc include='reference.I-D.song-ippm-postcard-based-telemetry'?>
	    <?rfc include='reference.I-D.xie-bier-ipv6-encapsulation'?>
	    <?rfc include='reference.I-D.ietf-bier-oam-requirements'?>
	    <?rfc include='reference.I-D.herbert-ipv4-udpencap-eh'?>
	    <?rfc include='reference.I-D.ioametal-ippm-6man-ioam-ipv6-deployment'?>
	    <?rfc include='reference.I-D.song-mpls-extension-header'?>
    </references>
  </back>
</rfc>
