<?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-08" 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/mcr/</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>
        <t>
        RPL-node: It is device which implements RPL, thus we can say that the device is RPL-capable or RPL-aware.
	Please note that the device can be found inside the LLN or outside LLN.
	In this document a RPL-node which is a leaf is called RPL-aware-leaf.
        </t>
        <t>
        RPL-not-capable: It is device which do not implement RPL, thus we can say that the device is not-RPL-aware.
	Please note that the device can be found inside the LLN.
	In this document a not-RPL-node which is a leaf is called not-RPL-aware-leaf.
        </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) is a RPL host that does not have forwarding capability and (25) is a RPL router.
		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 (at the time to write this specification, the draft is on version 05).
           </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" />.  Extensions may not
            be added or removed except by the sender or the receiver.
          </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,
            when it has the <xref target="RFC6553" /> RPL Option
            Header known as the RPI or <xref target="RFC6554" /> SRH3
            Extension Header (S)RH3.
          </t>
          <t>
            The recent change to the second of these rules it means that the RPI
            Hop-by-Hop option MAY be left in place even if the end host does not
            understand it.
          </t>
          <t>
            NOTE: There is some possible security risk when the RPI
            information is released to the Internet.  At this point this is
            a theoretical situation.  It is clear that the RPI option would
            waste some network bandwidth when it escapes.
          </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. The new header can be placed is
            placed after this new outer IP header.
         </t>
         <t>
           A corollory is that an SHR3 or RPI Option can only be removed by an
            intermediate router if it is placed in an encapsulating IPv6
            Header, which is addressed to the intermediate router.
            When it does so, the whole encapsulating header must be
            removed. (A replacement may be added).  This sometimes can
            result in outer IP headers being addressed to the next hop
            router using link-local addresses.
          </t>
          <t>
            Both RPI and RH3 headers may be modified in very specific ways
            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 can not secure the values which mutate.
         </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 (as the root has
            already made all routing decisions).  There still may be
            cases (such as in 6tisch) where the instanceID portion of the RPI
            header 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> No</c>
           <c> -- </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> No</c>
           <c> -- </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> No</c>
           <c> -- </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 this case the flow comprises:

                        </t>
                        <t>
                        RPL-aware-leaf (6LN) --> 6LR1,... --> 6LRN --> 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) --> 6LR1,... --> 6LRN --> 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) --> 6LR1,... --> 6LRN --> not-RPL-aware-leaf (IPv6)
                        </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(1..N)</ttcol>
                                          <ttcol> 6LN</ttcol>
                                          <c> Inserted headers</c>
                                          <c> RPI </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> RPI  </c>
                                          <c> -- </c>
                                          <c> Untouched headers</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> RPI (Ignored) </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 (IPv6) --> 6LR1,... --> 6LRN --> root (6LBR)
                        </t>
                        <t>
                                When the packet arrives from IPv6 node to
                                6LR, the 6LR1 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> 6LR1</ttcol>
                                          <ttcol> 6LRN</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> IP-in-IP(RPI) </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 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) --> 6LR1,... --> 6LRN --> 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(1..N)</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> RPI (Ignored) </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) --> 6LR1,... --> 6LRN --> 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(1...N)</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> IP-in-IP(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 (IPv6) --> 6LR1,... --> 6LRN --> root (6LBR) --> Internet
                 </t>
                 <t>
                   The 6LR1 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> IPv6 </ttcol>
                                          <ttcol> 6LR1</ttcol>
                                          <ttcol> 6LBN</ttcol>
                                          <ttcol> 6LBR</ttcol>
                                          <ttcol> Internet</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>IP-in-IP(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> IP-in-IP(RPI) </c>
                                          <c> --</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 Internet to non-RPL-aware-leaf">
                        <t>
                                In this case the flow comprises:
                        </t>
                        <t>

                                Internet --> root (6LBR) --> 6LR1,... --> 6LRN --> not-RPL-aware-leaf (IPv6)
                        </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(1...N)</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> IP-in-IP(RPI) </c>
                                          <c>-- </c>
                                          <c> Untouched headers</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> RPI (Ignored) </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 --> 6LR1 --> common parent (6LRx) --> 6LRN -->  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> 6LR1</ttcol>
                                          <ttcol> 6LRx (common parent)</ttcol>
                                          <ttcol> 6LRN</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 --> 6LR1 --> common parent (6LRx) --> 6LRN -->  not-RPL-aware 6LN (IPv6)
                        </t>
                        <t>
                          This situation is identical to the previous situation
                          <xref target="storingraftoraf" />
                        </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> 6LR1</ttcol>
                                          <ttcol> 6LRx (common parent)</ttcol>
                                          <ttcol> 6LRN</ttcol>
                                          <ttcol> IPv6</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> RPI(Ignored) </c>
                        </texttable>
               </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 (IPv6) --> 6LR1 --> common parent (6LRx) --> 6LRN -->  6LN
                 </t>
                 <t>
                   The 6LR1 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 destination 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> 6LR1</ttcol>
                                          <ttcol> common parent (6LRx)</ttcol>
                                          <ttcol> 6LRn</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 src)--> 6LR1 --> 6LR2 --> root (6LBR) --> 6LRn --> not-RPL-aware 6LN (IPv6 dst)
                 </t>
                 <t>
                   This flow is identical to
                   <xref target="storingnotraftoraf" />
                 </t>
                 <t>
                   The 6LR receives the packet from the the IPv6 node and inserts
                   the RPI header (RPIa) encapsulated in IPv6-in-IPv6 header.
                   The IPv6-in-IPv6 header is addressed to the 6LBR. The 6LBR remove the IPv6-in-IPv6 header and
		   insert another one (RPIb) with destination to 6LRn node.
                 </t>
                 <texttable title="Storing: Summary of the use of headers from not-RPL-aware-leaf to non-RPL-aware-leaf">
                                          <ttcol> Header</ttcol>
                                          <ttcol> IPv6 src</ttcol>
                                          <ttcol> 6LR1</ttcol>
                                          <ttcol> 6LR2</ttcol>
                                          <ttcol> 6LBR</ttcol>
                                          <ttcol> 6LRn</ttcol>
                                          <ttcol> IPv6 dst</ttcol>
                                          <c> Inserted headers</c>
                                          <c> -- </c>
                                          <c> IP-in-IP(RPIa) </c>
                                          <c> --</c>
                                          <c> IP-in-IP(RPIb) </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> Removed headers</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> --</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> Re-added headers</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> --</c>
                                          <c> -- </c>
                                          <c> IP-in-IP(RPIb) </c>
                                          <c> -- </c>
                                          <c> Modified headers</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> IP-in-IP(RPIa)</c>
                                          <c> -- </c>
                                          <c> IP-in-IP(RPIb) </c>
                                          <c> -- </c>
                                          <c> Untouched headers</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> --</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                        </texttable>
               </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> Opt</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> -- </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 anchor="nsroottoraf" 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 RPL-aware 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)--> 6LR1...-->6LRn --> not-RPL-aware-leaf (IPv6)
                        </t>
                        <t>
                          In 6LBR the RH3 is added, modified in each intermediate 6LR (6LR1 and so on) and
                          it is fully consumed in the last 6LR (6LRn), but left there.
                          If RPI is left present, the IPv6 node which
                          does not understand it will ignore it (following 2460bis), thus encapsulation is not necesary.
			  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>

                               <texttable title=" Non Storing: Summary of the use of headers from root to not-RPL-aware-leaf">
                                          <ttcol> Header</ttcol>
                                          <ttcol> 6LBR</ttcol>
                                          <ttcol> 6LR1</ttcol>
                                          <ttcol> 6LRn</ttcol>
                                          <ttcol> IPv6</ttcol>
                                          <c> Inserted headers</c>
                                          <c> (opt: RPI), RH3 </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> Removed headers</c>
                                          <c> -- </c>
                                          <c> RH3 </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> (opt: RPI), RH3 </c>
                                          <c>(opt: RPI), RH3</c>
                                          <c> -- </c>
                                          <c> Untouched headers</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> RPI </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 ...--> 6LRn --> root (6LBR)
                        </t>
                        <t>
                          In this case the RPI is added by the first
                          6LR (6LR1), encapsulated in an IP-in-IP header, and is
                          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> 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>
                        </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) --> 6LR1 ...--> 6LRn --> root (6LBR) --> Internet
                        </t>
                        <t>
                                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(1..N)</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> RPI (Ignored) </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) --> 6LR1...--> 6LRn --> 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 node, 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, it is optional.
                        </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> -- </c>
                          <c>  IP-in-IP(RH3,opt:RPI) </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,opt:RPI) </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 (IPv6) --> 6LR1..--> 6LRn --> 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> 6LR1</ttcol>
                                          <ttcol> 6LRn</ttcol>
                                          <ttcol> 6LBR</ttcol>
                                          <ttcol> Internet</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> IP-in-IP(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> IP-in-IP(RPI) </c>
                                          <c> -- </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 Internet to non-RPL-aware-leaf">

                        <t>
                                In this case the flow comprises:
                        </t>
                        <t>
                                Internet --> root (6LBR) --> 6LR1...--> 6LRn --> not-RPL-aware-leaf (IPv6)
                        </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> 6LR1</ttcol>
                          <ttcol> 6LRn</ttcol>
                          <ttcol> IPv6</ttcol>
                          <c> Inserted headers</c>
                          <c> -- </c>
                          <c> IP-in-IP(RH3,opt:RPI) </c>
                          <c> -- </c>
                          <c> -- </c>
                          <c> -- </c>
                          <c> Removed headers</c>
                          <c> -- </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> -- </c>
                          <c> Modified headers</c>
                          <c> -- </c>
                          <c> -- </c>
                          <c>  IP-in-IP(RH3, RPI) </c>
                          <c>  IP-in-IP(RH3, RPI) </c>
                          <c> -- </c>
                          <c> Untouched headers</c>
                          <c> -- </c>
                          <c> -- </c>
                          <c> -- </c>
                          <c> -- </c>
                          <c> RPI </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 --> 6LR1 --> root (6LBR) --> 6LRN -->  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 SHOULD put the RPI into an IP-in-IP
                          header addressed to the root, so that the 6LBR can
                          remove that header.  If it does not, then
                          additional resources are wasted on the way down to
                          carry the useless RPI option.
                        </t>
                        <t>
                          The 6LBR will need to insert an RH3 header, which
                          requires that it add an IP-in-IP header.  It SHOULD be
                          able to remove the RPI, as 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 or scenario <xref target="nsroottoraf"/>, with
                   the originating node acting as 6LBR.
                 </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> 6LR1 </ttcol>
                   <ttcol> 6LBR</ttcol>
                   <ttcol> 6LRN</ttcol>
                   <ttcol> 6LN dst</ttcol>
                   <c> Inserted headers</c>
                   <c> IP-in-IP(RPI1) </c>
                   <c> -- </c>
                   <c> IP-in-IP(RH3 to 6LN, opt RPI2) </c>
                   <c> -- </c>
                   <c> -- </c>
                   <c> Removed headers</c>
                   <c> -- </c>
                   <c> -- </c>
                   <c> IP-in-IP(RPI1) </c>
                   <c> -- </c>
                   <c> IP-in-IP(RH3, opt RPI2)</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 title=" Example of Flow from RPL-aware-leaf to not-RPL-aware-leaf">
                        <t>
                        In this case the flow comprises:
                        </t>
                        <t>
                         6LN --> 6LR1 --> root (6LBR) --> 6LRn -->  not-RPL-aware (IPv6)
                        </t>
                        <t>
                          As in the previous case, the 6LN will insert an RPI (RPI1)
                          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 destination node. The RPI is optional from 6LBR to 6LRn (RPI2).
                        </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> 6LR1</ttcol>
                                          <ttcol> 6LBR</ttcol>
                                          <ttcol> 6LRn</ttcol>
                                          <ttcol> IPv6</ttcol>
                                          <c> Inserted headers</c>
                                          <c> IP-in-IP(RPI1) </c>
                                          <c> -- </c>
                                          <c>  IP-in-IP(RH3, opt RPI2) </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> Removed headers</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> IP-in-IP(RPI1) </c>
                                          <c> IP-in-IP(RH3, opt RPI2) </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> IP-in-IP(RPI1) </c>
                                          <c> -- </c>
                                          <c> IP-in-IP(RH3, opt RPI2) </c>
                                          <c> -- </c>
                                          <c> Untouched headers</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> opt RPI2 </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 (IPv6) --> 6LR1 --> root (6LBR) --> 6LRn -->  6LN
                        </t>
                        <t>
                          This scenario is mostly identical to the previous
                          one.  The RPI is added by the first 6LR (6LR1) 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 and optional RPI (RPI2).
                        </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> 6LR1</ttcol>
                                          <ttcol> 6LBR</ttcol>
                                          <ttcol> 6LRn</ttcol>
                                          <ttcol> 6LN</ttcol>
                                          <c> Inserted headers</c>
                                          <c> -- </c>
                                          <c> IP-in-IP(RPI1) </c>
                                          <c> IP-in-IP(RH3, opt RPI2)</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> Removed headers</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> IP-in-IP(RPI1) </c>
                                          <c> -- </c>
                                          <c> IP-in-IP(RH3, opt RPI2) </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> IP-in-IP(RH3, opt RPI2) </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 src)--> 6LR1 --> root (6LBR) --> 6LRn --> not-RPL-aware (IPv6 dst)
                        </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 src </ttcol>
                                          <ttcol> 6LR1</ttcol>
                                          <ttcol> 6LBR</ttcol>
                                          <ttcol> 6LRn</ttcol>
                                          <ttcol> IPv6 dst</ttcol>
                                          <c> Inserted headers</c>
                                          <c> -- </c>
                                          <c>  IP-in-IP(RPI1) </c>
                                          <c>  IP-in-IP(RH3) </c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> Removed headers</c>
                                          <c> -- </c>
                                          <c> -- </c>
                                          <c> IP-in-IP(RPI1) </c>
                                          <c> IP-in-IP(RH3, opt RPI2) </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 cases">
         <section title="Storing mode">
<!--          <t>
            Without the modifications in 2460 bis, we would have 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>
           <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>
            Thanks to the relaxation of the RFC2406 rule about discarding
            unknown Hop-by-Hop options, there is no longer any uncertainty
            about when to use an IPIP header in the storing mode case.
            The RPI header SHOULD always be added when 6LRs originate
            packets (without IPIP headers), and IPIP headers should always
            be added (addressed to the root when on the way up, to the
            end-host when on the way down) when a 6LR finds it needs to
            insert an RPI header.
            (XXX - this is a problem for storing mode optimization)
          </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>
            <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:
-->
