<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">

<?rfc rfcedstyle="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<?rfc sortrefs="yes"?>
<?rfc symrefs="yes"?>
<?rfc toc="yes"?>
<?rfc tocdepth="5"?>
<?rfc tocindent="yes"?>
<?rfc tocompact="yes"?>

<rfc number="7313" category="std"
     updates="2918"
     ipr="trust200902" submissionType="IETF">

  <front>

    <title>Enhanced Route Refresh Capability for BGP-4</title>

    <author fullname="Keyur Patel" initials="K."
            surname="Patel">
      <organization>Cisco Systems</organization>
      <address>
        <postal>
          <street>170 W. Tasman Drive</street>
          <city>San Jose, CA</city>
          <country>USA</country>
          <code>95134</code>
        </postal>
        <phone></phone>
        <email>keyupate@cisco.com</email>
      </address>
    </author>

    <author fullname="Enke Chen" initials="E."
            surname="Chen">
      <organization>Cisco Systems</organization>
      <address>
        <postal>
          <street>170 W. Tasman Drive</street>
          <city>San Jose, CA</city>
          <country>USA</country>
          <code>95134</code>
        </postal>
        <phone></phone>
        <email>enkechen@cisco.com</email>
      </address>
    </author>


    <author initials="B." surname="Venkatachalapathy" 
	    fullname="Balaji Venkatachalapathy">
      <address>
        <postal>
          <street></street>
          <city></city>
          <country></country>
          <code></code>
        </postal>
        <phone></phone>
        <email>balaji_pv@hotmail.com</email>
      </address>
    </author>

    <date month="July" year="2014" />

    <area>Routing</area>

    <workgroup>IDR</workgroup>

<!-- [rfced] Please insert any keywords (beyond those that appear in 
the title) for use on http://www.rfc-editor.org/search.
-->

