<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE rfc SYSTEM "rfc2629-xhtml.ent">

<rfc  xmlns:xi="http://www.w3.org/2001/XInclude" ipr='trust200902' tocInclude="true"  sortRefs="true" symRefs="true" obsoletes="" updates="8138" submissionType="IETF"  category="std" consensus="true" xml:lang="en"  docName="draft-ietf-roll-turnon-rfc8138-18" number="9035" version="3">
      
<front>
   <title abbrev='Turn On 6LoRH Compression'>A Routing Protocol for Low-Power and Lossy Networks (RPL) Destination&nbhy;Oriented Directed Acyclic Graph (DODAG) Configuration Option for the 6LoWPAN Routing Header</title>
   <seriesInfo name="RFC" value="9035"/>

   <author fullname='Pascal Thubert' initials='P.' role='editor' surname='Thubert'>
      <organization abbrev='Cisco Systems'>Cisco Systems, Inc.</organization>
      <address>
         <postal>
           <extaddr>Building D</extaddr>
            <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>

          <author initials='L' surname='Zhao' fullname='Li Zhao'>
          <organization abbrev='Cisco Systems'>Cisco Systems, Inc.</organization>
          <address>
             <postal>
               <extaddr>Xinsi Building</extaddr>
                <street>No. 926 Yi Shan Rd</street>
                <city>Shanghai</city>
                <code>200233</code>
                <country>China</country>
             </postal>
             <email>liz3@cisco.com</email>
          </address>
       </author>

       <date year="2021" month="April"/>

<keyword>IoT</keyword>
<keyword>Header Compression</keyword>
<keyword>Source Routing Header</keyword>
<keyword>Hop-by-Hop Header</keyword>
<keyword>RPL artifacts</keyword>

   <abstract>
      <t>
     This document updates RFC 8138 by defining a bit in the Routing Protocol for Low-Power and Lossy Networks (RPL) Destination-Oriented Directed Acyclic Graph (DODAG)
     Configuration option to indicate whether compression is used within the
     RPL Instance and to specify the behavior of nodes compliant with RFC 8138 
     when the bit is set and unset.
      </t>
   </abstract>
</front>

<middle>
   <section><name>Introduction</name>

    <t>
    The design of Low-Power and Lossy Networks (LLNs) is generally focused on
    saving energy, which is the most constrained resource of all. The routing
    optimizations in "<xref target="RFC6550" format="title"/>" <xref target="RFC6550" format="default"/>, such as routing along a
    Destination-Oriented Directed Acyclic Graph (DODAG) to a Root Node and the
    associated routing header compression and forwarding technique specified in
    <xref target='RFC8138'/>, derive from that primary concern.
    </t>
    <t>
    Enabling <xref target='RFC8138'/> on a running network requires a "flag day",
    where the network is upgraded and rebooted.
    Otherwise, if acting as a leaf, a node that does not
    support compression per <xref target='RFC8138'/> would fail to communicate; if acting as a router, it
    would drop the compressed packets and black-hole a portion of the network.
    This specification enables a hot upgrade where a live network is migrated. During the migration, compression remains inactive until all nodes are upgraded.
      </t>
      <t>
    This document complements <xref target='RFC8138'/> and signals whether it
    should be used within a RPL DODAG with a new flag in the RPL DODAG
    Configuration option.
    The setting of this new flag is controlled by the Root and propagates as
    is in the whole network as part of the normal RPL signaling.
      </t>
      <t>
      The flag is cleared to ensure that compression remains inactive during
      the migration phase. When the migration is complete (e.g., as known by
      network management and/or inventory), the flag is set and compression
      is globally activated in the whole DODAG.
      </t>
   </section>

<section><name>Terminology</name>

<section anchor='lo'><name>Related Documents</name>

<t>
   The terminology used in this document is consistent with, and incorporates
   the terms provided in, "<xref target="RFC7102" format="title"/>" <xref target="RFC7102" format="default"/>.
   Other terms in use as related to LLNs are found in "<xref target="RFC7228" format="title"/>" <xref target="RFC7228" format="default"/>.
