<?xml version="1.0" encoding="UTF-8"?>
  <?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
  <!-- generated by https://github.com/cabo/kramdown-rfc2629 version 1.0.20 -->

<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
]>
      <?rfc include="reference.RFC.8300"?>

<rfc ipr="trust200902" docName="draft-thubert-roll-unaware-leaves-03" category="std" updates="6550, 6775">

<?rfc sortrefs="yes"?>
<?rfc iprnotified="no"?>
<?rfc authorship="yes"?>
<?rfc tocappendix="yes"?>
<?rfc strict="yes"?>
<?rfc toc="yes"?>
<?rfc tocdepth="4"?>
<?rfc symrefs="yes"?>
<?rfc compact="no"?>
<?rfc subcompact="yes"?>

<front>
  
    <title>Routing for RPL Leaves</title>

    <author initials="P" surname="Thubert" fullname="Pascal Thubert" role="editor">
      <organization abbrev="Cisco">Cisco Systems, Inc</organization>
      <address>
         <postal>
            <street>Building D</street>
            <street>45 Allee des Ormes - BP1200 </street>
            <city>MOUGINS - Sophia Antipolis</city>
            <code>06254</code>
            <country>FRANCE</country>
         </postal>
         <phone>+33 497 23 26 34</phone>
         <email>pthubert@cisco.com</email>
      </address>
   </author>
   

   <date/>
   <area>Routing</area>
   <workgroup>ROLL</workgroup>
    

<abstract>
<t>This specification updates RFC 6550 and RFC 6775 unicast
   routing service in a RPL domain to 6LoWPAN ND nodes that do not participate
   to the routing protocol.
</t>
</abstract>


</front>

<middle>


<section anchor="introduction" title="Introduction">

<t>The design of Low Power and Lossy Networks (LLNs) is generally focused on
   saving energy, which is the most constrained resource of all. Other design
   constraints, such as a limited memory capacity, duty cycling of the LLN
   devices and low-power lossy transmissions, derive from that primary concern.
</t>


<t>The IETF produced the <xref target="RFC6550">"Routing Protocol for Low Power
   and Lossy Networks"</xref> (RPL) to provide routing services
   within such constraints. 
   RPL is a Distance-Vector protocol, which, compared to link-state protocols,
   limits the amount of topological knowledge that needs to be installed and 
   maintained in each node. In order to operate in constrained networks,
   RPL allows a Routing Stretch (see <xref target="RFC6687"/>), whereby routing
   is only performed along a DODAG as opposed to straight along a shortest path
   between 2 peers, whatever that would mean in a given LLN.
   This trades the quality of peer-to-peer (P2P) paths for a vastly reduced
   amount of control traffic and routing state that would be required to
   operate a any-to-any shortest path protocol.
   Finally, broken routes may be fixed lazily and on-demand, based on dataplane
   inconsistency discovery, which avoids wasting energy in the proactive repair
   of unused paths.
   
</t><t>
   In order to cope with lossy transmissions, RPL forms Direction-Oriented
   Directed Acyclic Graphs (DODAGs) using DODAG Information Solicitation (DIS)
   and DODAG Information Object (DIO) messages. For most of the nodes, though
   not all, a DODAG provides multiple forwarding solutions towards the Root of
   the topology via so-called parents. 
   RPL is designed to adapt to fuzzy connectivity, whereby the physical topology
   cannot be expected to reach a stable state, with a lazy control that creates
   routes proactively but only fixes them when they are used by actual traffic.
   It results that RPL provides reachability for most of the LLN nodes, most of
   the time, but does not really converge in the classical sense.
   RPL provides unicast and multicast routing services back to RPL-Aware nodes.
   A RPL-Aware Node will inject routes to self using Destination Advertisement
   Object (DAO) messages sent to either their parents in Storing Mode or to the
   Root indicating their parent in Non-Storing mode.
   This process effectively forms a DODAG back to the device that is a subset of
   the DODAG to the Root with all links reversed.
