<?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 I-D.narten-iana-considerations-rfc2434bis SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.narten-iana-considerations-rfc2434bis.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="std" docName="draft-xu-idr-neighbor-autodiscovery-01"
     ipr="trust200902">
  <front>
    <title abbrev="">BGP Neighbor Autodiscovery</title>

    <author fullname="Xiaohu Xu" initials="X.X." surname="Xu">
      <organization>Huawei</organization>

      <address>
        <!--
       <postal>
         <street></street>
-->

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

        <!--
         <city>Soham</city>

         <region></region>

         <code></code>

         <country>UK</country>
       </postal>

       <phone>+44 7889 488 335</phone>
-->

        <email>xuxiaohu@huawei.com</email>

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

    <author fullname="Kunyang Bi" initials="K.B." surname="Bi">
      <organization>Huawei</organization>

      <address>
        <postal>
          <street/>

          <city/>

          <region/>

          <code/>

          <country/>
        </postal>

        <phone/>

        <facsimile/>

        <email>bikunyang@huawei.com</email>

        <uri/>
      </address>
    </author>

    <author fullname="Jeff Tantsura" initials="J.T." surname="Tantsura">
      <organization>Individual</organization>

      <address>
        <postal>
          <street/>

          <city/>

          <region/>

          <code/>

          <country/>
        </postal>

        <phone/>

        <facsimile/>

        <email>jefftant@gmail.com</email>

        <uri/>
      </address>
    </author>

    <!--

