<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" category="std" consensus="true"
docName="draft-lin-idr-interface-index-capability-01"
ipr="trust200902" submissionType="IETF" tocInclude="true" version="3">
  <?v3xml3rf "v3pre1"?>
  <front>
    <title abbrev="Interface Index Capability for BGP">Interface Index Capability for BGP</title>
    <author fullname="Changwang Lin" initials="C." surname="Lin">
      <organization>New H3C Technologies</organization>
      <address>
        <email>linchangwang.04414@h3c.com</email>
      </address>
    </author>
    <author fullname="Kevin Wang" initials="K." surname="Wang">
      <organization>HPE Networking</organization>
      <address>
        <email>kfwang@juniper.net</email>
      </address>
    </author>
    <date year="2026"/>
    <area>Routing</area>
    <workgroup>IDR Working Group</workgroup>
    <keyword>BGP</keyword>
    <keyword>Interface Index</keyword>
    <keyword>Capability</keyword>
    <keyword>Unnumbered Link</keyword>

    <abstract>
      <t>In some scenarios using unnumbered links, it is necessary for the BGP protocol
      to advertise the link's Interface Index and obtain the peer's Remote Interface Index.</t>
      <t>This document defines a new BGP capability, as specified in RFC 5492,
      for advertising local interface indexes and obtaining neighbor interface indexes.</t>
    </abstract>

  </front>
  <middle>
    <section anchor="introduction" numbered="true" title="Introduction">
      <t>Here are several issues that arise when using unnumbered links
      due to BGP's lack of support for interface index.</t>
      <t>Scenario 1: BGP-LS-SPF</t>
      <t>BGP-LS-SPF <xref target="RFC9815"/> is a solution that leverages
      both the BGP protocol <xref target="RFC4271"/> and the BGP-LS extension <xref target="RFC9552"/>.
      In the BGP SPF routing domain, BGP routers collect network-wide topology information
      through the BGP-LS-SPF protocol and perform cross-domain path calculation to compute routes
      using the SPF algorithm. This approach aims to achieve intelligent traffic engineering
      and automated routing optimization in large-scale data center or carrier networks.</t>
      <t>When an IGP protocol advertises an unnumbered link, it uses the local interface index
      and the remote interface index to distinguish between different unnumbered links.</t>
      <t>BGP-LS-SPF reuses the BGP-LS information from the IGP. However, during the deployment of BGP-LS-SPF,
      if the remote interface index is unknown, it may lead to path calculation errors.</t>
      <t>Scenario 2: BGP Egress Peer Engineering (EPE)</t>
      <t>When deploying EPE, the BGP-LS peer link information in EPE is defined as follows
      (see Section 5.2 of <xref target="RFC9086"/>):</t>
      <t>Link Descriptors MUST include the following TLV, as defined in <xref target="RFC9552"/>:</t>
      <ul>
        <li>Link Local/Remote Identifiers (TLV 258) contains the 4-octet Link Local Identifier
        followed by the 4-octet Link Remote Identifier. The value 0 is used by default
        when the link remote identifier is unknown.</li>
      </ul>
      <t>Currently, BGP has no mechanism to obtain the peer's Link Remote Identifier.</t>
      <t>Scenario 3: BGP neighbor monitoring</t>
      <t>During neighbor monitoring, if displaying bidirectional neighbor connectivity,
      without the Link Remote Identifier, the corresponding neighbor relationships
      on both sides cannot be matched.</t>
      <t>Therefore, fundamentally, in unnumbered BGP scenarios,
      BGP peer information should include: local router-id, peer address, peer AS number,
      local interface index, and remote interface index.</t>
      <t>This document defines a new BGP capability, as specified in <xref target="RFC5492"/>,
      for advertising support of the interface index capability, thereby advertising local interface indexes
      and obtaining neighbor interface indexes.</t>
    </section>

    <section anchor="requirements-language" numbered="true" 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"/> <xref target="RFC8174"/>
      when, and only when, they appear in all capitals, as shown here.</t>
    </section>

    <section anchor="terminology" numbered="true" title="Terminology">
      <t>The following terminology is used in this document.</t>
      <ul>
        <li>BGP: Border Gateway Protocol</li>
        <li>EPE: Egress Peer Engineering</li>
        <li>BGP-LS-SPF: BGP Link State Shortest Path First Routing</li>
      </ul>
    </section>

    <section anchor="interface-index-capability" numbered="true" title="Interface Index Capability">
      <t>In the BGP protocol, the OPEN message carries the newly added Interface Index Capability TLV
      to exchange interface index information with neighbors.</t>
      <t>When sending an OPEN message, the Interface Index Capability is included to
      advertise the Interface Index of the interface used to establish the neighbor relationship.</t>
      <t>When receiving an OPEN message, if it contains the Interface Index Capability,
      the peer's Remote Interface Index is saved. If the Interface Index Capability is not carried,
      save the Remote Interface Index as 0.</t>
      <t>The format of the Interface Index Capability is shown in <xref target="fig-interface-index-capability"/>.</t>
      <figure anchor="fig-interface-index-capability" title="Interface Index Capability">
        <artwork><![CDATA[
 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|Cap Code = TBD |Cap Length = 4 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                        Interface Index Value                  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
      </figure>
      <section anchor="error-handling" numbered="true" title="Error Handling">
        <t>A BGP speaker that receives an OPEN message containing the Interface Index Capability
        with a Capability Length (as defined in <xref target="RFC5492"/>) other than 4 MUST treat the capability
        as malformed and ignore it. In this case, the Remote Interface Index of the peer MUST be set to 0,
        and the BGP session SHOULD still be established. An implementation MAY log this condition for further analysis.</t>
        <t>If the Interface Index Value is 0, it indicates that the local interface index of the sender is unknown.
        The receiver MUST treat the Remote Interface Index as 0, and the BGP session SHOULD still be established.</t>
        <t>Per <xref target="RFC5492"/>, a BGP speaker that does not recognize or does not support the Interface Index Capability
        MUST silently ignore it, and the procedures described in this document do not apply to that BGP session.</t>
      </section>
    </section>

    <section anchor="iana-considerations" numbered="true" title="IANA Considerations">
      <t>A new BGP Capability named "Interface Index Capability" will be requested
      from the "Capability Codes" registry within the "IETF Review" range <xref target="RFC5492"/>.</t>
      <table anchor="tab-capability-codes">
        <name>Capability Codes</name>
        <thead>
          <tr>
            <th>Code Point</th>
            <th>Description</th>
            <th>Reference</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td>TBD</td>
            <td>Interface Index Capability</td>
            <td>This document</td>
          </tr>
        </tbody>
      </table>
    </section>

    <section anchor="security-considerations" numbered="true" title="Security Considerations">
      <t>This document defines a new BGP capability that is carried in the OPEN message
      as specified in <xref target="RFC5492"/>; it does not introduce any new BGP messages
      or modify the BGP finite state machine.</t>
      <t>The Interface Index carried in this capability is not considered sensitive information,
      as it is already advertised by the routing protocols of the local node
      (e.g., via the Link Local/Remote Identifiers TLV in BGP-LS <xref target="RFC9552"/>).
      However, a malicious BGP peer could advertise an incorrect Interface Index,
      which could mislead the receiver in scenarios such as those described in <xref target="introduction"/>
      (e.g., causing mismatches when correlating bidirectional neighbor relationships
      or computing paths over unnumbered links).</t>
      <t>This document does not introduce any new mechanisms to protect the BGP session
      beyond those that already exist. Existing mechanisms to protect BGP sessions,
      such as the Generalized TTL Security Mechanism (GTSM) <xref target="RFC5082"/>
      and the TCP Authentication Option (TCP-AO) <xref target="RFC5925"/>,
      SHOULD be used to protect the integrity of the BGP session.</t>
    </section>
  </middle>
  <back>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
        <reference anchor="RFC2119" target="https://www.rfc-editor.org/info/rfc2119">
        <front>
          <title>Key words for use in RFCs to Indicate Requirement Levels</title>
          <author initials="S." surname="Bradner"/>
          <date month="March" year="1997"/>
        </front>
      </reference>
      <reference anchor="RFC4271" target="https://www.rfc-editor.org/info/rfc4271">
        <front>
          <title>A Border Gateway Protocol 4 (BGP-4)</title>
          <author initials="Y." surname="Rekhter"/>
          <author initials="T." surname="Li" role="editor"/>
          <author initials="S." surname="Hares" role="editor"/>
          <date month="January" year="2006"/>
        </front>
      </reference>
      <reference anchor="RFC5492" target="https://www.rfc-editor.org/info/rfc5492">
        <front>
          <title>Capabilities Advertisement with BGP-4</title>
          <author initials="J." surname="Scudder">
            <organization>Juniper Networks</organization>
          </author>
          <author initials="R." surname="Chandra">
            <organization>Sonoa Systems</organization>
          </author>
          <date month="February" year="2009"/>
        </front>
      </reference>
      <reference anchor="RFC8174" target="https://www.rfc-editor.org/info/rfc8174">
        <front>
          <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
          <author initials="B." surname="Leiba"/>
          <date month="May" year="2017"/>
        </front>
      </reference>
        </references>
        <references>
          <name>Informative References</name>
      <reference anchor="RFC5082" target="https://www.rfc-editor.org/info/rfc5082">
            <front>
              <title>The Generalized TTL Security Mechanism (GTSM)</title>
              <author initials="V." surname="Gill"/>
              <author initials="J." surname="Heasley"/>
              <author initials="D." surname="Meyer"/>
              <author initials="P." surname="Savola" role="editor"/>
              <date month="October" year="2007"/>
            </front>
          </reference>
          <reference anchor="RFC5925" target="https://www.rfc-editor.org/info/rfc5925">
            <front>
              <title>The TCP Authentication Option</title>
              <author initials="J." surname="Touch"/>
              <author initials="A." surname="Mankin"/>
              <author initials="R." surname="Bonica"/>
              <date month="June" year="2010"/>
            </front>
          </reference>
          <reference anchor="RFC9086" target="https://www.rfc-editor.org/info/rfc9086">
            <front>
              <title>Border Gateway Protocol - Link State (BGP-LS) Extensions for Segment Routing BGP Egress Peer Engineering</title>
              <author initials="S." surname="Previdi"/>
              <author initials="K." surname="Talaulikar" role="editor"/>
              <author initials="C." surname="Filsfils"/>
              <author initials="K." surname="Patel"/>
              <author initials="S." surname="Ray"/>
              <author initials="J." surname="Dong"/>
              <date month="August" year="2021"/>
            </front>
          </reference>
          <reference anchor="RFC9552" target="https://www.rfc-editor.org/info/rfc9552">
            <front>
              <title>Distribution of Link-State and Traffic Engineering Information Using BGP</title>
              <author initials="K." surname="Talaulikar" role="editor">
                <organization>Cisco Systems</organization>
              </author>
              <date month="December" year="2023"/>
            </front>
          </reference>
          <reference anchor="RFC9815" target="https://www.rfc-editor.org/info/rfc9815">
            <front>
              <title>BGP Link State (BGP-LS) Shortest Path First (SPF) Routing</title>
              <author initials="K." surname="Patel">
                <organization>Arrcus, Inc.</organization>
              </author>
              <author initials="A." surname="Lindem">
                <organization>Arrcus, Inc.</organization>
              </author>
              <author initials="S." surname="Zandi">
                <organization>Arrcus, Inc.</organization>
              </author>
              <author initials="W." surname="Henderickx">
                <organization>Nokia</organization>
              </author>
              <date month="July" year="2025"/>
            </front>
          </reference>
        </references>
      </references>
  </back>
</rfc>
