<?xml version="1.0" encoding="US-ASCII"?>
<!-- This template is for creating an Internet Draft using xml2rfc,
     which is available here: http://xml.resource.org. -->
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!-- One method to get references from the online citation libraries.
     There has to be one entity for each item to be referenced.
     An alternate method (rfc include) is described in the references. -->

<!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC8174 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8174.xml">
<!ENTITY RFC3552 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3552.xml">
<!ENTITY RFC6550 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6550.xml">
<!ENTITY RFC9008 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.9008.xml">
<!ENTITY RFC6345 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6345.xml">
]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<!-- used by XSLT processors -->
<!-- For a complete list and description of processing instructions (PIs),
     please see http://xml.resource.org/authoring/README.html. -->
<!-- Below are generally applicable Processing Instructions (PIs) that most I-Ds might want to use.
     (Here they are set differently than their defaults in xml2rfc v1.32) -->
<?rfc strict="yes" ?>
<!-- give errors regarding ID-nits and DTD validation -->
<!-- control the table of contents (ToC) -->
<?rfc toc="yes"?>
<!-- generate a ToC -->
<?rfc tocdepth="4"?>
<!-- the number of levels of subsections in ToC. default: 3 -->
<!-- control references -->
<?rfc symrefs="yes"?>
<!-- use symbolic references tags, i.e, [RFC2119] instead of [1] -->
<?rfc sortrefs="yes" ?>
<!-- sort the reference entries alphabetically -->
<!-- control vertical white space
     (using these PIs as follows is recommended by the RFC Editor) -->
<?rfc compact="yes" ?>
<!-- do not start each main section on a new page -->
<?rfc subcompact="no" ?>
<!-- keep one blank line between list items -->
<!-- end of list of popular I-D processing instructions -->
<rfc category="std" docName="draft-ietf-roll-mopex-07" ipr="trust200902">
    <!-- category values: std, bcp, info, exp, and historic
     ipr values: full3667, noModification3667, noDerivatives3667
     you can add the attributes updates="NNNN" and obsoletes="NNNN"
     they will automatically be output with "(if approved)" -->

  <!-- ***** FRONT MATTER ***** -->

  <front>
      <!-- The abbreviated title is used in the page header - it is only necessary if the
         full title is longer than 39 characters -->

    <title abbrev="MOP extension">Mode of Operation extension</title>

    <author fullname="Rahul Arvind Jadhav" initials="R.A." role="editor" surname="Jadhav">
        <organization>Huawei Tech</organization>
        <address>
            <postal>
                <street>Kundalahalli Village, Whitefield,</street>
                <city>Bangalore</city>
                <region>Karnataka</region>
                <code>560037</code>
                <country>India</country>
            </postal>
            <phone>+91-080-49160700</phone>
            <email>rahul.ietf@gmail.com</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>
    <author initials="M." surname="Richardson" fullname="Michael Richardson">
      <organization>Sandelman Software Works</organization>
      <address>
        <email>mcr+ietf@sandelman.ca</email>
      </address>
    </author>

    <date/>

    <area>General</area>

    <workgroup>ROLL</workgroup>

    <!-- WG name at the upperleft corner of the doc,
         IETF is fine for individual submissions.
     If this element is not present, the default is "Network Working Group",
         which is used by the RFC Editor as a nod to the history of the IETF. -->

    <keyword>RPL, mesh, MOP, extension, capability, capabilities</keyword>

    <!-- Keywords will be incorporated into HTML output
         files in a meta tag but they have no effect on text or nroff
         output. If you submit your draft to the RFC Editor, the
         keywords will be used for the search engine. -->

    <abstract>
      <!-- [minor] RPL and MOP should be expanded.  Also, references shouldn't be included in the Abstract. -->
        <t>
          The Routing Protocol for Low-Power and Lossy Networks (RPL) can have
          different modes of operation (MOP) to allow nodes to agree on the
          basic primitives that must be supported to join a network.  The MOP
          field defined in RFC6550 is fast depleting.  This document specifies
          an extended MOP option for future use.
        </t>
    </abstract>
</front>

