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

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

<rfc xmlns:xi="http://www.w3.org/2001/XInclude" 
ipr="trust200902" 
docName="draft-ietf-6tisch-enrollment-enhanced-beacon-14" 
number="9032" 
obsoletes="" 
updates="" 
submissionType="IETF" 
category="std" 
consensus="true" 
xml:lang="en" 
tocInclude="true" 
tocDepth="2"
sortRefs="true" 
symRefs="true" 
version="3">

  <!-- xml2rfc v2v3 conversion 2.39.0 -->
  <front>
    <title abbrev="Enroll Beacon">Encapsulation of 6TiSCH Join and Enrollment Information Elements</title>
    <seriesInfo name="RFC" value="9032"/>

        <author initials="D" surname="Dujovne" fullname="Diego Dujovne" role="editor">
            <organization>Universidad Diego Portales</organization>
            <address>
                <postal>
                    <street>Escuela de Informática y Telecomunicaciones</street>
                    <street>Av. Ejército 441</street>
                    <city>Santiago</city>
                    <region>Región Metropolitana</region>
                    <country>Chile</country>
                </postal>
                <phone>+56 (2) 676-8121</phone>
                <email>diego.dujovne@mail.udp.cl</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 year="2021" month="May"/>
    <area>Internet</area>
    <workgroup>6TiSCH</workgroup>

<keyword>BRSKI</keyword>
<keyword>enroll</keyword>
<keyword>zero-touch</keyword>
<keyword>DODAG balancing</keyword>
<keyword>LLN balancing</keyword>

    <abstract>
      <t>In the Time-Slotted Channel Hopping (TSCH) mode of IEEE Std 802.15.4, 
opportunities for broadcasts are limited to
specific times and specific channels.  Routers in a 
TSCH network
transmit Enhanced Beacon (EB) frames to announce the presence of the
network.  This document provides a mechanism by which additional information critical
for new nodes (pledges) and long-sleeping nodes may be carried within the
EB in order to conserve use of broadcast opportunities.</t>
    </abstract>
  </front>
  <middle>
    <section anchor="problems" numbered="true" toc="default">
      <name>Introduction</name>
      <t><xref target="RFC7554" format="default"/> describes the use of the Time-Slotted Channel Hopping (TSCH) mode of <xref target="IEEE.802.15.4" format="default"/>.</t>
      <t>In TSCH mode of IEEE Std 802.15.4, opportunities for broadcasts are limited to
specific times and specific channels.
Routers in a TSCH network
transmit Enhanced Beacon (EB) frames during broadcast slots in order to
announce the time and channel schedule.</t>
      <t>This document defines a new IETF Information Element (IE) subtype to place
into the EB to provide join and enrollment information to prospective
pledges in a more efficient way.</t>
      <t>The following subsections explain the problem being solved, which
justifies carrying the join and enrollment information in the EB.</t>
      <section anchor="Terminology" numbered="true" toc="default">
        <name>Terminology</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>

        <t>Other terminology can be found in <xref target="RFC9030"
	sectionFormat="of" section="2.1"/>.</t>
      </section>
      <section anchor="layer-2-synchronization" numbered="true" toc="default">
        <name>Layer 2 Synchronization</name>
        <t>As explained in <xref target="RFC8180"
	sectionFormat="of" section="4.5.2"/>, the EB
has a number of purposes: it carries synchronization information such as the 
   Absolute Slot Number (ASN) and Join Metric and identifiers for 
   the timeslot template and the channel hopping sequence, and it 
   indicates the TSCH slotframe.</t>
        <t>An EB announces the existence of a TSCH network and the nodes
already joined to that network.  Receiving an EB allows a Joining Node
(pledge) to learn about the network and to synchronize with it.</t>
        <t>The EB may also be used as a means for a node already part of the network to
resynchronize <xref target="RFC7554" format="default"/>.</t>
        <t>There are a limited number of timeslots designated as broadcast slots by each
router in the network.
Considering 10 ms slots and a slotframe length of 100, these slots are rare
and could result in only 1 slot per second for broadcasts, which needs to be
used for the beacon.
Additional broadcasts for Router Advertisements (RA) or Neighbor Discovery
(ND) could be even more scarce.</t>
      </section>
      <section anchor="layer-3-synchronization-ipv6-router-solicitations-and-advertisements" numbered="true" toc="default">
        <name>Layer 3 Synchronization: IPv6 Router Solicitations and Advertisements</name>
        <t>At Layer 3, <xref target="RFC4861" format="default"/> defines a mechanism by which nodes learn about