</t>
   
   
<t>
   The IPv6 <xref target="RFC8200"/> Neighbor Discovery (IPv6 ND) Protocol (NDP)
   suite <xref target="RFC4861"/> <xref target="RFC4862"/> defined for fast 
   media such a Ethernet, relies heavily on multicast operations for address
   discovery and duplicate address detection (DAD).
</t>
<t>
   <xref target="RFC6775">
   "Neighbor Discovery Optimizations for 6LoWPAN networks"</xref>
   (6LoWPAN ND) adapts IPv6 ND for operations over energy-constrained LLNs.
   In particular, 6LoWPAN ND introduces a unicast host address registration
   mechanism that contributes to reduce the use of multicast messages that are
   present in the classical IPv6 ND protocol. 6LoWPAN ND defines a new Address 
   Registration Option (ARO) that is carried in the unicast
   Neighbor Solicitation (NS) and Neighbor Advertisement (NA) messages between
   the 6LoWPAN Node (6LN) and the 6LoWPAN Router (6LR). 
   6LoWPAN ND also defines the Duplicate Address Request (DAR) and Duplicate
   Address Confirmation (DAC) messages between the 6LR and the 6LoWPAN Border
   Router (6LBR). 
   In an LLN, the 6LBR is the central repository of all the registered addresses
   in its domain.
</t>

<t>
   When a routing protocol such as RPL is used to maintain reachability within a 
   Non-Broadcast Multi-Access (NBMA) subnet, some nodes may act as routers and 
   participate to the routing operations whereas others may be plain hosts.
   In RPL terms, a plain host that does not participate to the routing protocol
   is called a Leaf. It must be noted that a 6LN could participate to RPL and
   inject DAO routes to self, but refrain from advertising DIO and get children.
   In that case, the 6LN is still a host but not a Leaf.
</t>
<t>

   <xref target="I-D.ietf-6lo-rfc6775-update">An Update to 6LoWPAN ND</xref>
   defines an Extended ARO (EARO) with a 'R' flag to be used by a 6LN when
   registering, to indicate that this 6LN is not a router and that it will
   not handle its own reachability. The EARO also includes a sequence
   counter called Transaction ID (TID), which maps to the Path Sequence Field 
   found in Transit Options in RPL DAO messages. It is a prerequisite for this
   specification. The DAR and DAC messages are also extended as EDAR and EDAC
   messages respectively. 
</t>
<t>
   With this specification, a 6LN that operates as a Leaf uses the 'R' flag 
   to declare itself as such and the 6LR that accepts the registration will
   inject routing information on behalf of the 6LN in the RPL domain.
   The packet forwarding operation by the 6LR serving a Leaf 6LN is
   described in <xref target="I-D.ietf-roll-useofrplinfo">
   "When to use RFC 6553, 6554 and IPv6-in-IPv6"</xref>. This document adds
   the capability by a 6LR to advertise the IPv6 address(es) of the 6LN in the
   RPL protocol. Examples of routing-agnostic 6LN may include lightly-powered
   sensors such as window smash sensor (alarm system), or the kinetically
   powered light switch.

   

</t>


</section>
<section anchor="terminology" title="Terminology">

<t>The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”,
   “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “NOT RECOMMENDED”, “MAY”,
   and “OPTIONAL” in this document are to be interpreted as described in
   <xref target="RFC2119"/>.
</t><t>
   The Terminology used in this document is consistent with and incorporates
   that described in <xref target="RFC7102">Terms Used in Routing for Low-Power
   and Lossy Networks (LLNs).</xref>.
</t><t>
   Other terms in use in LLNs are found in <xref target="RFC7228">
   Terminology for Constrained-Node Networks</xref>.
</t><t>
   A glossary of classical 6LoWPAN acronyms is given in <xref target="gloss"/>.
</t><t>
   The term “byte” is used in its now customary sense as a synonym for “octet”.
</t>
   
<t>"RPL", "RPL Packet Information" (RPI) and "RPL Instance", DIO, DAO and DIS
   messages are defined in the
   <xref target="RFC6550">"RPL: IPv6 Routing Protocol for Low-Power and Lossy
   Networks"</xref> specification.  
</t>  

</section>


