<?xml version='1.0' encoding='utf-8'?>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
<?xml-model href="xml2rfcv3-annotated.rng" schematypens="http://relaxng.org/ns/structure/1.0"?>
<!-- <?rfc-ext refresh-from="draft-ietf-roll-nsa-extension-01.xml" refresh-interval="2"?> -->
<!-- <?rfc toc="yes"?> -->
<!-- <?rfc-ext support-rfc2731="yes"?> -->
<!-- <!DOCTYPE rfc SYSTEM "rfc2629.dtd" [ -->
<!--  <!ENTITY rfc2616 SYSTEM -->
<!--   "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2616.xml"> -->
<!-- ]> -->
<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="3"?>
<?rfc tocindent="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc compact="no"?>
<?rfc subcompact="no"?>
<?rfc authorship="yes"?>
<?rfc tocappendix="yes"?>
<!DOCTYPE rfc []>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" category="std" ipr="trust200902" docName="draft-ietf-roll-nsa-extension-11" obsoletes="" updates="" submissionType="IETF" xml:lang="en" tocInclude="true" tocDepth="3" symRefs="true" sortRefs="true" version="3" consensus="true">
  <!-- xml2rfc v2v3 conversion 2.41.0 -->
  <front>
    <title abbrev="CA OF and PS DAG MC Extension">
        Common Ancestor Objective Function and Parent Set DAG Metric Container Extension
    </title>
    <seriesInfo name="Internet-Draft" value="draft-ietf-roll-nsa-extension-11"/>
    <author initials="R.-A." surname="Koutsiamanis" fullname="Remous-Aris Koutsiamanis" role="editor">
      <organization>IMT Atlantique</organization>
      <address>
        <postal>
          <street>Office B220</street>
          <street>4 rue Alfred Kastler, BP 20722</street>
          <code>44307</code>
          <city>Nantes Cedex 3</city>
          <country>FRANCE</country>
        </postal>
<!--         <phone>+33 299 12 70 49</phone> -->
        <email>aris@ariskou.com</email>
      </address>
    </author>
    <author initials="G.Z." surname="Papadopoulos" fullname="Georgios Papadopoulos">
      <organization>IMT Atlantique</organization>
      <address>
        <postal>
          <street>Office B00 - 114A</street>
          <street>2 Rue de la Chataigneraie</street>
          <city>Cesson-Sevigne - Rennes</city>
          <code>35510</code>
          <country>FRANCE</country>
        </postal>
        <phone>+33 299 12 70 04</phone>
        <email>georgios.papadopoulos@imt-atlantique.fr</email>
      </address>
    </author>
    <author initials="N." surname="Montavont" fullname="Nicolas Montavont">
      <organization>IMT Atlantique</organization>
      <address>
        <postal>
          <street>Office B00 - 106A</street>
          <street>2 Rue de la Chataigneraie</street>
          <city>Cesson-Sevigne - Rennes</city>
          <code>35510</code>
          <country>FRANCE</country>
        </postal>
        <phone>+33 299 12 70 23</phone>
        <email>nicolas.montavont@imt-atlantique.fr</email>
      </address>
    </author>
    <author initials="P." surname="Thubert" fullname="Pascal Thubert">
      <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/>
    <workgroup>ROLL</workgroup>
    <abstract>
      <t>
        High reliability and low jitter can be achieved by being able to send data packets through multiple paths, via different parents, in a network.
        This document details how to exchange the necessary information within RPL control packets to let a node better select the different parents that will be used to forward a packet over different paths.
        This document also describes the Objective Function which takes advantage of this information to implement multi-path routing.
      </t>
    </abstract>
  </front>
  <middle>
    <!--section title="TEMPORARY EDITORIAL NOTES">

   <t>
        This document is an Internet Draft, so it is work-in-progress by nature.
           It contains the following work-in-progress elements:
   </t>    
              
   <t>
       <list style="symbols">
        <t>"TODO" statements are elements which have not yet been written by the authors 
        for some reason (lack of time, ongoing discussions with no clear consensus, etc).
        The statement does indicate that the text will be written at some time.</t>
       </list>
   </t>
            
</section --> 



<section numbered="true" toc="default">
      <name>Introduction</name>
      <t>
        Networks in the industrial context must provide stringent guarantees in terms of reliability and predictability, with this domain being one of the main ones addressed by <xref target="RFC8557">Deterministic Networking</xref>.
        
        One of the ways of achieving such guarantees is through Packet Replication and Elimination (PRE) (<xref target="RFC9030" sectionFormat="of" section="4.5.3"/>), a technique which allows redundant paths in the network to be utilized for traffic requiring higher reliability.

        Another is to have pre-selected backup paths on standby for quick packet retransmission when packet failures occur.

        Load-balancing can be also used to make sure that not all traffic passes through the same nodes, to more evenly spread the packet forwarding load.
        
        Allowing industrial applications to function over wireless networks requires the application of the principles and <xref target="RFC8655">architecture of Deterministic Networking</xref>.
        This results in designs that aim at optimizing packet delivery rate and bounding latency.

        Additionally, nodes operating on battery need to minimize their energy consumption.
      </t>
      <t>  
        As an example, to meet this goal, <xref target="IEEE802154">IEEE Std. 802.15.4</xref> provides Time-Slotted Channel Hopping (TSCH), a mode of operation that uses a common communication schedule
