<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="3"?>
<?rfc tocindent="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<rfc category="exp" docName="draft-ietf-idr-bgp-fwd-rr-01" ipr="trust200902"
     submissionType="IETF" updates="4456">
  <front>
    <title abbrev="BGP Forwarding Route Reflector">BGP Route Reflector in
    Forwarding Path</title>

    <author fullname="Kaliraj Vairavakkalai" initials="K." role="editor"
            surname="Vairavakkalai">
      <organization>Juniper Networks, Inc.</organization>

      <address>
        <postal>
          <street>1133 Innovation Way,</street>

          <city>Sunnyvale</city>

          <region>CA</region>

          <code>94089</code>

          <country>US</country>
        </postal>

        <email>kaliraj@juniper.net</email>
      </address>
    </author>

    <author fullname="Natrajan Venkataraman" initials="N." role="editor"
            surname="Venkataraman">
      <organization>Juniper Networks, Inc.</organization>

      <address>
        <postal>
          <street>1133 Innovation Way,</street>

          <city>Sunnyvale</city>

          <region>CA</region>

          <code>94089</code>

          <country>US</country>
        </postal>

        <email>natv@juniper.net</email>
      </address>
    </author>

    <date day="16" month="February" year="2024"/>

    <abstract>
      <t>The procedures in BGP Route Reflection (RR) spec <xref
      target="RFC4456"/> primarily deal with scenarios where the RR is
      reflecting BGP routes with next hop unchanged.</t>

      <t>These procedures can sometimes result in traffic forwarding loops in
      deployments where the RR is in forwarding path, because of reflecting
      BGP routes with next hop set to self.</t>

      <t>This document specifies approaches to minimize possiblity of such
      traffic forwarding loops. One of those approaches updates path selection
      procedures specified in <xref target="RFC4456">Section 9 of BGP
      RR.</xref></t>
    </abstract>

    <note title="Requirements Language">
      <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
      "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
      "OPTIONAL" in this document are to be interpreted as described in BCP 14
      <xref target="RFC2119">RFC 2119</xref> <xref target="RFC8174">RFC
      8174</xref> when, and only when, they appear in all capitals, as shown
      here.</t>
    </note>
  </front>

  <middle>
    <section title="Introduction">
      <t>The procedures in BGP Route Reflection (RR) spec <xref
      target="RFC4456"/> primarily deal with scenarios where the RR is
      reflecting BGP routes with next hop unchanged.</t>

      <t>These procedures can sometimes result in traffic forwarding loops in
      deployments where the RR is in forwarding path, and is reflecting BGP
      routes with next hop set to self. RR with next hop self is used at ABR
      nodes in Inter-AS Option C (Section 10, <xref target="RFC4364"/>)
      deployments.</t>

      <t>This document specifies approaches to minimize possiblity of such
      traffic forwarding loops. One of those approaches updates path selection
      procedures specified in <xref target="RFC4456">Section 9 of BGP
      RR.</xref></t>
    </section>

    <section title="Terminology">
      <t>ABR: Area Border Router</t>

      <t>AS: Autonomous System</t>

      <t>AFI: Address Family Identifier</t>

      <t>BN: Border Node</t>

      <t>EP: Endpoint, e.g. a loopback address in the network</t>

      <t>MPLS: Multi Protocol Label Switching</t>

      <t>PE: Provider Edge</t>

      <t>SAFI: Subsequent Address Family Identifier</t>
    </section>

    <section title="Avoiding Loops Between Route Reflectors in Forwarding Path">
      <figure anchor="RefTopo" suppress-title="false"
              title="Reference Topology: Inter-domain BGP Transport Network">
        <artwork align="left" xml:space="preserve">
                [RR26]      [RR27]                       [RR16]
                 |            |                             |
                 |            |                             |
                 |+-[ABR23]--+|+--[ASBR21]---[ASBR13]-+|+--[PE11]--+
                 ||          |||          `  /        |||          |
[CE41]--[PE25]--[P28]       [P29]          `/        [P15]     [CE31]
                 |           | |           /`         | |          |
                 |           | |          /  `        | |          |
                 |           | |         /    `       | |          |
                 +--[ABR24]--+ +--[ASBR22]---[ASBR14]-+ +--[PE12]--+


       |      AS2       |         AS2      |                   |
   AS4 +    region-1    +      region-2    +       AS1         + AS3
       |                |                  |                   |


203.0.113.41  ------------ Traffic Direction ----------&gt;  203.0.113.31

</artwork>
      </figure>

      <list>
        <t>A pair of redundant ABRs (ABR23, ABR24 in <xref
        target="RefTopo"/>), each acting as an RR with next hop self, may
        choose each other as best path towards egress PE11, instead of the
        upstream ASBR (ASBR21 or ASBR22), causing a traffic forwarding
        loop.</t>

        <t>This happens because of following the path selection rule specified
        in <xref target="RFC4456">Section 9 of BGP RR</xref> that tie-breaks
        on ORIGINATOR_ID before CLUSTER_LIST. RFC4456 considers pure RR
        functionality which leaves next hop unchanged.</t>

        <t>When a RR inserts itself in forwarding path because of reflecting
        routes with next hop self, as is the case for ABR BNs in an Inter-AS
        Option C (Section 10 <xref target="RFC4364"/>) BGP transport network,
        this rule may cause loops.</t>

        <t>This problem can happen for routes of any BGP address family,
        including BGP LU (1/4 or 2/4) and BGP CT (AFI/SAFIs: 1/76 or
        2/76).</t>

        <t>Using one or more of the following approaches softens the
        possibility of such loops in a network with redundant ABRs.</t>
      </list>

      <section anchor="PathSel" title="Path selection change">
        <list>
          <t>Implementations SHOULD provide a way to alter the tie-breaking
          rule specified in <xref target="RFC4456">Section 9 of BGP RR</xref>
          so as to tie-break on CLUSTER_LIST step before ORIGINATOR_ID step,
          when performing path selection for BGP routes.</t>

          <t>This document suggests the following modification to the BGP
          Decision Process Tie Breaking rules (Section 9.1.2.2 of <xref
          target="RFC4271"/>) that can be applied to path selection of BGP
          routes:</t>

          <t>The following rule SHOULD be inserted between Steps e) and f): a
          BGP Speaker SHOULD prefer a route with the shorter CLUSTER_LIST
          length. The CLUSTER_LIST length is zero if a route does not carry
          the CLUSTER_LIST attribute.</t>
        </list>
      </section>

      <section title="Other mechanisms">
        <list>
          <t>Some other deployment considerations, if feasible, can also help
          in avoiding this problem: <list>
              <t>Configuring the same CLUSTER_ID at the redundant ABR nodes.
              CLUSTER_ID Loop check will make routes reflected by an ABR
              unusable at redundant ABRs.</t>

              <t>IGP metric assignment, such that "ABR to redundant ABR" cost
              is inferior to "ABR to upstream ASBR" cost.</t>

              <t>Using procedures described in <xref target="BGP-CT"/> ,
              tunnels belonging to non 'best effort' Transport Classes not be
              provisioned between ABRs. This will ensure that the BGP CT route
              received from an ABR with next hop self will be unusable at a
              redundant ABR.</t>
            </list></t>
        </list>
      </section>
    </section>

    <section title="Managabeality Considerations">
      <list>
        <t>The path selection change mentioned in <xref target="PathSel"/> can
        be deployed incrementally at the redundant ABRs, since the forwarding
        loop would break when one of the ABRs stops chosing the other as best
        path. Neverthless, it is recommended to consistently provision the
        path selection change on all redundant ABR/RR nodes in a domain. This
        provides consistent route selection at the transport layer ABRs in the
        IBGP domain.</t>

        <t>The operator should carefully consider the overall impact of any of
        these options on a specific network deployment.</t>
      </list>
    </section>

    <section anchor="IANA" title="IANA Considerations">
      <t>This document makes no new requests of IANA.</t>
    </section>

    <section anchor="Security" title="Security Considerations">
      <t>This document does not change the underlying security issues inherent
      in the existing BGP protocol, such as those described in <xref
      target="RFC4271"/>, <xref target="RFC4272"/> and <xref
      target="RFC4456"/>.</t>

      <t>Mehanisms described in this document reduce possibility of loops
      within an IBGP domain. They do not affect routing across EBGP sessions.
      </t>
    </section>
  </middle>

  <back>
    <references title="Normative References">
      <?rfc include="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.4456.xml"?>

      <?rfc include="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"?>

      <?rfc include="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.4271.xml"?>

      <?rfc include="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.4272.xml"?>

      <?rfc include="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"?>
    </references>

    <references title="Informative References">
      <reference anchor="BGP-CT"
                 target="https://datatracker.ietf.org/doc/html/draft-ietf-idr-bgp-ct-16">
        <front>
          <title abbrev="BGP CT">BGP Classful Transport Planes</title>

          <author fullname="Kaliraj Vairavakkalai" initials="" role="editor"
                  surname="Vairavakkalai"/>

          <author fullname="Natarajan Venkataraman" initials="" role="editor"
                  surname="Venkataraman"/>

          <date day="22" month="09" year="2023"/>
        </front>
      </reference>

      <?rfc include="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.4364.xml"?>
    </references>

    <section anchor="Appendix A" numbered="true" title="Appendix">
      <section title="Document History">
        <t>The content in this document was introduced as part of <xref
        target="BGP-CT"/>. But because the described problem is not specific
        to BGP CT and is useful for other BGP families also, it is being
        extracted out to this separate document.</t>
      </section>
    </section>

    <section anchor="Acknowledgements" numbered="false"
             title="Acknowledgements">
      <t>The authors thank Jeff Haas, Jon Hardwick, Keyur Patel, Robert
      Raszuk, Susan Hares for the discussions and review comments.</t>
    </section>
  </back>
</rfc>
