<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" []>

<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="3"?>
<?rfc tocindent="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<?rfc authorship="yes"?>
<?rfc tocappendix="yes"?>
<rfc category="bcp" docName="draft-gnawali-roll-rpl-recommendations-02" ipr="trust200902">

  <front>
    <title abbrev="draft-gnawali-roll-rpl-recommendations">Recommendations for Efficient Implementation of RPL</title>
    <author fullname="Omprakash Gnawali" initials="O.G." surname="Gnawali">
      <organization>Stanford University</organization>
      <address>
        <postal>
          <street>S255 Clark Center, 318 Campus Drive</street>
          <city>Stanford</city>
          <region>CA</region>
          <code>94305</code>
          <country>USA</country>
        </postal>
        <phone>+1 650 725 6086</phone>
        <email>gnawali@cs.stanford.edu</email>
      </address>
    </author>

    <author fullname="Philip Levis" initials="P.L." surname="Levis">
      <organization>Stanford University</organization>
      <address>
        <postal>
          <street>358 Gates Hall, Stanford University</street>
          <city>Stanford</city>
          <region>CA</region>
          <code>94305</code>
          <country>USA</country>
        </postal>
        <email>pal@cs.stanford.edu</email>
      </address>
    </author>

    <date day="13" month="September" year="2011" />
    <area>Routing Area</area>
    <workgroup>Networking Working Group</workgroup>
    <keyword>Draft</keyword>

    <abstract>
      <t>RPL is a flexible routing protocol applicable to a wide range
      of Low Power and Lossy Networks. To enable this
      wide applicability, RPL provides many configuration options and
      gives implementers choices on how to implement various
      components of RPL. Drawing on our experiences, we distill the
      design choices and configuration parameters that lead to
      efficient RPL implementations and operations.</t>
    </abstract>

  </front>

  <middle>

    <section title="Introduction">

      <t>RPL <xref target="I-D.ietf-roll-rpl"></xref> is a routing
      protocol that is applicable in a wide range of settings in
      networks characterized by low power and lossy links
      (LLN). Because RPL is designed to work in a wide range of
      settings, it offers many configuration parameters and choices in
      how different mechanisms are implemented. This flexibility is
      essential to ensure the wide applicability of this protocol.</t>

      <t>One can take advantage of this flexibility to implement and
      configure RPL in the most efficient way for a given
      network. However, it is easy to inadvertently configure RPL to
      work inefficiently in the network. These design choices must be
      made carefully drawing on implementation and operational
      experiences.</t>

      <t>In this document, we describe aspects of configuration and
      mechanisms that impact the performance of RPL. We hope these
      descriptions serve as guidelines and best practices for RPL
      implementers and enables them to understand why certain design
      and configuration choices are favored over others.</t>

    </section>

    <section title="Terminology">

      <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 <xref
      target="RFC2119">RFC 2119</xref>.</t>

      <t>This terminology used in this document is consistent with the
      terminologies described
      in <xref target="I-D.ietf-roll-terminology"></xref>, <xref target="I-D.ietf-roll-rpl"></xref>,
      and <xref target="I-D.ietf-roll-routing-metrics"></xref>.</t>

      <t>This document does not introduce new terms.</t>

    </section>


    <section title="Set the Minimum Trickle Interval with Care">
      <t>The minimum Trickle interval determines the fastest rate at
      which RPL will send DIOs. It is not useful to have multiple DIOs
      in the transmit queue at a given node. The information in the
      older DIOs is likely already stale when the new DIO is
      generated. In systems that cannot cancel the packets that are
      already in the queue, it is advisable to set the minimum
      interval to be much larger than the minimum link layer packet
      time.</t>
    </section>

    <section title="Use Large Maximum Trickle Interval">
      <t>The maximum Trickle interval determines the slowest rate at
      which RPL will send DIOs. It is recommended that the maximum
      interval is set to several hours. A large interval does not
      necessarily make RPL less agile or the routing information
      stale. Trickle will operate at a rate between the minimum and
      maximum interval depending on the dynamics in the network.</t>
   </section>

    <section title="Use Small Trickle Redundancy Constant">
      <t>If a node receives more DIOs than the redundancy constant, it
	does not transmit, i.e., suppresses, its DIO. The rationale
	for this suppression is that the additional DIOs do not help
	discover new or better paths if certain number of DIOs have
	already been transmitted in the neighborhood of a node. In
	general, the smaller this number the more efficient the route
	discovery. Setting this value too small can lead to network
	partitioning as many nodes will suppress their DIOs and will
	not be discovered. A constant of 3-5 has been found adequate in
	deployments.</t>
    </section>

   <section title="Poison Route Sparingly">
     <t>It is often not necessary for a node to poison a route
     explicitly by advertising a rank of INFINITY. With datapath
     validation, it is easy to detect a loop and coupled with adaptive
     beaconing, the routes can be repaired quickly without additional
     explicit mechanism for route poisoning. Poisoning the route does
     not prevent loops because the control packet can get dropped on
     the lossy link.</t>
   </section>

   <section title="Preserve Neighbor Information">
     <t>The neighborhood information is useful even when a node
     detects that it has lost a route. It is recommended that the
     nodes not flush the entire or subset of the neighbor table even
     when a node loses its route or detects a loop. It is sufficient
     to mark the nodes in the table with the updated information that
     resulted in route loss or loops, e.g., marking the particular
     parent with a rank of INFINITY.</t>
   </section>

   <section title="Slow-Down Datapath Traffic During Path Inconsistency">
     <t>When a node detects that a path is inconsistent through
     datapath validation, it tasks the control plane to repair the
     topology and make it consistent. During this time, although the
     route is available, it is advisable that the data packets are
     sent at lower rates to reduce contention with the control
     packets. This slow-down can increase data packet latency or
     lead to queue overflow.</t>
   </section>

   <section title="Choose Better Path Cost Over Route Stability">
     <t>With bursty links, a link metric designed to reflect link
       quality accurately can change rapidly. Other link metrics may
       also change rapidly. As a result, the path cost computed using
       these agile metrics can change rapidly. Selecting the best path
       then implies frequent parent changes. Route flapping is not
       detrimental to the performance of many network protocols such
       as sensor data collection over UDP. Hence, oftentimes, it is
       better to optimize for path cost than for path stability.</t>
   </section>

   <section title="Consider State Overhead While Running Storing Mode">
     <t>A naive implementation of storing mode will have large state
     overhead, especially in large networks. However, it is possible
     for storing mode to use RAM efficiently by state aggregation,
     compression, and other techniques. Current open source
     implementations are known to limit the routing table size to 30
     (TinyOS on TelosB which has 10KB of RAM) and 100 (Contiki on
     MSP430F5438-based platform which has 16K of RAM).</t>
   </section>


    <section anchor="Acknowledgements" title="Acknowledgements">
       <t>Thanks to Ulrich Herberg and Mukul Goyal for valuable
       comments.</t>
    </section>

    <section anchor="IANA" title="IANA Considerations">
      <t>None.</t>
    </section>

    <section anchor="Security" title="Security Considerations">
      <t>Security considerations to be developed in accordance to the output of the WG.</t>
    </section>
  </middle>

  <!--  *****BACK MATTER ***** -->

  <back>
    <references title="Normative References">
      <?rfc include="reference.RFC.2119"?>
    </references>

    <references title="Informative References">
      <?rfc include='reference.I-D.draft-ietf-roll-rpl-18.xml'?>
      <?rfc include='reference.I-D.draft-ietf-roll-routing-metrics-01.xml'?>
      <?rfc include='reference.I-D.draft-ietf-roll-terminology-01.xml'?>
    </references>

  </back>
</rfc>

