<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<!-- $Id$ -->
<!DOCTYPE rfc SYSTEM 'rfc2629.dtd' [
	  <!ENTITY rfc2119 PUBLIC ''
		   'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml'>
	  ]>
<?rfc toc="yes"?>
<?rfc tocompact="no"?>
<?rfc tocdepth="6"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<?rfc strict="yes" ?>


<rfc category="std" docName="draft-mohanty-idr-rtc-hierarchical-rr-00"
     ipr="trust200902" updates="">

  <front>
    <title abbrev="Hierarchical RR RT-Constraints">
      A solution to the Hierarchical Route Reflector issue in RT Constraints
    </title>

    <author fullname="Satya Ranjan Mohanty" initials="S R."
            surname="Mohanty">
      <organization>Cisco Systems, Inc.</organization>
      <address>
        <postal>
          <street>225 West Tasman Drive</street>
          <street/>
          <city>San Jose</city>
          <code>95134</code>
          <region>CA</region>
          <country>USA</country>
        </postal>
        <email>satyamoh@cisco.com</email>
      </address>
    </author>
    <author fullname="Juan Alcaide" initials="J."
            surname="Alcaide">
      <organization>Cisco Systems, Inc.</organization>
      <address>
        <postal>
          <street>225 West Tasman Drive</street>
          <street/>
          <city>San Jose</city>
          <code>95134</code>
          <region>CA</region>
          <country>USA</country>
        </postal>
        <email>jalcaide@cisco.com</email>
      </address>
    </author>
    <author fullname="Mrinmoy Ghosh" initials="M."
            surname="Ghosh">
      <organization>Cisco Systems, Inc.</organization>
      <address>
        <postal>
          <street>225 West Tasman Drive</street>
          <street/>
          <city>San Jose</city>
          <code>95134</code>
          <region>CA</region>
          <country>USA</country>
        </postal>
        <email>mrghosh@cisco.com</email>
      </address>
    </author>
    <date month="March" day="7" year="2023"/>
    <area>Routing</area>

    <workgroup>Network Working Group</workgroup>

<abstract>
<t> Route Target Constraints (RTC)  is used to build a VPN route distribution graph such that routers only receive VPN routes corresponding to specified route-targets (RT) that they are interested in. This is done by exchanging the route-targets as routes in the RTC  address-family and a corresponding "RT filter" is installed that influences the VPN route advertisement. In networks employing hierarchical Route Reflectors (RR)  the use of RTC can lead to incorrect VPN route distribution and loss in connectivity as detailed in an earlier draft . Two solutions were provided to overcome the problem.</t>
<t> This draft presents a method with suggested modifications to the RTC RFC in order to solve the hierarchical RR RTC problem in an efficient manner.
</t>
</abstract>



  </front>


  <middle>
<section anchor="Req" title="Requirements Language">
	<t>The key words &quot;MUST&quot;, &quot;MUST NOT&quot;,
          &quot;REQUIRED&quot;, &quot;SHALL&quot;,
          &quot;SHALL NOT&quot;, &quot;SHOULD&quot;,
          &quot;SHOULD NOT&quot;, &quot;RECOMMENDED&quot;,
          &quot;MAY&quot;, and &quot;OPTIONAL&quot; in this document
          are to be interpreted as described in <xref target="RFC2119"/>.
	</t>

      </section> <!-- EO Req -->
    <section anchor="Intro" title="Introduction">
      <t>