routers by receiving multicast RAs.
If no RA is received within a set time, then a Router Solicitation (RS) may be
transmitted as a multicast, to which an RA will be received, usually unicast.</t>
        <t>Although <xref target="RFC6775" format="default"/> reduces the amount of multicast necessary for address
resolution via Neighbor Solicitation (NS) messages, it still requires multicast
of either RAs or RSes.
This is an expensive operation for two reasons: there
are few multicast timeslots for unsolicited RAs; and if a pledge node does not
receive an RA, and decides to transmit an RS,
a broadcast Aloha slot (see <xref target="RFC7554" sectionFormat="of" section="A.5"/>) is consumed with
unencrypted traffic.
<xref target="RFC6775" format="default"/> already allows for a unicast reply to such an RS.</t>
        <t>This is a particularly acute issue for the join process for the following
reasons:</t>
        <ol spacing="normal" type="1">
          <li>Use of a multicast slot by even a non-malicious unauthenticated node for
a Router Solicitation (RS) may overwhelm that timeslot.</li>
          <li>It may require many seconds of on-time before a new pledge receives a
Router Advertisement (RA) that it can use.</li>
          <li>A new pledge may have to receive many EBs before it can pick an
appropriate network and/or closest Join Proxy to attach to.
If it must remain in the receive state for an RA as well as find the
EB, then the process may take dozens of seconds, even minutes for each
enrollment attempt that it needs to make.</li>
        </ol>
      </section>
      <section anchor="layer-2-selection" numbered="true" toc="default">
        <name>Layer 2 Selection</name>
        <t>In a complex Low-power and Lossy Network (LLN), multiple LLNs may 
be connected together by Backbone Routers (technology such as 
<xref target="RFC8929" format="default"/>), resulting in an area that is 
serviced by multiple, distinct Layer 2 instances.
These are called Personal Area Networks (PANs).
Each instance will have a separate Layer 2 security profile and will be distinguished by a different PANID.

The PANID is part of the Layer 2 header as defined in <xref target="IEEE.802.15.4" format="default"/>:
it is a 16-bit value that is chosen to be unique, and 
it contributes context to the Layer 2 security mechanisms.
The PANID provides a context similar to the Extended Service Set ID (ESSID) 
in 802.11 networking and can be considered similar to 
the 802.3 Ethernet VLAN tag in that it provides context for all Layer 2 addresses.</t>
        <t>A device that is already enrolled in a network may find after 
a long sleep that it needs to resynchronize with the Layer 2 network.
The device's enrollment keys will be specific to a PANID, but the device may have more than one set of keys.
Such a device may wish to connect to a PAN that is experiencing less congestion or that has a shallower
Routing Protocol for LLNs (RPL) tree <xref target="RFC6550" format="default"/>.
It may even observe PANs for which it does not have keys, but for which 
it believes it may have credentials that would allow it to join.</t>

        <t>In order to identify which PANs are part of the same backbone network, the network ID is introduced in this extension.
PANs that are part of the same backbone will be configured to use the same network ID.
For RPL networks <xref target="RFC6550" format="default"/>, configuration of the network ID can be done with a configuration option, which is the subject of future work.</t>
        <t>In order to provide some input to the choice of which PAN to use, the PAN priority field has been added.
This lists the relative priority for the PAN among different PANs.
Every EB from a given PAN will likely have the same PAN priority.
Determination of the PAN priority is the subject of future work; 
but it is expected that it will be calculated by an algorithm in the 
6LoWPAN Border Router (6LBR), possibly involving communication between 6LBRs over the backbone network.</t>
        <t>The parent selection process <xref target="RFC6550" format="default"/> 
