<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
  <!ENTITY RFC2119 SYSTEM "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml">
  <!ENTITY RFC3629 SYSTEM "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.3629.xml">
  <!ENTITY RFC4271 SYSTEM "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.4271.xml">
  <!ENTITY RFC4272 SYSTEM "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.4272.xml">
  <!ENTITY RFC5082 SYSTEM "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5082.xml">
  <!ENTITY RFC5492 SYSTEM "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5492.xml">
  <!ENTITY RFC6973 SYSTEM "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6973.xml">
  <!ENTITY RFC7942 SYSTEM "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.7942.xml">
  <!ENTITY RFC8174 SYSTEM "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml">
  <!ENTITY RFC9072 SYSTEM "http://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.9072.xml">
]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<?rfc strict="yes" ?>
<?rfc toc="yes"?>
<?rfc tocdepth="4"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes" ?>
<?rfc compact="yes" ?>
<?rfc subcompact="no" ?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" category="info" docName="draft-abraitis-bgp-version-capability-18" ipr="trust200902" consensus="true" obsoletes="" updates="" submissionType="IETF" xml:lang="en" tocInclude="true" tocDepth="4" symRefs="true" sortRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.12.8 -->
  <front>
    <title abbrev="Software Version Capability for BGP">Software Version Capability for BGP</title>
    <seriesInfo name="Internet-Draft" value="draft-abraitis-bgp-version-capability-18"/>
    <author fullname="Donatas Abraitis" surname="Abraitis">
      <organization>Hostinger</organization>
      <address>
        <email>donatas.abraitis@gmail.com</email>
      </address>
    </author>
    <date year="2025"/>
    <area>Routing</area>
    <workgroup>Inter-Domain Routing</workgroup>
    <keyword>template</keyword>
    <abstract>
      <t>
        In this document, we introduce a new BGP capability that allows the
        advertisement of a BGP speaker's routing software version.
      </t>
      <t>
        This BGP capability is an optional advertisement. Implementations are
        not required to advertise the version nor to process received
        advertisements.
      </t>
    </abstract>
  </front>
  <middle>
    <section>
      <name>Introduction</name>
      <t>
        In modern data center designs, conventional routers
        participating in routing. These routers may have
        different versions of routing software. Knowing which
        versions of the routing software that are running on the various routers in the
        network can be a crucial factor in quickly identifying the root cause
        of protocol or network problems.
      </t>
      <t>
	This document specifies a BGP capability that carries the routing
	software version.
        This BGP capability is a optional. Implementations are
        not required to advertise their software version nor to process it on
	receipt.
      </t>
      <t>
        Information about the version of the routing software could also be exchanged
        in protocols such as LLDP and CDP. However, in containerized environments,
	<!-- XXX JMH - is it necessary to more rigorously define containerized?  -->
        it is difficult and not recommended to exchange this information between
        background processes. To assist in minimizing operational costs, it
        is helpful to exchange the routing software versions between BGP peers directly.
      </t>
    </section>
    <section anchor="simple_list">
      <name>Specification of Requirements</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>
      <name>Software Version Capability</name>
      <t>
        Although this document is not an IETF Standards Track document, it
        makes use of the terminology from BCP 14 in order to clearly state
        the implementation behaviors.
      </t>
      <t>
        BGP capability advertisement is defined in <xref target="RFC5492"/>.
        BGP Capabilities contain
        one or more triples &lt;Capability Code, Capability Length, Capability Value&gt;.
        This document defines a new BGP capability, the Software Version Capability,
        with Capability Code 75 and Capability Length and Capability Value
        as described below.
      </t>
      <t>
        The inclusion of the Software Version Capability is OPTIONAL. If an
        implementation supports the inclusion of the capability, the
        implementation MUST include a configuration option to enable or
        disable its use, and MUST default to disabled.
      </t>
      <t>
        The Software Version Capability is intended for environments where more visibility
        is needed for troubleshooting purposes. It is NOT RECOMMENDED for use
        outside a single Autonomous System, or a set of Autonomous Systems under
        a common administration.
      </t>
      <t>
        An implementation that does not recognize or support the Software Version
        Capability but receives one must ignore it, as described in <xref
	target="RFC5492" section="3"/>.
      </t>
      <t>
        The triple for the Software Version Capability is as follows:
      </t>
      <t>
        Capability Code
      </t>
      <ul empty="true" spacing="normal">
        <li>
          75
        </li>
      </ul>
      <t>Capability Length</t>
      <ul empty="true" spacing="normal">
        <li>
          Capability Length is a one-octet unsigned binary integer that
          contains the length of the Capability Value field in octets.
        </li>
        <li>
          The Capability Length for the Software Version Capability MUST
          be greater than zero. A value of zero SHALL be treated
          as an encoding error and the Capability MUST be ignored.
        </li>
        <li>
          The Capability Length SHOULD be no greater than 64. This length
          leaves space for other capabilities.
        </li>
      </ul>
      <t>Capability Value</t>
      <ul empty="true" spacing="normal">
        <li>
          The Capability Value field is the software version encoded as a UTF-8 <xref
	  target="RFC3629"/> string.
          It is unstructured data and can be formatted in any way that the
          implementor decides. The string is not null-terminated.
        </li>
      </ul>
      <t>
        Version:
      </t>
      <ul empty="true" spacing="normal">
        <li>
            The Version field MUST be encoded using UTF-8. A receiving BGP speaker
            MUST NOT interpret invalid UTF-8 sequences.
	    <!-- XXX JMH - see security considerations for RFC 9003 and decide
	    how you think they should be integrated -->
          </li>
        <li>
            The value consists of one identifier, which identifies
            the software and its significant version. Software version identifier consists of
            a product and optional product version.
          </li>
        <li>
            identifier = product ["/" product-version]
          </li>
        <li>
            A sender SHOULD limit generated product identifiers to what is
            necessary to identify the product; a sender MUST NOT generate
            advertising or other nonessential information within the product
            identifier.  A sender SHOULD NOT generate information in
            product-version that is not a version identifier (i.e., successive
            versions of the same product name ought to differ only in the
            product-version portion of the product identifier).
          </li>
        <li>Example:</li>
        <li>frrouting/8.4.2, ios/12.5.1, junos/12.1</li>
      </ul>
      <section>
        <name>Capabilities Length Overflow</name>
        <t>
          As defined in [RFC5492] the total length of capabilities that can be
          carried by the BGP Capabilities Optional Parameter is 255 bytes. If an
          implementation is constructing a BGP Capabilities Optional Parameter
          and its length exceeds 255 bytes, there is not enough space for other
          more important capabilities.
	</t>
	<t>
	  Implementations of this specification are REQUIRED Extended Optional
          Parameters Length for BGP OPEN Message support as defined in <xref target="RFC9072"/>.
        </t>
        <t>
	  <!-- XXX JMH - I'm not 100% sure what you're trying to say here. -->
          A rogue node can prevent the proper operation of a BGP session, or the
          advertisement of other Capabilities, by not excluding the Software Version
          Capability as required in Section 3.1. This risk is equivalent to a rogue
          node simply not advertising a specific Capability and is not new to BGP.
        </t>
      </section>
    </section>
    <section>
      <name>Operation</name>
      <t>
        The Software Version Capability MUST only be used for displaying the version
        of a BGP speaker's router daemon to make troubleshooting easier.
      </t>
      <t>
        Consider a group of routers each with a number of upstream nodes, and
        suppose that each router has a different operating system and
        different routing software at a different installed version.  Assuming
        that a specific feature is not working or that there is a bug which
        has not been fixed in a particular version of the code, knowledge of
        the routing daemon versions would allow an operator to quickly
        identify the pattern of which versions are affected.
      </t>
      <t>
        Enabling (i.e., turning on) this capability requires bouncing all
        existing BGP sessions and the feature MUST be explicitly configured
        before an implementation advertizes the Software Version Capability.
      </t>
    </section>
    <section anchor="IANA">
      <name>IANA Considerations</name>
      <t>
        IANA has assigned capability number 75 for the Software Version Capability
        described in this document. This registration is in the BGP Capability Codes
        registry.
      </t>
      <table anchor="table_ex">
        <name>Software Version Capability</name>
        <thead>
          <tr>
            <th align="center">Value</th>
            <th align="center">Description</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td align="center">75</td>
            <td align="center">Software Version Capability</td>
          </tr>
        </tbody>
      </table>
    </section>
    <section anchor="Security">
      <name>Security Considerations</name>
      <t>
        The Software Version Capability should be treated as sensitive information: it
        could be easier for an attacker to exploit the system if they know the
        specific software version and manufacturer of a BGP speaker. This
        information could be gathered by inspecting BGP OPEN messages that carry
        the Software Version Capability defined in this document. Furthermore, this
        knowledge may facilitate a number of social-engineering attacks.
      </t>
      <t>
        Modifying the information advertised by a router might lead to attacks
        including bogus software upgrades and also might mask the causes of
        faults in the network.
      </t>
      <t>
        Users of this mechanism should be aware that unless a transport that
        provides integrity is used for the BGP session in question, the Software Version
        Capability can be forged. Unless a transport that provides
        confidentiality is used, the Version Capability could be snooped by an
        attacker. These issues are common to any BGP message but may be of
        greater interest in the context of this extension as explained above.
        Refer to the related considerations in <xref target="RFC4271"/> and
        <xref target="RFC4272"/>.
      </t>
      <t>
        Users of this mechanism should consider applying data minimization
        practices as outlined in Section 6.1 of <xref target="RFC6973"/>, as
        appropriate within the deployment context.
      </t>
      <t>
        Sensitive information leaks can be minimized by using the Generalized
	TTL security mechanism <xref target="RFC5082"/>
        or firewalls to filter out TCP 179 port from untrusted networks.
        This capability should be enabled per neighbor, thus limiting the
	disclosure of sensitive information to trusted neighbors.
      </t>
    </section>
    <section anchor="Acknowledgements" numbered="false">
      <name>Acknowledgements</name>
      <t>
        Thanks to Alvaro Retana, Jakob Heitz, Robert Raszuk, Adrian Farrel, John Scudder,
        Jeffrey Haas, Enke Chen for the review, discussions and input to the draft.
      </t>
    </section>
  </middle>
  <back>
    <references>
      <name>References</name>
      <references title="Normative References">
        &RFC2119;
        &RFC3629;
        &RFC4271;
        &RFC4272;
        &RFC5082;
        &RFC5492;
        &RFC6973;
        &RFC7942;
        &RFC8174;
        &RFC9072;
      </references>
    </references>
    <section title="Implementation Report">
      <t>
        According to <xref target="RFC7942" format="default"/>, "This will allow reviewers and working groups to assign
        due consideration to documents that have the benefit of running code, which may
        serve as evidence of valuable experimentation and feedback that have made the
        implemented protocols more mature".
      </t>
      <t>
        <eref target="https://github.com/FRRouting/frr/commit/c4257900c4ca320117bcd1f88b7f036e0c8f7fcb">FRRouting</eref> implementation.
      </t>
      <t>
        <eref target="https://github.com/osrg/gobgp/pull/2622/commits/15f9d5c64c98d1db273cc45e95fcc11843fba4b5">GoBGP</eref> implementation.
      </t>
      <t>
        <eref target="https://github.com/mc36/freeRtr/commit/eb5d3490aec220ad8bfcbf1f439669bd27845199">freeRouter</eref> implementation.
      </t>
      <t>
        <eref target="https://github.com/Exa-Networks/exabgp/pull/1223/commits/d21e432c98ec9cbe1de2e471ecf7326170d7f176">ExaBGP</eref> implementation.
      </t>
      <t>
        Below is an example from the FRRouting and GoBGP implementations
        showing both the received and advertised Software Version Capability:
      </t>
      <figure anchor="frr_failed">
        <artwork align="left"><![CDATA[
  :~# vtysh -c 'show ip bgp summary failed'
  ...
  Neighbor EstdCnt DropCnt ResetTime Reason
  ens192         3       3  00:00:35 Waiting for peer OPEN (n/a)
  ens224         3       3  00:01:12 Waiting for NHT (frrouting/7.2)
  eth0           3       3  00:00:14 Neighbor deleted (frrouting/7.3)
  ...
              ]]></artwork>
      </figure>
      <figure anchor="gobgp_versions">
        <artwork align="left"><![CDATA[
        software-version:   advertised and received
          Local:
             GoBGP/3.10.0
          Remote:
             FRRouting/8.5-dev-MyOwnFRRVersion-gdc92f44a4
              ]]></artwork>
      </figure>
      <figure anchor="frr_version">
        <artwork align="left"><![CDATA[
  :~# vtysh -c 'show ip bgp neighbors 198.51.100.1 json' \
  > | jq '."198.51.100.1".neighborCapabilities.versions'
  {
    "advertisedVersion": "frrouting/7.2",
    "receivedVersion": "frrouting/7.3"
  }
            ]]></artwork>
      </figure>
    </section>
  </back>
</rfc>