Hierarchical RR <xref target='RFC4456'/> deployments with VPN <xref target='RFC4364'/> working in conjunction with RTC <xref target='RFC4684'/> may result in sub-optimal and incorrect VPN route distribution that is nicely described in <xref target="I-D.ietf-idr-rtc-hierarchical-rr"/>. The root reason for this is the way the RR rules for RTC are defined in <xref target='RFC4684'/>. The authors of <xref target="I-D.ietf-idr-rtc-hierarchical-rr"/> furnish two solutions for the problem, one based on add-paths and the other based on diverse-paths constructs. In this memo, we present another another solution to the very same problem.
</t>
</section> <!-- EO Intro -->
<section anchor="Background" title="RTC and RR Rules">
<t>  When advertising RT membership NLRI to a route-reflector client, Section 3.2 of <xref target='RFC4684'/> advocates the advertising RR to set the ORIGINATOR_ID attribute <xref target='RFC4456'/>  to its own router-id, and the Next-hop attribute to be set to the local address for that session. However, this creates the issue in hierarchical RR setups as explained in <xref target="I-D.ietf-idr-rtc-hierarchical-rr"/>. Fig. 1 represents the same Figure as in <xref target="I-D.ietf-idr-rtc-hierarchical-rr"/>. When RR-2 and RR-3 advertise RT-1 to RR-1, the latter will choose one of the routes to be best and will advertise the same to RR-2 and RR-3 respectively after setting the ORIGINATOR_ID and next-hop to itself. Note that RR-1 will also add its own CLUSTER_ID <xref target='RFC4456'/>to the CLUSTER_LIST but importantly not overwrite the CLUSTER_ID of the sender. This leads to the issue explained in <xref target="I-D.ietf-idr-rtc-hierarchical-rr"/>.
</t>
</section> <!--EO Background -->
<section anchor="HRW-A" title="Problem Definition">
<t>In the Fig 1, when RR-1 chooses the route from RR-2 as the best route, and formats the next-hop and ORIGINATOR_ID as explained above and then advertises the route to RR-2, RR-2 will drop the route reflected from RR-1 because of the CLUSTER_ID check. 
       <figure anchor="figure_equal">
           <preamble></preamble>
           <artwork>
                            
                    +---------------------------------+
                    |              +----+             |
                    |        Clu-1 |RR-1|             |
                    |             /+----+\            |
                    |            /        \           |
                    |         +----+    +----+        |
                    |  Clu-2  |RR-2|    |RR-3|  Clu-3 |
                    |         +-/--+    +/--\+        |
                    |          /        /    \        |
                    |     +----+    +----+    +----+  |
                    |     |PE-1|    |PE-2|    |PE-3|  |
                    |     +----+    +----+    +----+  |
                    |       |          |         |    |
                    +-------|----------|---------|----+
                       RT-1 |     RT-1 |         | RT-1
                    +--------+   +--------+    +--------+
                    |  VPN-1 |   |  VPN-1 |    |  VPN-1 |
                    +--------+   +--------+    +--------+
                                           
                       
                     
                                          

             Figure 1 Hierarchical RR Setup with RTC	


           </artwork>
           <postamble></postamble>
       </figure>
RR-2 will therefore not form the outbound filter of RT-1 towards RR-1 which means that after convergence RR-2 will not advertise VPN routes to RR-1 anymore. This leads to an incorrect VPN route distribution across the network.

</t>
<t> In the scenario of Fig 2. CE-1 is multi-homed to PE-1 and PE-2 and wants to communicate with CE-2 which is behind PE-4. 
As explained earlier, because RR-1 chooses RR-2 path as best in the RTC family, RR-1 is only receiving the VPN route from RR-3 (and not RR-2) in the steady state. 
       <figure anchor="figure_equal1">
           <preamble></preamble>
           <artwork>
                            

                     +---------------------------------+
                     |              +----+    +-----+  |  +------------+
                     |        Clu-1 |RR-1| ---|PE-4 |- - -| VPN-1 (CE2)|
                     |             /+----+\   +-----+  |  +------------+
                     |            /        \           |
                     |         +----+    +----+        |
                     |  Clu-2  |RR-2|    |RR-3|  Clu-3 |
                     |         +-/--+    +--\-+        |
                     |          /            \         |
                     |     +----+           +----+     |
                     |     |PE-1|           |PE-2|     |
                     |     +----+           +--/-+     |
                     |         \             /         |
                     +----------\-----------/----------+
                                 \   RT-1  /
                                 +--------+ ----|
                                 |  VPN-1 (CE1) |
                                  --------------|
                                                                      

             Figure 2 Hierarchical RR Setup with RTC with dual-homed CE


           </artwork>
           <postamble></postamble>
       </figure>
