<?xml version="1.0" encoding="UTF-8"?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" category="exp" ipr="trust200902" submissionType="IETF" docName="draft-ietf-pim-pfm-forwarding-enhancements-04">
<?rfc toc="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<?rfc symrefs="yes"?>

  <front>
    <title abbrev="PIM Forwarding Enhancements">PIM Flooding Mechanism and Source Discovery Enhancements</title>

        <author initials="A." surname="Gopal" fullname="Ananya Gopal">
      <organization>Cisco Systems, Inc.</organization>
      <address>
        <postal>
          <street>Tasman Drive</street>
          <city>San Jose</city>
          <code>CA 95134</code>
          <country>USA</country>
        </postal>
        <email>ananygop@cisco.com</email>
      </address>
    </author>
        
    <author initials="S." surname="Venaas" fullname="Stig Venaas">
      <organization>Cisco Systems, Inc.</organization>
      <address>
        <postal>
          <street>Tasman Drive</street>
          <city>San Jose</city>
          <code>CA 95134</code>
          <country>USA</country>
        </postal>
        <email>svenaas@cisco.com</email>
      </address>
    </author>

    <author initials="F." surname="Meo" fullname="Francesco Meo">
      <address>
  <email>fran.meo@gmail.com</email>
      </address>      
    </author>
        
    <date />
    <area>Routing</area>
    <keyword>Multicast</keyword>
    <abstract>
<t>The Protocol Independent Multicast (PIM) Flooding Mechanism (PFM) provides a
 generic hop-by-hop message exchange framework for distributing multicast information among PIM routers. 
 Existing PFM procedures enable efficient source discovery without reliance on 
 Rendezvous Points, shared trees, or initial data registers. </t>
<t>
This document specifies enhancements to PFM forwarding behavior
 to improve efficiency and scalability. In particular, it introduces 
 mechanisms to reduce redundant message transmission over multiple 
 parallel links and extends the encoding of multicast information 
 through additional Type-Length-Value (TLV) structures and sub-TLVs
  to convey richer flow-related data.