<section anchor="upd" title="Updating RFC 6550">
<t>
   This document specifies a new behavior whereby a 6LR injects DAO messages 
   for unicast addresses registered through the updated 6LoWPAN ND
   <xref target="I-D.ietf-6lo-rfc6775-update"/> on behalf of 6LN nodes that are
   not RPL-aware. 
</t><!--t>
   The External "E" flag is set to indicate that the source of
   the information is an alternate protocol. Information from the EARO option
   (TID, Lifetime) is mapped into equivalent information in the DAO that is
   proxy-generated. The registered address is indicated in the Target Option, 
   and in Non-Storing mode, the 6LR sets itself as the parent in the Transit
   Option.
</t--><t>
   Upon the renewal of a 6lowPAN ND registration, this specification
   changes the behavior of the 6LR as follows.
   If the 'R' flag is set, the 6LR injects a DAO targeting the Registered
   Address, and refrains from sending a DAR message. 
   the DAR/DAC exchange that refreshes the state in the 6LBR happens instead 
   between the RPL Root and the 6LBR. In that flow, the RPL Root acts as a
   proxy on behalf of the 6LR upon the reception of the DAO propagation
   initiated at the 6LR.
   </t>
</section>

<section anchor="upd2" title="Updating RFC 6775 Update">


<t>
   This document makes use of the 'R' flag in the EARO option, used by
   a 6LN, when registering, to indicate that this 6LN is a Leaf, not aware of
   the RPL operation in the network, and thus does not participate to it.
   The behavior defined in this specification whereby the 6LR that processes the
   registration advertises the Registered Address in DAO messages and bypasses
   the DAR/DAC process for the renewal of a registration, is  only triggered by
   an NS(EARO) that has the 'R' flag set. A RPL Leaf SHOULD set the 'R' flag.
   
</t><t>
   If the 'R' flag is not set, then the Registering Node is expected to be a RPL
   router that handles the reachability of the Registered Address by itself.
   This document also specifies a keep-alive EDAR message that the RPL Root may
   use to maintain an existing state in the 6LBR upon receiving DAO messages. 
   The EDAR message may only act as a refresher and can only update the Lifetime
   and the TID of the state in the 6LBR.  A RPL router SHOULD NOT set the 'R' flag.
   </t>
</section>

 