Notice that even though the link between between RR-3 and RR-1 comes down, The RR-2 PATH still remains as best in the RTC address-family at RR-1 and the  VPN route advertisements to RR-1 from RR-2 still continue to be blocked. Thus even though there is an alternative connectivity from CE-1 to PE-4 via PE-1, RR-2 and RR-1, the BGP VPN routes cannot be sent. In fact CE-1 is completely cut-off from rest of the network. Generalizing, it means that in a hierarchical RR with only a single first-level RR as its client, the solution is completely broken. Notice that without RTC, RR-1 would have both VPN paths and the loss of connectivity to RR-3 would just result in local convergence at RR-1 subject to the time when the path from RR-2 becomes best.
</t>
 <t>
The solutions presented in <xref target="I-D.ietf-idr-rtc-hierarchical-rr"/> are based on
<list style="letters">
   <t>Addpath, RR-1 will advertise both the paths from RR-2 and RR-3 to RR-2 and RR-3 so that each of the first level RRS will accept at least one of the routes and install the filter</t>
   <t>When RR-1 will advertise the best-path to a client or non-client speaker, and that speaker is the one whose path is the best, the advertising router will use the most "diverse" path (different next-hop and ORIGINATOR_ID than the best-path) to accomplish the same goal, i.e. the path will be accepted at the receiving speaker</t>
</list>
</t>
<t> In the next section, we provide a solution, that does not require add-path and also improves upon <xref target='RFC4684'/> while solving this hierarchical RR issue in RTC.
</t>
</section> <!-- EO Intro1 -->
<section anchor="HRW-B" title="Proposed Solution">
<t>
A problem that <xref target='RFC4684'/> does not address is limiting the number for VPN routes advertised to AN RR when only one client advertises RTC routes. Consider in Figure 1 that PE-1 is the only one advertising a RTC route to RR-2. RR-2 will advertise back the route towards PE-1 (with next-hop/ORIGINATOR_ID rewriting to avoid PE-1 discarding the route). PE-1 will advertise VPN routes towards RR-1, which is unnecessary and wastes resources on RR-1.
</t>
<section anchor="HRW-D" title="Sender Advertisement Rule">
<t> In the description that follows we define Attribute diversity to mean RTC routes with different ORIGINATOR_ID attribute (or router-id of the peer it is received from if ORIGINATOR_ID does not exist), or different first CLUSTER_ID inside the CLUSTER_LIST (an empty CLUSTER_ID is different to any other non-empty CLUSTER_ID). Diversity for ORIGINATOR_ID is typically used for first level RRs, diversity for CLUSTER_LIST is typically used for higher level RRs. </t>
<t>Both diversity attributes can be used in combination when the RR has a mix of clients (that are themselves RRs and non-RRs).
The underlying assumptions for looking at CLUSTER_ID for attribute diversity is that any clients that are also route-reflectors and have the same CLUSTER_ID, will themselves have the same set of clients. Imagine a a higher level RR receiving the same route from two lower level RRs with the same CLUSTER_ID. It will not reflect back the RTC if only the same CLUSTER_ID is received from its clients (as first CLUSTER_ID in the CLUSTER_LIST).
</t>
<t>
 The following rule modifies the <xref target='RFC4684'/>.
<list style="symbols">
<t>A RTC route is reflected from a client to a client (including the client the route is received from), only when there is enough attribute diversity amongst the RTC routes received from all the clients.</t>
</list>
</t>
<t> The rule above will apply as well to a top level RR, guaranteeing that top level RR does not have unnecessary routes.  
</t>
</section> <!-- EO Intro7 --> 
<section anchor="HRW-C" title="Receiver Acceptance Rule">



