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

	<front>
		<title abbrev="PIM Flooding Mechanism and Source Discovery 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>PIM Flooding Mechanism is a generic PIM message exchange mechanism that allows multicast information to be exchanged between PIM routers hop-by-hop. One example is PIM Flooding Mechanism and Source Discovery which allows last hop routers to learn about new sources using PFM messages, without the need for initial data registers, RPs or shared trees.</t> 
            <t>This document defines a new TLV for announcing sources that allows for Sub-TLVs that can be used for providing various types of information. This document also defines methodologies that enhance forwarding efficiency in PFM-SD deployments. </t>   
		</abstract>
	</front>
	<middle>
        
    <section title="Introduction">
		 <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 RPF checking at each router. This RPF check is defined in Section 3.4.1 <xref target="RFC8364"/>. Periodic PFM messages are triggered, see Section 3.4.2 <xref target="RFC8364"/> and exchanged to keep the multicast information updated across the PIM domain. </t>
        
                <t> First of all, PFM-SD does not allow the distribution of anything except for the announcements of active sources. However, it may be useful to provide additional information about flows in PFM
            <xref target="RFC8364"/> source announcements.</t>
            
        
                <t>Secondly, a PIM router will flood a PFM message on all its PIM enabled links. It is the recipient's responsibility to perform RPF checks on all received PFM messages and then decide whether to accept or drop a particular message. This means that if two routers have PIM neighborships over more than one link, the same PFM messages are exchanged or dropped over more than one link between the same two routers. This leads to extra processing at each PIM router, periodically, or every time a new source is discovered (in case of a PFM-SD implementation). </t> 
        

            <t>This document discusses two new improvements in PFM message exchanges between PIM routers.  </t>
     
                <list style="numbers">
                    <t>This document defines a new TLV for announcing sources that allows for Sub-TLVs that can be used providing various types of information. This enhancement is discussed in detail in Section 2.
                    </t>  
                   <t>
                    Utilizing the PIM Router-IDs <xref target="RFC6395"/>, PFM can limit the PFM messages exchanges to only on ONE link per router-pair, even though these PIM routers may maintain PIM neighborships over multiple links. 

                    In other words, when there are multiple links between two PIM routers, routers should not send the same message on all the links between them. This is achieved by identifying the PIM routers in the network using Router Identifiers <xref target="RFC6395"/> that are announced via PIM hellos. This enhancement is discussed in detail in Section 3.
                        </t>

                </list> 
            
         <t>Any existing PFM deployment MAY choose to implement one or both enhancements, however it is RECOMMENDED to implement both. 
        </t>
        

        
		 <section numbered="true" toc="include" removeInRFC="false">
            <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">
				<t>
					<list style="hanging">
						<t hangText="RP:">Rendezvous Point</t>
						<t hangText="RPF:">Reverse Path Forwarding</t>
                        <t hangText="PFM-SD:">PIM Flooding Mechanism and Source-Discovery</t>
					</list>
				</t>
			</section>
		

    </section> <!--end of introduction-->
     <section title="PIM PFM Sub-TLV">

         <t>PFM-SD <xref target='RFC8364'/> defines a Group Source Holdtime (GSH)
            TLV for announcing active sources. However, it could be beneficial for PIM routers to exchange additional data about these sources. </t>
            
        <section title="Group Source Info TLV">
                <t> This document defines a new
                  Group Source Info (GSI) TLV that is used similarly to the
                  GSH TLV except that it only provides info for a single source, and
                  includes additional information about the flow in Sub-TLVs. </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 = TBD            |          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>
                  <list style='hanging'>
                <t hangText='T: '>
                  If the Transitive bit is set to 0, a router MUST NOT forward
                  the message unless it supports this TLV and all the Sub-TLVs
                  that are present in the TLV in this message. If the transitive
                  bit is set to 1, it is forwarded even if the router does not
                  support the TLV or all the Sub-TLVs present.
                </t>

                <t hangText='Type: '>
                  This TLV has type TBD.
                </t>

                <t hangText='Length: '>
                  The length of the value in octets.
                </t>

                <t hangText='Group Address: '>
                  The group that sources are to be announced for. The format
                      for this address is given in the Encoded-Group format in
                      <xref target='RFC7761'/>.
                </t>

                <t hangText='Source Address: '>
                  The source address for the corresponding group.
                  The format for this address is given in the Encoded-Unicast
                  address in <xref target='RFC7761'/>.
                </t>

                <t hangText='Holdtime: '>
                  The Holdtime (in seconds).	
                </t>

                <t hangText='Type Sub-TLV 1..n: '>
                  The TLV contains n Sub-TLVs, n MAY be 0. The total length of the
                  TLV (the Length field) is used to derive how many octets are
                  used for Sub-TLVs. It will be at least 4 * n octets if n Sub-TLVs
                  are present. Type Sub-TLV indicates the type of the Sub-TLV. The
                  allowed types are Sub-TLV types that are specifically defined for
                  use in the Group Source Info TLV. This document defines
                  one such Sub-TLV type.
                </t>

                <t hangText='Length Sub-TLV 1..n: '>
                  The length of the Sub-TLV Value field in octets.
                </t>

                <t hangText='Value Sub-TLV 1..n: '>
                  The value of the Sub-TLV associated with the type and of the
                  specified length.
                </t>
                  </list>
                </t>
        </section>
    </section>  <!--end of enhancement 1 -->    
    <section title="PIM PFM forwarding optimization">
        <section title="RFC 6395 Compliance">
            <t>For this enhancement defined in this document to be adopted, all PIM routers MUST be compliant with RFC <xref target="RFC6395"/>. This means that PIM routers announce a unique domain-wide router ID in their PIM hellos. A PIM router announces the same 4-byte Router-ID in PIM hellos that it sends to all neighbors on all links. It also caches the Router-Ids of its neighbors, when it receives Hellos from <xref target="RFC6395"/> Compliant PIM neighbors.            
            
            This can be used to determine that different PIM neighbors are really the same router. In a VRF context, if the router has multiple interfaces with only one neighbor per interface, the router SHOULD check if those neighbors announce an RFC 6395 router ID. If the router can see the same router ID for multiple neighbors, PFM message exchange is optimized.  </t>
            
       
        </section> 
            
        <section title="PFM optimization Hello option">
            <t> A PIM router indicates that it supports the first enhancement mechanism specified in this document by including the new PFM optimization Hello option. When this optimization is included in 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             |       OptionLength = 0        |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
            Figure 1: PFM optimization Hello option
            </artwork> </figure> 
                
            <list style='hanging'>
	               <t hangText='OptionType = TBD'>
                   </t>
                  <t hangText='OptionLength = 0'>
                   </t> 
            </list>    
            <t> Note that there is no option value included. When a PIM hello with OptionType TBD is received from a PIM neighbor, the router MUST cache this information so that it can make forwarding and dropping decisions for PFM messages for that neighbor. When this option is included, the router MUST also cache the non-zero router-ID of this neighbor.</t>
        </section>  
            
        <section title="PFM message sending">
            <t> Consider a topology where two PIM routers maintain PIM neighborships over more than one link in the same PIM domain.
                 From each router's point of view, there is a single neighbor on each link. Traditionally, each of the routers will send out PFM messages out over all the links to its neighbor. RPF checks are one of the commonly used ways to prevent loops, hence the recipient router performs an RPF check and accepts only on one link, thereby dropping packets from all the others. Since the sender does not know which link will be chosen as the RPF-source on the neighbor, it cannot choose one of the links, without knowing its neighbor's decision.</t>
            <t>  If the optimization specified in this document is advertised by both routers, the sender should choose one of the links and send and forward PFM messages to its neighbor using only that link. The sender MUST do this only when the receiver is capable of the optimization and is advertising the same. Otherwise, the messages may be dropped because of RPF failures. The mechanism to choose a link is left to the implementation. </t>
        </section>
            
        <section title="PFM message receiving and RPF check relaxation">
            <t> Consider a router that is advertising its capability to optimize PFM exchanges in the network. Upon receiving a PFM message, this router MUST first check whether this message is sent by a PFM optimization enabled router. If the check returns true, the receiver should relax its RPF check and accept the message.  When a PFM message is received, the receiver SHOULD keep track of the router ID of the sender, so that the receiver does not forward the message back to the sender on any other link, as explained in the next section.
                      
            If it receives this message from a router that is not advertising the PFM optimization specified in this document, however, the optimization is enabled on the receiver, the receiver SHOULD NOT relax its RPF check. This is because the sender will be still sending out messages on all the links between them. </t>
        
        </section>
        
        <section title="PFM message forwarding">
            <t> Traditionally, a PIM router forwards a PFM message on all its PIM-enabled links. However, this is now optimized. Consider a router that is advertising its capability to optimize PFM exchanges in the network. When this router receives a PFM message from a router that also has the PFM optimization enabled, the forwarding mechanism is as follows. The receiver MUST NOT send the PFM message out on any links where there is only one neighbor and the neighbor has the same router ID as the sender. </t>
		</section>
    </section>  <!--end of enhancement 2-->
        
        
   
         
    <section title="Operational Considerations">
             <t> With respect to PIM PFM forwarding optimization, the following considerations apply:</t>  
                     <list style="hanging">

                     <t hangText='Existing neighbor on a new link:' > 
                   When a new neighbor is detected announcing support for the optimization and announcing a non-zero router ID, and it is the only neighbor on the link, a PIM router needs to check if there is an existing neighbor on another link with the same router ID (it does not need to be the sole neighbor on the other link). A mechanism SHOULD be implemented to prevent PFM messages sent on this link.  </t>

                     <t hangText='New neighbor on a new link:' > 
                         Appropriate logic SHOULD be implemented to handle new neighbor additions so that extra messages are not forwarded to the same neighbor, as well as ensuring that a new neighbor quickly gets the correct state. </t>

                       <t hangText='Removal of a neighbor:' > 
                     Appropriate logic SHOULD also be implemented to handle neighbor removals.
                      </t>

             </list>
             
    </section> <!--end of oper-cons -->      
        
    <section title="Security Considerations">
            <t>
              When it comes to general PIM message security, see
              <xref target='RFC7761'/>. For PFM security see <xref target='RFC8364'/>.
            </t>
            <t>This document defines a new format allowing for additional flow
            information. One concern is what happens if wrong information is provided
            by accident, or intentionally in a spoofed message by an attacker. The
            impact depends on what information is provided.
            </t>
    </section> <!--end of security-cons --> 
        

    <section title="IANA Considerations">
    <t>This document requires the assignment of a new PIM Hello Option for indicating the PFM optimization Hello option in the PIM-Hello Options Registry.</t>
    <t>
      This document requires the assignment of a new PFM TLV type in the
      "PIM Flooding Mechanism Message Types" registry. Also, a new registry
      "PFM Group Source Info Sub-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:
	<figure>
	  <artwork>
 Sub-Type         Name                  Reference
------------------------------------------------------
     0        Reserved               [this document]
  2-32767     Unassigned
	  </artwork>
	</figure>
    </t>
  </section> <!--end of IANA-cons --> 
        
        
     <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>