<keyword>example</keyword>


    <abstract>
      <t>
	In this document, we enhance the existing BGP route refresh mechanisms
	to provide for the demarcation of the beginning and the ending of a
	route refresh.  The enhancement can be used to facilitate correction of
	BGP Routing Information Base (RIB) inconsistencies in a non-disruptive manner. This document
	updates RFC 2918.
      </t>
    </abstract>
  </front>

  <middle>

    <section anchor="intro" title="Introduction">

      <t>
	It is sometimes necessary to perform routing consistency validations
	such as checking for possible missing route withdrawals between BGP speakers
	<xref target="RFC4271"/>.  Currently, such validations typically involve offline,
	manual operations that can be tedious and time-consuming.
      </t>

      <t>
	In this document, we enhance the existing BGP route refresh mechanisms
	<xref target="RFC2918"></xref> to provide for the demarcation of the 
	beginning and the ending of a route refresh (which refers to the complete re-advertisement of the Adj-RIB-Out to a peer, subject to routing
	policies).  The enhancement can be used to facilitate online, non-disruptive consistency validation of BGP routing updates.
      </t>

      <t>
	This document updates <xref target="RFC2918"></xref> by redefining a field 
	in the ROUTE-REFRESH message that was previously designated as Reserved.
      </t>
      </section>

     <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"/> only when they appear in all upper
	 case.  They may also appear in lower or mixed case as English
	 words, without any normative meaning.</t>
     </section>

   <section title="Protocol Extensions">
     <t>
       The BGP protocol extensions introduced in this document include the
       definition of a new BGP capability, named "Enhanced Route Refresh
       Capability", and the specification of the message subtypes for the
       ROUTE-REFRESH message.
     </t>

     <section title="Enhanced Route Refresh Capability">
       <t>
	 The "Enhanced Route Refresh Capability" is a new BGP capability
	 <xref target="RFC5492"></xref>.  IANA has assigned a Capability Code of 70
	 for this capability . The Capability
	 Length field of this capability is zero.
       </t>

       <t>
	 By advertising this capability to a peer, a BGP speaker conveys to
	 the peer that the speaker supports the message subtypes for the
	 ROUTE-REFRESH message and the related procedures described in this document.
       </t>

     </section>

     <section title="Subtypes for ROUTE-REFRESH Message">
       <t>
	 The "Reserved" field of the ROUTE-REFRESH message specified in
	 [RFC2918] is redefined as the "Message Subtype" with the following
	 values:
       </t>
       <t>
	 <figure>
	   <artwork>
          0 - Normal route refresh request [RFC2918]
              with/without Outbound Route Filtering (ORF) [RFC5291]
          1 - Demarcation of the beginning of a route refresh 
              (BoRR) operation
          2 - Demarcation of the ending of a route refresh 
              (EoRR) operation
        255 - Reserved
           </artwork>
	 </figure>
       </t>
       <t>
	 The remaining values of the message subtypes are reserved for future
	 use; see <xref target="IANA"/> ("IANA Considerations").  The use of the new message subtypes is described in <xref
	 target="op"/> ("Operation").
       </t>
     </section>

   </section>


   <section title="Operation" anchor="op">

   <t>
     A BGP speaker that supports the message subtypes for the ROUTE-
     REFRESH message and the related procedures SHOULD advertise the
     "Enhanced Route Refresh Capability".
   </t>

   <t>
   The following procedures are applicable only if a BGP speaker has
   received the "Enhanced Route Refresh Capability" from a peer.
   </t>

   <t>
     Before the speaker starts a route refresh that is either initiated
     locally, or in response to a "normal route refresh request" from the
     peer, the speaker MUST send a BoRR message. After the speaker 
     completes the re-advertisement of the
     entire Adj-RIB-Out to the peer, it MUST send an EoRR message.
   </t>

   <t>
     Conceptually, the "entire Adj-RIB-Out" for a peer in this section
     refers to all the route entries in the "Adj-RIB-Out" for the peer at
     the start of the route refresh operation.  These route entries comprise
     both the reachability as well as unreachability information. When a route entry 
     in the "Adj-RIB-Out" changes, only the modified route entry needs to be advertised.
   </t>

   <t>
     In processing a ROUTE-REFRESH message from a peer, the BGP speaker
     MUST examine the "message subtype" field of the message and take the
     appropriate actions. The message processing rules for ROUTE-REFRESH
     message with subtype of 0 are described in <xref target="RFC2918"></xref>
     and <xref target="RFC5291"></xref>. A BGP speaker can receive a BoRR
     message from a peer at any time, either as a result of a peer responding
     to a ROUTE-REFRESH message, or as a result of a peer unilaterally initiating
     a route refresh.
     When a BGP speaker receives a BoRR message from a peer,
     it MUST mark all the routes with the given Address Family Identifier and
     Subsequent Address Family Identifier, &lt;AFI, SAFI&gt;
     <xref target="RFC2918"></xref>,
     from that peer as stale. As it receives routes from its peer's
     subsequent Adj-RIB-Out re-advertisement, these replace any
     corresponding stale routes. When a BGP speaker receives an EoRR
     message from a peer, it MUST immediately
     remove any routes from the peer that are still marked as stale for
     that &lt;AFI, SAFI&gt;.
     Such purged routes MAY be logged for future analysis.
     A BGP speaker MAY ignore any EoRR message received without a prior receipt
     of an associated BoRR message. Such messages MAY be logged for future analysis.
   </t>

   <t>
     An implementation MAY impose a locally configurable upper bound on
     how long it would retain any stale routes. Once the upper bound is
     reached, the implementation MAY remove any routes from the peer that
     are still marked as stale for that &lt;AFI, SAFI&gt; without waiting for
     an EoRR message.
   </t>

<!-- [rfced] Because this document uses the similar abbreviations 
"EoRR" and "EoR", we suggest the instances of EoR simply be 
written out as End-of-Rib. (Total there are three instances in 
the last paragraph of Section 4.) Please let us know if you agree.
-->

   <t>
     The following procedures are specified in order to simplify the interaction
     with the BGP Graceful Restart <xref target="RFC4724"></xref>.  In particular,
     these procedures ensure that End-of-RIB (EoR) defined in Graceful Restart and 
     EoRR as defined in this specification are kept separate, thereby avoiding any 
     premature cleanup of stale routes. For a BGP speaker that supports the
     BGP Graceful Restart, it MUST NOT send a BoRR for an &lt;AFI, SAFI&gt; to a neighbor before
     it sends the EoR for the &lt;AFI, SAFI&gt; to the neighbor.  A BGP speaker that has received
     the Graceful Restart Capability from its neighbor MUST ignore any BoRRs for an
     &lt;AFI, SAFI&gt; from the neighbor before the speaker receives the EoR for the given
     &lt;AFI, SAFI&gt; from the neighbor. The BGP speaker SHOULD log an error of the condition
     for further analysis.
   </t>
   </section>

   <section title="Error Handling">
     <t>
       This document defines a new NOTIFICATION error code:
     </t>

     <t>
       <figure>
	 <artwork>
	   Error Code   Name

	       7        ROUTE-REFRESH Message Error
	 </artwork>
       </figure>
     </t>

     <t>
       The following error subcode is defined as well:
     </t>

     <t>
       <figure>
	 <artwork>
	   Subcode      Name

	      1         Invalid Message Length
	 </artwork>
       </figure>
     </t>

     <t>
       The error handling specified in this section is applicable only when
       a BGP speaker has received the "Enhanced Route Refresh Capability"
       from a peer.
     </t>

     <t>
       If the length, excluding the fixed-size message header, of the received
       ROUTE-REFRESH message with Message Subtype 1 and 2 is not 4, then the
       BGP speaker MUST send a NOTIFICATION message with the Error Code of
       "ROUTE-REFRESH Message Error" and the subcode of "Invalid Message Length".
       The Data field of the NOTIFICATION message MUST contain the complete
       ROUTE-REFRESH message.
     </t>

     <t>
       When the BGP speaker receives a ROUTE-REFRESH message with a "Message Subtype" 
       field other than 0, 1, or 2, it MUST ignore the received ROUTE-REFRESH message. 
       It SHOULD log an error for further analysis.
     </t>

   </section>


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