</t>

<t>"RPL", "RPL Packet Information" (RPI), and "RPL Instance" (indexed by a
   RPLInstanceID) are defined in "<xref target="RFC6550" format="title"/>" <xref target="RFC6550" format="default"/>.
 The RPI is the abstract
   information that RPL defines to be placed in data packets, e.g., as the RPL
   Option <xref target='RFC6553'/> within the IPv6 Hop-By-Hop Header.
   By extension, the term "RPI" is often used to refer to the RPL Option itself.
   The DODAG Information Solicitation (DIS), Destination Advertisement Object
   (DAO), and DODAG Information Object (DIO) messages are also specified in
   <xref target='RFC6550'/>.
</t><t>

   This document uses the terms "RPL-Unaware Leaf" (RUL) and "RPL-Aware Leaf"
   (RAL) consistently with <xref target='RFC9008'> "Using RPI Option Type, Routing Header for Source Routes, and IPv6-in-IPv6 Encapsulation in the RPL Data Plane"</xref>.
   The term "RPL-Aware Node" (RAN) refers to a node that is either
   a RAL or a RPL router. A RAN manages the reachability of its addresses and
   prefixes by injecting them in RPL by itself. In contrast, a RUL leverages
   "<xref target="RFC8505" format="title"/>" <xref target="RFC8505" format="default"/>
   to obtain reachability services from its parent router(s)
    as specified in <xref target='RFC9010'> "Routing for RPL (Routing Protocol for Low-Power and Lossy Networks) Leaves"</xref>.
</t>

</section>
<section anchor='gloss'><name>Glossary</name>
 <t> This document often uses the following abbreviations:
    </t>
    <dl spacing='compact'>
    <dt>6LoRH:</dt><dd>6LoWPAN Routing Header</dd>
    <dt>6LoWPAN:</dt><dd>IPv6 over Low-Power Wireless Personal Area Network</dd>
    <dt>DIO:</dt><dd> DODAG Information Object (a RPL message) </dd>
    <dt>DODAG:</dt><dd> Destination-Oriented Directed Acyclic Graph </dd>
    <dt>LLN:</dt><dd> Low-Power and Lossy Network </dd>
    <dt>MOP:</dt><dd> RPL Mode of Operation </dd>
    <dt>RAL:</dt><dd> RPL-Aware Leaf </dd>
    <dt>RAN:</dt><dd> RPL-Aware Node  </dd>
    <dt>RPI:</dt><dd> RPL Packet Information </dd>
    <dt>RPL:</dt><dd> IPv6 Routing Protocol for Low-Power and Lossy Networks </dd>
    <dt>RUL:</dt><dd> RPL-Unaware Leaf</dd>
    <dt>SRH:</dt><dd>Source Routing Header</dd>
    <dt>Sub-DODAG:</dt><dd>The sub-DODAG of a node is a DODAG rooted at that node that is a subset of a main DODAG the node belongs to. It is formed by the other nodes in the
main DODAG whose paths to the main DODAG root pass through that node.</dd>
    </dl>
</section>

<section anchor='bcp'><name>Requirements Language</name>
       <t>The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>",
       "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>",
       "<bcp14>SHALL NOT</bcp14>", "<bcp14>SHOULD</bcp14>",
       "<bcp14>SHOULD NOT</bcp14>",
       "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
       "<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document
       are to be interpreted as described in BCP&nbsp;14
       <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only
       when, they appear in all capitals, as shown here.</t>
</section>

</section>

   <section><name>Extending RFC 6550</name>
   <t>
   The DODAG Configuration option is defined in <xref target="RFC6550" sectionFormat="of" section="6.7.6"/>. Its purpose is extended to distribute configuration
   information affecting the construction and maintenance of the DODAG, as
   well as operational parameters for RPL on the DODAG, through the DODAG.

   The DODAG Configuration option was originally
   designed with four bit positions reserved for future use as flags.
   </t>

