<?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-xz-pim-flex-algo-02"
      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-xz-pim-flex-algo-02"/>
    <!-- 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="2024"/>
    <!-- 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>Protocol Independent Multicast (PIM) get the upstream neighbor and incoming interface to multicast source or Rendezvous Point (RP) from the unicast routing protocol. 
    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) is a technology to enable service differentiation within an IP network. 
	  To support MTR, an IGP maintains independent IP topologies, termed as "Multi-Topologies" (MT), and computes/installs routes per topology. 
	  OSPF extensions <xref target="RFC4915" format="default"/> and ISIS extensions <xref target="RFC5120" format="default"/> specify the MT extensions.</t>
	  
	  <t><xref target="RFC9350" format="default"/> specifies a solution that allows IGPs themselves to compute constraint-based paths over the network. 
	  FA can be seen as creating a sub-topology within a topology using defined topology constraints and computation algorithm. This can be done within a MTR topology or
      the default Topology. 
	  In the future different algorithms might be defined. For that reason, in the remainder of this document, we'll refer to this as the IGP Algorithm (IPA).</t>

	  <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 1, there is only a defult topology in the network. 
	   R1 is the source DR and R6 is last-hop DR. Two multicast flows need to be received by the receiver: 
	   flow 1 (1.0.0.0/24, 233.252.0.1/32) and flow 2 (2.0.0.0/24, 233.252.0.2/32). 
	   The shortest paths to the two sources are the same: R6-R4-R2-R1. But the bandwidth on the path is not enough for the two flows delivery. Packet loss occurs.
	   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, and R1/R3/R5/R6 belong to red plane.</t>
	   
	   <t>This document defines the PIM message extensions to provide the way to build multicast tree through the specific topology and constraint-based path instead of the shortest path. 
	   In this figure, flow 1 can be delivered in plan 1, flow 2 can be delivered in plan 2.</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 does not introduce more terminologies than <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 MT Sub-TLV</name>
		
		<t><xref target="I-D.gopal-pim-pfm-forwarding-enhancements" format="default"/> defines a new TLV for announcing sources that allows for Sub-TLVs 
		that can be used for providing various types of information. This document defines a new MT Sub-TLV that can be used for carrying the topology ID and the IPA value.</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              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     IPA       |            MT-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 1.</dt>
        <dd></dd>
        <dt>IPA: A 1-octet field The IGP Algorithm, values are from the IGP Algorithm registry. 
		For using Flex-Algorithm (see Section 4 of <xref target="RFC9350" format="default"/>) to specify the sub-topology,  
		the value is between 128 and 255 inclusive.</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>
        </dl> 
		
      </section>
	  
	  <section numbered="true" toc="default">
        <name>Multi-Topology 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 MT 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=TBD | Length = 1    |      IPA      |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |          MT-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.</dt>
        <dd></dd>
        <dt>IPA: A 1-octet field The IGP Algorithm, values are from the IGP Algorithm registry. 
		For using Flex-Algorithm (see Section 4 of <xref target="RFC9350" format="default"/>) to specify the sub-topology,  
		the value is between 128 and 255 inclusive.</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>
        </dl> 

      </section>
	  
	  <section numbered="true" toc="default">
        <name>Specification</name>
		
		<section numbered="true" toc="default">
          <name>Source with MT 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.gopal-pim-pfm-forwarding-enhancements" format="default"/> defines a new TLV for announcing sources that allows for Sub-TLVs that 
		  can be used for providing various types of information. The MT Sub-TLV is advertised with Group Source Info TLV, and flooded in the network.</t>
		
		  <t>The FHR advertises the announcing sources carrying the MT Sub-TLV to the network. 
	      All the routers in the network receive the information through PFM function. 
		  If two or more FHRs announce same source and group with different MT-ID and IPA value because of wrong configurations or other reasons, 
		  the LHR SHOULD select the MT-ID and the IPA by using the lowest or highest originator address.</t>
		  
		  <t>The PFM function defined in <xref target="RFC8364" format="default"/> is not changed.</t>
		</section>
		
		<section numbered="true" toc="default">
          <name>J/P message Processing</name>
		
		  <t>The LHR PIM router on the receiving side specifies the MT-ID and IPA of the unicast route to the multicast source according to the local policy. 
		  The LHR looks up the local topology routing table and gets the upstream neighbor, then the LHR sends the join message to the upstream neighbor 
		  with the specified MT-ID and IPA value set in the MT attribute. The local configured MT-ID and IPA is the same with the advertisement of LHR usually. 
		  In case there is inconsistent, the LHR MUST NOT send the J/P message with MT attribute. 
		  When there is no specific MT-ID and IPA value in local policy or configuration on LHR, LHR SHOULD use the MT-ID and IPA received by PFM advertisements if there is.</t>
		
		  <t>After receiving join messages, the upstream PIM router checks all the received join messages, if all the received join messages carried the same 
		  MT-ID and IPA value, then it looks up unicast routes in the specific topology and selects the incoming interface and upstream neighbor according to the algorithm. 
		  And the continual join messages keep carrying the MT Attribute. 
		  When the local policy or configuration is deleted on LHR, LHR MUST send the associated prune message. And the continual prune message MUST carried the attribute.</t>
		
		  <t>In case the upstream neighbor finds that not all the received join messages carried the same MT-ID and IPA value, or unicast routing is unreachable in 
		  the specific topology, the upstream neighbor MUST use the local routing table which is the default topology to get the upstream neighbor. 
		  And this inconsistency SHOULD be notified to the network administrator. 
		  If the upstream neighbor is FHR, the FHR SHOULD NOT continue advertising the MT Sub-TLV until all the received join messages carried the same MT-ID and IPA value.</t>
		
		  <t>The MT attribute SHOULD NOT be used with RPF vector attribute(<xref target="RFC5496" format="default"/>). 
		  In case the MT 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 MT attribute in an Encoded-Source Address when PIM build a join message. 
		  If the PIM router receives a join message with multiple MT attributes in an Encoded-Source Address, the first one is RECOMMENDED be used.</t>
		  </section>
		  
		  <section numbered="true" toc="default">
          <name>Example</name>
		  
		  <t>In the example of figure 1, R1 sends the PFM message with MT sub-TLV according to local policy or configuration. 
		  The MT-ID 0 which indicate the default topology and IPA M which indicates the FA is set in the sub-TLV.
		  All the nodes in the network receive the message. 
		  R6 is configured with policy rule1 to match flow 1 (1.0.0.0/24, 233.252.0.1/32) and set IPA M to select green plane in the default topology, 
	      and R6 is configured with policy rule2 to match flow 2 (2.0.0.0/24, 233.252.0.2/32) and set Flex-Algorithm N to select red plane. 
	      When JoinDesired(1.0.0.1, 233.252.0.1) (<xref target="RFC7761" format="default"/>) is TRUE, R6 will match policy rule1 in local policy and send PIM join to R4 
	      with MT-ID 0 and IPA M in MT Attribute. Also, when JoinDesired(2.0.0.1, 233.252.0.2) is TRUE, R6 will match policy rule2 in local policy and 
	      send PIM join to R5 with MT-ID 0 and IPA N in MT Attribute. Then flow 1 can be delivered in plan 1, flow 2 can be delivered in plan 2.</t>
		  </section>

	  </section>
	  
    </section>

	
    
    <section anchor="IANA" numbered="true" toc="default">
      <name>IANA Considerations</name>
      <t>TBD.</t>
    </section>
    <section anchor="Security" numbered="true" toc="default">
      <name>Security Considerations</name>
      <t>The consideration mentioned in <xref target="RFC7761" format="default"/> and <xref target="I-D.gopal-pim-pfm-forwarding-enhancements" 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. 
	  Forged router may advertise source and group information with wrong MT sub-TLV. 
	  The network administrator should be careful for the MT consistency.</t>
    </section>
  </middle>
  <!--  *****BACK MATTER ***** -->

 <back>

   <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
        <?rfc include="reference.RFC.2119.xml"?>	
        <?rfc include="reference.RFC.7761.xml"?>	
        <?rfc include="reference.RFC.5384.xml"?>
        <?rfc include="reference.RFC.5496.xml"?>
		<?rfc include="reference.RFC.9350.xml"?>
		<?rfc include="reference.RFC.4915.xml"?>
		<?rfc include="reference.RFC.5120.xml"?>
      </references>
	  
	  <references title="Informative References">
	    <?rfc include="reference.RFC.8364.xml"?>   
        <?rfc include="reference.I-D.gopal-pim-pfm-forwarding-enhancements.xml"?>		
    </references>
    </references>
 </back>
</rfc>