based on timeslots to allow deterministic medium access as well as channel hopping to work around radio interference.
        However, since TSCH uses retransmissions in the event of a failed transmission, end-to-end latency and jitter performance can deteriorate.
      </t>
      <t>
        Furthermore, the 6TiSCH working group, focusing on IPv6 over IEEE Std. 802.15.4-TSCH, has worked on these issues and produced the <xref target="RFC9030">"6TiSCH Architecture"</xref> to address that case.
      </t>
      <t>
        Building a multi-path DODAG can be achieved based on the RPL capability of having multiple parents for each node in a network, a subset of which is used to forward packets.
        In order to select parents to be part of this subset, the RPL Objective Function (OF) needs additional information.

        This document describes an OF which implements multi-path routing and specifies the transmission of this specific path information.
      </t>
      <t>
        This document describes a new Objective Function (OF) called the Common Ancestor (CA) OF (see <xref target="ca_of" />).
        A detailed description is given of how the path information is used within the CA OF and how the subset of parents for forwarding packets is selected.
        This specification defines a new Objective Code Point (OCP) for the CA OF.
      </t>
      <t>

        For the path information, this specification focuses on the extensions to the <xref target="RFC6551">DAG Metric Container</xref> required for supplying to the CA OF a part of the information it needs to operate.
        This information is the <xref target="RFC6550">RPL</xref> parent address set of a node and it must be sent to potential children of the node.
        The RPL DIO Control Message is the canonical way of broadcasting this kind of information and therefore its <xref target="RFC6551">DAG Metric Container</xref> field is used to append a Node State and Attribute (NSA) object.
        The node's parent address set is stored as an optional TLV within the NSA object.
        This specification defines the type value and structure for the parent address set TLV (see <xref target="PS_TLV" />).
      </t>
    </section>
    <section numbered="true" toc="default">
      <name>Terminology</name>
      <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 BCP 14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when, they appear in all capitals, as shown here.
      </t>
      <t>
        The draft uses the following Terminology from other RFCs:
      </t>
      <dl newline="false" spacing="normal">
        <dt>Parent Set (PS):</dt>
        <dd>
                Defined in <xref target="RFC6550">RPL</xref>.
        </dd>
        <dt>Packet Replication and Elimination (PRE):</dt>
        <dd>
                A method that consists of transmitting multiple copies of a packet using multi-path forwarding over a multi-hop network and that consolidates multiple received packet copies to control flooding.
                See "Complex Track with Replication and Elimination" in <xref target="RFC9030" sectionFormat="of" section="4.5.3"/> for more details.
        </dd>
      </dl>
      <t>
        The draft introduces the following Terminology:
      </t>
      <dl newline="false" spacing="normal">
        <dt>Alternative Parent (AP):</dt>
        <dd>
                An RPL parent in the parent set of a node is used to forward a packet copy when replicating packets.
        </dd>
        <dt>Alternative Parent (AP) Selection:</dt>
        <dd>
                The mechanism for choosing the next hop node to forward a packet copy when replicating packets.
        </dd>
        <dt>Preferred Grand Parent (PGP):</dt>
        <dd>
                The preferred parent of the preferred parent of a node.
        </dd>
      </dl>
    </section>
    <section numbered="true" toc="default" anchor="ca_policies">
      <name>Common Ancestor AP Selection Policies</name>
      <t>
        In the RPL protocol, each node maintains a list of potential parents. 
        When more than one parent is required, as when performing PRE, the RPL DODAG Preferred Parent node is used, as per <xref target="RFC6550">RPL</xref> parent selection, effectively depending on the OF used.
        If the CA OF is used, the way this choice is made is described in <xref target="ca_of" />.
        Furthermore, to construct an alternative path toward the root, in addition to the PP node, each node in the network selects one or more parents, called Alternative Parents (APs), from its Parent Set (PS).
      </t>
      <t>
        There are multiple possible policies for selecting the AP node.
        This section details three such possible policies.
      </t>
      <t>
        All three policies defined perform AP selection based on common ancestors, named Common Ancestor Strict, Common Ancestor Medium, and Common Ancestor Relaxed, depending on how restrictive the selection process is.
        A more restrictive policy will limit flooding but might fail to select an appropriate AP, while a less restrictive one will more often find an appropriate AP but might increase flooding.
      </t>
      <t>
        All three policies apply their corresponding common ancestor criterion to filter the list of candidate neighbors in the Alternative Parent set.
      </t>
      <t>
        If after the filtering there are multiple condition-meeting candidate nodes, the node MUST decide to use at least one of them as its AP node. 
        The way this choice is made depends on which OF is used. 
        If the CA OF is used, the way this choice is made is described in <xref target="ca_of" />.
      </t>
      <section anchor="sec_ca_strict" numbered="true" toc="default">
        <name>Common Ancestor Strict</name>
        <t>
            In the CA Strict OF the node will check if its Preferred Grand Parent (PGP), the PP of its PP, is the same as the PP of the potential AP.
        </t>
        <figure anchor="fig_ca_alternative_parent_selection">
          <name>Example Common Ancestor Strict Alternative Parent Selection policy</name>
          <artwork name="" type="" align="left" alt=""><![CDATA[

               (  R  ) root              
                  .                      PS(S) = {A, B, C, D}
                  .                      PP(S) = C
                  .                      PP(PP(S)) = Y          
                  .                                          
                                         PS(A) = {W, X}      
  ( W )    ( X )    ( Y )    ( Z )       PP(A) = X               
    ^ ^   ^^ ^ ^    ^^^^ ^   ^ ^^                                
    |  \ //  |  \ //  ||  \ /  ||        PS(B) = {W, X, Y}      
    |   //   |   //   ||   /   ||        PP(B) = Y                            
    |  // \  |  // \  ||  / \  ||                                
    | //   \ | //   \ || /   \ ||        PS(C) = {X, Y, Z}      
  ( A )    ( B )    ( C )    ( D )       PP(C) = Y               
      ^        ^      ^^     ^                                    
       \        \     ||    /            PS(D) = {Y, Z}        
         \       \    ||   /             PP(D) = Z                            
           \      \   ||  /                   
             \----\\  || /               || Preferred Parent
                  (   S   ) source       |  Potential Alt. Parent
]]></artwork>
        </figure>
        <t>
            For example, in <xref target="fig_ca_alternative_parent_selection"/>, the source node S must know its grandparent sets through nodes A, B, C, and D.
            The Parent Sets (PS) and the Preferred Parents (PS) of nodes A, B, C, and D are shown on the side of the figure.
            The CA Strict parent selection policy will select an AP for node S for which PP(PP(S)) = PP(AP).
            Given that PP(PP(S)) = Y:
        </t>
        <ul spacing="normal">
          <li>
                    Node A: PP(A) = X and therefore it is different than PP(PP(S))
          </li>
          <li>
                    Node B: PS(B) = Y and therefore it is equal to PP(PP(S))
          </li>
          <li>
                    Node D: PS(D) = Z and therefore it is different than PP(PP(S))
          </li>
        </ul>
        <t>
            
            Therefore, node S MUST decide to use node B as its AP node, since PP(PP(S)) = Y = PP(B).
        </t>
      </section>
      <section anchor="sec_ca_medium" numbered="true" toc="default">
        <name>Common Ancestor Medium</name>
        <t>
            In the CA Medium OF the node will check if its Preferred Grand Parent (PGP), the PP of its PP, is contained in the PS of the potential AP.
        </t>
        <t> 
            Using the same example, in <xref target="fig_ca_alternative_parent_selection"/>, the CA Medium parent selection policy will select an AP for node S for which PP(PP(S)) is in PS(AP).
            
            Given that PP(PP(S)) = Y:
        </t>
        <ul spacing="normal">
          <li>
                    Node A: PS(A) = {W, X} and therefore PP(PP(S)) is not in the set
          </li>
          <li>
                    Node B: PS(B) = {W, X, Y} and therefore PP(PP(S)) is in the set
          </li>
          <li>
                    Node D: PS(D) = {Y, Z} and therefore PP(PP(S)) is in the set
          </li>
        </ul>
        <t>
            
          Therefore, S MUST decide to use at least one node among B and D as its AP node.
        </t>
      </section>
      <section anchor="sec_ca_relaxed" numbered="true" toc="default">
        <name>Common Ancestor Relaxed</name>
        <t>
            In the CA Relaxed OF the node will check if the Parent Set (PS) of its Preferred Parent (PP) has a node in common with the PS of the potential AP.
        </t>
        <t> 
            Using the same example, in <xref target="fig_ca_alternative_parent_selection"/>, the CA Relaxed parent selection policy will select an AP for node S for which PS(PP(S)) has at least one node in common with PS(AP).
            Given that PS(PP(S)) = {X, Y, Z}:
        </t>
        <ul spacing="normal">
          <li>
                    Node A: PS(A) = {W, X} and the common nodes are {X}
          </li>
          <li>
                    Node B: PS(B) = {W, X, Y} and the common nodes are {X, Y}
          </li>
          <li>
                    Node D: PS(D) = {Y, Z} and the common nodes are {Y, Z}
          </li>
        </ul>
        <t>
            
          Therefore, S MUST decide to use at least one node among A, B, and D as its AP node.
        </t>
      </section>
    </section>
    <section numbered="true" toc="default" anchor="ca_of">
      <name>Common Ancestor Objective Function</name>
      <t>
        An OF which allows the multiple paths to remain correlated is detailed here.
        More specifically, when using this OF a node will select an AP node "close" to its PP node to allow the operation of overhearing between parents.
        Closeness here is not strictly defined, however, the premise is that those candidate parent nodes that have common parents themselves have a higher probability of being within each other's radio range, though it's of course not guaranteed.
        
        For more details about overhearing and its use in this context see the "Complex Track with Replication and Elimination" in <xref target="RFC9030" sectionFormat="of" section="4.5.3"/>.
        If multiple potential APs match this condition, the AP with the lowest rank will be registered.
      </t>
      <t>
        The OF described here is an extension of <xref target="RFC6719">The Minimum Rank with Hysteresis Objective Function (MRHOF)</xref>.
        The CA OF does not update <xref target="RFC6719"/>. 
        Rather, it uses the existing definition of MRHOF in <xref target="RFC6719"/> to build a new OF (with a new Objective Code Point (OCP)) which provides additional functionality, while maintaining compatibility by retaining the existing functionality of MRHOF for the preferred parent.

        To be precise, this OF extends MRHOF by specifying how an AP is selected while the selection and switching of the PP remain unaltered.
        Importantly, the calculation of the rank of the node through each candidate neighbor and the selection of the PP is kept the same as in MRHOF.
      </t>
      <t>
        How the CA OF differs from MRHOF in a section-by-section manner follows in detail:
      </t>
      <dl newline="true" spacing="normal">
        <dt><xref target="RFC6719" sectionFormat="comma" section="2" />: "Terminology". Term "Selected Metric":</dt>
        <dd>
                The CA OF uses only one metric, like MRHOF, for rank calculation, with the same MRHOF semantics.
                For selecting the AP, the PS TLV (stored in the DIO Metric Container Node State and Attribute (NSA) object body, see <xref target="PS_TLV"/>) is used.
                This additional NSA metric is disregarded for rank calculation.
        </dd>
        <dt><xref target="RFC6719" sectionFormat="comma" section="3" /> "The Minimum Rank with Hysteresis Objective Function":</dt>
        <dd>
                Same as MRHOF extended to AP selection.
                Minimum Rank path selection and switching apply correspondingly to the AP with the extra CA requirement of having some match between ancestors, according to one of the Common Ancestor AP selection policies defined in <xref target="ca_policies"/>.
        </dd>
        <dt><xref target="RFC6719" sectionFormat="comma" section="3.1" /> "Computing the Path Cost":</dt>
        <dd>
                Same as MRHOF extended to AP selection.
                If a candidate neighbor does not fulfill the CA requirement then the path cost through that neighbor SHOULD be set to MAX_PATH_COST, the same value used by MRHOF.
        </dd>
        <dt><xref target="RFC6719" sectionFormat="comma" section="3.2" /> "Parent Selection":</dt>
        <dd>
                Same as MRHOF extended to AP selection.
                To allow hysteresis, AP selection maintains a variable, cur_ap_min_path_cost, which is the path cost of the current AP.
        </dd>
        <dt><xref target="RFC6719" sectionFormat="comma" section="3.2.1" /> "When Parent Selection Runs":</dt>
        <dd>
                Same as MRHOF.
        </dd>
        <dt><xref target="RFC6719" sectionFormat="comma" section="3.2.2" /> "Parent Selection Algorithm":</dt>
        <dd>
                Same as MRHOF extended to AP selection.
                If the smallest path cost for paths through the candidate neighbors is smaller than cur_ap_min_path_cost by less than PARENT_SWITCH_THRESHOLD (the same variable as MRHOF uses), the node MAY continue to use the current AP.
                Additionally, if there is no PP selected, there MUST NOT be any AP selected either.
                Finally, as with MRHOF, a node MAY include up to PARENT_SET_SIZE-1 additional candidate neighbors in its Alternative Parent set.
                The value of PARENT_SET_SIZE is the same as in MRHOF.
        </dd>
        <dt><xref target="RFC6719" sectionFormat="comma" section="3.3" /> "Computing Rank":</dt>
        <dd>
                Same as MRHOF.
        </dd>
        <dt><xref target="RFC6719" sectionFormat="comma" section="3.4" /> "Advertising the Path Cost":</dt>
        <dd>
                Same as MRHOF.
        </dd>
        <dt><xref target="RFC6719" sectionFormat="comma" section="3.5" /> "Working without Metric Containers":</dt>
        <dd>
                The CA OF can work without metric containers identically to MRHOF. 
                Nodes that transmit DIO messages without the Metric Container will never be selected as an AP by the CA OF of another node but can be selected as the PP as per the operation of MRHOF.
                Effectively, the lack of Metric Containers is equivalent to operating with a Parent Set TLV where there are no PS IPv6 addresses and the PS Length is 0.
        </dd>
        <dt><xref target="RFC6719" sectionFormat="comma" section="4" /> "Using MRHOF for Metric Maximization":</dt>
        <dd>
                Same as MRHOF.
        </dd>
        <dt><xref target="RFC6719" sectionFormat="comma" section="5" /> "MRHOF Variables and Parameters":</dt>
        <dd>
          <t>
                Same as MRHOF extended to AP selection.
                The CA OF operates like MRHOF for AP selection by maintaining separate:
          </t>
          <dl newline="false" spacing="normal">
            <dt>AP:</dt>
            <dd>
                        Corresponding to the MRHOF PP.
                        Hysteresis is configured for AP with the same PARENT_SWITCH_THRESHOLD parameter as in MRHOF.
                        The AP MUST NOT be the same as the PP.
            </dd>
            <dt>Alternative parent set:</dt>
            <dd>
                        Corresponding to the MRHOF parent set.
                        The size is defined by the same PARENT_SET_SIZE parameter as in MRHOF.
                        The Alternative parent set MUST be a strict subset of the parent set.
            </dd>
            <dt>cur_ap_min_path_cost:</dt>
            <dd>
                        Corresponding to the MRHOF cur_min_path_cost variable.
                        To support the operation of the hysteresis function for AP selection.
            </dd>
          </dl>
        </dd>
        <dt><xref target="RFC6719" sectionFormat="comma" section="6" /> "Manageability":</dt>
        <dd>
                Same as MRHOF.
        </dd>
        <dt><xref target="RFC6719" sectionFormat="comma" section="6.1" /> "Device Configuration":</dt>
        <dd>
                Same as MRHOF.
        </dd>
        <dt><xref target="RFC6719" sectionFormat="comma" section="6.2" /> "Device Monitoring":</dt>
        <dd>
                Same as MRHOF.
        </dd>
      </dl>
      <section numbered="true" toc="default">
        <name>Usage</name>
        <t>
            All the Common Ancestor AP Selection Policies (<xref target="ca_policies"/>) apply their corresponding criterion to filter the list of candidate neighbors in the Alternative Parent set.
            The AP is then selected from the Alternative Parent set based on Rank and using hysteresis as is done for the PP in MRHOF.
            It is noteworthy that the OF uses the same Objective Code Point (OCP): (TBD1) for all policies used.
        </t>
        <t>
            The PS information can be used by any of the described AP selection policies or other ones not described here, depending on requirements.
            It is optional for all nodes to use the same AP selection policies.
            Different nodes may use different AP selection policies since the selection policy is local to each node.
            For example, using different policies can be used to vary the transmission reliability in each hop. 
            Some suggestions are provided in <xref target="appendix_choosing_policy"/>.
        </t>
      </section>
    </section>
    <section anchor="PS_TLV" numbered="true" toc="default">
      <name>Node State and Attribute (NSA) object type extension</name>
      <t>
            In order to select their AP node, nodes need to be aware of their grandparent node sets. 
            Within <xref target="RFC6550">RPL</xref>, the nodes use the DODAG Information Object (DIO) Control Message to broadcast information about themselves to potential children.
            However, <xref target="RFC6550">RPL</xref>, does not define how to propagate information related to the parent set, which is what this document addresses. 
      </t>
      <t>
            DIO messages can carry multiple options, out of which the <xref target="RFC6551">DAG Metric Container option</xref> is the most suitable structurally and semantically to carry the parent set.
            The DAG Metric Container option itself can carry different nested objects, out of which the <xref target="RFC6551">Node State and Attribute (NSA)</xref> is appropriate for transferring generic node state data.
            Within the Node State and Attribute, it is possible to store optional TLVs representing various node characteristics.
            As per the <xref target="RFC6551">Node State and Attribute (NSA)</xref> description, no TLV has been defined for use.
            This document defines one TLV for transmitting a node's parent set.
      </t>
      <figure anchor="fig_dio">
        <name>Example DIO Message with a DAG Metric Container option</name>
        <artwork name="" type="" align="left" 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| RPLInstanceID |Version Number |             Rank              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|G|0| MOP | Prf |     DTSN      |     Flags     |   Reserved    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