<figure anchor="RPLDCO">
          <name>DODAG Configuration Option (Partial View) </name>
       <artwork align="center" name="" type="" alt=""><![CDATA[
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   Type = 0x04 |Opt Length = 14| | |T| |A|       ...           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                     +
                                <- flags ->]]></artwork>
</figure>

      <t>
   This specification defines a new flag, "Enable Compression per RFC 8138 (T)".
   The 'T' flag is set to turn on the use of
   <xref target='RFC8138'/> within the DODAG. The 'T' flag is encoded
   in position 2 of the reserved flags in the DODAG Configuration option (counting from bit 0 as the most significant bit) and set to 0 in
   legacy implementations as specified in 
Sections&nbsp;<xref target="RFC6550" section="20.14"
 sectionFormat="bare"/> and <xref target="RFC6550" section="6.7.6"
 sectionFormat="bare"/> of <xref target="RFC6550"/>, respectively.
   </t>
   <t>
   <xref target="RFC9008" sectionFormat="of" section="4.1.2"/>
 updates
   <xref target='RFC6550'/> to indicate that the definition of the flags applies to Mode of Operation (MOP) values zero (0) to six (6) only.
   For a MOP value of 7, <xref target='RFC8138'/> <bcp14>MUST</bcp14> be used on links where 6LoWPAN Header
   Compression <xref target='RFC6282'/> applies and <bcp14>MUST NOT</bcp14> be used otherwise.

   </t>
      <t>
   The RPL DODAG Configuration option is typically placed in
   a DIO message. The DIO message propagates down the
   DODAG to form and then maintain its structure. The DODAG Configuration option
   is copied unmodified from parents to children.