can only operate within a single PAN because it depends upon receiving RPL DIO messages from all available parents.
As part of the PAN selection process, the device may wish to know how deep 
in the LLN mesh it will be if it joins a particular PAN, and the rank 
priority field provides an estimation of each announcer's rank.
Once the device synchronizes with a particular PAN's TSCH schedule,  
it may receive DIOs that are richer in their diversity than this value.
The use of this value in practice is the subject of future research, and the interpretation of this
value of the structure is considered experimental.</t>
      </section>
    </section>
    <section anchor="protocol-definition" numbered="true" toc="default">
      <name>Protocol Definition</name>
      <t><xref target="RFC8137" format="default"/> creates a registry for new IETF IE subtypes.
This document allocates a new subtype.</t>
      <t>The new IE subtype structure is as follows.  As explained in
<xref target="RFC8137" format="default"/>, the length of the subtype content can be calculated from the
container, so no length information is necessary.</t>

      <figure anchor="iesubtype">
        <name>IE Subtype Structure</name>
        <artwork name="" type="" align="left" alt=""><![CDATA[
                     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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|       2       |R|P| res |  proxy prio |    rank priority      |
+-+-+-+-+-+-+-+-+-+-------------+-------------+-----------------+
| PAN priority  |                                               |
+---------------+                                               +
|                     Join Proxy Interface ID                   |
+                        (present if P=1)                       +
|                                                               |
+               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|               |                                               |
+-+-+-+-+-+-+-+-+                                               +
|                           network ID                          |
+                   variable length, up to 16 bytes             +
~                                                               ~
+                                                               +
|                                                               |
+               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|               |
+-+-+-+-+-+-+-+-+
]]></artwork>
      </figure>
      <dl newline="false" spacing="normal">
        <dt>res:</dt>
        <dd>
  Reserved bits <bcp14>MUST</bcp14> be ignored upon receipt and <bcp14>SHOULD</bcp14> be set to 0 when sending.</dd>
        <dt>R:</dt>
        <dd>
  The RA R-flag is set if the sending node will act as a router for host-only nodes relying on stateless address auto-configuration (SLAAC) to get their global IPv6 address.
Those hosts <bcp14>MUST</bcp14> send a unicast RS message in order to receive an RA with the Prefix Information Option.</dd>
        <dt/>
        <dd>In most cases, every node sending a beacon will set this flag, and in a
typical mesh, this will be every single node.  When this bit is not set, it
might indicate that this node may be under provisioned or that it may have no additional
slots for additional nodes.  This could make this node more interesting to an
attacker.</dd>
        <dt>P:</dt>
        <dd>
  If the Proxy Address P-flag is set, then the Join Proxy Interface ID bit field
is present.  Otherwise, it is not provided.</dd>
        <dt/>
        <dd>This bit only indicates if another part of the structure is present, and
it has little security or privacy impact.</dd>
        <dt>proxy prio (proxy priority):</dt>
        <dd>
  This field indicates the willingness of the sender to act as a Join Proxy.
Lower value indicates greater willingness to act as a Join Proxy as described in
<xref target="RFC9031" format="default"/>.
Values range from 0x00 (most willing) to 0x7e (least willing).
A priority of 0x7f indicates that the announcer should never be considered as a viable Join Proxy.
Only unenrolled pledges look at this value.</dd>
        <dt/>
        <dd>Lower values in this field indicate that the transmitter may have more
capacity to handle unencrypted traffic.
A higher value may indicate that the transmitter is low on neighbor cache entries or other resources.
Ongoing work such as <xref target="I-D.ietf-roll-enrollment-priority" format="default"/> documents one way to set this field.</dd>
        <dt>rank priority:</dt>
        <dd>
  The rank priority is set by the IPv6 LLN Router (6LR) that sent the beacon and is an
indication of how willing this 6LR is to serve as a RPL parent <xref target="RFC6550" format="default"/> within a
particular network ID.
Lower values indicate more willingness, and higher values indicate less willingness.
This value is calculated by each 6LR according to algorithms specific to the
routing metrics used by the RPL <xref target="RFC6550" format="default"/>.
The exact process is a subject of significant research work.
It will typically be calculated from the RPL rank, and it may include some modifications
based upon current number of children or the number of neighbor cache entries
available.
Pledges <bcp14>MUST</bcp14> ignore this value.
It helps enrolled devices only to compare connection points.</dd>
        <dt/>
        <dd>An attacker can use this value to determine which nodes are potentially
