<?xml version="1.0"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [

<!ENTITY RFC6550 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6550.xml">
<!ENTITY RFC6553 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6553.xml">
<!ENTITY RFC6554 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6554.xml">
<!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC7102 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7102.xml">
<!ENTITY RFC4443 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4443.xml">
<!ENTITY RFC6775 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6775.xml">
<!ENTITY I-D.ietf-6tisch-architecture SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-6tisch-architecture.xml">
<!ENTITY I-D.ietf-6man-rfc2460bis SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-6man-rfc2460bis.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="no" ?>
<!-- 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="info" docName="draft-ietf-roll-useofrplinfo-07" ipr="trust200902">
 <!-- category values: std, bcp, info, exp, and historic
    ipr values: trust200902, noModificationTrust200902, noDerivativesTrust200902,
       or pre5378Trust200902
    you can add the attributes updates="NNNN" and obsoletes="NNNN"
    they will automatically be output with "(if approved)" -->

 <!-- ***** FRONT MATTER ***** -->

 <front>
   <!-- The abbreviated title is used in the page header - it is only necessary if the
        full title is longer than 39 characters -->

  <title abbrev="Useof6553">When to use RFC 6553, 6554 and IPv6-in-IPv6</title>

  <author  initials="M.I." surname="Robles" fullname="Maria Ines Robles">
     <organization abbrev="Ericsson">Ericsson</organization>
    <address>
     <postal>
       <street>Hirsalantie 11</street>
       <city>Jorvas</city>
       <code>02420</code>
       <country>Finland</country>
     </postal>
      <email>maria.ines.robles@ericsson.com</email>
    </address>
  </author>

  <author initials="M." surname="Richardson" fullname="Michael C. Richardson">
    <organization abbrev="SSW">Sandelman Software Works</organization>
     <address>
        <postal>
        <street>470 Dawson Avenue</street>
        <city>Ottawa</city>
        <region>ON</region>
        <code>K1Z 5V7</code>
        <country>CA</country>
        </postal>
        <email>mcr+ietf@sandelman.ca</email>
        <uri>http://www.sandelman.ca/</uri>
     </address>

  </author>
  <author initials="P." surname="Thubert" fullname="Pascal Thubert">
    <organization abbrev="Cisco">Cisco Systems, Inc</organization>
     <address>
        <postal>
        <street> Village d'Entreprises Green Side 400, Avenue de Roumanille</street>
        <city>Batiment T3</city>
        <region>Biot - Sophia Antipolis  </region>
        <code>06410</code>
        <country>France</country>
        </postal>
        <email>pthubert@cisco.com </email>
        <uri></uri>
     </address>

  </author>

  <date year="2016" />

   <area>Internet</area>

   <workgroup>ROLL Working Group</workgroup>

   <keyword>RPL Option</keyword>
   <keyword>6LoWPAN</keyword>
   <keyword>RFC 6553</keyword>

   <abstract>
      <t>
        This document looks at different data flows through LLN (Low-Power and Lossy Networks) where RPL (IPv6 Routing Protocol for Low-Power and Lossy Networks) is used to establish routing.
        The document enumerates the cases where RFC 6553, RFC 6554 and IPv6-in-IPv6 encapsulation is required. This analysis
        provides the basis on which to design efficient compression of these headers.
     </t>
   </abstract>
 </front>

<middle>
          <section title="Introduction">
             <t>
                RPL (IPv6 Routing Protocol for Low-Power and Lossy Networks) <xref target="RFC6550"/> is a routing protocol for
                constrained networks. RFC 6553 <xref target="RFC6553"/>
                defines the "RPL option" (RPI), carried within the IPv6 Hop-by-Hop
                header to                          quickly identify
                inconsistencies (loops) in the routing topology. RFC 6554 <xref
                target="RFC6554"/> defines the "RPL Source Route Header" (RH3), an
                IPv6 Extension Header to deliver datagrams within a RPL
                routing domain, particularly in non-storing mode.
             </t>
             <t>
                These various items are referred to as RPL artifacts, and
                they are seen on all of the data-plane traffic that occurs in
                RPL routed networks; they do not in general appear on the RPL
                control plane traffic at all which is mostly hop-by-hop
                traffic (one exception being DAO messages in non-storing mode).
             </t>
             <t>
               It has become clear from attempts to do multi-vendor
               interoperability, and from a desire to compress as many of
               the above artifacts as possible that not all implementors
               agree when artifacts are necessary, or when they can be safely
               omitted, or removed.
             </t>
             <t>
               An interim meeting went through the 24 cases defined here to
               discover if there were any shortcuts, and this document is the
               result of that discussion.  This document should not be
               defining anything new, but it may clarify what is correct and
               incorrect behaviour.
             </t>
             <t>
               The related document  <xref
                target="I-D.ietf-roll-routing-dispatch"> A Routing Header
                Dispatch for 6LoWPAN (6LoRH) </xref> defines a method to
                compress RPL Option information and Routing Header type 3
                <xref
                target="RFC6554"/>, an efficient IP-in-IP technique, and use cases
                proposed for the <xref target="Second6TischPlugtest"/>
                involving 6loRH.
           </t>
     </section>

     <section title="Terminology and 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>
        <t>
        Terminology defined in <xref target="RFC7102"/> applies to this document: LBR, LLN, RPL, RPL Domain and ROLL.
        </t>

        <section title="hop-by-hop IPv6-in-IPv6 headers">
        <t>
          The term "hop-by-hop IPv6-in-IPv6" header refers to: adding a header
          that originates from a node to an adjacent node, using the
          addresses (usually the GUA or ULA, but could use the link-local addresses)
          of each node.  If the packet must traverse multiple hops, then it
          must be decapsulated at each hop, and then re-encapsulated again
          in a similar fashion.
        </t>
        </section>



       </section>


       <section title="Sample/reference topology">
                <t>
                A RPL network is composed of a 6LBR (6LoWPAN Border Router),
                Backbone Router (6BBR), 6LR (6LoWPAN Router) and 6LN (6LoWPAN
                Node) as leaf logically organized in a DODAG structure
                (Destination Oriented Directed Acyclic Graph).
                </t>
                <t>
                RPL defines the RPL Control messages (control plane), a new
                ICMPv6 <xref target="RFC4443"/>  message with Type 155. DIS (DODAG Information Solicitation), DIO (DODAG Information Object) and DAO (Destination Advertisement Object) messages are
                all RPL Control messages but with different Code values. A RPL Stack is showed in Figure 1.
                </t>
                <t>
                RPL supports two modes of Downward traffic: in storing mode (RPL-SM),
                it is fully stateful or an in non-storing (RPL-NSM), it is fully source
                routed. A RPL Instance is either fully storing or fully
                non-storing, i.e. a RPL Instance with a combination of
                storing and non-storing nodes is not supported with the
                current specifications at the time of writing this document.
                     </t>
                <t>
             <figure title="RPL Stack."

                        anchor="fig_RPLStack" align="center">
                <artwork><![CDATA[
+--------------+
| Upper Layers |
|              |
+--------------+
|   RPL        |
|              |
+--------------+
|   ICMPv6     |
|              |
+--------------+
|   IPv6       |
|              |
+--------------+
|   6LoWPAN    |
|              |
+--------------+
|   PHY-MAC    |
|              |
+--------------+


                ]]></artwork></figure>
                 </t>
               <t>
             <figure title="A reference RPL Topology." anchor="fig_CommonTopology" align="center">
                <artwork><![CDATA[

                                 +---------+
                             +---+Internet |
                             |   +---------+
                             |
                        +----+--+
                        | DODAG |  node:01
              +---------+ Root  +----------+
              |         | 6LBR  |          |
              |         +----+--+          |
              |              |             |
              |              |             |
             ...            ...           ...
              |              |             |
        +-----+-+         +--+---+      +--+---+
        |6LR    |         |      |      |      |
  +-----+       |         |      |      |      |
  |     |   11  |         |   12 |      |   13 +------+
  |     +-----+-+         +-+----+      +-+----+      |
  |           |             |             |           |
  |           |             |             |           |
  | 21        | 22          | 23          | 24        | 25
+-+---+     +-+---+      +--+--+       +- --+     +---+-+
|Leaf |     |     |      |     |       |Leaf|     |Leaf |
| 6LN |     |     |      |     |       | 6LN|     | 6LN |
+-----+     +-----+      +-----+       +----+     +-----+

                ]]></artwork></figure>
                 </t>
                 <t> In Figure 2 is showed the reference RPL Topology for this document.   The numbers in or above the nodes are there so that
                 they may be referenced in subsequent sections. In the figure, a 6LN can be a router or a host. The 6LN leafs marked as (21) and (25) are routers. The leaf marked 6LN (24) is
                 a device which does not speak RPL at all (not-RPL-aware), but uses Router-Advertisements,
                 6LowPAN DAR/DAC and efficient-ND only to participate in the network <xref target="RFC6775"/>. In the document this leaf (24) is often named IPv6 node. The 6LBR in the figure is the root of the Global DODAG.
                 </t>
                <t>
        This document is in part motivated by the work that is ongoing at the
        6TiSCH working group.
             The <xref target="I-D.ietf-6tisch-architecture">6TiSCH architecture
        </xref> draft explains the network architecture of a 6TiSCH network.
        </t>


       </section>


       <section title="Use cases">
         <t>
           In data plane context a combination of RFC6553, RFC6554 and
           IPv6-in-IPv6 encapsulation is going to be analyzed for the
           following traffic flows.
           </t>
           <t>This version of the document assumes the changes in <xref
           target="I-D.ietf-6man-rfc2460bis"/> are passed.
           </t>

           <t>
           <list>
             <t>
               RPL-aware-leaf to root
             </t>
             <t>
               root to RPL-aware-leaf
             </t>
             <t>
               not-RPL-aware-leaf to root
             </t>
             <t>
               root to not-RPL-aware-leaf
             </t>
             <t>
               RPL-aware-leaf to Internet
             </t>
             <t>
               Internet to RPL-aware-leaf
             </t>
             <t>
               not-RPL-aware-leaf to Internet
             </t>
             <t>
               Internet to not-RPL-aware-leaf
             </t>
             <t>
               RPL-aware-leaf to RPL-aware-leaf (storing and non-storing)
             </t>
             <t>
               RPL-aware-leaf to not-RPL-aware-leaf (non-storing)
             </t>
             <t>
               not-RPL-aware-leaf to RPL-aware-leaf (storing and non-storing)
             </t>
             <t>
               not-RPL-aware-leaf to not-RPL-aware-leaf (non-storing)
             </t>
           </list>
           </t>
          <t>
            This document assumes the rule that a Header cannot be
            inserted or removed on the fly inside an IPv6 packet that is
            being routed.
            This is a fundamental precept of the IPv6 architecture as
            outlined in <xref target="RFC2460" /> is that Extensions may not
            be added or removed except by the sender or the receiver.  (A
            revision to RFC2460 considered changing this rule, but has kept it)
          </t>
          <t>
            But, options in the Hop-by-Hop option which are marked with
            option type 01 (<xref target="RFC2460" /> section 4.2 and
            <xref target="I-D.ietf-6man-rfc2460bis" />) SHOULD be ignored
            when received by a host or router which does not understand that
            option.
          </t>
          <t>
            This means that in general, any packet that leaves the RPL domain
            of an LLN (or leaves the LLN entirely) will NOT be discarded,
            even if it has the <xref target="RFC6553" /> RPL Option
            Header known as the RPI or <xref target="RFC6554" /> SRH3
            Extension Header (S)RH3.
          </t>
          <t>
            With abolition of one of these rules it means that the RPI
            Hop-by-Hop option MAY be left in place even if the end host does
            host understand it.  This collapses many of the cases above
            (where it says "or")
          </t>
          <t>
            An intermediate router that needs to add an extension header
            (SHR3 or RPI Option) must encapsulate the packet in an
            (additional) outer IP header where the new header can be placed.
         </t>
          <t>
            This also means that a Header can only be removed by an
            intermediate router if it is placed in an encapsulating IPv6
            Header, and in that case, the whole encapsulating header must be
            removed - a replacement may be added. Further, an intermediate
            router can only remove such an outer header if that outer header
            has the router as the destination!
          </t>
          <t>
            Both RPI and RH3 headers may be modified by routers on the path
            of the packet without the need to add to remove an encapsulating
            header.  Both headers were designed with this modification in
            mind, and both the RPL RH and the RPL option are marked mutable
            but recoverable, so an IPsec AH security header can be applied
            across these headers, but it may not secure all the values in
            those headers.
         </t>
          <t>
            RPI should be present in every single RPL data packet. There is one
            exception in non-storing mode: when a packet is going down from the
            root.  In a downward non-storing mode, the entire route is
            written, so there can be no loops by construction, nor any
            confusion about which forwarding table to use.  There may be
            cases (such as in 6tisch) where the instanceID may still be
            needed to pick an appropriate priority or channel at each hop.
          </t>

          <t>
            In the tables present in this document, the term "RPL aware leaf" is has been shortened to
            "Raf", and "not-RPL aware leaf" has been shortened to "~Raf" to
            make the table fit in available space.
          </t>

          <t>
            The earlier examples are more extensive to make sure that the
            process is clear, while later examples are more consise.
          </t>
        </section>


        <section title=" Storing mode">

          <t>
	   In storing mode (fully stateful), the sender cannot determine whether the destination is RPL-capable and
           thus would need an IP-in-IP header. The IP-in-IP
           header needs to be addressed on a hop-by-hop basis so that the last 6LR can remove
           the RPI header. Additionally, The sender can determine if the destination is inside the LLN by
            looking if the destination address is matched by the DIO's PIO option.
          </t>

          <t>
            The following table summarizes what headers are needed in the following
            scenarios, and indicates when the IP-in-IP header must be
            inserted on a hop-by-hop basis, and when it can target the
            destination node directly.  There are three possible situations:
            hop-by-hop necessary (indicated by "hop"), or destination address
            possible (indicated by "dst").  In all cases hop by hop can be
            used. In cases where no IP-in-IP header is needed, the column is left blank.
          </t>
          <t>
            The leaf can be a router 6LR or a host, both indicated as 6LN.
          </t>

         <texttable anchor="table_storing" title="Headers needed in Storing mode: RPI, RH3, IP-in-IP encapsulation" >
           <ttcol> Use Case </ttcol>
           <ttcol> RPI  </ttcol>
           <ttcol> RH3  </ttcol>
           <ttcol> IP-in-IP </ttcol>
           <ttcol> IP-in-IP dst </ttcol>
           <c> Raf to root</c>
           <c> Yes</c>
           <c> No</c>
           <c> No</c>
           <c> -- </c>

           <c> root to Raf</c>
           <c> Yes</c>
           <c> No</c>
           <c> No</c>
           <c> -- </c>

           <c> root to ~Raf</c>
           <c> Yes</c>
           <c> No</c>
           <c> Yes</c>
           <c> hop </c>

           <c> ~Raf to root</c>
           <c> Yes</c>
           <c> No</c>
           <c> Yes</c>
           <c> root </c>

           <c> Raf to Int</c>
           <c> Yes</c>
           <c> No</c>
           <c> Yes</c>
           <c> root </c>

           <c> Int to Raf</c>
           <c> Yes</c>
           <c> No</c>
           <c> Yes</c>
           <c> raf </c>

           <c> ~Raf to Int</c>
           <c> Yes</c>
           <c> No</c>
           <c> Yes</c>
           <c> root </c>

           <c> Int to ~Raf</c>
           <c> Yes</c>
           <c> No</c>
           <c> Yes</c>
           <c> hop </c>

           <c> Raf to Raf</c>
           <c> Yes</c>
           <c> No</c>
           <c> No</c>
           <c> -- </c>

           <c> Raf to ~Raf</c>
           <c> Yes</c>
           <c> No</c>
           <c> Yes</c>
           <c> hop </c>

           <c> ~Raf to Raf </c>
           <c> Yes</c>
           <c> No</c>
           <c> Yes</c>
           <c> dst </c>

           <c> ~Raf to ~Raf</c>
           <c> Yes</c>
           <c> No</c>
           <c> Yes</c>
           <c> hop </c>
         </texttable>

               <section title="Example of Flow from RPL-aware-leaf to root">

			<t>
                        In storing mode, RFC 6553 (RPI) is used
                        to send RPL Information instanceID and rank
                        information.
                        </t>
			<t>
                         As stated in Section 16.2 of <xref
                         target="RFC6550"/>  a RPL-aware-leaf node does not
                         generally issue DIO messages; a leaf node accepts
                         DIO messages from upstream.
                        (When the inconsistency in routing occurs, a leaf
                        node will generate a DIO with an infinite rank, to
                        fix it).  It may issue DAO and DIS
                        messages though it generally ignores DAO and DIS
                        messages.
                        </t>

                        <t>
                        In storing mode, RFC 6553 (RPI) is used
                        to send RPL Information instanceID and rank
                        information.
                        </t>

                         <t>
                           In this case the flow comprises:

                        </t>
                        <t>
                        RPL-aware-leaf (6LN) --> 6LR --> 6LR,... --> root
                        (6LBR)
                        </t>
                        <t> As it was mentioned In this document 6LRs, 6LBR are always
                        full-fledge RPL routers.
                        </t>
                         <t>
                           The 6LN inserts the RPI header, and sends the
                           packet to 6LR which decrements the rank in RPI and
                           sends the packet up. When the packet arrives at
                           6LBR, the RPI is removed and the packet is
                           processed.
                         </t>
                        <t>
                          No IP-in-IP header is required.
                        </t>

                         <t> The RPI header can be removed by the 6LBR
                         because the packet is addressed to the 6LBR.  The
                         6LN must know that it is communicating with the 6LBR
                         to make use of this scenario.
                         The 6LN can know the address of the 6LBR because it
                         knows the address of the root via the DODAGID in the
                         DIO messages.
                         </t>

                        <texttable title="Storing: Summary of the use of headers from RPL-aware-leaf to root">
                                          <ttcol> Header</ttcol>
                                          <ttcol> 6LN</ttcol>
                                          <ttcol> 6LR</ttcol>
                                          <ttcol> 6LBR</ttcol>
                                          <c> Inserted headers</c>
                                          <c> RPI</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> Removed headers</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> RPI </c>
                                          <c> Re-added headers</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> Modified headers</c>
                                          <c> -- </c>
                                          <c> RPI </c>
                                          <c> -- </c>
                                          <c> Untouched headers</c>
                                          <c> -- </c>
                                          <c> --</c>
                                          <c> --</c>

                        </texttable>
               </section>

               <section title="Example of Flow from root to RPL-aware-leaf">

                         <t>
                                In this case the flow comprises:
                        </t>
                        <t>

                                root (6LBR)--> 6LR --> RPL-aware-leaf (6LN)
                        </t>
                        <t>
                                In this case the 6LBR inserts RPI header and
                                sends the packet down, the 6LR is going to
                                increment the rank in RPI (examines
                                instanceID for multiple tables), the packet
                                is processed in 6LN and RPI removed.
                        </t>
                        <t>
                          No IP-in-IP header is required.
                        </t>

                        <texttable title="Storing: Summary of the use of headers from root to RPL-aware-leaf">
                                          <ttcol> Header</ttcol>
                                          <ttcol> 6LBR</ttcol>
                                          <ttcol> 6LR</ttcol>
                                          <ttcol> 6LN</ttcol>
                                          <c> Inserted headers</c>
                                          <c> RPI </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> Removed headers</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> RPI </c>
                                          <c> Re-added headers</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> Modified headers</c>
                                          <c> -- </c>
                                          <c> RPI  </c>
                                          <c> -- </c>
                                          <c> Untouched headers</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                        </texttable>
               </section>

               <section title="Example of Flow from root to not-RPL-aware-leaf">
                        <t>
                        In this case the flow comprises:
                        </t>
                        <t>
                                root (6LBR)--> 6LR --> not-RPL-aware-leaf (6LN)
                        </t>
                        <t>
                          As the RPI extension can be ignored by the
                          not-RPL-aware leaf, this situation is identical to
                          the previous scenario.
                        </t>
                        <texttable title="Storing: Summary of the use of headers from root to not-RPL-aware-leaf">
                                          <ttcol> Header</ttcol>
                                          <ttcol> 6LBR</ttcol>
                                          <ttcol> 6LR</ttcol>
                                          <ttcol> IPv6</ttcol>
                                          <c> Inserted headers</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> Removed headers</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> Re-added headers</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> Modified headers</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> Untouched headers</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                        </texttable>
               </section>

               <section title="Example of Flow from not-RPL-aware-leaf to root">
                        <t>
                                In this case the flow comprises:
                        </t>
                        <t>

                                not-RPL-aware-leaf (6LN) --> 6LR --> root (6LBR)
                        </t>
                        <t>
                                When the packet arrives from IPv6 node to
                                6LR, the 6LR will insert an RPI header, encapsuladed
                                in a IPv6-in-IPv6 header.  The IPv6-in-IPv6
                                header can be addressed to the next hop, or to
                                the root.  The root removes the header and processes
                                the packet.
                        </t>

                        <texttable title="Storing: Summary of the use of headers from not-RPL-aware-leaf to root">
                                          <ttcol> Header</ttcol>
                                          <ttcol> IPv6</ttcol>
                                          <ttcol> 6LR</ttcol>
                                          <ttcol> 6LBR</ttcol>
                                          <c> Inserted headers</c>
                                          <c> -- </c>
                                          <c>  IP-in-IP(RPI) </c>
                                          <c> -- </c>
                                          <c> Removed headers</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> IP-in-IP(RPI)</c>
                                          <c> Re-added headers</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> Modified headers</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> Untouched headers</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                        </texttable>
               </section>

               <section title="Example of Flow from RPL-aware-leaf to Internet">
                         <t>
                        RPL information from RFC 6553 MAY go out to
                        Internet as it will be ignored by nodes which have
                        not been configured to be RPI aware.
                         </t>
                         <t>
                                In this case the flow comprises:
                        </t>
                        <t>

                                RPL-aware-leaf (6LN) --> 6LR --> root (6LBR) --> Internet
                        </t>
                        <t>
                          No IP-in-IP header is required.
                        </t>

                        <texttable title="Storing: Summary of the use of headers from RPL-aware-leaf to Internet">
                                          <ttcol> Header</ttcol>
                                          <ttcol> 6LN</ttcol>
                                          <ttcol> 6LR</ttcol>
                                          <ttcol> 6LBR</ttcol>
                                          <ttcol> Internet</ttcol>
                                          <c> Inserted headers</c>
                                          <c> RPI </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> Removed headers</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> Re-added headers</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> Modified headers</c>
                                          <c> -- </c>
                                          <c>RPI </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> Untouched headers</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                        </texttable>
               </section>

               <!-- section 5.6 -->
               <section title="Example of Flow from Internet to RPL-aware-leaf">
                        <t>
                                In this case the flow comprises:
                        </t>
                        <t>

                                Internet --> root (6LBR) --> 6LR --> RPL-aware-leaf (6LN)
                        </t>
                        <t>

                                When the packet arrives from Internet to 6LBR
                                the RPI header is added in a outer
                                IPv6-in-IPv6 header and sent to 6LR, which
                                modifies the rank in the RPI. When the packet
                                arrives at 6LN the RPI header is removed and the
                                packet processed.
                        </t>

                        <texttable title="Storing: Summary of the use of headers from Internet to RPL-aware-leaf">
                                          <ttcol> Header</ttcol>
                                          <ttcol> Internet</ttcol>
                                          <ttcol> 6LBR</ttcol>
                                          <ttcol> 6LR</ttcol>
                                          <ttcol> 6LN</ttcol>
                                          <c> Inserted headers</c>
                                          <c> -- </c>
                                          <c> IP-in-IP(RPI) </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> Removed headers</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> IP-in-IP(RPI) </c>
                                          <c> Re-added headers</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> Modified headers</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> RPI </c>
                                          <c> -- </c>
                                          <c> Untouched headers</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                        </texttable>
               </section>


               <!-- section 5.6 -->
               <section title="Example of Flow from not-RPL-aware-leaf to Internet">
                 <t>
                   In this case the flow comprises:
                 </t>
                 <t>
                   not-RPL-aware-leaf (6LN) --> 6LR --> root (6LBR) --> Internet
                 </t>
                 <t>
                   The 6LR node will add an IP-in-IP(RPI) header addressed either
                   to the root, or hop-by-hop such that the root can remove
                   the RPI header before passing upwards.
                 </t>
                 <t>
                   The originating node will ideally leave the IPv6 flow
                   label as zero so that it can be better compressed through
                   the LLN, and the 6LBR will set the flow label to a
                   non-zero value when sending to the Internet.
                 </t>

                 <texttable title="Storing: Summary of the use of headers from not-RPL-aware-leaf to Internet">
                                          <ttcol> Header</ttcol>
                                          <ttcol> 6LN </ttcol>
                                          <ttcol> 6LR</ttcol>
                                          <ttcol> 6LBR</ttcol>
                                          <ttcol> Internet</ttcol>
                                          <c> Inserted headers</c>
                                          <c> -- </c>
                                          <c> IP-in-IP(RPI) </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> Removed headers</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c>IP-in-IP(RPI) </c>
                                          <c> -- </c>
                                          <c> Re-added headers</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> Modified headers</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> --</c>
                                          <c> -- </c>
                                          <c> Untouched headers</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                        </texttable>
               </section>

                       <section title=" Example of Flow from Internet to non-RPL-aware-leaf">
                        <t>
                                In this case the flow comprises:
                        </t>
                        <t>

                                Internet --> root (6LBR) --> 6LR --> not-RPL-aware-leaf (6LN)
                        </t>
                        <t>
                          The 6LBR will have to add an RPI header within an
                          IP-in-IP header. The IP-in-IP can be addressed to
                          the not-RPL-aware-leaf, leaving the RPI inside.
                        </t>
                        <t>
                          The 6LBR MAY set the flow label on the inner IP-in-IP
                          header to zero in order to aid in compression, as
                          the packet will not emerge again from the LLN.
                        </t>
                        <texttable title="Storing: Summary of the use of headers from Internet to non-RPL-aware-leaf">
                                          <ttcol> Header</ttcol>
                                          <ttcol> Internet</ttcol>
                                          <ttcol> 6LBR</ttcol>
                                          <ttcol> 6LR</ttcol>
                                          <ttcol> IPv6</ttcol>
                                          <c> Inserted headers</c>
                                          <c> -- </c>
                                          <c>  IP-in-IP(RPI) </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> Removed headers</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c>IP-in-IP(RPI) </c>
                                          <c> -- </c>
                                          <c> Re-added headers</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> Modified headers</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c>-- </c>
                                          <c> Untouched headers</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                        </texttable>
               </section>

               <!-- section 5.9 -->
               <section anchor="storingraftoraf" title="Example of Flow from RPL-aware-leaf to RPL-aware-leaf">
                 <t>
                   In <xref target="RFC6550"/> RPL allows a simple one-hop
                   optimization for both storing and non-storing
                   networks.
                   A node may send a packet destined to a one-hop
                   neighbor directly to that node. Section 9 in <xref
                   target="RFC6550"/>.
                 </t>
                 <t>
                   In this case the flow comprises:
                 </t>
                 <t>
                   6LN --> 6LR --> common parent (6LR) --> 6LR -->  6LN
                 </t>
                 <t>
                   This case is assumed in the same RPL Domain. In the
                   common parent, the direction of RPI is changed (from
                   increasing to decreasing the rank).
                 </t>
                 <t>
                   While the 6LR nodes will update the RPI, no node needs to
                   add or remove the RPI, so no IP-in-IP headers are
                   necessary.
                   This may be done regardless of where the destination is,
                   as the included RPI will be ignored by the receiver.
                 </t>

                 <texttable title="Storing: Summary of the use of headers for RPL-aware-leaf to RPL-aware-leaf">
                                          <ttcol> Header</ttcol>
                                          <ttcol> 6LN src</ttcol>
                                          <ttcol> 6LR</ttcol>
                                          <ttcol> 6LR (common parent)</ttcol>
                                          <ttcol> 6LR</ttcol>
                                          <ttcol> 6LN dst</ttcol>
                                          <c> Inserted headers</c>
                                          <c> RPI </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> Removed headers</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> RPI</c>
                                          <c> Re-added headers</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> Modified headers</c>
                                          <c> -- </c>
                                          <c> RPI (decreasing rank) </c>
                                          <c> RPI (increasing rank)</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> Untouched headers</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                        </texttable>
               </section>

               <!-- section 5.10 -->
               <section anchor="storingraftononraf" title="Example of Flow from RPL-aware-leaf to non-RPL-aware-leaf">
                        <t>
                        In this case the flow comprises:
                        </t>
                        <t>
                         6LN --> 6LR --> common parent (6LR) --> 6LR -->  not-RPL-aware 6LN
                        </t>
                        <t>
                          This situation is identical to the situation
                          <xref target="storingraftoraf" />
                        </t>
               </section>

               <section anchor="storingnotraftoraf" title="Example of Flow from not-RPL-aware-leaf to RPL-aware-leaf">
                 <t>
                   In this case the flow comprises:
                 </t>
                 <t>
                   not-RPL-aware 6LN --> 6LR --> common parent (6LR) --> 6LR -->  6LN
                 </t>
                 <t>
                   The 6LR receives the packet from the the IPv6 node and
                   inserts
                   and the RPI header encapsulated in IPv6-in-IPv6 header.
                   The IP-in-IP header is addressed to the destinion 6LN.
                 </t>
                 <texttable title="Storing: Summary of the use of headers from not-RPL-aware-leaf to RPL-aware-leaf">
                                          <ttcol> Header</ttcol>
                                          <ttcol> IPv6</ttcol>
                                          <ttcol> 6LR</ttcol>
                                          <ttcol> common parent (6LR)</ttcol>
                                          <ttcol> 6LR</ttcol>
                                          <ttcol> 6LN</ttcol>
                                          <c> Inserted headers</c>
                                          <c> -- </c>
                                          <c> IP-in-IP(RPI) </c>
                                          <c> --</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> Removed headers</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> IP-in-IP(RPI) </c>
                                          <c> Re-added headers</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> Modified headers</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> IP-in-IP(RPI) </c>
                                          <c> IP-in-IP(RPI) </c>
                                          <c> -- </c>
                                          <c> Untouched headers</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                        </texttable>
               </section>

               <section title="Example of Flow from not-RPL-aware-leaf to not-RPL-aware-leaf">
                 <t>
                   In this case the flow comprises:
                 </t>
                 <t>
                   not-RPL-aware 6LN (IPv6 node)--> 6LR --> root (6LBR) --> 6LR --> not-RPL-aware 6LN (IPv6 node)
                 </t>
                 <t>
                   This flow is identical to
                   <xref target="storingnotraftoraf" />
                 </t>
               </section>
       </section>


       <section title="Non Storing mode">

         <texttable anchor="table_nonstoring" title="Headers needed in Non-Storing mode: RPI, RH3, IP-in-IP encapsulation" >
           <ttcol> Use Case </ttcol>
           <ttcol> RPI </ttcol>
           <ttcol> RH3 </ttcol>
           <ttcol> IP-in-IP </ttcol>
           <ttcol> IP-in-IP dst </ttcol>
           <c> Raf to root</c>
           <c> Yes</c>
           <c> No</c>
           <c> No</c>
           <c> --</c>
           <c> root to Raf</c>
           <c> Yes</c>
           <c> Yes</c>
           <c> No</c>
           <c> --</c>
           <c> root to ~Raf</c>
           <c> No</c>
           <c> Yes</c>
           <c> Yes</c>
           <c> 6LR </c>
           <c> ~Raf to root</c>
           <c> Yes</c>
           <c> No</c>
           <c> Yes</c>
           <c> root </c>
           <c> Raf to Int</c>
           <c> Yes</c>
           <c> No</c>
           <c> Yes</c>
           <c> root </c>
           <c> Int to Raf</c>
           <c> opt</c>
           <c> Yes</c>
           <c> Yes</c>
           <c> dst </c>
           <c> ~Raf to Int</c>
           <c> Yes</c>
           <c> No</c>
           <c> Yes</c>
           <c> root </c>
           <c> Int to ~Raf</c>
           <c> opt</c>
           <c> Yes</c>
           <c> Yes</c>
           <c> 6LR </c>
           <c> Raf to Raf</c>
           <c> Yes</c>
           <c> Yes</c>
           <c> Yes</c>
           <c> root/dst</c>
           <c> Raf to ~Raf</c>
           <c> Yes</c>
           <c> Yes</c>
           <c> Yes</c>
           <c> root/6LR</c>
           <c> ~Raf to Raf </c>
           <c> Yes</c>
           <c> Yes</c>
           <c> Yes</c>
           <c> root/6LN</c>
           <c> ~Raf to ~Raf</c>
           <c> Yes</c>
           <c> Yes</c>
           <c> Yes</c>
           <c> root/6LR</c>
         </texttable>


               <section title=" Example of Flow from RPL-aware-leaf to root">
                         <t>
                        In non-storing mode the leaf node uses default
                        routing to send traffic to the root. The RPI header
                        must be included to avoid/detect loops.
                        </t>

                        <t>
                        RPL-aware-leaf (6LN) --> 6LR --> root (6LBR)
                        </t>
                        <t>
                        This situation is the same case as storing mode.
                         </t>

                        <texttable title="Non Storing: Summary of the use of headers from RPL-aware-leaf to root">
                                          <ttcol> Header</ttcol>
                                          <ttcol> 6LN</ttcol>
                                          <ttcol> 6LR</ttcol>
                                          <ttcol> 6LBR</ttcol>
                                          <c> Inserted headers</c>
                                          <c> RPI</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> Removed headers</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> RPI </c>
                                          <c> Re-added headers</c>
                                          <c> -- </c>
                                          <c> RPI </c>
                                          <c> -- </c>
                                          <c> Modified headers</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> Untouched headers</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>

                        </texttable>
               </section>

               <section title=" Example of Flow from root to RPL-aware-leaf">
                 <t>
                   In this case the flow comprises:
                 </t>
                 <t>

                   root (6LBR)--> 6LR --> RPL-aware-leaf (6LN)
                 </t>
                 <t>
                   The 6LBR will insert an RH3, and may optionally insert an
                   RPI header.   No IP-in-IP header is necessary as the traffic
                   originates with an RPL aware node, the 6LBR.
                  The destination is known to 6LBR because, the root knows the whole topology in non-storing mode.
                 </t>

                        <texttable title="Non Storing: Summary of the use of headers from root to RPL-aware-leaf">
                                          <ttcol> Header</ttcol>
                                          <ttcol> 6LBR</ttcol>
                                          <ttcol> 6LR</ttcol>
                                          <ttcol> 6LN</ttcol>
                                          <c> Inserted headers</c>
                                          <c> (opt: RPI), RH3</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> Removed headers</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> RH3,RPI </c>
                                          <c> Re-added headers</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> Modified headers</c>
                                          <c> -- </c>
                                          <c>RH3 </c>
                                          <c> -- </c>
                                          <c> Untouched headers</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                        </texttable>
               </section>

               <section title=" Example of Flow from root to not-RPL-aware-leaf">
                        <t>
                                In this case the flow comprises:
                        </t>
                        <t>

                                root (6LBR)--> 6LR --> not-RPL-aware-leaf (IPv6 node)
                        </t>
                        <t>
                          In 6LBR the RH3 is added, modified in each intermediate 6LR and
                          it is fully consumed in the last 6LR, but left there.
                          If the RPI is left present, the IPv6 node which
                          does not understand it will drop it, therefore the
                          RPI should be removed before reaching the IPv6-only
                          node.  To permit removal, an IP-in-IP header
                          (hop-by-hop) or addressed to the last 6LR is
                          necessary.  Due the complete knowledge of the
                          topology at the root, the 6LBR is able to address
                          the IP-in-IP header to the last 6LR.
                        </t>
                        <t>
                          Omitting the RPI entirely is therefore a better
                          solution, as no IP-in-IP header is necessary.
                        </t>

                               <texttable title=" Non Storing: Summary of the use of headers from root to not-RPL-aware-leaf">
                                          <ttcol> Header</ttcol>
                                          <ttcol> 6LBR</ttcol>
                                          <ttcol> 6LR</ttcol>
                                          <ttcol> IPv6</ttcol>
                                          <c> Inserted headers</c>
                                          <c> RH3</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> Removed headers</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> Re-added headers</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> Modified headers</c>
                                          <c> -- </c>
                                          <c>RH3</c>
                                          <c> -- </c>
                                          <c> Untouched headers</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                        </texttable>
               </section>

               <section title=" Example of Flow from not-RPL-aware-leaf to root">
                        <t>
                                In this case the flow comprises:
                        </t>
                        <t>

                                IPv6-node --> 6LR1 --> 6LR2 --> root (6LBR)
                        </t>
                        <t>
                          In this case the RPI is added by the first
                          6LR, encapsulated in an IP-in-IP header, and is not
                          modified in the followings 6LRs.  The RPI and
                          entire packet is consumed by the root.
                        </t>

                        <texttable title="Non Storing: Summary of the use of headers from not-RPL-aware-leaf to root">
                                          <ttcol> Header</ttcol>
                                          <ttcol> IPv6</ttcol>
                                          <ttcol> 6LR1</ttcol>
                                          <ttcol> 6LR2</ttcol>
                                          <ttcol> 6LBR</ttcol>
                                          <c> Inserted headers</c>
                                          <c> -- </c>
                                          <c> IP-in-IP(RPI) </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> Removed headers</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> IP-in-IP(RPI) </c>
                                          <c> Re-added headers</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> Modified headers</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> Untouched headers</c>
                                          <c> -- </c>
                                          <c> IP-in-IP(RPI) </c>
                                          <c> -- </c>
                                          <c> -- </c>
                        </texttable>
               </section>

               <section title=" Example of Flow from RPL-aware-leaf to Internet">
                        <t>
                                In this case the flow comprises:
                        </t>
                        <t>
                                RPL-aware-leaf (6LN) --> 6LR --> root (6LBR) --> Internet
                        </t>
                        <t>
                                This case requires that the RPI be added, but
                                removed by the 6LBR.  The 6LN must therefore
                                add the RPI inside an IP-in-IP header, addressed
                                to the root.  This case is identical to
                                storing-mode case.
                        </t>
                        <t>
                          The IPv6 flow label should be set to zero to aid
                          in compression, and the 6LBR will set it to a
                          non-zero value when sending towards the Internet.
                        </t>

                        <texttable title="Non Storing: Summary of the use of headers from RPL-aware-leaf to Internet">
                          <ttcol> Header</ttcol>
                          <ttcol> 6LN</ttcol>
                          <ttcol> 6LR</ttcol>
                          <ttcol> 6LBR</ttcol>
                          <ttcol> Internet</ttcol>
                          <c> Inserted headers</c>
                          <c> IP-in-IP(RPI)</c>
                          <c> -- </c>
                          <c> -- </c>
                          <c> -- </c>
                          <c> Removed headers</c>
                          <c> -- </c>
                          <c> -- </c>
                          <c> IP-in-IP(RPI) </c>
                          <c> -- </c>
                          <c> Re-added headers</c>
                          <c> -- </c>
                          <c> -- </c>
                          <c> -- </c>
                          <c> -- </c>
                          <c> Modified headers</c>
                          <c> -- </c>
                          <c> -- </c>
                          <c> -- </c>
                          <c> -- </c>
                          <c> Untouched headers</c>
                          <c> -- </c>
                          <c> RPI </c>
                          <c> -- </c>
                          <c> -- </c>
                        </texttable>
               </section>

               <section title=" Example of Flow from Internet to RPL-aware-leaf">
                        <t>
                                In this case the flow comprises:
                        </t>
                        <t>
                                Internet --> root (6LBR) --> 6LR --> RPL-aware-leaf (6LN)
                        </t>
                        <t>
                          The 6LBR must add an RH3 header.  As the 6LBR will
                          know the path and address of the target not, it can
                          address the IP-in-IP header to that node.
                          The 6LBR will zero the flow label upon entry in
                          order to aid compression.
                        </t>
                        <t>
                          The RPI may be added or not.
                        </t>

                        <texttable title="Non Storing: Summary of the use of headers from Internet to RPL-aware-leaf">
                          <ttcol> Header</ttcol>
                          <ttcol> Internet</ttcol>
                          <ttcol> 6LBR</ttcol>
                          <ttcol> 6LR</ttcol>
                          <ttcol> 6LN</ttcol>
                          <c> Inserted headers</c>
                          <c> -- </c>
                          <c>  IP-in-IP(RH3,opt:RPI)  </c>
                          <c> -- </c>
                          <c> -- </c>
                          <c> Removed headers</c>
                          <c> -- </c>
                          <c> -- </c>
                          <c> IP-in-IP(RH3) </c>
                          <c> -- </c>
                          <c> Re-added headers</c>
                          <c> -- </c>
                          <c> -- </c>
                          <c> -- </c>
                          <c> -- </c>
                          <c> Modified headers</c>
                          <c> -- </c>
                          <c> -- </c>
                          <c> IP-in-IP(RH3) </c>
                          <c> -- </c>
                          <c> Untouched headers</c>
                          <c> -- </c>
                          <c> -- </c>
                          <c> -- </c>
                          <c> -- </c>
                        </texttable>
               </section>

               <section title=" Example of Flow from not-RPL-aware-leaf to Internet">
                        <t>
                                In this case the flow comprises:
                        </t>
                        <t>

                                not-RPL-aware-leaf (6LN) --> 6LR --> root (6LBR) -->  Internet
                        </t>
                        <t>
                                In this case the flow label is recommended to
                                be zero in the IPv6 node. As RPL headers are
                                added in the IPv6 node, the first 6LN will
                                add an RPI header inside a new IP-in-IP header.
                                The IP-in-IP header will be addressed to the
                                root.  This case is identical to the
                                storing-mode case (Section 5.7).
                        </t>

                        <texttable title="Non Storing: Summary of the use of headers from not-RPL-aware-leaf to Internet">
                                          <ttcol> Header</ttcol>
                                          <ttcol> IPv6</ttcol>
                                          <ttcol> 6LR</ttcol>
                                          <ttcol> 6LBR</ttcol>
                                          <ttcol> Internet</ttcol>
                                          <c> Inserted headers</c>
                                          <c> -- </c>
                                          <c> IP-in-IP(RPI)</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> Removed headers</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> IP-in-IP(RPI) </c>
                                          <c> -- </c>
                                          <c> Re-added headers</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> Modified headers</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> Untouched headers</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                        </texttable>
               </section>

               <section title=" Example of Flow from Internet to non-RPL-aware-leaf">

                        <t>
                                In this case the flow comprises:
                        </t>
                        <t>
                                Internet --> root (6LBR) --> 6LR --> not-RPL-aware-leaf (IPv6 node)
                        </t>
                        <t>
                          The 6LBR must add an RH3 header inside an IP-in-IP
                          header.
                          The 6LBR will know the path, and will recognize
                          that the final node is not an RPL capable node as
                          it will have received the connectivity DAO from the
                          nearest 6LR.  The 6LBR can therefore make the IP-in-IP
                          header destination be the last 6LR.
                          The 6LBR will set to zero the flow label upon entry in
                          order to aid compression.
                        </t>

                        <texttable title=" NonStoring: Summary of the use of headers from Internet to non-RPL-aware-leaf">
                          <ttcol> Header</ttcol>
                          <ttcol> Internet</ttcol>
                          <ttcol> 6LBR</ttcol>
                          <ttcol> 6LR</ttcol>
                          <ttcol> IPv6</ttcol>
                          <c> Inserted headers</c>
                          <c> -- </c>
                          <c> IP-in-IP(RH3,opt:RPI) </c>
                          <c> -- </c>
                          <c> -- </c>
                          <c> Removed headers</c>
                          <c> -- </c>
                          <c> -- </c>
                          <c>  IP-in-IP(RH3, RPI) </c>
                          <c> -- </c>
                          <c> Re-added headers</c>
                          <c> -- </c>
                          <c> -- </c>
                          <c> -- </c>
                          <c> -- </c>
                          <c> Modified headers</c>
                          <c> -- </c>
                          <c> -- </c>
                          <c> -- </c>
                          <c> -- </c>
                          <c> Untouched headers</c>
                          <c> -- </c>
                          <c> -- </c>
                          <c> -- </c>
                          <c> -- </c>
                        </texttable>
               </section>

               <section title=" Example of Flow from RPL-aware-leaf to RPL-aware-leaf">
                        <t>
                        In this case the flow comprises:
                        </t>
                        <t>
                         6LN --> 6LR --> root (6LBR) --> 6LR -->  6LN
                        </t>
                        <t>
                          This case involves only nodes in same RPL Domain.
                          The originating node will add an RPI header to the
                          original packet, and send the packet upwards.
                        </t>
                        <t>
                          The originating node could put the RPI into an IP-in-IP
                          header addressed to the root, so that the 6LBR can
                          remove that header.
                        </t>
                        <t>
                          The 6LBR will need to insert an RH3 header, which
                          requires that it add an IP-in-IP header.  It may be
                          able to remove the RPI if it was contained in an
                          IP-in-IP header addressed to it.  Otherwise, there may
                          be an RPI header buried inside the inner IP header,
                          which should get ignored.
                        </t>

                 <t>
                   Networks that use the RPL P2P extension <xref target="RFC6997" />
                   are essentially non-storing DODAGs and fall into this
                   scenario.
                 </t>


                 <texttable title="Non Storing: Summary of the use of headers for RPL-aware-leaf to RPL-aware-leaf">
                   <ttcol> Header</ttcol>
                   <ttcol> 6LN src</ttcol>
                   <ttcol> 6LBR</ttcol>
                   <ttcol> 6LR</ttcol>
                   <ttcol> 6LN dst</ttcol>
                   <c> Inserted headers</c>
                   <c> IP-in-IP(RPI) </c>
                   <c> IP-in-IP(RH3 to 6LN,RPI) </c>
                   <c> -- </c>
                   <c> -- </c>
                   <c> Removed headers</c>
                   <c> -- </c>
                   <c> -- </c>
                   <c> -- </c>
                   <c> IP-in-IP(RH3,RPI)</c>
                   <c> Re-added headers</c>
                   <c> -- </c>
                   <c> -- </c>
                   <c> -- </c>
                   <c> -- </c>
                   <c> Modified headers</c>
                   <c> -- </c>
                   <c> -- </c>
                   <c> -- </c>
                   <c> -- </c>
                   <c> Untouched headers</c>
                   <c> -- </c>
                   <c> -- </c>
                   <c> -- </c>
                   <c> -- </c>
                 </texttable>
               </section>

               <section title=" Example of Flow from RPL-aware-leaf to not-RPL-aware-leaf">
                        <t>
                        In this case the flow comprises:
                        </t>
                        <t>
                         6LN --> 6LR --> root (6LBR) --> 6LR -->  not-RPL-aware (IPv6 node)
                        </t>
                        <t>
                          As in the previous case, the 6LN will insert an RPI
                          header which MUST be in an IP-in-IP header addressed to
                          the root so that the 6LBR can remove this RPI.
                          The 6LBR will then insert an RH3 inside a new IP-in-IP
                          header addressed to the 6LN above the destination node.
                        </t>

                                       <texttable title="Non Storing: Summary of the use of headers from RPL-aware-leaf to not-RPL-aware-leaf">
                                          <ttcol> Header</ttcol>
                                          <ttcol> 6LN</ttcol>
                                          <ttcol> 6LBR</ttcol>
                                          <ttcol> 6LR</ttcol>
                                          <ttcol> IPv6</ttcol>
                                          <c> Inserted headers</c>
                                          <c> IP-in-IP(RPI) </c>
                                          <c>  IP-in-IP(RH3, opt RPI) </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> Removed headers</c>
                                          <c> -- </c>
                                          <c> IP-in-IP(RPI) </c>
                                          <c> IP-in-IP(RH3, opt RPI) </c>
                                          <c> -- </c>
                                          <c> Re-added headers</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> Modified headers</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> Untouched headers</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                        </texttable>
               </section>

               <section title=" Example of Flow from not-RPL-aware-leaf to RPL-aware-leaf">

                        <t>
                        In this case the flow comprises:
                        </t>
                        <t>
                         not-RPL-aware 6LN --> 6LR --> root (6LBR) --> 6LR -->  6LN
                        </t>
                        <t>
                          This scenario is mostly identical to the previous
                          one.  The RPI is added by the first 6LR inside an
                          IP-in-IP header addressed to the root.  The 6LBR will
                          remove this RPI, and add it's own IP-in-IP header
                          containing an RH3 header.
                        </t>

                                <texttable title="Non Storing: Summary of the use of headers from not-RPL-aware-leaf to RPL-aware-leaf">
                                          <ttcol> Header</ttcol>
                                          <ttcol> IPv6</ttcol>
                                          <ttcol> 6LR</ttcol>
                                          <ttcol> 6LBR</ttcol>
                                          <ttcol> 6LN</ttcol>
                                          <c> Inserted headers</c>
                                          <c> -- </c>
                                          <c> IP-in-IP(RPI) </c>
                                          <c> IP-in-IP(RH3)</c>
                                          <c> -- </c>
                                          <c> Removed headers</c>
                                          <c> -- </c>
                                          <c> IP-in-IP(RPI) </c>
                                          <c> -- </c>
                                          <c> IP-in-IP(RH3) </c>
                                          <c> Re-added headers</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> Modified headers</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> Untouched headers</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                        </texttable>
               </section>

               <section title=" Example of Flow from not-RPL-aware-leaf to not-RPL-aware-leaf">

                        <t>
                        In this case the flow comprises:
                        </t>
                        <t>
                         not-RPL-aware 6LN --> 6LR --> root (6LBR) --> 6LR --> not-RPL-aware (IPv6 node)
                        </t>
                        <t>
                          This scenario is the combination of the previous
                          two cases.
                        </t>
                                <texttable title="Non Storing: Summary of the use of headers from not-RPL-aware-leaf to not-RPL-aware-leaf">
                                          <ttcol> Header</ttcol>
                                          <ttcol> IPv6</ttcol>
                                          <ttcol> 6LR</ttcol>
                                          <ttcol> 6LBR</ttcol>
                                          <ttcol> 6LR</ttcol>
                                          <ttcol> IPv6</ttcol>
                                          <c> Inserted headers</c>
                                          <c> -- </c>
                                          <c>  IP-in-IP(RPI) </c>
                                          <c>  IP-in-IP(RH3) </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> Removed headers</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> IP-in-IP(RPI) </c>
                                          <c> IP-in-IP(RH3, opt RPI) </c>
                                          <c> -- </c>
                                          <c> Re-added headers</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> Modified headers</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> Untouched headers</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                        </texttable>
                       </section>

       </section>

       <section title="Observations about the problem">
         <section title="Storing mode">
          <t>
            In the completely general storing case, which includes not-RPL
            aware leaf nodes, it is not possible for a sending node to know
            if the destination is RPL aware, and therefore it must always use
            hop-by-hop IP-in-IP encapsulation, and it can never omit the IP-in-IP
            encapsulation.  See table <xref target="table_storing" />
          </t>
          <t>
            The simplest fully general approach for storing mode is to
            always put in hop-by-hop IP-in-IP headers.  <xref
            target="I-D.ietf-roll-routing-dispatch" /> shows that this
            hop-by-hop IP-in-IP header can be compressed down to {TBD} bytes.
          </t>
          <t>
            There are potential significant advantages to having a single
            code path that always processes IP-in-IP headers with no options.
          </t>

          <t>
            If all RPL aware nodes can be told/configured that there are no
            non-RPL aware leaf nodes, then the only case where an IP-in-IP header
            is needed is when communicating outside the LLN.  The 6LBR knows
            well when the communication is from the outside, and the 6LN
            can tell by comparing the destination address to the prefix
            provided in the PIO.  If it is known that there are no
            communications outside the RPL domain (noting that the RPL domain
            may well extend to outside the LLN), then RPI headers can be
            included in all packets, and IP-in-IP headers are *never* needed.
            This may be significantly advantageous in relatively closed
            systems such as in building or industrial automation.
            Again, there are advantages to having a single code path.
          </t>

          <t>
            In order to support the above two cases with full generality, the
            different situations (always do IP-in-IP vs never use IP-in-IP) should be
            signaled in the RPL protocol itself.
          </t>
         </section>

        <section title="Non-Storing mode">
          <t>
            In the non-storing case, dealing with non-RPL aware leaf nodes
            is much easier as the 6LBR (DODAG root) has complete knowledge
            about the connectivity of all DODAG nodes, and all traffic flows
            through the root node.
          </t>
          <t>
            The 6LBR can recognize non-RPL aware leaf nodes because it will
            receive a DAO about that node from the 6LN immediately above that
            node.  This means that the non-storing mode case can avoid ever
            using hop-by-hop IP-in-IP headers.
          </t>
          <t>
            It is unclear what it would mean for an RH3 header to be present
            in a hop-by-hop IP-in-IP header.  The receiving node ought to consume
            the IP-in-IP header, and therefore consume the RH3 as well, and then
            attempt to send the packet again.  But intermediate 6LN nodes
            would not know how to forward the packet (because they do not save the sate), so the RH3 would need
            to be retained.  This is a new kind of IPv6 packet processing.
            Therefore it may be that on the outbound leg of non-storing RPL
            networks, that hop-by-hop IP-in-IP header can NOT be used.
          </t>
          <t>
            <xref target="I-D.ietf-roll-routing-dispatch" /> shows how the
            destination=root, and destination=6LN IP-in-IP header can be
            compressed down to {TBD} bytes.
          </t>

          <t>
            Unlike in the storing mode case, there is no need for all nodes
            to know about the existence of non-RPL aware nodes.  Only the
            6LBR needs to change when there are non-RPL aware nodes.
            Further, in the non-storing case, the 6LBR is informed by the
            DAOs when there are non-RPL aware nodes.
          </t>
        </section>
      </section>


        <section title="6LoRH Compression cases">
           <t>
              The <xref target="I-D.ietf-roll-routing-dispatch"/> proposes a compression method for RPI, RH3 and IPv6-in-IPv6.
           </t>
           <t>
             In Storing Mode, for the examples of Flow from RPL-aware-leaf to
             non-RPL-aware-leaf and non-RPL-aware-leaf to non-RPL-aware-leaf
             comprise an IP-in-IP and RPI compression headers. The type of
             this case is critical since IP-in-IP is encapsulating a RPI
             header.
           </t>
           <t>

<figure title="Critical IP-in-IP (RPI)." anchor="rtghc"><artwork><![CDATA[

+--+-----+---+--------------+-----------+-------------+-------------+
|1 | 0|0 |TSE| 6LoRH Type 6 | Hop Limit | RPI - 6LoRH | LOWPAN IPHC |
+--+-----+---+--------------+-----------+-------------+-------------+

]]></artwork></figure>

           </t>
      </section>

        <section title="IANA Considerations">
           <t>
              There are no IANA considerations related to this document.
           </t>
        </section>

        <section anchor="Security" title="Security Considerations">
           <t>
         The security considerations covering of <xref target="RFC6553"/> and
         <xref target="RFC6554"/> apply when the packets get into RPL
         Domain.
          </t>
        </section>

        <section anchor="Acknowledgments" title="Acknowledgments">
           <t>
           This work is partially funded by the FP7 Marie Curie Initial Training
           Network (ITN) METRICS project (grant agreement No.  607728).
           </t>
           <t>
           The authors would like to acknowledge the review, feedback, and
           comments of Robert Cragie, Simon Duquennoy, Cenk Gündogan, Peter
           van der Stok, Xavier Vilajosana and Thomas Watteyne.
           </t>
         </section>


</middle>

 <back>

   <references title="Normative References">


     <!--?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml"?-->

     &RFC6553;
     &RFC6554;
     &RFC2119;
     <?rfc include="reference.RFC.2460" ?>
     <?ref include="reference.I-D.ietf-6man-rfc2460bis" ?>

     &RFC6550;
   </references>

   <references title="Informative References">
   <!--?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml"?-->

     &RFC6775;
     &RFC4443;
     &RFC7102;
     &I-D.ietf-6tisch-architecture;
     <?rfc include="reference.I-D.ietf-roll-routing-dispatch" ?>
     <?rfc include="reference.RFC.6997" ?>

        <reference anchor="Second6TischPlugtest" target="http://www.ietf.org/mail-archive/web/6tisch/current/pdfgDMQcdCkRz.pdf">
          <front>
            <title>2nd 6Tisch Plugtest </title>
            <author/>
            <date/>
          </front>
             </reference>
     </references>


   <!-- Change Log
v00 2011-03-07  BPa  Initial version

     -->
 </back>
</rfc>
<!--
    Local Variables:
    mode: xml
    End:
-->
