<?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. -->
<?xml-model href="rfc7991bis.rnc"?>  <!-- Required for schema validation and schema-aware editing -->
<!-- <?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?> -->
<!-- This third-party XSLT can be enabled for direct transformations in XML processors, including most browsers -->

<rfc
      xmlns:xi="http://www.w3.org/2001/XInclude"
      category="std"
      docName="draft-ietf-pim-flex-algo-00"
      ipr="trust200902"
      obsoletes=""
      updates=""
      submissionType="IETF"
      xml:lang="en"
      tocInclude="true"
      tocDepth="4"
      symRefs="true"
      sortRefs="true"
      version="3">
  <!-- xml2rfc v2v3 conversion 2.38.1 -->
  <!-- category values: std, bcp, info, exp, and historic
    ipr values: trust200902, noModificationTrust200902, noDerivativesTrust200902,
       or pre5378Trust200902
    you can add the attributes updates="NNNN" and obsoletes="NNNN" 
    they will automatically be output with "(if approved)" -->

 <!-- ***** FRONT MATTER ***** -->

 <front>
    <!-- The abbreviated title is used in the page header - it is only necessary if the 
        full title is longer than 39 characters -->

   <title abbrev="Abbreviated Title">Multi-Topology in PIM</title>
    <seriesInfo name="Internet-Draft" value="draft-ietf-pim-flex-algo-00"/>
    <!-- add 'role="editor"' below for the editors if appropriate -->

   <!-- Another author who claims to be an editor -->
   <author fullname="Zheng Zhang" initials="Z" surname="Zhang">
      <organization>ZTE Corporation</organization>
      <address>
        <postal>
          <street/>
          <!-- Reorder these if your country does things differently -->

         <city></city>
          <region/>
          <code/>
          <country>China</country>
        </postal>
        <phone></phone>
        <email>zhang.zheng@zte.com.cn</email>
        <!-- uri and facsimile elements may also be added -->
      </address>
    </author>
   <author fullname="Benchong Xu" initials="B" surname="Xu">
      <organization>ZTE Corporation</organization>
      <address>
        <postal>
          <street/>
          <!-- Reorder these if your country does things differently -->

         <city></city>
          <region/>
          <code/>
          <country>China</country>
        </postal>
        <phone></phone>
        <email>xu.benchong@zte.com.cn</email>
        <!-- uri and facsimile elements may also be added -->
     </address>
   </author>
   <author fullname="Stig Venaas" initials="S" surname="Venaas">
      <organization>Cisco Systems, Inc.</organization>
      <address>
        <postal>
          <street>Tasman Drive</street>
          <!-- Reorder these if your country does things differently -->

         <city>San Jose, CA 95134</city>
          <region/>
          <code/>
          <country>United States of America</country>
        </postal>
        <phone></phone>
        <email>stig@cisco.com</email>
        <!-- uri and facsimile elements may also be added -->
      </address>
    </author>
	<author fullname="Zhaohui Zhang" initials="Z" surname="Zhang">
      <organization>Juniper Networks</organization>
      <address>
        <postal>
          <street/>
          <city>Boston</city>
          <region/>
          <code/>
          <country>United States of America</country>
        </postal>
        <phone></phone>
        <email>zzhang@juniper.net</email>
        <!-- uri and facsimile elements may also be added -->
      </address>
    </author>
	<author fullname="Hooman Bidgoli" initials="H" surname="Bidgoli">
      <organization>Nokia</organization>
      <address>
        <postal>
          <street/>
          <city>Ottawa</city>
          <region/>
          <code/>
          <country>Canada</country>
        </postal>
        <phone></phone>
        <email>hooman.bidgoli@nokia.com</email>
        <!-- uri and facsimile elements may also be added -->
      </address>
    </author>

    <date year="2026"/>
    <!-- If the month and year are both specified and are the current ones, xml2rfc will fill 
        in the current day for you. If only the current year is specified, xml2rfc will fill 
	 in the current day and month for you. If the year is not the current one, it is 
	 necessary to specify at least a month (xml2rfc assumes day="1" if not specified for the 
	 purpose of calculating the expiry date).  With drafts it is normally sufficient to 
	 specify just the year. -->

   <!-- Meta-data Declarations -->

   <area>Routing</area>
    <workgroup>PIM</workgroup>
    <!-- WG name at the upperleft corner of the doc,
        IETF is fine for individual submissions.  
	 If this element is not present, the default is "Network Working Group",
        which is used by the RFC Editor as a nod to the history of the IETF. -->

   <keyword>template</keyword>
    <!-- Keywords will be incorporated into HTML output
        files in a meta tag but they have no effect on text or nroff
        output. If you submit your draft to the RFC Editor, the
        keywords will be used for the search engine. -->

   <abstract>
      <t>PIM usually uses the shortest path computed by routing protocols to build multicast tree. 
	  Multi-Topology Routing is a technology to enable service differentiation within an IP network. 
	  IGP Flex Algorithm provides a way to compute constraint-based paths over the network. 
	  This document defines the PIM message extensions to provide a way to build multicast tree through the specific topology and constraint-based path instead of the shortest path.</t>
    </abstract>
  </front>

  <middle>
    <section numbered="true" toc="default">
      <name>Introduction</name>
	  <t>As described in section 3 in <xref target="RFC7761" format="default"/>, PIM relies on an underlying topology-gathering protocol to populate the MRIB 
	(Multicast Routing Information Base). Usually the MRIB is the best paths over the network based on the IGP metric. 
    In some cases, alternative paths with low latency or high bandwidth are needed for specific requirements.</t>

	  <t>Multi-Topology Routing (MTR) <xref target="RFC4915" format="default"/> <xref target="RFC5120" format="default"/> 
	  is a technology to enable service differentiation within an IP network. 
	  To support MTR, an IGP advertises multiple, potentially incongruent, IP topologies, and computes topology specific routes.</t>
	  
	  <t>Flex-Algo <xref target="RFC9350" format="default"/> specifies a solution that allows IGPs themselves 
	  to compute constraint-based paths over the network. 
	  Flex-Algo(FA) can be seen as creating a sub-topology within a topology using algorithm specific constraints 
	  and an algorithm specific calculation type. Flex-algo can operate on any topology supported by the IGPs.</t>
	  
	  <t>Advertisement of IGP Flex-Algo <xref target="RFC9350" format="default"/> participation requires a data plane context. 
	  Currently the following dataplane contexts have been defined:</t>

	  <ul spacing="normal">
        <li>Segment Routing Dataplane <xref target="RFC8665" format="default"/> <xref target="RFC8667" format="default"/></li>
        <li>IP Flex Dataplane <xref target="RFC9502" format="default"/></li>
	    <li>Soft dataplane <xref target="I-D.ietf-lsr-flex-soft-dataplane" format="default"/></li>
      </ul>
	  
	  <t>This document defines how PIM can utilize a given combination of a topology, an algorithm, and a dataplane to 
	  populate an MRIB. 
	  In the remainder of this document, we'll refer to this combination as Topology-Algorithm-Dataplane (TAD).</t>

      <t>This document defines the PIM message extensions to provide a way to build a multicast tree using a given TAD instead of simple IGP 
	   shortest path.</t>
	   
	  <t>All the routers on a given PIM multicast tree MUST participate in the same TAD.</t>

      <section numbered="true" toc="default">
        <name>Requirements Language</name>
        <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
       "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
       document are to be interpreted as described in <xref target="RFC2119" format="default"/>.</t>
      </section>
    </section>
    
    <section numbered="true" toc="default">
      <name>Terminology</name>
      <t>This document uses terminologies defined in <xref target="RFC7761" format="default"/>, <xref target="RFC5384" format="default"/>, 
	  <xref target="RFC5496" format="default"/>, <xref target="RFC4915" format="default"/>, <xref target="RFC5120" format="default"/> and <xref target="RFC9350" format="default"/>.</t>
    </section>
    
    <section numbered="true" toc="default">
      <name>PIM Message extensions</name>

      <section numbered="true" toc="default">
        <name>Group Source Info TAD Sub-TLV</name>
		
		<t><xref target="I-D.ietf-pim-pfm-forwarding-enhancements" format="default"/> defines a 'Group Source Info TLV' for announcing sources 
		that supports Sub-TLVs that can be used to advertise various types of information. 
		This document defines a new Sub-TLV that can be used for carrying the topology ID and the Algorithm value associated with the TAD to be used.</t>
        
        <figure anchor="Fig3">
        <artwork align="left" name="Figure 3" type="" alt=""><![CDATA[
    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                 Type         |            Length              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |   Algorithm   |            MT-ID              |    DP-ID      |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
           ]]></artwork>
      </figure>
        
        <dl newline="true" spacing="normal" indent="8">
        <dt>Type: TBD (To be assigned by IANA).</dt>
        <dd></dd>
        <dt>Length: 2-octet. This length is always 4.</dt>
        <dd></dd>
        <dt>Algorithm: A 1-octet value from the IGP Algorithm Types registry under IGP Parameters registry.</dt>
        <dd></dd>
		<dt>MT-ID: A 2-octet field MT-ID (see Section 3.7 of <xref target="RFC4915" format="default"/>, Section 7 of <xref target="RFC5120" format="default"/>) to special the topology. 
		If this field is set to zero, it means the default topology.</dt>
        <dd></dd>
		<dt>DP-ID: A 1-octet field the data plane ID.</dt>
        <dd></dd>
        </dl> 
		
		<t>MT-ID values are protocol specific. The value advertised therefore has to match an MT-ID value 
		supported by the IGP deployed in the network.</t>		
      </section>
	  
	  <section numbered="true" toc="default">
        <name>TAD Attribute Format</name>
		
		<t><xref target="RFC5384" format="default"/> defines a pim Join Attributes are encoded as TLVs into the Encoded-Source Address field of a PIM Join message. 
	  This document specifies the TAD Attribute that allows the receiver to select the associated topology or algorithm.</t>
        
        <figure anchor="Fig2">
        <artwork align="left" name="Figure 2" type="" alt=""><![CDATA[
       0                   1                   2
       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |F|E|   Type    |    Length     |   Algorithm   |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |          MT-ID                |     DP-ID     |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
           ]]></artwork>
      </figure>
        
        <dl newline="true" spacing="normal" indent="8">
        <dt>F bit: The Transitive bit. Specifies whether the attribute is transitive or non-transitive. 
		This bit RECOMMENDED set to 1 and the attribute will be transitived.</dt>
        <dd></dd>
        <dt>E bit: End-of-Attributes bit. Specifies whether this attribute is the last. Set to zero if there are more attributes. 
		Set to 1 if this is the last attribute.</dt>
        <dd></dd>
        <dt>Type: TBD (To be assigned by IANA).</dt>
        <dd></dd>
        <dt>Length: 1-octet. This length is always 4.</dt>
        <dd></dd>
        <dt>Algorithm: A 1-octet value from the IGP Algorithm Types registry under IGP Parameters registry.</dt>
        <dd></dd>
		<dt>MT-ID: A 2-octet field MT-ID (see Section 3.7 of <xref target="RFC4915" format="default"/>, Section 7 of <xref target="RFC5120" format="default"/>) to special the topology. 
		If this field is set to zero, it means the default topology.</dt>
        <dd></dd>
		<dt>DP-ID: A 1-octet field the data plane ID.</dt>
        <dd></dd>
        </dl> 
		
        <t>MT-ID values are protocol specific. The value advertised therefore has to match an MT-ID value 
		supported by the IGP deployed in the network.</t>	
        </section>
	  </section>
	  
	  <section numbered="true" toc="default">
        <name>Specification</name>
		
		<t>When TAD is specified, PIM MUST use the topology, algorithm and data-plane specified.</t>
		<t>PIM messages with the local TAD MUST NOT be sent outside the IGP domain,  
		because the value in the TAD may have a different meaning in another IGP domain, which will cause processing errors.</t>
		
		<t>When PIM wants to use flex-algo paths for the prefix that is advertised as a regular algo 0 prefix in IGP, 
		it MUST specify the soft data plane type in the TAD. 
		If PIM wants to use a prefix advertised according to RFC 9502, 
		in which case the prefix is bound to the specific flex-algorithm, 
		PIM needs to specify the IP algorithm as the data-plane for the flex-algo path calculation.
		In both cases, PIM needs to be configured with the flex-algo number that it intends to use.</t>
	
		<section numbered="true" toc="default">
          <name>Source with TAD Sub-TLV advertisement</name>
		
		  <t>PIM Flooding Mechanism and Source Discovery <xref target="RFC8364" format="default"/> allows for announcement of active sources. 
		  <xref target="I-D.ietf-pim-pfm-forwarding-enhancements" format="default"/> defines a 'Group Source Info TLV' for announcing sources 
		  that allows for Sub-TLVs that can be used for providing various types of information. 
		  The TAD Sub-TLV is advertised with the Group Source Info TLV, and flooded in the network. 
		  When MTR is not deployed in the network, the MT-ID in the Sub-TLV MUST be set to zero.</t>
		
		  <t>The First Hop Router (FHR) advertises the announcing sources carrying the TAD Sub-TLV to the network. 
	      All the routers in the network receive the information through PFM function. 
		  The TAD advertisement of FHR is used by LHR to select the corresponding TAD to send the joining message.
		  If two or more FHRs announce same source and group with different TAD because of wrong configurations or other reasons, 
		  the LHR SHOULD select the TAD by using the lowest or highest originator address. The highest originator address is preferred.</t>
		  
		  <t>The PFM function defined in <xref target="RFC8364" format="default"/> is not changed.</t>
		  
		  <t>Similarly, MVPN, EVPN, etc. can also announce the corresponding TAD when advertising routes, 
		  so that PE can select the topology corresponding to the corresponding TAD.</t>
		</section>
		
		<section numbered="true" toc="default">
          <name>J/P message Processing</name>
		
		  <t>The LHR PIM router on the receiving side specifies the TAD to the multicast source 
		  according to the received TAD Sub-TLV or the local policy. 
		  The LHR looks up the local TAD aware routing table and gets the upstream neighbor, then the LHR sends the join message to the upstream neighbor 
		  with the specified TAD value set in the TAD attribute. The local configured TAD is the same with the advertisement of LHR usually. 
		  In case there is inconsistent, the LHR MUST NOT send the J/P message with TAD attribute. 
		  When there is no specific TAD in local policy or configuration on LHR, 
		  LHR SHOULD use the TAD received by PFM advertisements if there is.</t>
		
		  <t>When a PIM router receives a J/P message with the TAD attribute, the router checks all the received join messages, 
		  if all the received join messages carried the TAD value, then it looks up the TAD specific unicast routes   
		  and selects the incoming interface and upstream neighbor. 
		  And the continual join messages keep carrying the TAD Attribute. 
		  When the LHR stops to use the function defined in this document, LHR MUST send the associated prune message. 
		  And the continual prune message MUST carried the attribute.</t>
		
		  <t>When a PIM router receives the join messages from different neighbors for the same (*,G) or (S,G), 
		  in case the router finds that not all the received join messages carried the same TAD value, 
		  or unicast routing is unreachable in the TAD aware routing table, 
		  the router needs to stop the PIM procedure and sends notification to the network administrator. 
		  If the router is FHR, the FHR SHOULD NOT forward the multicast flow until all the received join messages 
		  carried the same TAD value.</t>
		
		  <t>The TAD attribute SHOULD NOT be used with RPF vector attribute(<xref target="RFC5496" format="default"/>). 
		  In case the TAD attribute is also received with the RPF vector attribute, 
		  the router SHOULD ignore one of them according to local policy.</t>
		
		  <t>There should be no more than one TAD attribute in an Encoded-Source Address when PIM build a join message. 
		  If the PIM router receives a join message with multiple TAD attributes in an Encoded-Source Address, the first one is 
		  RECOMMENDED be used.</t>
		  </section>
		  
		  <section numbered="true" toc="default">
          <name>Example</name>
		  
		  <figure anchor="Fig1">
          <artwork align="left" name="Figure 1" type="" alt=""><![CDATA[
                      +----(gR2)------(gR4)----+
                     /       |          |       \ 
                    /        |          |        \
         Source--(R1)(RP)    |          |       (R6)--Recv
                    \        |          |        /
                     \       |          |       /
                      +----(rR3)------(rR5)----+
           ]]></artwork>
          </figure>
          <t>In Figure 3, there is only a default topology in the network. 
	      R1 is the source DR and R6 is last-hop DR. Two multicast flows with the same source address need to be received by the receiver: 
	      flow 1 (192.0.2.1/24, 233.252.0.1/32) and flow 2 (192.0.2.1/24, 233.252.0.2/32). 
	      The shortest path to the source is: R6-R4-R2-R1. But the bandwidth on the path is not enough for the two flows delivery. 
	      Packet loss occurs.</t>
	      <t>The network can be divided into 2 planes by different Flex-Algorithms defined in <xref target="RFC9350" format="default"/>. 
	      For example, R1/R2/R4/R6 belong to green plane of Algorithm X, and R1/R3/R5/R6 belong to red plane of Algorithm Y.</t>
		  
		  <t>When the soft dataplane defined in  <xref target="I-D.ietf-lsr-flex-soft-dataplane" format="default"/> is used, 
		  the TAD combinations can be TAD 1 "FA=X, MT-ID=0, DP-ID=3" and TAD 2 "FA=Y, MT-ID=0, DP-ID=3". 
		  All the routers send the participation of Flex-algo X and Y per <xref target="I-D.ietf-lsr-flex-soft-dataplane" format="default"/>.
		  The IP prefix routes for the sources of flow 1/2 are advertised in default topology.</t>
		  
		  <t>R1 sends the PFM messages for flow 1 with TAD 1 sub-TLV and flow 2 with TAD 2 sub-TLV.
		  After receiving the PFM messages, when JoinDesired(192.0.2.1, 233.252.0.1) (<xref target="RFC7761" format="default"/>) is TRUE, 
		  R6 looks up the local routing by the TAD 1, and gets the upstream router R4 for flow 1. 
		  When JoinDesired(192.0.2.1/24, 233.252.0.2) is TRUE, the process of R6 for TAD 2 is similar,
		  R6 gets the upstream router R5 for flow 2.
          Then R6 sends the PIM join messages with the TAD 1 to R4 for flow 1 and TAD 2 to R5 for flow 2.
          All the routers along the path process the join messages in similar way and the multicast trees for flow 1 and flow 2 are built finally.</t>
		  
 		  <t>Another example is to suppose that the prefix of a multicast stream source S2 is advertised according 
		  to <xref target="RFC9502" format="default"/>, belongs to IP Flex Dataplane, and its advertised Algorithm is 130. 
		  If PIM is to be applied in this case, the DP-ID needs to be set to IP Flex Dataplane Type (DP-ID=2) and the FA value to 130 
		  in the PIM's TAD advertisement, including the Group Source Info TAD sub-TLV that advertises source S2, 
		  as well as in the TAD Attribute of the join/prune message initiated by LHR.</t>
		  </section>
	  </section>
    
    <section anchor="IANA" numbered="true" toc="default">
      <name>IANA Considerations</name>
	  <section numbered="true" toc="default">
        <name>Group Source Info TAD Sub-TLV</name>
		<t>IANA is request to assign a new sub-type for "Group Source Info TAD Sub-TLV" in the "PFM Group Source Info Sub-Types" registry.</t>
	  </section>
	  
	  <section numbered="true" toc="default">
        <name>TAD Attribute</name>
		<t>IANA is request to assign a new sub-type for "TAD Attribute" in the "PIM Join Attribute Types" registry.</t>
	  </section>
	  
	  <section numbered="true" toc="default">
        <name>PIM TAD</name>
		<t>IANA is request to create a new registry for "Dataplane ID" in the "Interior Gateway Protocol (IGP) Parameters" registry. 
		For now, three values are defined:</t>
		
		<ul spacing="normal">
        <li>1: Segment Routing Dataplane <xref target="RFC8665" format="default"/> <xref target="RFC8667" format="default"/></li>
        <li>2: IP Flex Dataplane <xref target="RFC9502" format="default"/></li>
	    <li>3: Soft Dataplane <xref target="I-D.ietf-lsr-flex-soft-dataplane" format="default"/></li>
        </ul>
	  </section>
    </section>
	
    <section anchor="Security" numbered="true" toc="default">
      <name>Security Considerations</name>
      <t>The consideration mentioned in <xref target="RFC7761" format="default"/>, <xref target="I-D.ietf-pim-pfm-forwarding-enhancements" format="default"/> 
	  and <xref target="I-D.ietf-lsr-flex-soft-dataplane" format="default"/> apply to this document.</t>
	  <t>If PIM routers in the multicast tree select different topology and algorithm based on different local policy, 
	  there may be a loop in the network, or the multicast flow cannot be forwarded. 
	  Forged router may advertise source and group information with wrong TAD sub-TLV. 
	  The network administrator should be careful for the TAD consistency.</t>
    </section>
	
	<section anchor="ACK" numbered="true" toc="default">
      <name>Acknowledgments</name>
      <t>The authors would like to acknowledge Les Ginsberg, Peter Psenak for their input on this document.</t>
    </section>
  </middle>
  <!--  *****BACK MATTER ***** -->

 <back>

   <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
		<xi:include href="http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
		<xi:include href="http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7761.xml"/>
		<xi:include href="http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5384.xml"/>
		<xi:include href="http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5496.xml"/>
		<xi:include href="http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.9350.xml"/>
		<xi:include href="http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.4915.xml"/>
		<xi:include href="http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5120.xml"/>
		<xi:include href="https://datatracker.ietf.org/doc/bibxml3/draft-ietf-pim-pfm-forwarding-enhancements.xml"/>
      </references>
	  
	  <references title="Informative References">
	   <xi:include href="http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8364.xml"/>
	   <xi:include href="http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8665.xml"/>
	   <xi:include href="http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8667.xml"/>
	   <xi:include href="http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.9502.xml"/>
	   <xi:include href="https://datatracker.ietf.org/doc/bibxml3/draft-ietf-lsr-flex-soft-dataplane.xml"/>
    </references>
    </references>
 </back>
</rfc>