These enhancements optimize control-plane overhead while
 preserving interoperability with existing PFM procedures, 
 enabling more efficient dissemination of multicast state in PIM networks.</t>
		</abstract>
  </front>
  <middle>
        
    <section title="Introduction"> <!--section 1-->
       <t> PIM Flooding Mechanism <xref target="RFC8364"/> allows a PIM router in
         the network to originate a PFM message to distribute announcements of 
         active sources to its PIM neighbors <xref target="RFC7761"/>. 
         All PIM neighbors then process this PFM message and flood it further 
         on their PIM-enabled links. To prevent loops, the originator address 
         as defined in Section 3.1 <xref target="RFC8364"/> is used for Reverse Path Forwarding (RPF) 
         checking at each router. 
         This RPF check is defined in Section 3.4.1 <xref target="RFC8364"/>. 
         Periodic PFM messages are exchanged to keep the multicast 
         information updated across the PIM domain (Section 3.4.2 
         <xref target="RFC8364"/>) </t>

        <t>The TLV defined in <xref target="RFC8364"/> for source discovery conveys 
         only source and group information. 
         It does not provide a mechanism to include additional attributes describing a multicast flow.</t>

        <t>In addition, PFM messages are flooded on all PIM-enabled links. 
        When two routers maintain multiple PIM adjacencies, 
        identical PFM messages are transmitted across each link. 
        Receivers perform RPF checks and discard duplicates as needed. 
        This behavior introduces unnecessary processing overhead, 
        both periodically and upon source discovery.</t>

        <t>This document defines two independent enhancements to PFM message exchange:</t>
            <list style="numbers">
                <t>A new TLV that supports Sub-TLVs, enabling the inclusion of additional flow-related information. 
                This enhancement is specified in Section 2.</t>
              
                <t>An optimization for PFM message exchange across multiple PIM
                 adjacencies between the same pair of routers. 
                 By leveraging PIM Router-IDs <xref target="RFC6395"/>, routers can identify such adjacencies
                  and limit message transmission to a subset of links, reducing redundant processing. 
                  This optimization applies to point-to-point links and does not alter behavior on shared LANs. 
                  This enhancement is specified in Section 3.</t>
            </list>

        <t>Implementations MAY support these enhancements independently; however, support for both is RECOMMENDED.</t>
  
 

        <section numbered="true" toc="include" removeInRFC="false"> <!--section 1.1-->
            <name>Conventions Used in This Document</name>
             <t>
                The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>",
                "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>",
                "<bcp14>SHALL NOT</bcp14>", "<bcp14>SHOULD</bcp14>",
                "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>",
                "<bcp14>NOT RECOMMENDED</bcp14>", "<bcp14>MAY</bcp14>", and
                "<bcp14>OPTIONAL</bcp14>" 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="Terminology"> <!--section 1.2-->
      <t>
    <list style="hanging">
        <t hangText="RPF:">Reverse Path Forwarding</t>
                    <t hangText="FHR:">First-Hop Router</t>
                    <t hangText="PFM-SD:">PIM Flooding Mechanism and Source-Discovery</t>
    </list>
      </t>
  </section>  
    </section>  <!--end of introduction section 1 -->

    <section anchor="pfm-sub-tlv" title="PIM PFM Sub-TLV"> <!--section 2-->

         <t>PFM-SD <xref target='RFC8364'/> defines a Group Source Holdtime (GSH)
            TLV for announcing active sources. 
            The GSH TLV conveys only source and group information.
            This document defines an extension that allows PIM routers to exchange additional information associated with multicast sources. </t>
            
        <section title="Group Source Info TLV"> <!--section 2.1-->
            <t> This document defines a new Group Source Info (GSI) TLV (Type TBD1). 
            The GSI TLV is functionally similar to the GSH TLV but applies to a single 
            (S,G) entry and supports the inclusion of Sub-TLVs to convey additional flow-specific information.
            Support for the GSI TLV is advertised using a PIM Hello option (TBD2), 
            as described in <xref target="subtlv-hello-option"/> </t>
            <t>
              <figure>
                <artwork>
    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |T|         Type = TBD1         |          Length               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             Group Address (Encoded-Group format)              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             Source Address (Encoded-Unicast format)           |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |            Holdtime           |        Type Sub-TLV 1         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |       Length Sub-TLV 1        |       Value Sub-TLV 1         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               +
   |                               .                               |
   |                               .                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                               .                               |
   |                               .                               |
   |        Type Sub-TLV n         |       Length Sub-TLV n        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |        Value Sub-TLV n                                        |
   |                               .                               |
   |                               .                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
                </artwork>
              </figure>
            </t>
            <t>
            The format of the GSI TLV is as follows:
              <list style='hanging'>
                <t hangText='T-bit (1 bit):'>
                  Indicates transitivity. If set to 0, a router 
                  that does not support the TLV or any contained Sub-TLV MUST NOT 
                  forward the message. If set to 1, the message MAY be forwarded even if 
                  unsupported TLVs or Sub-TLVs are present.
                </t>

                <t hangText='Type: (15 bits):'>
                  Set to TBD1.
                </t>

                <t hangText='Length (16 bits):'>
                  The length, in octets, of the Value field.
                </t>

                <t hangText='Group Address:'>
                   The multicast group address encoded as specified in <xref target="RFC7761"/>.
                </t>

                <t hangText='Source Address:'>
                  The unicast source address encoded as specified in <xref target="RFC7761"/>.
                </t>

                <t hangText='Holdtime:'>
                 The lifetime, in seconds, for the advertised (S,G) information.
                </t>

                <t hangText='Sub-TLVs:'>
                   Zero or more Sub-TLVs MAY be included. Each Sub-TLV consists of:
                    <list style='hanging'>
                      <t hangText='Type (16 bits):'>
                        The Sub-TLV Type. Values for this field are assigned by IANA.
                      </t>
  
                      <t hangText='Length (16 bits):'>
                        The length, in octets, of the Value field.
                      </t>
  
                      <t hangText='Value:'>
                        The content of the Sub-TLV, whose format is determined by the Sub-TLV Type.
                      </t>
                    </list>
                </t>
              </list>
            </t>
              </section>

              <section anchor="subtlv-hello-option" title="Group Source Info TLV Hello option" > <!--section 2.2-->
		<t> A PIM router indicates support for the GSI TLV defined in this document by 
        including the Group Source Info TLV Hello option in PIM Hello messages. 
        The format of the Hello option is as follows:</t>
      
            <figure> <artwork>                
    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |       OptionType = TBD2       |           Length = 0          |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
            </artwork> </figure> 
                
            <list style='hanging'>
	               <t hangText='OptionType (16 bits):'>TBD2</t>
                  <t hangText='OptionLength (16 bits):'>0</t> 
            </list>
            <t>The presence of this option signifies that the router supports the GSI TLV.</t>
        </section> <!--end of Hello option section 2.2 -->

        <section title="Considerations for using the Group Source Info TLV"> <!--section 2.3-->
            <t>All PIM routers MUST track which neighbors advertise support for the GSI TLV via the Hello option <xref target="subtlv-hello-option"/>. 
            This tracking is beneficial in heterogeneous networks where only certain routers 
            support the new TLV Type TBD1. 
            If GSI TLV is supported, use of the GSI TLV (Type TBD1) is RECOMMENDED.</t>

	    <t>
	      A router that supports the GSI TLV MUST: 
	      <list style="symbols"> 
		            <t> Advertise its capability by including the Hello option (OptionType TBD2) in PIM Hello messages. </t>
                
                <t> Track, per PIM interface, whether all neighbors support the GSI TLV. 
                    The scope and persistence of this state are implementation-specific. 
                    An implementation MAY retain this state even if local capability is disabled. </t>     
              
                <t> If acting as a First Hop Router (FHR), originate a Type TBD1 TLV 
                    when all neighbors on the outgoing interface support Type TBD1.</t>
                
                <t> If acting as an FHR, originate a Type 1 TLV <xref target="RFC8364"/>
                    when any neighbor on the outgoing interface does not support Type TBD1.</t> 

                <t> Upon receipt of a Type TBD1 TLV, MUST forward the PFM message 
                    unchanged on interfaces where all neighbors support Type TBD1.</t>

          
               <t> For interfaces with at least one neighbor that does not support Type TBD1, 
                   convert each Type TBD1 TLV to a Type 1 TLV <xref target="RFC8364"/> and forward only on those interfaces. 
                   The conversion MUST preserve the group, source, and holdtime fields, and MUST ignore Sub-TLVs. 
                   Multiple (S,G) entries for the same group SHOULD be aggregated into a single Type 1 TLV.
                   However, it MUST still send Type TBD1 TLV on all 
                   interfaces where the neighbors do support it.</t> 

               <t>  A PFM message MAY contain both Type 1 and Type TBD1 TLVs. 
                  When forwarding to neighbors that do not support Type TBD1, 
                  all Type TBD1 TLVs MUST be converted to Type 1 TLVs.</t>
            </list>
          </t>  
        </section>  
    </section>  <!--end of enhancement 1 -->    

    <section title="PIM PFM forwarding optimization"> <!--section 3-->
        <section title="RFC 6395 Compliance"> <!--section 3.1-->
            <t>To apply the forwarding optimization defined in this document, 
                 PIM routers MUST advertise a Router-ID as specified in <xref target="RFC6395"/>. 
                 Within a PIM VRF, a router MUST use the same 4-octet Router-ID in PIM Hello messages on all interfaces 
                 and MUST cache Router-IDs learned from neighbors. 
                Within a PIM VRF, a router MUST identify interfaces with a single neighbor sharing the same Router-ID, 
                indicating multiple adjacencies to that neighbor.
                This identification is necessary for applying the forwarding optimization defined in this document.
               Router-IDs are assumed to be unique within the PIM domain. 
               If this assumption is violated, the optimization defined in this document MUST NOT be applied.
            </t>
            
        </section> 
            
        <section anchor="opt-hello-option" title="PFM optimization Hello option" > <!--section 3.2-->
            <t> A PIM router indicates support for the forwarding optimization by 
               including the PFM Optimization Hello option (OptionType TBD3) in PIM Hello messages.
               <!--
               the PIM hello, the router MUST also include 
               the Router-ID Hello Option defined in <xref target="RFC6395"/> with a non-zero Router-ID.  --> </t>
      
            <figure> <artwork>                
    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |       OptionType = TBD3       |           Length = 0          |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
            </artwork> </figure> 
                
            <list style='hanging'>
	               <t hangText='OptionType (16 bits):'>TBD3</t>
                  <t hangText='OptionLength (16 bits):'>0</t> 
            </list>    
            
            <t> A router that supports this optimization MUST track, per interface, whether all neighbors support the option.
               This tracking is beneficial in heterogeneous networks where only certain routers support the optimization.</t>
              
            <t>For each learned Router-ID, the router MUST maintain a set of interfaces, 
                denoted as PFM_OPT_IF, that satisfy both of the following conditions:
                <list style="symbols">
                  <t> The neighbor with this Router-ID is the sole PIM neighbor on this interface. </t>
                  <t> The neighbor is advertising the PFM optimization option TBD3 on this interface. </t>
                </list>
                PFM message exchange MAY be optimized on interfaces in the PFM_OPT_IF set. This is discussed in <xref target="relax-rpf"/>.
            </t>