<!-- [rfced] FYI, the "IANA Considerations" section has been 
updated to more closely match the IANA registry 
(http://www.iana.org/assignments/bgp-parameters/).
Please review and let us know if changes are needed.
-->

    <t>
      This document defines the Enhanced Route Refresh Capability for BGP.
In the "Capability Codes" registry, IANA has assigned it value 70, referencing
this document.
    </t>
<t>
      This document
      also defines two new subcodes for the Route Refresh message. They have
      been registered with the IANA in a new registry as follows:
   </t>
    <t>
       <figure>
	 <artwork>
        Under "Border Gateway Protocol (BGP) Parameters":
        Registry: "BGP Route Refresh Subcodes"
        Reference: [RFC7313]
        Registration Procedure(s): Values 0-127 Standards Action, 
          values 128-254 First Come First Served

        Value   Code                Reference
        0       Route-Refresh       [RFC2918], [RFC5291]
        1       BoRR                [RFC7313]
        2       EoRR                [RFC7313]
        3-254   Unassigned
        255     Reserved            [RFC7313]
	 </artwork>
       </figure>
    </t>
    <t>
      In addition, this document defines a NOTIFICATION error code and
      an error subcode related to the ROUTE-REFRESH message. 

IANA has changed the name of the "BGP Error Codes" to "BGP Error
(Notification) Codes" and added this document as a reference. IANA has
allocated a new error code from that registry with
      the name "ROUTE-REFRESH Message Error", referencing this
      document. 
    </t>
<t>
IANA has created a new registry for the error subcodes as follows:

       <figure>
	 <artwork>
        Under "Border Gateway Protocol (BGP) Parameters",
        under "BGP Error Subcodes":
        Registry: "BGP ROUTE-REFRESH Message Error subcodes"
        Reference: [RFC7313]
        Registration Procedure(s): Values 0-127 Standards Action,
          values 128-255 First Come First Served

        Value   Name                     Reference
        0       Reserved                 [RFC7313]
        1       Invalid Message Length   [RFC7313]
        2-255   Unassigned
	 </artwork>
       </figure>
    </t>
  </section>

  <section anchor="Security" title="Security Considerations">
    <t>
      Security considerations are given in <xref target="RFC4272"></xref> ,  
      but they do not cover Route-Refresh and many other BGP extensions.   This document
      does not significantly change the underlying security issues regarding 
      Route-Refresh, although improved error handling may aid operational security.
    </t>
  </section>

    <section anchor="Acknowledgements" title="Acknowledgements">
      <t>
	The authors would like to thank Pedro Marques, Pradosh Mohapatra,
	Robert Raszuk, Pranav Mehta, Shyam Sethuram, Bruno Decraene,
	Martin Djernaes, Jeff Haas,
	Ilya Varlashkin, Rob Shakir, Paul Jakma, Jie Dong, Qing Zeng, Albert
	Tian, Jakob Heitz, and Chris Hall for their review and comments. The authors would 
	like to thank John Scudder for the review and contribution to this document.
      </t>
    </section>

  </middle>

  <back>

    <references title="Normative References">
      <?rfc include="reference.RFC.2119"?>
      <?rfc include="reference.RFC.2918"?>
      <?rfc include="reference.RFC.4271"?>
      <?rfc include="reference.RFC.4272"?>
      <?rfc include="reference.RFC.4724"?>
      <?rfc include="reference.RFC.5291"?>
      <?rfc include="reference.RFC.5492"?>
    </references>
  </back>

</rfc>