<section anchor="op" title="Protocol Operations">
<section anchor="flow" title="General Flow"> 

    <t> This specification enables to save the exchange of Extended Duplicate
        Address messages, EDAR and EDAC, from a 6LN all the way to the 6LBR
        across a RPL mesh, for the sole purpose of refreshing an existing state
        in the 6LBR.
        Instead, the EDAR/EDAC exchange is proxied by the RPL Root upon a DAO
        message that refreshes the RPL routing state. To achieve this, the
        lifetimes and sequence counters in 6LoWPAN ND and RPL are aligned. 
        In other words, the Path Sequence and the Path Lifetime in the DAO
        message are derived from the Transaction ID and the registration 
        lifetime in the NS(EARO) message from the 6LN.       
    </t><t>  
        From the perspective of the 6LN, the registration flow happens
        transparently; it is not delayed by the proxy RPL operation, so the
        device does not need to wait more whether RPL proxy operation happens
        or not. The flows below are RPL Non-Storing Mode examples. 
        In Storing Mode, the DAO ACK may not be present, and the DAO messages
        cascade from child to parent all the way to the DODAG Root. 
    </t><t>
        On the first registration, illustrated in <xref target="fReg1"/>, from
        the perspective of the 6LR, the Extended
        Duplicate Address message takes place as prescribed by
        <xref target="I-D.ietf-6lo-rfc6775-update"/>. When successful, the flow
        creates a Neighbor Cache Entry (NCE) in the 6LR, and the 6LR injects
        the registered address in RPL using DAO/DAO-ACK exchanges all the way to
        the RPL DODAG Root.
        The protocol does not carry a specific information that the Extended
        Duplicate Address messages were already exchanged, so the Root proxies
        them anyway.
    </t>
    <figure anchor="fReg1" suppress-title="false"
	title="First Registration Flow">
    <artwork><![CDATA[
     6LN              6LR             Root            6LBR
      |                |               |                |
      |   NS(EARO)     |               |                |
      |--------------->|               |                |
      |                | Extended DAR                   |
      |                |------------------------------->|
      |                |                                |
      |                | Extended DAC                   |
      |                |<-------------------------------|
      |   NA(EARO)     |                                |
      |<---------------|               |                |
      |                |      DAO      |                |
      |                |-------------->|                |
      |                |    DAO ACK    |                |
      |                |<--------------|                |
      |                |               | keep-alive DAR |
      |                |               |--------------->|
      |                |               | keep-alive DAC |
      |                |               |<---------------|
      |                |               |                |
    ]]></artwork>
    </figure>
    <t>
    A re-registration is performed by the 6LN to maintain the NCE in the 6LR
    alive before lifetime expires. Upon a re-registration, as
    illustrated in <xref target="fReg1"/>, 
    the 6LR redistributes the NS(EARO) in RPL. This causes the RPL DODAG Root to
    refresh the state in the 6LBR with a keep-alive EDAR message.
    </t>
    <figure anchor="fReg2" suppress-title="false"
	title="Next Registration Flow">
    <artwork><![CDATA[
     6LN              6LR             Root            6LBR
      |                |               |                |
      |   NS(EARO)     |               |                |
      |--------------->|               |                |
      |   NA(EARO)     |               |                |
      |<---------------|               |                |
      |                |      DAO      |                |
      |                |-------------->|                |
      |                |    DAO ACK    |                |
      |                |<--------------|                |
      |                |               | proxy DAR      |
      |                |               |--------------->|
      |                |               | proxy DAC      |
      |                |               |<---------------|
      |                |               |                |
    ]]></artwork>
    </figure>
    <t>Note that any of the functions 6LR, Root and 6LBR might be collapsed in a
    single node, in which case the flow above happens internally, and possibly
    through internal API calls as opposed to messaging.
    </t>
</section>  
<section anchor="ln" title="6LN Operation">
<t>
  This specification does not alter the operation of a 6LowpAN ND-compliant 6LN,
  which is expected to operate as follows:
<list style="symbols"><t>
   The 6LN obtains an IPv6 global address, for instance using autoconfiguration
   <xref target="RFC4862"/> based on a Prefix Information Option (PIO)
   <xref target="RFC4861"/> found in a Router Advertisement message
   or by some other means such as DHCPv6 <xref target="RFC3315"/>.
   
</t><t>
   Once it has formed an address, the 6LN (re)registers its address periodically,
   within the Lifetime of the previous registration, as prescribed by
   <xref target="I-D.ietf-6lo-rfc6775-update"/>.
   
</t><t>
   Upon each consecutive registration, the 6LN increases the TID field.
</t><t>
   The 6LN MAY register to more than one 6LR at the same time. In that case, a 
   same value of TID is used for each registration.
</t><t>
   The 6LN MAY use any of the 6LRs to which it register to forward its packets.
</t>
</list>
</t>
</section>

<section anchor="lr" title="6LR Operation">
<t>
   Also as prescribed by <xref target="I-D.ietf-6lo-rfc6775-update"/>,
   the 6LR generates a DAR message upon reception of a valid NS(EARO)
   message for the registration of a new IPv6 Address by a 6LN. If the Duplicate
   Address exchange succeeds, then the 6LR installs a Neighbor Cache Entry (NCE).
   If the 'R' flag was set in the EARO of the NS message, and this 6LR can
   manage the reachability of Registered Address, then the 6LR sets the 'R' flag
   in the ARO of the response NA message.
</t>
   
<t>From then on, the 6LN periodically sends a new NS(EARO) to refresh the NCE
   state before the lifetime indicated in the EARO expires, with TID that is
   incremented each time till it wraps in a lollipop fashion. As long as the 'R'
   flag is set and this router can still manage the reachability of Registered
   Address, the 6LR keeps setting the 'R' flag in the ARO of the response NA
   message, but the exchange of Duplicate Address messages is skipped.
  
