<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
<!-- generated by https://github.com/cabo/kramdown-rfc version 1.7.39 (Ruby 3.2.3) -->
<?rfc comments="yes"?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-lin-idr-bgp-ecmp-ebgp-enhancements-00" category="std" consensus="true" submissionType="IETF" updates="5004" tocInclude="true" sortRefs="true" symRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.34.0 -->
  <front>
    <title abbrev="BGP ECMP EBGP Enhancements">BGP Enhancements for ECMP EBGP Scenarios</title>
    <seriesInfo name="Internet-Draft" value="draft-lin-idr-bgp-ecmp-ebgp-enhancements-00"/>
    <author initials="C." surname="Lin" fullname="Changwang Lin">
      <organization>New H3C Technologies</organization>
      <address>
        <postal>
          <country>China</country>
        </postal>
        <email>linchangwang.04414@h3c.com</email>
      </address>
    </author>
    <date year="2026" month="July" day="06"/>
    <area>Routing</area>
    <workgroup>IDR Working Group</workgroup>
    <keyword>EBGP, BGP, enhancement, Parallel, extension, ECMP</keyword>
    <abstract>
      <?line 44?>

<t>This document proposes extensions to BGP to apply the RFC 5004 route persistence
   algorithm across parallel EBGP sessions and to suppress unnecessary advertisements
   between EBGP peers in the same AS.</t>
      <t>This document updates RFC 5004.</t>
    </abstract>
  </front>
  <middle>
    <?line 52?>

<section anchor="introduction">
      <name>Introduction</name>
      <t>In Spine-Leaf topologies of data center or AI network, devices frequently establish
   multiple parallel EBGP sessions to build Equal-Cost Multi-Path (ECMP) for redundancy
   and increased capacity, as shown in <xref target="fig-sl-mp-network"/>.</t>
      <t>In <xref target="fig-sl-mp-network"/>, Spine belongs to AS 100; Leaf1 through Leaf8 belong to
   AS 1 through 8 respectively. Spine has multiple parallel links with Leaf1 through
   Leaf8, and establishes multiple parallel EBGP sessions with each of Leaf1 through
   Leaf8. External path (a) is sent to Leaf1 through Leaf8 respectively.</t>
      <figure anchor="fig-sl-mp-network">
        <name>Spine-Leaf Network with Multiple Parallel EBGP Sessions</name>
        <artwork type="ascii-art"><![CDATA[
            +---------------------------------------+
            |AS 100          +-------+              |
            |      +---------|       |-----------+  |
            |      | +-------|       |---------+ |  |
            |      | | +-----| Spine |-------+ | |  |
            |      | | | +---|       |-----+ | | |  |
            |      | | | |   +-------+     | | | |  |
            |      | | | |                 | | | |  |
            +------|-|-|-|-----------------|-|-|-|--+
                   | | | |                 | | | |
            +------|-|-|-|--+       +------|-|-|-|--+
            |AS 1 +-------+ |       |AS 8 +-------+ |
            |     | Leaf1 | |  ...  |     | Leaf8 | |
            |     +-------+ |   |   |     +-------+ |
            +-------------\-+   |   +-----/---------+
                           \    |      /
                            \   |   /
                               (a)
]]></artwork>
      </figure>
      <t><xref target="RFC5004"/> defines a mechanism to retain the current best path when a route
   is re-advertised by another EBGP peer without changes, thus improving
   the overall network stability. However, this mechanism does not apply
   across parallel sessions, which can lead to frequent best path oscillations
   in data center or AI network environments.</t>
      <t>Additionally, in such multiple-session configurations, a prefix received
   from one EBGP peer may be re-advertised to another EBGP peer in the same AS.
   This is unnecessary and increases network load.</t>
      <t>This document specifies an extension to <xref target="RFC5004"/> to apply route persistence algorithm
   cross parallel EBGP sessions, and a new advertisement rule to prevent
   sending a prefix to an EBGP peer if that prefix was originally received
   from another EBGP peer in the same AS.</t>
    </section>
    <section anchor="terminology">
      <name>Terminology</name>
      <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"/> <xref target="RFC8174"/> when, and only when, they appear in all
   capitals, as shown here.</t>
    </section>
    <section anchor="problem-statement">
      <name>Problem Statement</name>
      <section anchor="best-path-persistence-across-parallel-ebgp-sessions">
        <name>Best Path Persistence Across Parallel EBGP Sessions</name>
        <t>In a Spine-Leaf network using parallel EBGP sessions, Spine devices
   receive the same prefix from multiple Leaf peers through different
   BGP sessions. Since the path persistence algorithm defined in <xref target="RFC5004"/>
   does not apply to scenarios with identical BGP identifiers (i.e., parallel sessions),
   the best path will be reselected based on the comparison of peer addresses
   when the same route is received from another parallel peer. This can lead to
   unnecessary best path churn and may cause persistent routing oscillations.</t>
      </section>
      <section anchor="redundant-advertisement-to-same-as-ebgp-peers">
        <name>Redundant Advertisement to Same-AS EBGP Peers</name>
        <t>When a BGP speaker receives a prefix from an EBGP peer and then re-advertises
   it to another EBGP peer in the same AS, it creates unnecessary advertisement and overhead
   due to the AS_PATH loop detection.
   In multiple EBGP sessions topologies, this can occur frequently and SHOULD be avoided.</t>
      </section>
    </section>
    <section anchor="proposed-solutions">
      <name>Proposed Solutions</name>
      <section anchor="route-selection-extension-for-parallel-ebgp-sessions">
        <name>Route Selection Extension for Parallel EBGP Sessions</name>
        <t>To address unnecessary best path churn, the BGP speaker SHOULD maintain best path
   persistence state for each prefix across all parallel EBGP sessions to the same peer AS.
   When a new UPDATE for the same prefix is received from any parallel EBGP peer, the speaker SHOULD
   compare it with the current best path using the extended algorithm:</t>
        <ul spacing="normal">
          <li>
            <t>If the new route remains equivalent to the current best path before BGP identifier comparison,