-->

    <date day="" month="" year="2017"/>

    <abstract>
      <t>BGP has been used as the routing protocol in many hyper-scale data
      centers. This document proposes a BGP neighbor autodiscovery mechanism
      which can be used to simplify the BGP deployment greatly. This mechanism
      is very useful for those hyper-scale data centers where BGP is used as
      the routing protocol.</t>
    </abstract>
  </front>

  <middle>
    <section title="Introduction">
      <t>BGP has been used as the routing protocol instead of IGP in many
      hyper-scale data centers <xref target="RFC7938"/>. Furthermore, there is
      an attempt to leverages BGP Link-State distribution and the Shortest
      Path First algorithm similar to Internal Gateway Protocols (IGPs) such
      as OSPF <xref target="I-D.keyupate-idr-bgp-spf"/>. In a word, there is a
      strong motivation to replace IGP by BGP in hyper-scale data centers.</t>

      <t>However, BGP is not good as IGP from the perspective of deployment
      automation and simplicity. For instance, the IP address and Autonomous
      System Number (ASN) of each BGP neighbor have to be manually configured
      on BGP routers although these BGP peers are directly connected. In
      addition, for those directly connected BGP routers, it's usually not
      ideal to establish BGP sessions over their directly connected interface
      addresses due to the following reasons: 1) it's not convient to do
      trouble-shooting; 2) the BGP update volume is unnecessarily increased
      when there are multiple physical links between them and those links
      couldn't be configured as a Link Aggregtion Group (LAG) due to whatever
      reason (e.g., diffferent link type or speed). As a result, it's more
      common that loopback interface addresses of those directly connected BGP
      peers are used for BGP session establishment. To make those loopback
      addresses of directly connected BGP peers reachable from one another,
      either static routes have to be configured or some kind of IGP has to be
      enabled. The former is not good from the automation perspective while
      the latter is in conflict with the original intention of using BGP as
      IGP.</t>

      <t>This draft specifies a BGP neighbor autodiscovery mechanism by
      borrowing some ideas from the Label Distribution Protocol (LDP) <xref
      target="RFC5036"/> . More specifically, directly connected BGP routers
      could automatically discovery the loopback address and the ASN of one
      other through the exchange of the to-be-defined BGP HELLO messages. The
      BGP session establishment process as defined in <xref target="RFC4271"/>
      is triggered once directly connected BGP neighbors are discovered from
      one another. Note that the BGP session should be established over the
      discovered loopback address of the BGP neighbor. In addition, to
      elimnate the need of configing static routes or enabling IGP for the
      loopback addresses, a certain type of routes towards the BGP neighbor's
      loopback addresses are dymatically created once the BGP neighbor has
      been discovered. The administritive distance of such type of routes MUST
      be smaller than their equivalents which are learnt via the normal BGP
      update messages . Otherwise, circular dependency problem would occur
      once these loopback addresses are advertised via the normal BGP update
      messages as well.</t>

      <section title="Requirements Language">
        <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
        "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
        document are to be interpreted as described in <xref
        target="RFC2119">RFC 2119</xref>.</t>
      </section>
    </section>

    <section anchor="Teminology" title="Terminology">
      <t>This memo makes use of the terms defined in <xref
      target="RFC4271"/>.</t>
    </section>

    <section anchor="Advertising" title="BGP Hello Message Format">
      <t>To automatically discover directly connected BGP neighbors, a BGP
      router periodically sends BGP HELLO messages out those interfaces on
      which BGP neighbor autodiscovery are enabled. The BGP HELLO message is a
      new BGP message which has the same fixed-size BGP header as the exiting
      BGP messages. However, the HELLO message MUST sent as UDP packets
      addressed to the to-be-assigned BGP discovery port (179 is the suggested
      port value) for the "all routers on this subnet" group multicast address
      (i.e., 224.0.0.2 in the IPv4 case and FF02::2 in the IPv6 case). The IP
      source address is set to the address of the interface over which the
      message is sent out.</t>

      <t>In addition to the fixed-size BGP header, the HELLO message contains
      the following fields:</t>

      <t><figure>
          <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
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |     Version   |   Hold Time   |      Message Length           |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                             TLVs                              |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
                       Figure 1: BGP Hello Message]]></artwork>
        </figure><list>
          <t>Version: This 1-octet unsigned integer indicates the protocol
          version number of the message. The current BGP version number is
          4.</t>

          <t>Hold Time: Hello hold timer in seconds. Hello Hold Time specifies
          the time the sending BGP peer will maintain its record of Hellos
          from the receiving BGP peer without receipt of another Hello. A pair
          of BGP peers negotiates the hold times they use for Hellos from each
          other. Each proposes a hold time. The hold time used is the minimum
          of the hold times proposed in their Hellos. A value of 0 means use
          the default 15 seconds.</t>

          <t>Message Length: This 2-octet unsigned integer specifies the
          length in octects of the ASN TLV, Connection Address TLV and other
          TLVs.</t>

          <t>TLVs: This field contains ASN TLV, Connection Address TLV and
          other TLVs.</t>
        </list></t>

      <t>The ASN TLV format is show as follows:</t>

      <figure>
        <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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |          Type=TBD2            |      Length                   |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |             AS Number (2-octet or 4-octet)                    |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
                   Figure 2: ASN TLV]]></artwork>
      </figure>

      <t><list>
          <t>Type: TBD2.</t>

          <t>Length: Specifies the length of the Value field in octets.</t>

          <t>AS Number: This variable-length field indicates the 2-octet or
          4-octet ASN of the sender.</t>
        </list></t>

      <t>The Connection Address TLV format is shown as follows:</t>

      <figure>
        <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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |          Type=TBD3            |      Length                   |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |      Connection Address (4-octet or 16-octet)                 |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
                   Figure 3: Connection Address TLV]]></artwork>
      </figure>

      <t><list>
          <t>Type: TBD3</t>

          <t>Length:Specifies the length of the Value field in octets.</t>

          <t>Connection Address: This variable-length field indicates the IPv4
          or IPv6 loopback address which is used for establishing BGP
          sessions.</t>
        </list></t>

      <t>The Router ID TLV format is shown as follows:</t>

      <figure>
        <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
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |          Type=TBD4            |      Length                   |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |               Router ID (4-octet or 16-octet)                 |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
                   Figure 4: Router ID TLV]]></artwork>
      </figure>

      <t><list>
          <t>Type: TBD3</t>

          <t>Length:Specifies the length of the Value field in octets and it's
          set to 4 for the IPv4-address-formatted BGP Router ID.</t>

          <t>Router ID: This variable-length field indicates the BGP router ID
          which is used for performing the BGP-SPF algorithm as described in
          <xref target="I-D.keyupate-idr-bgp-spf"/>.</t>
        </list></t>
    </section>

    <section title="Hello Message Procedure">
      <t>A BGP peer receiving Hellos from another peer maintains a Hello
      adjacency corresponding to the Hellos. The peer maintains a hold timer
      with the Hello adjacency, which it restarts whenever it receives a Hello
      that matches the Hello adjacency. If the hold timer for a Hello
      adjacency expires the peer discards the Hello adjacency.</t>

      <t>We recommend that the interval between Hello transmissions be at most
      one third of the Hello hold time.</t>

      <t>A BGP session with a peer has one or more Hello adjacencies.</t>

      <t>A BGP session has multiple Hello adjacencies when a pair of BGP peers
      is connected by multiple links that have the same connection address;
      for example, multiple PPP links between a pair of routers. In this
      situation, the Hellos a BGP peer sends on each such link carry the same
      Connection Address. In addition, to elimnate the need of configing
      static routes or enabling IGP for the loopback addresses, a certain type
      of routes towards the BGP neighbor's loopback addresses (e.g., carried
      in the Connection Address TLV) are dymatically created once the BGP
      neighbor has been discovered. The administritive distance of such type
      of routes MUST be smaller than their equivalents which are learnt via
      the normal BGP update messages. Otherwise, circular dependency problem
      would occur once these loopback addresses are advertised via the normal
      BGP update messages as well.</t>

      <t>BGP uses the regular receipt of BGP Discovery Hellos to indicate a
      peer's intent to keep BGP session identified by the Hello. A BGP peer
      maintains a hold timer with each Hello adjacency that it restarts when
      it receives a Hello that matches the adjacency. If the timer expires
      without receipt of a matching Hello from the peer, BGP concludes that
      the peer no longer wishes to keep BGP session for that link or that the
      peer has failed. The BGP peer then deletes the Hello adjacency. When the
      last Hello adjacency for an BGP session is deleted, the BGP peer
      terminates the BGP session by sending a Notification message and closing
      the transport connection.</t>
    </section>

    <section title="HELLO Message Error Handling">
      <t>TBD</t>
    </section>

    <!---->

    <section anchor="Acknowledgements" title="Acknowledgements">
      <t>The authors would like to thank</t>
    </section>

    <section anchor="IANA" title="IANA Considerations">
      <t/>

      <section title="BGP Hello Message">
        <t>This document requests IANA to allocate a new UDP port for BGP
        Hello message.</t>

        <t><figure>
            <artwork><![CDATA[    Value   TLV Name                               Reference
    -----   ------------------------------------   -------------
    Service Name: BGP-HELLO 
    Transport Protocol(s): UDP 
    Assignee: IESG <iesg@ietf.org> 
    Contact: IETF Chair <chair@ietf.org>. 
    Description: BGP Hello Message. 
    Reference: This document -- draft-xu-idr-neighbor-autodiscovery. 
    Port Number: TBD1 (179 is the suggested value) -- To be assigned by IANA.]]></artwork>
          </figure></t>
      </section>

      <section title="TLVs of BGP Hello Message">
        <t>This document requests IANA to create a new registry "TLVs of BGP
        Hello Message" with the following registration procedure:</t>

        <t><figure>
            <artwork><![CDATA[              Registry Name: TLVs of BGP Hello Message.

    Value      TLV Name                                     Reference
    -------    ------------------------------------------   -------------
          0    Reserved                                     This document
          1    ASN                                          This document
          2    Connection Address                           This document
          3    Router ID                                    This document
    4-65500    Unassigned
65501-65534    Experimental                                 This document
      65535    Reserved                                     This document
]]></artwork>
          </figure></t>
      </section>

      <!---->
    </section>

    <section anchor="Security" title="Security Considerations">
      <t>For security purposes, BGP speakers usually only accept TCP
      connection attempts to port 179 from the specified BGP peers or those
      within the configured address range. With the BGP auto-discovery
      mechanism, it's configurable to enable or disable sending/receiving BGP
      hello messages on the per-interface basis and BGP hello messages are
      only exchanged between physically connected peers that are trustworthy.
      Therefore, the BGP auto-discovery mechanism doesn't introduce additional
      security risks associated with BGP.</t>

      <!---->
    </section>
  </middle>

  <back>
    <references title="Normative References">
      <?rfc include="reference.RFC.2119"?>

      <?rfc include="reference.RFC.4271"?>

      <!---->
    </references>

    <references title="Informative References">
      <!---->

      <?rfc include="reference.I-D.keyupate-idr-bgp-spf"?>

      <?rfc include="reference.RFC.5036"?>

      <?rfc include="reference.RFC.7938"?>
    </references>
  </back>
</rfc>