</t> 
<t>  
   Upon a successful NS/NA(EARO) exchange: if the 'R' flag was set in the 
   EARO of the NS message, then the 6LR SHOULD inject the Registered Address in
   RPL by sending a DAO message on behalf of the 6LN; else the 6LR SHOULD
   refrain from injecting the registered address into RPL.    
</t><t> 
  The DAO message advertising the Registered Address MUST be constructed as
  follows:
  <list style="symbols">
  <t>The registered address is placed in a RPL Target Option in the DAO
  message as the Target Prefix, and the Prefix Length is set to 128 
  </t><t>the External 'E' flag in the Transit Information Option (TIO)
  associated to the Target Option is set to indicate that the 6LR redistributes
  an external target into the RPL network
  </t><t>
  the Path Lifetime in the TIO is computed from the Lifetime in the EARO Option
  to adapt it to the Lifetime Units used in the RPL operation. Note that if the
  lifetime is 0, then the 6LR generates a No-Path DAO message that cleans up
  the routes down to the Address of the 6LN.
  </t><t> 
  the Path Sequence in the TIO is set to the TID value found in the EARO option.
  </t><t> 
  Additionally, in Non-Storing Mode the 6LR indicates one of its global IPv6
  unicast addresses as the Parent Address in the TIO.
  </t>
  </list> 
</t>
<t>
   If a 6LR receives a valid NS(EARO) message with the 'R' flag reset and the 6LR
   was redistributing the registered address due to previous NS(EARO) messages
   with the flag set, then it MUST stop injecting the address.
   It is up to the Registering Node to maintain the corresponding route from then
   on, either keeping it active by sending further DAO messages, or destroying
   it using a No-Path DAO. 
</t>
</section>

<section anchor="Root" title="RPL Root Operation">


<t>
   In RPL Storing Mode of Operation (MOP), the DAO message is propagated from
   child to parent all the way to the Root along the DODAG, populating routing
   state as it goes. In Non-Storing Mode, The DAO message is sent directly to the
   route.
   Upon reception of a DAO message that creates or updates an existing RPL state,
   the Root notifies the 6LR using an internal API if they are collocated, or
   a proxied DAR/DAC exchange on behalf of the registering node if they are
   separated.  
</t><t> 
  In the latter case, the DAR message MUST be constructed as follows:
  <list style="symbols">
  <t>The registered address from in the Target Option is placed in the
  Registered Address field
  </t><t>the Owner Unique ID field is set to all ones to indicate that it is not
  provided
  </t><t>
  the Registration Lifetime in the DAR message is adapted from the Path Lifetime
  in the TIO.
  </t><t> 
   the TID value is set to the Path Sequence in the TIO.
  </t>
  </list> 
</t>

<t>
  Upon a status in a DAC message that is not "Success", the Root MAY destroy
  the formed paths using a No-Path DAO downwards as specified in 
  <xref target="I-D.ietf-roll-efficient-npdao"/>.
</t>


<t>
   In Non-Storing Mode, the outer IPv6 header that is used by the Root to 
   transport the source routing information in data packets down the DODAG has
   the 6LR that serves the 6LN as final destination. This way, when the final
   6LR decapsulates the outer header, it also removes all the RPL artifacts
   from the packet.
</t>


</section>

<section anchor="lbr" title="6LBR Operation">


<t>
   Upon reception of a DAR message with the Owner Unique ID field is set to all
   ones, the 6LBR checks whether an entry exists for the 
   and computes whether the TID in the DAR message is fresher than that in the
   entry as prescribed in section 4.2.1. of 
   <xref target="I-D.ietf-6lo-rfc6775-update"/>.

</t><t> 
   If the entry does not exist, the 6LBR does not create the entry, and answers
   with a Status "Removed" in the DAC message.
</t><t> 
   If the entry exists but is not fresher, the 6LBR does not update the entry, and answers
   with a Status "Success" in the DAC message.
</t><t> 
   If the entry exists and the TID in the DAR message is fresher, the 6LBR
   updates the TID in the entry, and if the
   lifetime of the entry is extended by the Registration Lifetime in the DAR
   message, it also updates the lifetime of the entry.
   In that case, the 6LBR replies with a Status "Success" in the DAC message.