more interesting.
Nodes that are less willing to be parents likely have more traffic, and an
attacker could use this information to determine which nodes would be more
interesting to attack or disrupt.</dd>
        <dt>PAN priority:</dt>
        <dd>
  The PAN priority is a value set by the Destination-Oriented Directed
Acyclic Graph (DODAG) root (see <xref target="RFC6550" format="default"/>, typically the 6LBR) to indicate the relative
priority of this LLN compared to those with different PANIDs that the
operator might control.
This value may be used as part of the enrollment priority, but typically it is used by devices
that have already enrolled and need to determine which PAN to pick when
resuming from a long sleep.
Unenrolled pledges <bcp14>MAY</bcp14> consider this value when selecting a PAN to join.
Enrolled devices <bcp14>MAY</bcp14> consider this value when looking for an eligible parent
device.
Lower values indicate more willingness to accept new nodes.</dd>
        <dt/>
        <dd>An attacker can use this value, along with the observed PANID in the EB 
to determine which PANIDs have more network resources, and may have more
interesting traffic.</dd>
        <dt>Join Proxy Interface ID:</dt>
        <dd>
  If the P bit is set, then 64 bits (8 bytes) of address are present.
This field provides the Interface ID (IID) of the link-local address of the Join Proxy.
The associated prefix is well-known as fe80::/64.  If this field is not
present, then IID is derived from the Layer 2 address of the sender per
SLAAC <xref target="RFC4862" format="default"/>.</dd>
        <dt/>
        <dd>This field communicates the IID bits that should be used for this node's
Layer 3 address, if it should not be derived from the Layer 2 address.
Communication with the Join Proxy occurs in the clear.
This field avoids the need for an additional service-discovery process for the case where the Layer 3
address is not derived from the Layer 2 address.
An attacker will see both Layer 2 and Layer 3 addresses, so this field provides no new information.</dd>
        <dt>network ID:</dt>
        <dd>
  This is a variable length field, up to 16-bytes in size that uniquely identifies
this network, potentially among many networks that are operating in the same
frequencies in overlapping physical space.  The length of this field can be
calculated as being whatever is left in the IE.</dd>
        <dt/>
        <dd>In a 6TiSCH network, where RPL <xref target="RFC6550" format="default"/> is used as the mesh routing protocol, the
network ID can be constructed from a truncated SHA-256 hash of the prefix (/64) of the
network.  This will be done by the RPL DODAG root and communicated by the RPL
Configuration Option payloads, so it is not calculated more than once.
This is just a suggestion for a default algorithm: it may be set in any
convenient way that results in a non-identifying value.
In some LLNs where multiple PANIDs may lead to the same management device
(the Join Registrar/Coordinator (JRC)), then a common value that is the same across all the PANs <bcp14>MUST</bcp14> be
configured.
Pledges that see the same network ID will not waste time
attempting to enroll multiple times with the same network when the network has multiple attachment points.</dd>
        <dt/>
        <dd>If the network ID is derived as suggested, then it will be an opaque,
seemingly random value and will not directly reveal any information about the network.
An attacker can match this value across many transmissions to map the extent
of a network beyond what the PANID might already provide.</dd>
      </dl>
    </section>
    <section anchor="security-considerations" numbered="true" toc="default">
      <name>Security Considerations</name>
      <t>All of the contents of this IE are transmitted in the clear.
The content of the EB is not encrypted.
This is a restriction in the cryptographic architecture of the 802.15.4 mechanism.
In order to decrypt or do integrity checking of Layer 2 frames in TSCH, the
TSCH ASN is needed.
The EB provides the ASN to new (and long-sleeping) nodes.</t>
      <t>The sensitivity of each field is described within the description of each field.</t>
      <t>The EB is authenticated at the Layer 2 level using 802.15.4
mechanisms using the network-wide keying material.  Nodes that are enrolled
will have the network-wide keying material and can validate the beacon.</t>
      <t>Pledges that have not yet enrolled are unable to authenticate the beacons
and will be forced to temporarily take the contents on faith.
After enrollment, a newly enrolled node will be able to return to the beacon and
validate it.</t>
      <t>In addition to the enrollment and join information described in this
