<?xml version="1.0" encoding="US-ASCII"?>
<!-- This template is for creating an Internet Draft using xml2rfc,
     which is available here: http://xml.resource.org. -->
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!-- One method to get references from the online citation libraries.
     There has to be one entity for each item to be referenced.
     An alternate method (rfc include) is described in the references. -->

<!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC2629 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2629.xml">
<!ENTITY RFC3552 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3552.xml">
<!ENTITY RFC8174 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8174.xml">
<!ENTITY RFC5492 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5492.xml">
<!ENTITY RFC5082 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5082.xml">
]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<!-- used by XSLT processors -->
<!-- For a complete list and description of processing instructions (PIs),
     please see http://xml.resource.org/authoring/README.html. -->
<!-- Below are generally applicable Processing Instructions (PIs) that most I-Ds might want to use.
     (Here they are set differently than their defaults in xml2rfc v1.32) -->
<?rfc strict="yes" ?>
<!-- give errors regarding ID-nits and DTD validation -->
<!-- control the table of contents (ToC) -->
<?rfc toc="yes"?>
<!-- generate a ToC -->
<?rfc tocdepth="4"?>
<!-- the number of levels of subsections in ToC. default: 3 -->
<!-- control references -->
<?rfc symrefs="yes"?>
<!-- use symbolic references tags, i.e, [RFC2119] instead of [1] -->
<?rfc sortrefs="yes" ?>
<!-- sort the reference entries alphabetically -->
<!-- control vertical white space
     (using these PIs as follows is recommended by the RFC Editor) -->
