<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE rfc SYSTEM "rfc2629bis.dtd">
<?rfc toc="yes"?>
<?rfc tocdepth="3"?>
<?rfc symrefs="yes"?>
<?rfc compact="yes"?>
<?rfc strict="no"?>
<?rfc notedraftinprogress="yes"?>
<rfc ipr="full3978" docName="draft-jakma-mrai-02">
  <front>
    <title abbrev="BGP MRAI Timer Value Recommendations">
    Revised Default Values for the BGP 'Minimum Route Advertisement Interval'</title>
    <author initials="P." fullname="Paul Jakma" surname="Jakma">
      <organization>Sun Microsystems</organization>
      <address>
        <postal>
          <street>Springfield</street>
          <city>Linlithgow</city>
          <region>West Lothian</region>
          <code>EH49 7LR</code>
          <country>Scotland</country>
        </postal>
        <phone>+44 1506 673150</phone>
        <email>paul.jakma@sun.com</email>
      </address>
    </author>
    <date year="2008" />
    <area>Routing</area>
    <workgroup>Inter-Domain Routing</workgroup>
    <!-- <workgroup>Inter-Domain Routing Working Group</workgroup> -->
    <keyword>BGP</keyword>
    <keyword>IDR</keyword>
    <keyword>MRAI</keyword>
    <keyword>Convergence</keyword>
    <abstract>
      <t>
      
      This document briefly examines what is known about the effects of the
      BGP MRAI timer, particularly on convergence. It highlights published
      work which suggests the MRAI interval as deployed has an adverse
      effect on the convergence time of BGP.
      
      </t><t>
      
      It then recommends revised, lower default values for the MRAI timer,
      thought to be more suited to today's Internet environment.
      
      </t>
    </abstract>
  </front>
  <middle>
    <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"/>.
      </t>
    </section>
    <section title="Background" anchor="intro">
      <t>
 

      The proper functioning of the <xref target="BGP"/> routing protocol is
      of great importance to the Internet. Issues regarding matters of its
      stability and convergence have been documented widely, such as in
      <xref target="BGP-STAB"/>, <xref target="bgp-converge"/> and <xref
      target="Potaroo0607"/>.
      
      </t><t>
      
      One such issue is the effect of 'Minimum Route Advertisement Interval'
      (MRAI).
      
      </t>
    <section title="The MRAI Timer" anchor="mrai">
      <t>
      
      The Minimum Route Advertisement Interval (MRAI) timer is specified in
      <xref target="BGP">RFC4271</xref>. This timer acts to rate-limit
      updates, on a per-destination basis. <xref target="BGP"/> suggests
      values of 30s and 5s for this interval for eBGP and iBGP respectively.
      The MRAI must also be applied to withdrawals according to <xref
      target="BGP">RFC4271</xref>, a change from the earlier RFC1771.
      
      </t><t>
      
      Some implementations apply this rate-limiting on a per-peer basis,
      presumably an adequate approximation. Some implementations apply it to
      withdrawal methods (often called "WRATE" in the literature). Some
      implementations do not apply MRAI at all.
      
      </t>
    </section>
    <section title="Known effects of the MRAI timer on convergence">
      <t>
      
      The MRAI timer serves to suppress messages which BGP would otherwise
      send out to describe transitory states, and so allow BGP to converge
      with significantly fewer messages sent. This beneficial effect of the
      MRAI timer, in terms of # of messages, increases as the timer is
      increased until an optimum value is reached, after which the
      beneficial effect stabilises.
      
      <xref target="bgp-converge"/>
      <xref target="mrai-final"/>
      
      </t><t>
      
      In terms of convergence time, a similar beneficial effect is seen as
      the MRAI increases to near the same optimum value. However as the
      timer value is increased past this point, the convergence time
      increases again linearly. The scale of this increase is significantly
      worse with WRATE, i.e. applying the MRAI to withdrawals has an adverse
      effect on BGP convergence time.
      
      <xref target="bgp-converge"/>
      <xref target="mrai-final"/>
      
      </t><t>
      
      The optimum MRAI timer value is dependent on several factors, most
      particularly the topology in its layout and propagation times.  The
      optimum value will differ between different subsets of the Internet. 
      <xref target="mrai-final"/>
      
      </t><t>
      
      It is believed to be infeasible to try directly calculate this value. 
      However a useful approximation can be made from the diameter of the
      topology if it is known, along with some assumptions about the the
      topology, such as the latency between nodes.
      <xref target="mrai-internet"/>
      
      </t><t>
      
      The interaction between extensions to BGP designed to improve
      convergence, such as those that allow propagation of additional and/or
      backup paths, and the MRAI timer is as yet unknown.  However, it seems
      reasonable to speculate these extensions might have the effect of
      leading to a lower optimum MRAI than would be indicated by an
      approximation based on the diameter of the BGP topology. Further work
      on these questions would be useful.
      
      </t>
      
    </section>
    <section title="Interaction with Flap-Damping">
    <t>
    
    As the MRAI helps eliminate some updates, it interacts with <xref
    target="BGP-DAMP">flap-damping</xref>. The lower the MRAI timer, the
    greater the risk of crossing below the threshold of the optimum value. 
    If that threshold is crossed, there will be an increased number of
    updates somewhere within the BGP system, and hence an increased risk of
    paths being dampened which otherwise would not.

    </t><t>
    
    So, in presence of significant flap-damping deployment and given
    the uncertainty of what the optimum is, it is reasonable to err
    towards selecting a value of the MRAI timer significantly higher
    than the optimum.
    
    </t><t>
    
    However, given that flap-damping increasingly is discouraged <xref
    target="RIPE-378"/> in Internet routing, this particular need to be
    conservative in the choice of MRAI timer value may be less important.
    
    </t>
    
    </section>
    <section title="Current Status of the MRAI">
    <t>
    
    The current recommended value of 30s may be far higher than is optimal
    for the Internet, based on observations of certain parameters related to
    its topology. In <xref target="mrai-final"/> it is suggested that the
    optimal value may be between 5s ('semi-safe') to 15s ('safe'). The
    estimation of the 'safe' value here is of no relevance if WRATE is
    universally deployed, as in such a case the 'semi-safe' value will be
    the same as the 'safe' value. Further empirical work by the same authors
    <xref target="mrai-internet"/> suggests that the optimal, Internet MRAI
    may be below 5s.
    
    </t><t>
    
    Further, <xref target="BGP-STAB"/> and <xref target="Potaroo0607"/>
    argue that operational conditions (e.g. different routers using
    different MRAI values) mean the MRAI is having an adverse effect even on
    the number of messages sent, and so further exacerbating convergence
    problems in the global BGP system, such as path hunting. The <xref
    target="BGP-STAB"/> document goes further still and argues that MRAI be
    deprecated in favour of some better way of damping BGP UPDATES, however
    there are no clear proposals before the IDR as of this writing for such
    changes to BGP.
    
    </t>
    </section>
    </section>
    <section title="Risk Evaluation in the Choice of MRAI Time">
    
    <t>
    
    Though there is an optimum value for the MRAI, it's unlikely that it can
    be determined empirically or otherwise for the general Internet. It may
    even not be possible, as the optimum MRAI will differ for different
    subsets of the Internet.  Some degree of guesstimation at a reasonable
    value for the MRAI is required, which is an exercise in risk; whether to
    err towards fast convergence at the risk of a disproportionate increase
    in BGP messaging, or to err to the side of an optimal number of messages
    at the expense of convergence.
    
    </t><t>
    
    Arguably, economising on bandwidth and control-plane processing power is
    of less importance than the convergence time of BGP, compared to times
    past. Presuming this, any new recommendations for the MRAI should seek
    to err slightly to the side of convergence, rather than erring towards
    minimising BGP traffic.
    
    </t><t>
    
    Further, if we assume most implementations apply the MRAI to
    withdrawals, then the Internet BGP topology effectively is
    WRATE-enabled, and <xref target="mrai-final"/> suggests there is even
    less benefit to erring toward a higher MRAI.
    
    </t><t>
    
    There may be risks in mismatched MRAI values between speakers in an AS
    as revised MRAI values are deployed. The MRAI values in <xref
    target="BGP">RFC4271</xref> were deliberately specified to be lower for
    iBGP than for eBGP, so as to allow interior routing to converge while
    minimising the effect on eBGP state. So with mismatched values there is
    an increased risk that the external stability of an AS's routes would
    be affected by transient, internal states.
    
    </t><t>
    
    This last risk suggests that the existing iBGP/VPN values should be the
    lower-bound for any conservative revision of the eBGP MRAI value.

    </t><t> 
    
    The most definite risk of lowering the MRAI is the increased risk of
    flap-damping, if the value is set too much below the optimum. Therefore,
    taking into account estimations of that optimum is required. That said,
    at least one BGP implementation by default does not apply any MRAI at
    all.
    
    </t>
    
    </section>
    <section title="Recommendations on the MRAI"> 
    
    <t> 
    
    The suggested default values for the MinRouteAdvertisementIntervalTimer
    given in <xref target="BGP">RFC4271</xref> are revised to be 5s or less
    for eBGP connections, and 1s or less for iBGP connections, for use on
    Internet topologies.
    
    </t><t>
    
    These values may not be suitable for topologies which differ from the
    Internet, be that in scale, arrangement or otherwise. Such non-Internet,
    BGP topologies likely would have lower optimum values, assuming they are
    always significantly smaller in scale than the Internet BGP topology. 
    Hence, implementations SHOULD allow the MRAI value to be configured
    administratively on a per-AFI/SAFI basis, as well as a per-peer basis.
    
    </t><t>
    
    Given the beneficial effects on convergence time, implementations MAY
    exempt withdrawals from the MRAI timer.
    
    </t>

    </section>

    <section title="IANA Considerations">
    <t>There are no requests made to IANA in this document.</t>
    </section>
    <section title="Security Considerations">
    <t>This document raises no new security considerations.</t>
    </section>
    <section title="Acknowledgements">
    <t>
    
    The author would like to thank Manav Bhatia for his helpful review and
    comments; as well as Robert Raszuk, Samita Chakrabarti, Danny McPherson
    and Jeffrey Haas for their useful comments; dissenting or otherwise.
    
    </t><t>
    
    The authors of the cited documents are thanked for their contributions
    to the understanding of BGP, of which this document is a simple summary.
    
    </t>
    
    </section>
  </middle>
  <back>
    <references title="Normative References">
      <reference anchor="BGP">
        <front>
          <title>A Border Gateway Protocol 4 (BGP-4)</title>
          <author initials="Y." surname="Rekhter">
            <organization>Unknown</organization>
          </author>
          <author initials="T." surname="Li">
            <organization>Unknown</organization>
          </author>
          <author initials="S." surname="Hares">
            <organization>Unknown</organization>
          </author>
          <date month="January" year="2006" />
        </front>
        <seriesInfo name="RFC" value="4271" />
      </reference>

      <reference anchor="RFC2119">
        <front>
          <title>Key words for use in RFCs to Indicate Requirement
          Levels</title>
          <author initials="S." surname="Bradner">
            <organization>Harvard University</organization>
          </author>
          <date month="February" year="2001" />
        </front>
        <seriesInfo name="RFC" value="2119" />
        <seriesInfo name="BCP" value="14" />
      </reference>