</section> <!--end of PFM optimization Hello option section 3.2 -->
        <section anchor="topology-example" title="Sample PFM Topology"> <!--section 3.3-->
          <!--
          
          <t> The following diagram illustrates a typical network topology where PFM 
              forwarding optimization can be applied. 
          </t>
          -->
          <figure anchor="star-topology" title="Four Router Network Topology Example">
            <artwork>
                         Router C
                            |
                            | LAN 1
                            |
     Router A --------------------------------- Router B
        |                                          |
        |----------------- Link L1 ----------------| 
        |                                          |
        |----------------- Link L2 ----------------| 
        |                                          | 
        |----------------- Link L3 ----------------| 
        |__________________________________________| 
                            |
                            | LAN 2
                            |
                         Router D
            </artwork>
          </figure>
        </section> <!--end of Sample PFM Topology section 3.3 -->

	<section anchor="relax-rpf" title="PFM message handling with Relaxed-RPF enabled"> <!--section 3.4-->

	   <!-- <t> 
        When a router sends a PIM Hello with OptionType TBD2 and Flag Bit TBD5 set, 
        it signals to its PIM neighbor that it can optimize forwarding between
        them if they are the only two neighbors on more than one connecting link between them.</t>
      -->
	  <t> 
      When two routers maintain multiple adjacencies and are the only neighbors on those links, 
      PFM messages are typically transmitted on all links and filtered by RPF checks at the receiver. 
      This results in redundant processing.
      If both routers advertise Router-IDs and support the optimization, 
      each router forms a PFM_OPT_IF set containing eligible interfaces. </t>
       

	  <t> When Relaxed-RPF is enabled:
      <list style="symbols">
        <t>A sender MUST select a single interface from its PFM_OPT_IF set for PFM transmission to that neighbor. The selection method is implementation-specific. </t>
        <t> On shared LANs, the sender MUST send PFM messages as normal since optimization cannot be applied when there are more than two routers on the network segment.</t>
        <t>
         A receiver that supports Relaxed-RPF MUST:
          <list style="symbols">
            <t>Determine the expected RPF interface using standard procedures.</t>
            <t>Accept a PFM message received on any interface in the PFM_OPT_IF set if both sender and receiver support the optimization.</t>
            <t>Otherwise, perform standard RPF validation.</t> </list>
        </t>
      </list>
      </t>
      
    <t> Referring to <xref target="star-topology"/>, when Router A originates or forwards a PFM message, 
        it MUST transmit the message on exactly one of links L1, L2, or L3.
        This behavior reduces processing overhead on point-to-point links. The selection of the interface from the PFM_OPT_IF set is implementation-specific.
        Router A also MUST send the message on both LAN 1 and LAN 2 to ensure Routers C and D receive the message. 
    </t>

    </section> <!--end of Relaxed-RPF section 3.4 -->

  <section anchor="pfm-opt-if" title="Maintenance of PFM_OPT_IF"> <!--section 3.5-->

    <t> Routers MUST update the PFM_OPT_IF set upon neighbor or capability changes: </t>

    <list style="symbols">
    
      <t>Neighbor Addition: If the new neighbor is the sole neighbor on the interface 
              and advertises both a Router-ID and the optimization option,
              the interface MUST be added to the corresponding PFM_OPT_IF set.
              If no set exists, it MUST be created. If a second neighbor appears on the interface, the interface 
              MUST be removed from the PFM_OPT_IF set.</t>

      <t>Neighbor Removal: If exactly one neighbor remains and it advertises both a Router-ID and the optimization option, 
        the interface MUST be added to the PFM_OPT_IF set for that Router-ID. If no set exists, it MUST be created.</t>

      <t>Router-ID Changes: If a neighbor starts advertising a Router-ID and satisfies all conditions,
              the interface MUST be added to the PFM_OPT_IF set. If a neighbor stops advertising a Router-ID, the interface MUST be removed from the PFM_OPT_IF set for that Router-ID. 
              If the set becomes empty, it MUST be deleted.</t>

      <t>Optimization Capability Changes: If a neighbor starts advertising the optimization option and satisfies all conditions,
              the interface MUST be added to the PFM_OPT_IF set. If a neighbor stops advertising the optimization option, the interface MUST be removed from the PFM_OPT_IF set for that Router-ID. 
              If the set becomes empty, it MUST be deleted.</t>
    </list>
      <t>These procedures apply during topology changes, 
         configuration updates, and software upgrades or downgrades. 
         Routers MUST maintain accurate PFM_OPT_IF state for each Router-ID.</t>

        </section> <!--end of PFM_OPT_IF maintenance section 3.5 -->
    <!--end of PFM forwarding optimization section 3 -->

    <section anchor="block-send-to-sender" title="PFM message forwarding to sender"> <!--section 3.6-->
      <t> 
        When the TBD3 optimization is enabled on a PIM router, 
        the router MUST NOT forward a PFM message on a link if both of the following conditions are true: 
        (1) the link has only one neighbor, 
        and (2) that neighbor's Router-ID matches the Router-ID of the router that originated the PFM message.

        It is sufficient for the neighbor to advertise only the Router-ID, 
        without any additional optimization options,
         since this information alone ensures the message is not sent back 
         to its original sender, thereby reducing unnecessary PFM message forwarding.
      </t>
  </section> <!--end of PFM message forwarding to sender section 3.6 -->
  </section> <!--end of PIM PFM forwarding optimization section 3 -->
    <section title="Security Considerations"> <!--section 4-->
            <t>
              When it comes to general PIM message security, see
              <xref target='RFC7761'/>. For PFM security see
              <xref target='RFC8364'/>. This optimization relies on
              correct Router-ID and capability advertisement in PIM
              Hellos, as well as general PIM hello integrity. For the
              new PFM TLV, the security considerations are the same as
              for the existing PFM TLV defined in <xref target='RFC8364'/>.
            </t>
    </section> <!--end of section 4 --> 
        

