<?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-00">
  <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" month="October" day="9" />
    <area>Routing</area>
    <workgroup>Networking</workgroup>
    <!-- <workgroup>Inter-Domain Routing Working Group</workgroup> -->
    <keyword>RFC</keyword>
    <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="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 the same optimum value. However as the
      timer value is increased past the optimum, the convergence time
      increases again linearly - the scale of this increase is worse
      with WRATE.
      
      <xref target="bgp-converge"/>
      <xref target="mrai-final"/>
      
      </t><t>
      
      The optimum MRAI timer value is dependent on several factors, most
      particularly the topology. The optimum value will differ between
      different subsets of the Internet.
      
      <xref target="mrai-final"/>
      
      </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. 
    So with a lower value, there is 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,
    based on observations of certain parameters related to the topology of
    the Internet. 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 and 'safe'
    value are the same. 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 today less important than the convergence time of BGP,
    than in 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> 
    
    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="Recommended values for the MRAI"> 
    
    <t>
    The suggested default values for the
    MinRouteAdvertisementIntervalTimer given in <xref
    target="BGP">RFC4271</xref> are hereby revised to be 5s for eBGP
    connections, and 1s or less for iBGP connections.
    
    </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.    
    </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>
      </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>
      </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>
      </reference>

    </references>
  </back>
</rfc>