<?rfc compact="yes" ?>
<!-- do not start each main section on a new page -->
<?rfc subcompact="no" ?>
<!-- keep one blank line between list items -->
<!-- end of list of popular I-D processing instructions -->
<rfc category="info" docName="draft-abraitis-bgp-version-capability-05" ipr="trust200902">
  <!-- category values: std, bcp, info, exp, and historic
     ipr values: full3667, noModification3667, noDerivatives3667
     you can add the attributes updates="NNNN" and obsoletes="NNNN"
     they will automatically be output with "(if approved)" -->

  <!-- ***** FRONT MATTER ***** -->

  <front>
    <!-- The abbreviated title is used in the page header - it is only necessary if the
         full title is longer than 39 characters -->

    <title abbrev="Version Capability for BGP">Version Capability for BGP</title>

    <!-- add 'role="editor"' below for the editors if appropriate -->

    <!-- Another author who claims to be an editor -->

    <author fullname="Donatas Abraitis" initials="D.Abraitis" surname="Abraitis">
      <organization>Hostinger</organization>

      <address>
        <postal>
          <street>Jonavos g. 60C</street>

          <!-- Reorder these if your country does things differently -->

          <city>Kaunas</city>

          <region></region>

          <code>44192</code>

          <country>LT</country>
        </postal>

        <phone>+370 614 18958</phone>

        <email>donatas.abraitis@hostinger.com</email>

        <!-- uri and facsimile elements may also be added -->
      </address>
    </author>

    <date month="March" year="2020" />

    <!-- If the month and year are both specified and are the current ones, xml2rfc will fill
         in the current day for you. If only the current year is specified, xml2rfc will fill
	 in the current day and month for you. If the year is not the current one, it is
	 necessary to specify at least a month (xml2rfc assumes day="1" if not specified for the
	 purpose of calculating the expiry date).  With drafts it is normally sufficient to
	 specify just the year. -->

    <!-- Meta-data Declarations -->

    <area>General</area>

    <!-- WG name at the upperleft corner of the doc,
         IETF is fine for individual submissions.
	 If this element is not present, the default is "Network Working Group",
         which is used by the RFC Editor as a nod to the history of the IETF. -->

    <keyword>template</keyword>

    <!-- Keywords will be incorporated into HTML output
         files in a meta tag but they have no effect on text or nroff
         output. If you submit your draft to the RFC Editor, the
         keywords will be used for the search engine. -->

    <abstract>
      <t>
        In this document, we introduce a new BGP capability that allows the
        advertisement of a BGP speaker's version.
      </t>
    </abstract>
  </front>

  <middle>
    <section title="Introduction">
      <t>
        In modern data center designs, we tend to have conventional hosts participating in the routing process.
        And the fleet of hosts has different versions of routing daemon.
        This means that troubleshooting is a crucial part to quickly identify the root cause.
        This document introduces the new BGP capability to advertise the version of the routing daemon.
      </t>
    </section>

    <section anchor="simple_list" title="Specification of Requirements">
      <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 [RFC2119] [RFC8174] when, and only when, they appear in all
        capitals, as shown here.
      </t>
    </section>

    <section title="Version Capability">
    <t>
      The Version Capability is a new BGP capability [RFC5492].
      The implementation is specific to the vendor. The version is
      unstructured and can be defined in any format the vendor decides.
    </t>
    <t>
      The length of the version SHOULD be limited to 64 bytes. This is the
      limit to allow other capabilities as much space as they require.
      The version MUST NOT be empty.
    </t>
    <t>
      This capability is OPTIONAL. The vendor MUST implement a capability
      switch to enable or disable it.
    </t>
    <t>
      In case you reached 255 bytes of capabilities, you can disable this
      capability. The capability is designed more to non-production
      environments where you need more visibility for troubleshooting purposes.
      It's RECOMMENDED to turn it only inside a single Autonomous System
      domain or Autonomous System Confederations.
    </t>
    <t>
      Such protocols like LLDP, CDP can provide the same information as well,
      but in containerized environments, it's very hard and NOT RECOMMENDED
      run background processes. To minimize operational costs it would help
      having all the necessary information in place.
    </t>
      <figure align="center" anchor="version_capability">
        <artwork align="left"><![CDATA[
                +--------------------------------+
                |    Version Length (1 octet)    |
                +--------------------------------+
                |      Version (variable)        |
                +--------------------------------+
            ]]></artwork>
      </figure>
      <t>
        Version Length:
        <list><t>
          The number of characters in the Version
        </t></list></t><t>
        Version:
        <list><t>
          The Version encoded via UTF-8
        </t></list></t>
    </section>

    <?rfc needLines="8" ?>

    <section title="Operation">
      <t>
        The Version capability MUST only be used for displaying the version of a speaker to make troubleshooting easier.
        You have a bunch of routers with a number of upstreams each. All of them are with a different operating system and routing daemon installed.
        Assuming that a specific feature is not working or a bug which is not fixed in an appropriate version,
        would allow us to quickly identify the pattern which versions are affected.
      </t>
      <t>
        Enabling this capability REQUIRED bouncing all existing BGP sessions.
        It MUST be explicitly configured to advertise the Version capability.
      </t>
      <t>
        Below is an example of implementation in <xref target="FRRouting"></xref> how it looks like with version advertised by a BGP sender:
      </t>
      <figure align="center" anchor="frr_failed">
        <artwork align="left"><![CDATA[
:~# vtysh -c 'show ip bgp summary failed'
...
Neighbor      EstdCnt DropCnt ResetTime Reason
198.51.100.2        3       3  00:00:35 Waiting for peer OPEN (n/a)
198.51.100.3        3       3  00:01:12 Peer closed the session (FRRouting 7.2-b3ac21114g)
198.51.100.4        3       3  00:00:14 Peer closed the session (FRRouting 7.3-g4c566878f)
198.51.100.5        3       3  00:00:45 Peer closed the session (FRRouting 7.4-a25sg503g2)
...
            ]]></artwork>
      </figure>
      <figure align="center" 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-dev-MyOwnFRRVersion",
  "receivedVersion": "FRRouting 7.2-dev-MyOwnFRRVersion-gc68bb14"
}
            ]]></artwork>
      </figure>
    </section>

    <section anchor="IANA" title="IANA Considerations">
      <t>
        IANA maintains the "Border Gateway Protocol (BGP) Parameters"
        registry with a subregistry called "Capabilities Codes". IANA is
        requested to assign a capability number from the First Come First
        Served range for the Version Capability in this document as follows:
      </t>
      <texttable anchor="table_ex" title="Version Capability">
          <ttcol align='center'>Value</ttcol>
          <ttcol align='center'>Description</ttcol>
          <ttcol align='center'>Reference</ttcol>
          <c>TBD</c>
          <c>Version Capability</c>
          <c>[draft-abraitis-bgp-version-capability]</c>
      </texttable>
    </section>

    <section anchor="Security" title="Security Considerations">
      <t>
        The Version Capability can be treated as sensitive information,
        thus it would be easier for an attacker to exploit by knowing
        the specific version of the BGP speaker. This information can
        be gathered in BGP OPEN messages.
      </t>
      <t>
        The Version Capability MUST be configurable with a vendor-specific
        knob to be able to enable or disable the capability.
        The vendor might implement to disable this capability per neighbor.
      </t>
      <t>
        It would be safe to enable this for iBGP or inside the same
        tenant where you have full control and the BGP speaker is
        behind exit points.
      </t>
      <t>
        The Version Capability information can be gathered in
        BGP OPEN messages.
      </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>
        Advertising which versions of code and from which
        vendor it comes may facilitate a number of social-engineering attacks.
        A lot of BGP implementations leave TCP/179 open and this could lead
        to sensitive information disclosure. This capability is NOT RECOMMENDED
        for eBGP use.
      </t>
      <t>
        Sensitive information leaks can be minimized by using the
        [RFC5082] mechanism or firewalls to filter out TCP 179 port
        from untrusted networks. This capability can be disabled per
        neighbor, thus the sensitive information can't be disclosed to
        untrusted neighbors.
      </t>
    </section>
  </middle>

  <!--  *****BACK MATTER ***** -->

  <back>
    <!-- References split into informative and normative -->

    <!-- There are 2 ways to insert reference entries from the citation libraries:
     1. define an ENTITY at the top, and use "ampersand character"RFC2629; here (as shown)
     2. simply use a PI "less than character"?rfc include="reference.RFC.2119.xml"?> here
        (for I-Ds: include="reference.I-D.narten-iana-considerations-rfc2434bis.xml")

     Both are cited textually in the same manner: by using xref elements.
     If you use the PI option, xml2rfc will, by default, try to find included files in the same
     directory as the including file. You can also define the XML_LIBRARY environment variable
     with a value containing a set of directories to search.  These can be either in the local
     filing system or remote ones accessed by http (http://domain/dir/... ).-->

    <references title="Normative References">
      <!--?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml"?-->
      &RFC2119;

      <reference anchor="FRRouting" target="https://github.com/ton31337/frr/commit/4c566878fd1a7df9f8c84ee03f419c0b00ae444b">
        <front>
          <title>FRRouting - BGP Version Capability</title>

          <author initials="D.A." surname="Abraitis" fullname="Donatas Abraitis">
            <organization abbrev="Hostinger">Hostinger</organization>
          </author>

          <date year="2019" />
        </front>
      </reference>
    </references>

    <references title="Informative References">
      &RFC3552;
    </references>

  </back>
</rfc>