<!-- Quoted text is DNE.  Verified.  Fixed per RFC 6550. -->
   <xref target='RFC6550'/> states that "Nodes other than the DODAG root
   <bcp14>MUST NOT</bcp14> modify this information when propagating the DODAG Configuration option."
   Therefore, a legacy parent propagates the 'T' flag as set by the Root, and
   when the 'T' flag is set, it is transparently flooded to all the nodes in the DODAG.
  </t>
   </section>

   <section><name>Updating RFC 8138</name>

   <t>
   A node <bcp14>SHOULD</bcp14> generate packets in compressed form using
   <xref target='RFC8138'/> if and only if the 'T' flag
   is set. This behavior can be overridden by configuration or network
   management. Overriding may be needed, e.g., to turn on compression in a
   network where all nodes support <xref target='RFC8138'/> but the Root does
   not support this specification and cannot set the 'T' flag, or to disable it
   locally in case of a problem.
   </t>
   <t>
   The decision to use <xref target='RFC8138'/> is made by the originator of
   the packet, depending on its capabilities and its knowledge of the state of
   the 'T' flag.
   A router encapsulating a packet is the originator of the resulting
   packet and is responsible for compressing the outer headers per 
   <xref target= 'RFC8138'/>, but it <bcp14>MUST NOT</bcp14> perform compression on the encapsulated packet.
   </t>
   <t>
   An external target <xref target='RFC9008'/> is not
   expected to support <xref target='RFC8138'/>. In most cases, packets to and
   from an external target are tunneled back and forth between the border router
   (referred to as a 6LoWPAN Router (6LR)) that serves the external target and the Root, regardless
   of the MOP used in the RPL DODAG.
   The inner packet is typically not compressed per <xref target='RFC8138'/>,
   so for outgoing packets, the border router just needs to decapsulate the
   (compressed) outer header and forward the (uncompressed) inner packet towards
   the external target.
   </t>
   <t>
   A border router that forwards a packet to an external target <bcp14>MUST</bcp14>
   uncompress the packet first. In all other cases, a router <bcp14>MUST</bcp14>
   forward a packet in the form that the source used, either compressed or 
   uncompressed.
   </t>
   <t>
   A RUL <xref target='RFC9010'/> is both a leaf and an
   external target. A RUL does not participate in RPL and
   depends on the parent router to obtain connectivity. In the case of a RUL,
   forwarding towards an external target actually means delivering the packet.
   </t>

   </section>

   <section><name>Transition Scenarios</name>
   <t>
   A node that supports <xref target='RFC8138'/> but not this specification
   can only be used in a homogeneous network.
   Enabling compression per <xref target='RFC8138'/> without a turn-on signaling
   method requires a flag day, by which time all nodes must be upgraded and
   at which point the network can be rebooted with 6LoRH compression <xref target='RFC8138'/> turned on.
   </t>
   <t>
   The intent of this specification is to perform a migration once and for all,
   without the need for a flag day. In particular, the intent is not to
   undo the setting of the 'T' flag.
   Though it is possible to roll back (see <xref target='rb'/>), the rollback
   operation <bcp14>SHOULD</bcp14> be complete before the network operator adds nodes
   that do not support <xref target='RFC8138'/>.
   </t>

   <section anchor='coex'><name>Coexistence</name>
   <t>
    A node that supports this specification can operate in a network with 6LoRH
    compression <xref target='RFC8138'/> turned on or off with the 'T' flag set
    accordingly and in a network in transition from off to on or on to off
    (see <xref target='mig'/>).
   </t>
   <t>
    A node that does not support <xref target='RFC8138'/> can interoperate with
    nodes that do in a network with 6LoRH compression <xref target='RFC8138'/> turned
    off. If compression is turned on, all the RANs are expected
    to be able to handle packets in compressed form. A node that
    cannot do so may remain connected to the network as a RUL as described in
    <xref target='RFC9010'/>.
   </t>

   </section>

   <section anchor='mig'><name>Inconsistent State While Migrating</name>

   <t>
   When the 'T' flag is turned on by the Root, the
   information slowly percolates through the DODAG as the DIO gets propagated.
   Some nodes will see the flag and start sourcing packets in compressed
   form, while other nodes in the same RPL DODAG will still not be aware of it.
   In Non-Storing mode, the Root will start using
   <xref target='RFC8138'/> with a Source Routing Header 6LoRH (SRH-6LoRH)
   that routes all the way to the parent router or to the leaf.
   </t>

   <t>
   To ensure that a packet is forwarded across the RPL DODAG in the form in
   which it was generated, it is required that all the RPL nodes support
   <xref target='RFC8138'/> at the time of the switch.
   </t>

   <t>
   Setting the 'T' flag is ultimately the responsibility of the network
   administrator. The expectation is that the network management or upgrading
   tools in place enable the network administrator to know when all the nodes
   that may join a DODAG were migrated. In the case of a RPL Instance with
   multiple Roots, all nodes that participate in the RPL Instance may
   potentially join any DODAG.
   The network <bcp14>MUST</bcp14> be operated with the 'T' flag unset until all nodes in the
   RPL Instance are upgraded to support this specification.
   </t>

   </section>


   <section anchor='rb'><name>Rolling Back</name>

  <t>
   When turning 6LoRH compression <xref target='RFC8138'/> off in the network, the
   network administrator <bcp14>MUST</bcp14> wait until each node has its 'T' flag
   unset before allowing nodes that do not support compression in
   the network. Information regarding whether compression is active in a node
   <bcp14>SHOULD</bcp14> be exposed in the node's management interface.
  </t>
   <t>
   Nodes that do not support <xref target='RFC8138'/> <bcp14>SHOULD NOT</bcp14> be deployed
   in a network where compression is turned on. If that is done, the node
   can only operate as a RUL.
   </t>

   </section>

   </section>

   <section anchor="iana"><name>IANA Considerations</name>
       <t>
    This specification updates the "DODAG Configuration Option Flags for MOP      
0..6" registry <xref target='RFC9008'/> (formerly the "DODAG Configuration Option Flags" registry, which was created for <xref target='RFC6550'/>), by allocating one
 new flag as follows:
    </t>

   <table  anchor="nexndopt"><name>New DODAG Configuration Option Flag</name>
   <thead>
      <tr><td>Bit Number</td><td>Capability Description</td><td>Reference</td></tr>
   </thead><tbody>
      <tr><td>2</td><td>Enable Compression per RFC 8138 (T)</td><td>RFC 9035</td></tr>
   </tbody>
   </table>