and both routes are received from peers that are identified as belonging to the same set of
parallel EBGP sessions, the current best path SHOULD be retained, regardless of which parallel
EBGP peer advertised it.</t>
          </li>
          <li>
            <t>This persistence state SHOULD be reset only if the route selection attributes change or
the route is withdrawn.</t>
          </li>
        </ul>
        <t>This mechanism requires the BGP speaker to be able to identify parallel EBGP sessions.
   Such identification MAY be based on explicit configuration or MAY be derived automatically
   by detecting that multiple EBGP peers share the same BGP Identifier.</t>
      </section>
      <section anchor="suppression-of-redundant-advertisement-to-same-as-ebgp-peers">
        <name>Suppression of Redundant Advertisement to Same-AS EBGP Peers</name>
        <t>Before advertising a prefix to an EBGP peer, the BGP speaker SHOULD check
   the AS_PATH of the prefix as stored in its Adj-RIB-In. If the first AS
   in the AS_PATH matches the peer's AS (indicating the prefix was originally
   received from that AS via another EBGP session), the speaker SHOULD NOT
   advertise the prefix to that peer.</t>
        <t>This check prevents unnecessary propagation of the prefix back into the same
   AS via a different EBGP session.</t>
      </section>
    </section>
    <section anchor="protocol-changes">
      <name>Protocol Changes</name>
      <section anchor="bgp-path-selection-modification">
        <name>BGP Path Selection Modification</name>
        <t>Base on the best path persistence algorithm defined in <xref target="RFC5004"/>,
   a new step is also added before BGP identifier comparison (Section 9.1.2.2 of <xref target="RFC4271"/>)
   of the best path selection process:</t>
        <artwork><![CDATA[
 "If the speaker supports the parallel-session persistence
  extension defined in this document, and if a new route is
  received from a peer that is identified as part of a set of
  parallel EBGP sessions, and this new route is determined to be
  equivalent to the current best path prior to the comparison of
  BGP Identifiers, and the current best path was also received
  from a peer within the same set of parallel sessions, then the
  speaker MUST retain the current best path and SHALL NOT select
  a new best path."
]]></artwork>
      </section>
      <section anchor="advertisement-filtering-rule">
        <name>Advertisement Filtering Rule</name>
        <t>During the process of route advertisement, prior to transmitting an UPDATE message
   to a peer, a BGP speaker SHOULD apply the following rule:</t>
        <t>When advertising a prefix to an EBGP peer, if the first AS in the prefix's AS_PATH
   equals the peer's own AS number, the BGP speaker SHOULD NOT advertise that prefix to the peer.</t>
      </section>
    </section>
    <section anchor="implementation-considerations">
      <name>Implementation Considerations</name>
      <t>Implementations SHOULD provide a configuration option to enable/disable:</t>
      <ul spacing="normal">
        <li>
          <t>Route Selection Extension for Parallel EBGP Sessions.</t>
        </li>
        <li>
          <t>Same-AS EBGP advertisement suppression.</t>
        </li>
      </ul>
      <t>Defaults MAY be vendor-specific but SHOULD favor enabling these features
   in network with multiple Parallel EBGP sessions.</t>
    </section>
    <section anchor="security-considerations">
      <name>Security Considerations</name>
      <t>These extensions defined in this document affect route stability and
   advertisement scope but do not introduce new security threats
   beyond those inherent in BGP.</t>
      <t>Operators SHOULD ensure that parallel session detection is correctly
   configured to avoid incorrect route persistence.</t>
    </section>
    <section anchor="iana-considerations">
      <name>IANA Considerations</name>
      <t>This document has no IANA requirements.</t>
    </section>
  </middle>
  <back>
    <references anchor="sec-normative-references">
      <name>Normative References</name>
      <reference anchor="RFC2119" target="https://www.rfc-editor.org/info/rfc2119" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml">
        <front>
          <title>Key words for use in RFCs to Indicate Requirement Levels</title>
          <author fullname="S. Bradner" initials="S." surname="Bradner"/>
          <date month="March" year="1997"/>
          <abstract>
            <t>In many standards track documents several words are used to signify the requirements in the specification. These words are often capitalized. This document defines these words as they should be interpreted in IETF documents. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
          </abstract>
        </front>
        <seriesInfo name="BCP" value="14"/>
        <seriesInfo name="RFC" value="2119"/>
        <seriesInfo name="DOI" value="10.17487/RFC2119"/>
      </reference>
      <reference anchor="RFC4271" target="https://www.rfc-editor.org/info/rfc4271" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4271.xml">
        <front>
          <title>A Border Gateway Protocol 4 (BGP-4)</title>
          <author fullname="Y. Rekhter" initials="Y." role="editor" surname="Rekhter"/>
          <author fullname="T. Li" initials="T." role="editor" surname="Li"/>
          <author fullname="S. Hares" initials="S." role="editor" surname="Hares"/>
          <date month="January" year="2006"/>
          <abstract>
            <t>This document discusses the Border Gateway Protocol (BGP), which is an inter-Autonomous System routing protocol.</t>
            <t>The primary function of a BGP speaking system is to exchange network reachability information with other BGP systems. This network reachability information includes information on the list of Autonomous Systems (ASes) that reachability information traverses. This information is sufficient for constructing a graph of AS connectivity for this reachability from which routing loops may be pruned, and, at the AS level, some policy decisions may be enforced.</t>
            <t>BGP-4 provides a set of mechanisms for supporting Classless Inter-Domain Routing (CIDR). These mechanisms include support for advertising a set of destinations as an IP prefix, and eliminating the concept of network "class" within BGP. BGP-4 also introduces mechanisms that allow aggregation of routes, including aggregation of AS paths.</t>
            <t>This document obsoletes RFC 1771. [STANDARDS-TRACK]</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="4271"/>
        <seriesInfo name="DOI" value="10.17487/RFC4271"/>
      </reference>
      <reference anchor="RFC5004" target="https://www.rfc-editor.org/info/rfc5004" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5004.xml">
        <front>
          <title>Avoid BGP Best Path Transitions from One External to Another</title>
          <author fullname="E. Chen" initials="E." surname="Chen"/>
          <author fullname="S. Sangli" initials="S." surname="Sangli"/>
          <date month="September" year="2007"/>
          <abstract>
            <t>In this document, we propose an extension to the BGP route selection rules that would avoid unnecessary best path transitions between external paths under certain conditions. The proposed extension would help the overall network stability, and more importantly, would eliminate certain BGP route oscillations in which more than one external path from one BGP speaker contributes to the churn. [STANDARDS-TRACK]</t>
          </abstract>
        </front>
        <seriesInfo name="RFC" value="5004"/>
        <seriesInfo name="DOI" value="10.17487/RFC5004"/>
      </reference>
      <reference anchor="RFC8174" target="https://www.rfc-editor.org/info/rfc8174" xml:base="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml">
        <front>
          <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
          <author fullname="B. Leiba" initials="B." surname="Leiba"/>
          <date month="May" year="2017"/>
          <abstract>
            <t>RFC 2119 specifies common key words that may be used in protocol specifications. This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the defined special meanings.</t>
          </abstract>
        </front>
        <seriesInfo name="BCP" value="14"/>
        <seriesInfo name="RFC" value="8174"/>
        <seriesInfo name="DOI" value="10.17487/RFC8174"/>
      </reference>
    </references>
  </back>
  <!-- ##markdown-source:
H4sIAAAAAAAAA51Z73PbuBH9zr8Ck3xo0og6O5fO5dTpTBXHd/FMnLiWMzed
XqcDkZCFhiJ4AGifGrt/e98uQBKUZF+u8tjmD2CxeLt4+wDleZ4VptT19Uy0
fpW/zjKvfaVm4s2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