+                                                               +
|                                                               |
+                            DODAGID                            +
|                                                               |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| DAGMC Type (2)| DAGMC Length  |                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               |
|                                                               |
//                   DAG Metric Container data                 //
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

]]></artwork>
      </figure>
      <t>
            <xref target="fig_dio"/> shows the structure of the DIO Control Message when a DAG Metric Container option is included.
            The DAG Metric Container option type (DAGMC Type in <xref target="fig_dio"/>) has the value 0x02 as per the IANA registry for the RPL Control Message Options, and is defined in <xref target="RFC6550"/>.
            The DAG Metric Container option length (DAGMC Length in <xref target="fig_dio"/>) expresses the DAG Metric Container length in bytes.
            DAG Metric Container data holds the actual data and is shown expanded in <xref target="fig_dagmc"/>.
      </t>
      <figure anchor="fig_dagmc">
        <name>DAG Metric Container (MC) data with Node State and Attribute (NSA) object body and a TLV</name>
        <artwork name="" type="" align="left" 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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|Routing-MC-Type|Res Flags|P|C|O|R| A   |  Prec | Length (bytes)|   
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     Res       |  Flags    |A|O|    PS  type   |   PS  Length  | 
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+    
|   PS IPv6 address(es) ...                                       
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

]]></artwork>
      </figure>
      <t>
            The structure of the DAG Metric Container data in the form of a Node State and Attribute (NSA) object with a TLV in the NSA Optional TLVs field is shown in <xref target="fig_dagmc"/>.
            The first 32 bits comprise the DAG Metric Container header and all the following bits are part of the Node State and Attribute object body, as defined in <xref target="RFC6551"/>.
            This document defines a new TLV, which MUST be carried in the Node State and Attribute (NSA) object Optional TLVs field within the context of the use of the CA OF. 
            The TLV is named Parent Set and is abbreviated as PS in <xref target="fig_dagmc"/>.
      </t>
      <dl newline="false" spacing="normal" indent="6">
        <dt>PS type:</dt>
        <dd>
                    The type of the Parent Set TLV.
                    The value is (TBD2).
        </dd>
        <dt>PS Length:</dt>
        <dd>
                    The total length of the TLV value field (PS IPv6 address(es)) in bytes (0 included).
                    The length is an integral multiple of 16, the number of bytes in an IPv6 address.
        </dd>
        <dt>PS IPv6 address(es)</dt>
        <dd>
                    One or more 128-bit IPv6 addresses, without any separator between them.
                    The field consists of one IPv6 address per parent in the parent set.
                    The parent addresses are listed in decreasing order of preference and not all parents in the parent set need to be included.
                    The selection of how many parents from the parent set will be included is left to the implementation.  
                    The number of parent addresses in the PS IPv6 address(es) field can be deduced by dividing the length of the PS IPv6 address(es) field in bytes by 16, the number of bytes in an IPv6 address.
        </dd>
      </dl>
      <section numbered="true" toc="default">
        <name>Usage</name>
        <t>
            The PS SHOULD be used in the process of parent selection, and especially in AP selection since it can help the alternative path to not significantly deviate from the preferred path.
            The Parent Set is information local to the node that broadcasts it.
        </t>
        <t>
            The PS is used only within NSA objects configured as a metric, therefore the DAG Metric Container field "C" MUST be 0.
            Additionally, since the information in the PS needs to be propagated downstream but cannot be aggregated, the DAG Metric Container field "R" MUST be 1.
            Finally, since the information contained is by definition partial, specifically just the parent set of the DIO-sending node, the DAG Metric Container field "P" MUST be 1.
        </t>
        <t>
            The presence of incorrectly configured flags MUST render the Parent Set TLV invalid. 
            This case MUST be handled the same as having valid flags and a valid Parent Set TLV with no addresses in the PS IPv6 address(es).
        </t>
        <t>
          The presence of a PS Length value that is not a multiple of 16 or larger than 240 MUST render the Parent Set TLV invalid. 
          This case MUST be handled the same as a valid Parent Set TLV with no addresses in the PS IPv6 address(es).
      </t>
        <!--<section title="DAG Metric Container fields">
            <t>
                Given the intended usage, when using the PS, the NSA object it is contained in MUST be used as a constraint in the DAG Metric Container.
                More specifically, using the PS places the following requirements on the DAG Metric Container header fields:
                <ul spacing="normal">
                    <li>
                        'P' flag: MUST be cleared, since PS is used only with constraints.
                    </li>
                    <li>
                        'C' flag:  MUST be set, since PS is used only with constraints.
                    </li>
                    <li>
                        'O' flag: Used as per <xref target="RFC6551"/>, to indicated optionality.
                    </li>
                    <li>
                        'R' flag: Used as per <xref target="RFC6551"/>.
                    </li>
                    <li>
                        'A' Field: Used as per <xref target="RFC6551"/>.
                    </li>
                    <li>
                        'Prec' Field: Used as per <xref target="RFC6551"/>.
                    </li>
                </ul>
            </t>
        </section>
        
        <section numbered="true" toc="default">
            <name>Node State and Attribute fields</name>
            <t>
                For clarity reasons, the usage of the PS places no additional restrictions on the NSA flags ('A' and 'O'), which can be used as normally defined in <xref target="RFC6551"/>.
            </t>
        </section>-->
    </section>
    </section>
    <section numbered="true" toc="default">
      <name>Controlling PRE</name>
      <t>
        PRE is very helpful when the aim is to increase reliability for a certain path, however, its use creates additional traffic as part of the replication process.
        It is conceivable that not all paths have stringent reliability requirements. 
        Therefore, a way to control whether PRE is applied to a path's packets SHOULD be implemented.
        For example, a traffic class label can be used to determine this behavior per flow type as described in <xref target="RFC8655">Deterministic Networking Architecture</xref>.
      </t>
    </section>
    <section numbered="true" toc="default">
      <name>Security Considerations</name>
      <t>
        All the security considerations from <xref target="RFC6550"/>, <xref target="RFC6551"/>, and <xref target="RFC6719"/> apply.
      </t>
      <t>
        In this document, the structure of the DIO control message is extended, within the pre-defined DIO options.
        The additional information is the list of IPv6 addresses of the parent set of the node transmitting the DIO.
        This use of this additional information can have the following additional potential consequences:
      </t>
      <ul spacing="normal">
        <li>
                A malicious node that can send DIOs can use the parent set extension to convince neighbors to route through itself, instead of the normal preferred parent they would use.
                However, this is already possible with other OFs (like <xref target="RFC6552">OF0</xref> and <xref target="RFC6719">MRHOF</xref>) by reporting a fake rank value in the DIO, thus masquerading as the DODAG root.
        </li>
      </ul>
    </section>
    <section numbered="true" toc="default">
      <name>IANA Considerations</name>
      <t>
        This document requests the allocation of a new value (TBD1) from the "Objective Code Point (OCP)" sub-registry of the "Routing Protocol for Low Power and Lossy Networks (RPL)" registry.
      </t>
      <t>
        This document also requests the allocation of a new value (TBD2) for the "Parent Set" TLV from the "Routing Metric/Constraint TLVs" sub-registry of the "Routing Protocol for Low Power and Lossy Networks (RPL) Routing Metric/Constraint" registry.
      </t>
    </section>
    <section title="Acknowledgments">
          <t>
              We are very grateful to Dominique Barthel, Rahul Jadhav, Fabrice Theoleyre, Diego Dujovne, Derek Jianqiang Hou, Michael Richardson, and Alvaro Retana for their comments, feedback, and support which lead to many improvements to this document.
              We would also like to thank Tomas Lagos Jenschke very much for helping in the implementation and evaluation of this document.
          </t>
    </section>