</t>

</section>

</section>

<section anchor="impl" title="Implementation Status">
<t></t>
</section>


<section anchor="security-considerations" title="Security Considerations">
    <t>
	The LLN nodes depend on the 6LBR and the RPL participants for their
    operation.
	A trust model must be put in place to ensure that the right devices are
	acting in these roles, so as to avoid threats such as black-holing,
	or bombing attack whereby an impersonated 6LBR would destroy state in
	the network by using the "Removed" Status code. This trust model could be
    at a minimum based on a Layer-2 access control, or could provide role
    validation as well. This is a generic 6LoWPAN requirement, see Req5.1 in
    Appendix of <xref target="I-D.ietf-6lo-rfc6775-update"/>.    
    </t><t>
    The keep-alive EDAR message does not carry a valid Registration Unique ID
    <xref target="I-D.ietf-6lo-rfc6775-update"/> and it cannot be used to create
    a binding state in the 6LBR. The 6LBR MUST NOT create an entry based on a
    keep-alive EDAR that does not match an existing entry. All it can do is 
    refresh the lifetime and the TID of an existing entry.
    
    </t>
    
</section>


<section anchor="iana-considerations" title="IANA Considerations">
    <t>
	This specification has no requirement on IANA.
    </t>
</section>
<section anchor="acknowledgments" title="Acknowledgments">
   <t>The author wishes to thank Michael Richardson and Georgios Papadopoulos 
    for their early reviews of and contributions to this document
  </t>

</section>


  </middle>

    <back>
    <references title='Normative References'>
	  <?rfc include="reference.RFC.2119"?>
	  <?rfc include="reference.RFC.4861"?>
	  <?rfc include="reference.RFC.4862"?>
	  <?rfc include="reference.RFC.6550"?>
	  <?rfc include="reference.RFC.6775"?>
      <?rfc include="reference.RFC.8200"?>
	  <?rfc include='reference.I-D.ietf-6lo-rfc6775-update'?> 
     
    </references>
    <references title='Informative References'>
	  <?rfc include="reference.RFC.3315"?>
	  <?rfc include="reference.RFC.6687"?>
	  <?rfc include="reference.RFC.7102"?>
	  <?rfc include="reference.RFC.7228"?>
      <?rfc include='reference.I-D.ietf-6lo-ap-nd.xml'?>
      <?rfc include='reference.I-D.ietf-roll-efficient-npdao.xml'?>
      <?rfc include='reference.I-D.ietf-roll-useofrplinfo'?> 
       
      <reference anchor="IEEEstd802154">
         <front>
            <title>IEEE Standard for Local and metropolitan area networks--
            Part 15.4: Low-Rate Wireless Personal Area Networks (LR-WPANs)
            </title>
            <author>
               <organization>IEEE standard for Information Technology</organization>
            </author>
            <date/>
         </front>
      </reference>
      

    </references>
    
    <section anchor='gloss' title="Subset of a 6LoWPAN Glossary"> 
    <t> This document often uses the followng acronyms:
       <list hangIndent="6" style="hanging">
       <t hangText="6BBR:"> 6LoWPAN Backbone Router (proxy for the registration) </t>
       <t hangText="6LBR:"> 6LoWPAN Border Router (authoritative on DAD) </t>
       <t hangText="6LN:"> 6LoWPAN Node  </t>
       <t hangText="6LR:"> 6LoWPAN Router (relay to the registration process) </t>
       <t hangText="6CIO:"> Capability Indication Option </t>

       <t hangText="(E)ARO:"> (Extended) Address Registration Option  </t>
       <t hangText="DAD:"> Duplicate Address Detection </t>

       <t hangText="LLN:"> Low Power Lossy Network (a typical IoT network)  </t>
       <t hangText="NCE:"> Neighbor Cache Entry  </t>
       <t hangText="RUID:"> Registration Unique ID  </t>
       <t hangText="TID:"> Transaction ID (a sequence counter in the EARO) </t>
       
       </list>
    </t>    
    </section>

    </back>
</rfc>