<section title="IANA Considerations"> <!--section 5-->
  <t>
  This document requires the assignment of a new PFM TLV Type TBD1 in the
  "PIM Flooding Mechanism Message Types" registry. </t>
  
  <figure>
    <artwork>
        PIM Flooding Mechanism Message Types

      Type            Name           Reference
    -----------------------------------------------
      TBD1       Group Source Info   [This document]
    </artwork>
  </figure>

  <t>
  Also, a new registry "PIM Flooding Mechanism Group Source Info
  Message Types" registry needs to be created.
  Assignments for the new registry are to be made according to the policy
  "IETF Review" as defined in <xref target='RFC8126'/>. The initial
  content of the registry should be:
  </t>

  <figure>
    <artwork>
        PIM Flooding Mechanism 
      Group Source Info Sub-TLV Types

      Type            Name           Reference
    -----------------------------------------------
        0            Reserved        [This document]
        1-32767      Unassigned
    </artwork>
  </figure>

  <t>
  This document requires the assignment of two new PIM Hello Options:
  </t>

  <figure>
    <artwork>
                      PIM Hello Options

      Value   Length   Name              Reference
    --------------------------------------------------
      TBD2      0     GSI TLV support   [This document]
      TBD3      0     PFM Optimization  [This document]

    </artwork>
  </figure>
</section>
        
  <section title="Acknowledgments">
  </section>
   </middle>
    
  <back>
        <references>
    <name>Normative References</name>
    <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6395.xml"/>
                <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
                <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
    <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7761.xml"/>
    <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8126.xml"/>
    <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8364.xml"/>
    </references>
  </back>
</rfc>