</middle>
  <back>
    <!--  <references title="Normative References"> 
  </references> -->

    <references>
      <name>References</name>
      <references>
        <name>Normative references</name>
        <!-- Key words for use in RFCs to Indicate Requirement Levels -->
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
        <!-- RPL: IPv6 Routing Protocol for Low-Power and Lossy Networks -->
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6550.xml"/>
        <!-- Routing Metrics Used for Path Calculation in Low-Power and Lossy Networks -->
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6551.xml"/>
        <!-- The Minimum Rank with Hysteresis Objective Function -->
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6719.xml"/>
        <!-- Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words -->
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
      </references>
      <references>
        <name>Informative references</name>
        <!-- Deterministic Networking Architecture -->
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8655.xml"/>
        <!-- Deterministic Networking Problem Statement -->
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8557.xml"/>
        <!-- Objective Function Zero for the Routing Protocol for Low-Power and Lossy Networks (RPL) -->
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6552.xml"/>
        <!-- IPv6 over Low-Power Wireless Personal Area Network (6LoWPAN) Routing Header -->
        <!-- <?rfc include="reference.RFC.8138"?> -->
        <!-- 6TiSCH: Minimal 6TiSCH Configuration -->
        <!-- <?rfc include="reference.RFC.8180"?> -->
        <!-- 6TiSCH: 6TiSCH architecture -->
        <xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.9030.xml"/>
        <!-- 6TiSCH: 6top protocol -->
        <!-- <?rfc include='reference.I-D.ietf-6tisch-6top-protocol'?> -->
        <!-- Exploiting Packet Replication and Elimination in Complex Tracks in LLNs -->
        
        <reference anchor="IEEE802154" target="http://standards.ieee.org/findstds/standard/802.15.4-2015.html">
          <front>
            <title>IEEE Std. 802.15.4, Part. 15.4: Wireless Medium Access Control (MAC) and Physical Layer (PHY) Specifications for Low-Rate Wireless Personal Area Networks</title>
            <author initials="" surname="IEEE standard for Information Technology">
              <organization/>
            </author>
            <date year="2015" month="December"/>
          </front>
        </reference>        
      </references>
    </references>
    <section numbered="true" toc="default">
      <name>Implementation Status</name>
      <t>
        A research-stage implementation of the PRE mechanism using the proposed extension as part of a 6TiSCH IOT use case was developed at IMT Atlantique, France by Tomas Lagos Jenschke and Remous-Aris Koutsiamanis.
        It was implemented on the open-source Contiki OS and tested with the Cooja simulator.
        The DIO DAGMC NSA extension is implemented with a configurable number of parents from the parent set of a node to be reported.
      </t>
      <figure anchor="fig_sim_topology">
        <name>Simulation Topology</name>
        <artwork name="" type="" align="left" alt=""><![CDATA[
                 ( R )              
              

(11)   (12)   (13)   (14)   (15)   (16)        
                                 
                                 
(21)   (22)   (23)   (24)   (25)   (26)        
                                 
                                 
(31)   (32)   (33)   (34)   (35)   (36)        
                                 
                                 
(41)   (42)   (43)   (44)   (45)   (46)        
                                 
                                 
(51)   (52)   (53)   (54)   (55)   (56)

 
                 ( S )        
]]></artwork>
      </figure>
      <t>
        The simulation setup is:
      </t>
      <dl newline="false" spacing="normal">
        <dt>Topology:</dt>
        <dd>
                32 nodes structured in a regular grid as shown in <xref target="fig_sim_topology"/>. 
                Node S (source) is the only data packet sender and sends data to node R (root).
                The parent set of each node (except R) is all the nodes in the immediately higher row, the immediately above 6 nodes.
                For example, each node in {51, 52, 53, 54, 55, 56} is connected to all of {41, 42, 43, 44, 45, 46}.
                Nodes 11, 12, 13, 14, 15, and 16 have a single upwards link to R.   
        </dd>
        <dt>MAC:</dt>
        <dd>
               TSCH with 1 retransmission
        </dd>
        <dt>Platform:</dt>
        <dd>
               Cooja 
        </dd>
        <dt>Schedule:</dt>
        <dd>
               Static, 2 timeslots per link from each node to each parent in its parent set, 1 broadcast EB slot, 1 sender-based shared timeslot (for DIO and DIS) per node (total of 32).
        </dd>
        <dt>Simulation lifecycle:</dt>
        <dd>
               Allow link formation for 100 seconds before starting to send data packets.
               Afterward, S sends data packets to R.
               The simulation terminates when 1000 packets have been sent by S. 
        </dd>
        <dt>Radio Links:</dt>
        <dd>
               Every 60 s, a new Packet Delivery Rate is randomly drawn for each link, with a uniform distribution spanning the 70% to 100% interval. 
        </dd>
        <dt>Traffic Pattern:</dt>
        <dd>
                CBR, S sends one non-fragmented UDP packet every 5 seconds to R.
        </dd>
        <dt>PS extension size:</dt>
        <dd>
                3 parents.
        </dd>
        <dt>Routing Methods:</dt>
        <dd>
          <ul spacing="normal">
            <li>
                        RPL: The default RPL non-PRE implementation in Contiki OS.
            </li>
            <li>
                        2nd ETX: PRE with a parent selection method which picks as AP the 2nd best parent in the parent set based on ETX.
            </li>
            <li>
                        CA Strict: As described in <xref target="sec_ca_strict"/>. 
            </li>
            <li>
                        CA Medium: As described in  <xref target="sec_ca_medium"/>. 
            </li>
          </ul>
        </dd>
      </dl>
      <t>
            Simulation results: 
      </t>
      <table align="center">
        <thead>
          <tr>
            <th align="left">
            Routing Method
            </th>
            <th align="right">
            Average Packet Delivery Rate (%)
            </th>
            <th align="right">
            Average Traversed Nodes/packet (#)
            </th>
            <th align="right">
            Average Duplications/packet (#)
            </th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td align="left">RPL</td>
            <td align="right">82.70</td>
            <td align="right">5.56</td>
            <td align="right">7.02</td>
          </tr>
          <tr>
            <td align="left">2nd ETX</td>
            <td align="right">99.38</td>
            <td align="right">14.43</td>
            <td align="right">31.29</td>
          </tr>
          <tr>
            <td align="left">CA Strict</td>
            <td align="right">97.32</td>
            <td align="right">9.86</td>
            <td align="right">18.23</td>
          </tr>
          <tr>
            <td align="left">CA Medium</td>
            <td align="right">99.66</td>
            <td align="right">13.75</td>
            <td align="right">28.86</td>
          </tr>
        </tbody>
      </table>
      <t>
        Links:
      </t>
      <ul spacing="normal">
        <li>
          <eref target="https://github.com/ariskou/contiki/tree/draft-koutsiamanis-roll-nsa-extension">Contiki OS DIO DAGMC NSA extension (draft-koutsiamanis-roll-nsa-extension branch)</eref>
        </li>
        <li>
          <eref target="https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=e2f6ba229f45d8ccae2a6405e0ef41f1e61da138">Wireshark dissectors (for the optional PS TLV) - currently merged / in master</eref>
        </li>
      </ul>
    </section>
    <section numbered="true" toc="default" anchor="appendix_choosing_policy">
      <name>Choosing an AP selection policy</name>
      <t>
        The manner of choosing an AP selection policy is left to the implementation, for maximum flexibility.
      </t>
      <t>
        For example, a different policy can be used per traffic type.
        The network configurator can choose the CA Relaxed policy to increase reliability (thus producing some flooding) for specific, extremely important, alert packets.
        On the other hand, all normal data traffic uses the CA Strict policy.
        Therefore, an exception is made just for the alert packets.
      </t>
      <t>
        Another option would be to devise a new disjoint policy, where the paths are on purpose non-correlated, to increase path diversity and resilience against whole groups of nodes failing.
        The disadvantage may be increased jitter.
      </t>
      <t>
        Finally, a network configurator may provide the CA policies with a preference order of Strict &gt; Medium &gt; Relaxed as a means of falling back to more flood-prone policies to maintain reliability.
      </t>
    </section>
  </back>
</rfc>