<t>
We need to take care that when reflecting back a RTC route to the advertising client, this client does not discard the update. RFC 4684 mandates to overwrite next-hop to self and the ORIGINATOR_ID to our local router-id when advertising RTC route a route reflector client  (section 3.2, rule (i) ). 
This rule can be extended to take care of the case where the reflection happens at a higher level RR (See Rule(1) below). Additionally, no attribute overwriting is deemed necessary when reflecting a RTC route from client to non-client. Thus, the following rule is added to RFC 4684.
</t>

<t>
<list style="numbers">
<t>  When reflecting a RTC route from RR client to RR client, NEXT_HOP attribute is overwritten to self, ORIGINATOR _ID is set or overwritten to local router-id, and first CLUSTER_ID of CLUSTER_LIST (if not empty) is overwritten to local CLUSTER_ID (this is before regular CLUSTER_ID prepending; thus advertised CLUSTER_LIST may have two repeated CLUSTER_ID at the beginning).</t>
<t>when a RR receives an RT-Constraint route that contains its own CLUSTER_ID or ORIGINATOR_ID, it ignores the CLUSTER_ID/ORIGINATOR_ID check and does not discard the path but keep it as "Received-only". Treating the path as "Received-only" removes it from best-path computation considerations but allows to install the VPN filter. </t>
</list>
With the Rule 1. since we are over-writing the cluster-id, the receiver will accept the route. With Rule 2., in the above Fig. 1 and 2 when RR-2 receives the update from RR-1, it will accept the route and will treat it as "Received-only". However, although the route will not be eligible for advertisement, but since this route is accepted, the VPN filter is installed and VPN routes will be advertised from RR-2 to RR-1. Both rules are exclusive of each other.
</t>
</section> <!-- EO Intro1 -->     
    </section> <!-- EO HRW-A -->
<section anchor="CONC" title="Conclusion">
<t>
With the procedures it is not necessary for the RR to know in which level it is operating. The above rules are compatible. We always advertise best-path for any rule and it is easily seen that RR-2 will accept the RT Constraint path advertised from RR-1 . Since the path is accepted, the RT Filter at RR-2 will pass the VPN routes, and the problem scenarios are resolved accordingly.
</t>
<t>
With this specification in the RT-Constraint address-family, we solve both the incorrect and sub-optimal issues as mentioned above. There is no need for add-paths. We can also optimize over <xref target='RFC4684'/> on RTC advertisements based on diversity of ORIGINATOR_ID and CLUSTER_ID so that a higher level RR does not have to be populated with VPN routes with a specific RT if that RT is not present in other clusters.
</t>
</section>


   <section anchor="proto"
               title="IANA Considerations">
   <t>  None.
   </t>
   </section>


      <section anchor="Oper"
               title="Operational Considerations">
      <t>
        TBD.
      </t>
      </section> <!-- EO Oper -->



    <section anchor="Security"
             title="Security Considerations">
      <t>
	This document raises no new security issues for RT Constraints.
      </t>

    </section> <!-- EO Security -->



    <section anchor="Acknowledgements"
             title="Acknowledgements">
      <t>
	The authors would like to thank Swadesh Agrawal and M. Mirza for useful discussions related to hierarchical RR RTC.
      </t>

    </section> <!-- Ack -->


  </middle>
  <back>
    <references title="Normative References">

      <?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml"?>
      <?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.4684.xml"?> 
      <?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.4456.xml"?>
      <?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.4364.xml"?>
      <?rfc include="http://xml.resource.org/public/rfc/bibxml3/reference.I-D.draft-ietf-idr-rtc-hierarchical-rr-03.xml"?>
    </references>

  </back>
</rfc>