<t>IANA has added this document as a reference for MOP 7 in the RPL "Mode of Operation" registry.
</t>
   </section>

   <section anchor='sec'><name>Security Considerations</name>
    <t>
   It is worth noting that in RPL <xref target='RFC6550'/>, every node in the
   LLN that is RPL aware and has access to the RPL domain can inject any RPL-based attack in the network; see <xref target='RFC7416'/> for details.
   This document typically applies to an existing deployment and does not change
   its security requirements and operations.
   It is assumed that the security mechanisms as defined for RPL are followed.
 </t>
    <t>
    Setting the 'T' flag before all routers are upgraded may cause a loss
    of packets. The new bit benefits from the same protection as the rest of the
    information in the DODAG Configuration option that transports it. Touching
    the new bit is just one of the many attacks that can happen if an
    attacker manages to inject a corrupted configuration option in the network.
    </t><t>
    Setting and unsetting the 'T' flag may create inconsistencies in the network,
    but as long as all nodes are upgraded to provide support for <xref target='RFC8138'/>, 
    they will be able to forward both forms. The source is responsible
    for selecting whether the packet is compressed or not, and all routers must
    use the format that the source selected. So, the result of an inconsistency
    is merely that both forms will be present in the network, at an additional
    cost of bandwidth for packets in uncompressed form.

    </t><t>
    An attacker may unset the 'T' flag to force additional energy consumption of child or descendant nodes in its sub-DODAG.
    Conversely, it may set the 'T' flag so
    that nodes located downstream would compress packets even when compression is not desired, potentially causing packet loss.  In a tree structure, the attacker would be in a position to drop the packets from and to the attacked nodes.  So, the attacks mentioned above would be more complex and more visible than simply dropping selected packets.  The downstream node may have other parents and see the bit with both
settings; such a situation may be detected, and an alert may be triggered.
    </t>
   </section>
</middle>

<back>
   <references><name>References</name>

    <references><name>Normative References</name>
          <xi:include href='https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml'/>
          <xi:include href='https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml'/>
          <xi:include href='https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6550.xml'/>
  <xi:include href='https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7102.xml'/>
          <xi:include href='https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8138.xml'/>
          <xi:include href='https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8505.xml'/>

<!-- draft-ietf-roll-unaware-leaves (RFC 9010) -->
          <xi:include href='https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.9010.xml'/>

   </references>
   <references><name>Informative References</name>
          <xi:include href='https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6282.xml'/>
          <xi:include href='https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6553.xml'/>
  <xi:include href='https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7228.xml'/>
          <xi:include href='https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7416.xml'/>

<!-- draft-ietf-roll-useofrplinfo (RFC 9008) -->
          <xi:include href='https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.9008.xml'/>
   </references>
   </references>

   <section numbered="false"><name>Acknowledgments</name>
   <t>
   The authors wish to thank
   <contact fullname="Murray Kucherawy"/>, <contact fullname="Meral Shirazipour"/>, <contact fullname="Barry Leiba"/>, <contact fullname="Tirumaleswar Reddy"/>,
   <contact fullname="Nagendra Kumar Nainar"/>, <contact fullname="Stewart Bryant"/>, <contact fullname="Carles Gomez"/>, <contact fullname="Éric Vyncke"/>,
   <contact fullname="Roman Danyliw"/>,
   and especially <contact fullname="Benjamin Kaduk"/>, <contact fullname="Alvaro Retana"/>, <contact fullname="Dominique Barthel"/>,
   and <contact fullname="Rahul Jadhav"/> for their in-depth reviews and constructive suggestions.
   </t><t>
   Also, many thanks to <contact fullname="Michael Richardson"/> for always being  helpful and responsive when the need arises.
   </t>
   </section>
</back>
</rfc>