<middle>
    <section title="Introduction">
        <t>
            RPL <xref target="RFC6550"/> specifies a proactive distance-vector
            based routing scheme. The protocol creates a DAG-like structure
            that operates with a given "Mode of Operation" (MOP) determining the
            minimum and mandatory set of primitives to be supported by all the
            participating nodes.
        </t>
        <t>
            MOP as per <xref target="RFC6550"/> is a 3-bit value carried in DIO
            messages and is specific to the RPL Instance. The recipient of the
            DIO message can join the specified network as a router only when it
            can support the primitives as required by the mode of operation
            value. For example, in the case of MOP=3 (Storing MOP with multicast
            support), the nodes can join the network as routers only when they
            can handle the DAO advertisements from the peers and manage routing
            tables. The 3-bit value is fast depleting and requires
            replenishment. This document introduces a mechanism to extend the mode
            of operation values.
        </t>
        <t>
            This document further extends the RPL Control Option syntax to
            handle generic flags. The primary aim of these flags is to define
            the behavior of a node not supporting the given control type. If a
            node does not support a given RPL Control Option, there are following
            possibilities:
            <list>
                <t> Strip off the option </t>
                <t> Copy the option as-is </t>
                <t> Ignore the message containing this option </t>
                <t> Let the node join in only as a leaf to this parent </t>
            </list>
        </t>

        <section title="Requirements Language and 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 BCP 14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when, they
                appear in all capitals, as shown here.

			</t>

            <t>
                MOP: Mode of Operation. Identifies the mode of operation of the
                RPL Instance as administratively provisioned at and distributed
                by the DODAG root.
            </t>

            <t>
                MOPex: Extended MOP: This document extends the MOP values over
                a bigger range. This extension of MOP is called MOPex.
            </t>

            <t>
				DAO: Destination Advertisement Object (see Section 6.4 of <xref target="RFC6550"/>)
            </t>

            <t>
				DIO: DODAG Information Object (see Section 6.3 of <xref target="RFC6550"/>)
            </t>

            <t>
                This document uses the terminology described in <xref
                    target="RFC6550"/>. For the sake of readability, some of the
                known relevant terms are repeated in this section.
            </t>
        </section>
    </section>

    <section anchor="requirements" title="Requirements for this document">
        <t>
            The following are the requirements considered for this document:
            <list style="format REQ%d:">
                <t>
					MOP extension. The 3-bits MOP as defined in [RFC6550] is
					fast depleting. A MOP extension needs to extend the
					possibility of adding new MOPs in the future.
                </t>
                <t>
                    Backwards compatibility. The new options and new fields in
                    the DIO message should be backward compatible i.e. if there
                    are nodes that support old MOPs they could still operate
                    in their RPL Instances.
                </t>
            </list>
        </t>
    </section>

    <section anchor="ext_mop" title="Extended MOP Control Message Option">
        <t>
            This document assigns MOP value 7 to be used as an
			extender <xref target="IANA"/>. A DIO message with a MOP value of 7 indicates that the MOP for RPL instance is contained in the Extended MOP (MOPex) option.
        </t>
        <t>
            <figure align="center" anchor="mopex-opt" title="Extended MOP
            Option"><artwork align="center"><![CDATA[
 0                   1                   2
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   Type = TBD1 | Option Length |  MOPex-value  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
           ]]></artwork> </figure>
        </t>
        <t>
            The Option Length value MUST be less than or equal to 2. An Option
            Length value of zero is invalid and the implementation MUST
            silently ignore the DIO on receiving a value of zero. Section 6.7.1
			of <xref target="RFC6550"/> explains how to interpret Option Length
			and subsequent Option Data (which is MOPex-value in this context).
        </t>
        <section title="Handling MOPex">
            <t>
                The MOPex option MUST be used only if the DIO MOP is 7. If
                the DIO MOP is 7 and if the MOPex option is not present or invalid
                then the DIO MUST be silently ignored. If the DIO MOP is
                less than 7 then MOPex MUST NOT be used. In case the base
                MOP is 7 and if the MOPex option is present, then the
                implementation MUST use the MOPex value.
            </t>
            <t>
                Note that <xref target="RFC6550"/> allows a node that does not
                support the received MOP to still join the network as a leaf
				node. This semantics continues to be true even in the case of MOPex.
                All the general assumptions that are applicable in the context
                of MOP are applicable in the context of MOPex as well.
            </t>
        </section>
        <section title="Use of values 0-6 in the MOPex option">
            <t>
                The MOPex option should also be used for existing MOP values
                0-6. The use of current MOPs (values 0 to 6) in MOPex indicates
				that the MOP might be supported with an extended set of semantics e.g.,
				the capability options <xref target="I-D.ietf-roll-capabilities"/>.
            </t>
        </section>
    </section>
    <section title="Extending RPL Control Options" anchor="ext-opts">
        <t>
			Section 6.7.1 of <xref target="RFC6550"/> describes the RPL Control Message Option
            Generic Format. This document extends the format as follows:
        </t>
        <t>
            <figure align="center" anchor="ext-opt"
                title="Extended RPL Option Format"><artwork align="center">
                    <![CDATA[
 0                   1                   2
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-----------
|X| Option Type | Option Length | Option Flags  | Option Data
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-----------
           ]]></artwork> </figure>
        </t>
        <t>
            The new fields in the Extended RPL Option are specified as follows:
            <list>
                <t>
                    Option Type: 8-bit identifier of the type of option. The
                    Option Type values are assigned by IANA (see Section 20.4 of
                    <xref target="RFC6550"/>).
                </t>
                <t>
                    'X' bit in Option Type: Value 1 indicates that this is an
                    extended option. If the 'X' flag is set, a 1-byte Option
                    Flags field follows the Option Length field.
                </t>
                <t>
                    Option Length: 8-bit unsigned integer, representing the
                    length in octets of the option, not including the Option
                    Type and Length fields. Option Flags and variable length
                    Option Data fields are included in the length.
                </t>
                <t>
                    Option Flags: 8-bit unsigned integer, representing flags
                    in the context of the Extended RPL Control Option.
                    This document defines three flags 'J', 'C', and 'I'. These
                    flags only apply if the Option Type is unknown or
                    unsupported.
		<figure align="center" anchor="option-flags"
			title="Option Flags in Extended RPL Control Option"><artwork align="center">
				<![CDATA[
 0 1 2 3 4 5 6 7
+-+-+-+-+-+-+-+-+
| Unused  |J|I|C|
+-+-+-+-+-+-+-+-+
           ]]></artwork> </figure>
                </t>
                <t>
                    'J' (Join) flag: If set, the node MAY only join the network
                    as a leaf.
                </t>
                <t>
                    'C' (Copy) flag: If set, the node MUST copy this Option Type
                    in the DIO message it generates. If unset, the node MUST
                    strip off the Option and process the message.
                </t>
                <t>
                    'I' (Ignore) flag: If set, the node MUST ignore the whole
                    message regardless of the setting of the J and C flags.
                </t>
            </list>
        </t>
        <t>
            Note that this format does not deprecate the previous format, it
            simply extends it. The new format is applicable only when the most
            significant bit (MSB), 'X' flag, of the Option Type is set. Option
            Type 0x80 to 0xFF are thus applicable only as extended options.
        </t>
        <texttable anchor="table_bits" title="Option Flags handling">
            <ttcol align='center'>'J' bit</ttcol>
            <ttcol align='center'>'C' bit</ttcol>
            <ttcol align='center'>Handling</ttcol>

            <c>0</c>
            <c>0</c>
            <c>Strip off the option, and the node can join as RPL router</c>
            <c>0</c>
            <c>1</c>
            <c>Copy the option, and the node can join as RPL router</c>
            <c>1</c>
            <c>NA</c>
            <c>Join as leaf</c>
        </texttable>
    </section>

    <section anchor="imp-con" title="Implementation Considerations">
        <t>
            In <xref target = "RFC6550" />, it was possible to discard an
            unsupported MOP just by inspecting the DIO base object. With the extensions in this
            document, the MOPex is in a control message option and thus
            discarding of the DIO message can only happen after inspecting the
            message options.
        </t>
		<t>
            An implementation should carefully set the Option Flags considering
			implications of nodes not supporting the corresponding Option Type.
			<t>
                Unsetting the 'J' flag means that a node receiving an
                unsupported Option Type would be allowed to join as a RPL
                router. Thus the implementation should carefully consider the
                implications of such a node joining the network as a RPL router.
			</t>
			<t>
                Setting the 'C' (Copy) bit should be carefully considered since
                the node would copy the Option of its preferred parent whose DIO
                it has accepted from the set of parent nodes.
			</t>
		</t>
    </section>

    <section anchor="Acknowledgements" title="Acknowledgements">
        <t>
            Thank you Dominique Barthel for important review/feedback on
            extending Control Options. Thanks to Alvaro Retana for shaping the
            final version with detailed review comments.
        </t>
    </section>

    <section anchor="IANA" title="IANA Considerations">
        <section title="Mode of operation: MOPex">
            <t>
                IANA is requested to assign a new Mode of Operation, named
                "MOPex" for MOP extension under the RPL registry. The value of
                7 is to be assigned from the "Mode of Operation" space <xref
                    target="RFC6550"/>.
            </t>
            <texttable title="Mode of Operation">
                <ttcol align='center'>Value</ttcol>
                <ttcol align='center'>Description</ttcol>
                <ttcol align='center'>Reference</ttcol>

                <c>7</c>
                <c>MOPex</c>
                <c>This document</c>
            </texttable>
			<t>
				This document updated <xref target="RFC9008"/> to remove the
				reservation on Mode of Operation value 7.

				IANA is requested to assign the Mode of Operation value 7 to MOPex,
				as shown in Table 2.  As shown there, all other references related
				to value 7 are to be removed.

				IANA is also requested to replace the reference to
				<xref target="RFC9008"/> in the overall registry with a reference
				to this document.
			</t>
        </section>
        <section title="New option: Extended MOP (MOPex)">
            <t>
                IANA is requested to assign a value from the RPL Control
                Message Options registry for the Extended MOP (MOPex) option
                <xref target="ext_mop"/> as shown in Table 3.
            </t>
            <texttable title="New options">
                <ttcol align='center'>Value</ttcol>
                <ttcol align='center'>Meaning</ttcol>
                <ttcol align='center'>Reference</ttcol>

                <c>TBD1</c>
                <c>Extended MOP (MOPex)</c>
                <c>This document</c>
            </texttable>
        </section>
        <section title="New Registry for MOPex value">
            <t>
                IANA is requested to create a registry for the
				MOPex-value <xref target="ext_mop"/>. This registry should be located in
                the Routing Protocol for Low Power and Lossy Networks (RPL) group. New MOPex values may be allocated only by an IETF
                review. Each value is tracked with the following qualities:
            </t>
			<list style="symbols">
				<t>MOPex value</t>
				<t>Description</t>
				<t>Reference</t>
			</list>
			<texttable title="Registry for MOPex values">
				<ttcol align='center'>MOPex Value</ttcol>
				<ttcol align='center'>Description</ttcol>
				<ttcol align='center'>Reference</ttcol>

				<c>0 to 6</c>
				<c>MOP</c>
				<c>[RFC6550]</c>
			</texttable>
        </section>
        <section title="Change in RPL Control Option field">
			<t>
				IANA is requested to modify the RPL Control Message Options registry
				to include an Extended Control Options range as shown in <xref target="rpl-ctrl-opt"/>.
                IANA is also requested to add [this document] as a reference for
                this updated registry.
			</t>
			<texttable anchor="rpl-ctrl-opt" title="Registry for RPL Control Option">
				<ttcol align='center'>Range</ttcol>
				<ttcol align='center'>Option Type</ttcol>
				<ttcol align='center'>Reference</ttcol>

				<c>0x00 to 0x7f</c>
				<c>Base Options</c>
				<c>[RFC6550]</c>

				<c>0x80 to 0xFf</c>
				<c>Extended Options</c>
				<c>[this document]</c>
			</texttable>
        </section>
    </section>

    <section anchor="Security" title="Security Considerations">
        <t>
            The options defined in this document are carried in the base
            message objects as defined in <xref target = "RFC6550" />. The RPL
            control message options are protected by the same security
            mechanisms that protect the base messages. As such, the Security Consideration in [RFC6550] apply.
        </t>
        <t>
            The use of MOP 7 can reveal that the node has been upgraded or is
            running a old feature set. This document assumes that the base
            messages that carry these options are protected by RPL security
            mechanisms and thus are not visible to a malicious node.
        </t>
    </section>
</middle>

<back>
    <!-- References split into informative and normative -->

    <!-- There are 2 ways to insert reference entries from the citation libraries:
     1. define an ENTITY at the top, and use "ampersand character"RFC2629; here (as shown)
     2. simply use a PI "less than character"?rfc include="reference.RFC.2119.xml"?> here
        (for I-Ds: include="reference.I-D.narten-iana-considerations-rfc2434bis.xml")

     Both are cited textually in the same manner: by using xref elements.
     If you use the PI option, xml2rfc will, by default, try to find included files in the same
     directory as the including file. You can also define the XML_LIBRARY environment variable
     with a value containing a set of directories to search.  These can be either in the local
     filing system or remote ones accessed by http (http://domain/dir/... ).-->

    <references title="Normative References">
        <!--?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml"?-->
        &RFC2119;
        &RFC8174;
        &RFC6550;
        &RFC9008;
    </references>

    <references title="Informative References">
        <!-- Here we use entities that we defined at the beginning. -->
		<?rfc include='reference.I-D.ietf-roll-capabilities.xml'?>	<!-- Capabilities draft -->
    </references>

</back>
</rfc>