</references>
    <references title="Informative References">
      <reference anchor="BGP-STAB">
        <front>
          <title>BGP Stability Improvements</title>
          <author initials="T." surname="Li">
            <organization>Cisco Systems, Inc.</organization>
          </author>
          <author initials="G." surname="Huston">
            <organization>APNIC</organization>
          </author>
          <date month="June" year="2007" />
        </front>
        <seriesInfo name="I-D" value="draft-li-bgp-stability" />
      </reference>
      <reference anchor="BGP-DAMP">
        <front>
          <title>BGP Route Flap Damping</title>
          <author initials="C." surname="Villamizar">
            <organization>Cisco Systems, Inc.</organization>
          </author>
          <author initials="R." surname="Chandra">
            <organization>Cisco Systems, Inc.</organization>
          </author>
          <author initials="R." surname="Govindan">
            <organization>Cisco Systems, Inc.</organization>
          </author>
          <date month="November" year="1998" />
        </front>
        <seriesInfo name="RFC" value="2439" />
      </reference>

      <reference
        anchor="Potaroo0607"
        target="http://www.potaroo.net/ispcol/2007-06/dampbgp.html">
        <front>
          <title>Damping BGP</title>
          <author initials="G." surname="Huston">
            <organization>APNIC</organization>
          </author>
          <date month="June" year="2007" />
        </front>
      </reference>

      <reference
        anchor="RIPE-378"
        target="http://www.ripe.net/docs/ripe-378.html">
        <front>
          <title>RIPE RRG: Recommendations on Route-flap Damping</title>
          <author initials="P." surname="Smith"
                  fullname="Philip Smith">
          </author>
          <author initials="P." surname="Panigl"
          	  fullname="Christian Panigl">
          </author>
          <date month="May" year="2006" />
        </front>
      </reference>


       <reference
        anchor="bgp-converge"
        target="http://www.ssfnet.org/Papers/icnp-2001.pdf">
        <front>
          <title>An Experimental Analysis of BGP Convergence Time</title>
          <author initials="T." surname="Griffin"
                  fullname="Timothy G. Griffin">
            <organization>AT&gt;T Research</organization>
          </author>
          <author initials="B." surname="Premore"
          	 fullname="Brian J. Premore">
            <organization>Dartmouth College</organization>
          </author>
          <date month="November" year="2001" />
        </front>
        <seriesInfo name="In Proceedings of ICNP" value="pages 53-61"/>
      </reference>


      <reference
        anchor="mrai-final"
        target="http://www.net-glyph.org/~qiu/public_html/mrai_final.pdf">
        <front>
          <title>An Experimental Study of the BGP Rate-limiting Timer</title>
          <author initials="J." surname="Qiu" fullname="Jian Qui">
            <organization>Tsinghua University</organization>
          </author>
          <author initials="R." surname="Hao" fullname="Ruibing Hao">
            <organization>Bell Labs Research China</organization>
          </author>
          <author initials="X." surname="Li" fullname="Xing Li">
            <organization>Tsinghua University</organization>
          </author>
          <date month="June" year="2003" />
        </front>
        <seriesInfo name="Bell Labs Technical Memo" value="ITD-03-44604H"/>
      </reference>

      <reference
        anchor="mrai-internet"
        target="http://rio.ecs.umass.edu/~jqiu/mrai_journal.pdf">
        <front>
          <title>The Optimal Rate-Limiting Timer of BGP for
          Routing Convergence
          </title>
          <author initials="J." surname="Qiu" fullname="Jian Qui">
            <organization>University of Massachusetts
            </organization>
          </author>
          <author initials="R." surname="Hao" fullname="Ruibing Hao">
            <organization>Bell Labs Research China</organization>
          </author>
          <author initials="X." surname="Li" fullname="Xing Li">
            <organization>Tsinghua University</organization>
          </author>
          <date month="April" year="2005" />
        </front>
        <seriesInfo name="IEICE TRANS. Comm." value="Vol.E88–B, No. 4"/>
      </reference>
      
      <!--
      <reference
        anchor="ghost-flush"
        target="http://www.ieee-infocom.org/2003/papers/23_02.PDF">
        <front>
          <title>Improved BGP Convergence via Ghost Flushing
          </title>
          <author initials="A." surname="Bremler-Barr" fullname="Anat Bremler-Barr">
            <organization>Tel Aviv University
            </organization>
          </author>
          <author initials="Y." surname="Afek" fullname="Yehuda Afek">
            <organization>Tel Aviv University</organization>
          </author>
          <author initials="S." surname="Schwarz" fullname="Shemer Schwarz">
            <organization>Tel Aviv University</organization>
          </author>
          <date month="March" year="2003" />
        </front>
        <seriesInfo name="In Proc. IEEE INFOCOM." value="Mar. 2003"/>
      </reference>
      -->
    </references>
  </back>
</rfc>