document, the EB contains a description of the TSCH schedule to
be used by the transmitter of this packet.
The schedule can provide an attacker with a list of channels and frequencies
on which communication will occur.
Knowledge of this can help an attacker to more efficiently jam
communications, although there is future work being considered to make some
of the schedule less visible.
Encrypting the schedule does not prevent an attacker from jamming, but rather
increases the energy cost of doing that jamming.</t>
    </section>
    <section anchor="privacy-considerations" numbered="true" toc="default">
      <name>Privacy Considerations</name>
      <t>The use of a network ID may reveal information about the network.
The use of a SHA-256 hash of the DODAGID (see <xref target="RFC6550" format="default"/>), rather than using the DODAGID itself
directly provides some privacy for the addresses used within the network,
as the DODAGID is usually the IPv6 address of the root of the RPL mesh.</t>
      <t>An interloper with a radio sniffer would be able to use the network ID to map
out the extent of the mesh network.</t>
    </section>
    <section anchor="iana-considerations" numbered="true" toc="default">
      <name>IANA Considerations</name>
      <t>IANA has assigned the following value in the 
"IEEE Std 802.15.4 IETF IE Subtype IDs" registry, as defined by <xref target="RFC8137" format="default"/>.</t>

<table anchor="iana"> 

  <thead>
    <tr>
      <th>Value</th>   
      <th>Subtype ID</th>
      <th>Reference</th>
    </tr>
  </thead>
  <tbody>         
    <tr>
      <td>2</td>
      <td>6tisch-Join-Info</td>
      <td>RFC 9032</td>
    </tr>

  </tbody>
</table>
    </section>

  </middle>
  <back>

<displayreference target="I-D.ietf-roll-enrollment-priority" to="NETWORK-ENROLLMENT"/>

    <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.8137.xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6775.xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4861.xml"/>

<reference anchor="RFC9031" target="https://www.rfc-editor.org/info/rfc9031">
  <front>
    <title>Constrained Join Protocol (CoJP) for 6TiSCH</title>
    <author initials="M" surname="Vučinić" fullname=" Mališa Vučinić"           
role="editor">
      <organization/>
    </author>
    <author initials="J" surname="Simon" fullname="Jonathan Simon">
     <organization/>
    </author>
    <author initials="K" surname="Pister" fullname="Kris Pister">
     <organization/>
    </author>
    <author initials="M" surname="Richardson" fullname="Michael Richardson">
     <organization/>
    </author>
    <date month="May" year="2021"/>
  </front>
  <seriesInfo name="RFC" value="9031"/>
  <seriesInfo name="DOI" value="10.17487/RFC9031"/>
</reference>


      <reference                                                                
anchor="IEEE.802.15.4"
target="https://ieeexplore.ieee.org/document/7460875">
        <front>
            <title>IEEE Standard for Low-Rate Wireless Networks</title>
            <author>
              <organization>IEEE</organization>
            </author>
            <date month="April" year="2016"/>
        </front>
        <seriesInfo name="IEEE Standard" value="802.15.4-2015"/>
        <seriesInfo name="DOI" value="10.1109/IEEESTD.2016.7460875"/>
      </reference>

      </references>
      <references>

        <name>Informative References</name>

<reference anchor="RFC9030" target="https://www.rfc-editor.org/info/rfc9030">
<front>
<title>An Architecture for IPv6 over the Time-Slotted Channel Hopping Mode of IEEE 802.15.4 (6TiSCH)</title>

<author initials="P" surname="Thubert" fullname="Pascal Thubert" role="editor">
    <organization/>
</author>

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

</front>
<seriesInfo name="RFC" value="9030"/>
<seriesInfo name="DOI" value="10.17487/RFC9030"/>
</reference>


<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8180.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.7554.xml"/>
<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8929.xml"/>

<xi:include href="https://datatracker.ietf.org/doc/bibxml3/reference.I-D.ietf-roll-enrollment-priority.xml"/>

<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4862.xml"/>

      </references>
    </references>

    <section anchor="acknowledgements" numbered="false" toc="default">
      <name>Acknowledgments</name>
      <t><contact fullname="Thomas Watteyne"/> provided extensive editorial comments on the document.
<contact fullname="Carles Gomez Montenegro"/> generated a detailed review of the document at Working Group Last Call.
<contact fullname="Tim Evens"/> provided a number of useful editorial suggestions.</t>
    </section>
  </back>
</rfc>
