RFC 9033

6TiSCH Minimal Scheduling Function (MSF)

๐Ÿ“… published May 2021, from ietf

RFC 9033: 6TiSCH Minimal Scheduling Function (MSF) ๐Ÿฆ‹

Okay bestie, here's the title block tea โ˜• This is RFC 9033, an Internet Engineering Task Force (IETF) doc, and it's giving "6TiSCH Minimal Scheduling Function (MSF)" ๐Ÿ’…

  • Authors: T. Chang, Ed.; M. Vuฤiniฤ‡; X. Vilajosana; S. Duquennoy; D. Dujovne ๐Ÿ‘‘
  • Affiliations (in the order printed): Inria, Universitat Oberta de Catalunya, RISE SICS, Universidad Diego Portales ๐ŸŒˆ
  • Category: Standards Track ๐ŸŽ€
  • ISSN: 2070-1721
  • Date: May 2021 ๐ŸŒธ
  • Obsoletes / Updates: the header doesn't list anything this one obsoletes or updates ๐Ÿ™ˆ

Abstract โœจ

So the abstract is the vibe check. This spec defines the "IPv6 over the TSCH mode of IEEE 802.15.4" (6TiSCH) Minimal Scheduling Function (MSF) ๐Ÿฆ‹ A Scheduling Function (SF) is what decides how a node behaves when it joins the network and how the communication schedule gets managed in a distributed way, so nobody has to babysit it ๐Ÿซถ MSF is built on top of the 6TiSCH Operation Sublayer Protocol (6P) and the minimal security framework for 6TiSCH ๐Ÿ”ฅ

Status of This Memo โœจ

Okay so this doc is an Internet Standards Track document, no cap ๐Ÿ’…

It's a product of the IETF, which means it reflects the consensus of the IETF community. It got public review and was approved for publication by the Internet Engineering Steering Group (IESG) ๐Ÿ’– If you want more on Internet Standards, check Section 2 of RFC 7841 ๐Ÿงš

Info about the current status of this doc, any errata, and how to send feedback lives at https://www.rfc-editor.org/info/rfc9033 ๐Ÿ“

Copyright (c) 2021 IETF Trust and the persons identified as the document authors. All rights reserved. ๐Ÿ’œ

This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) as in effect on the date of publication. Please read these carefully, because they spell out your rights and restrictions for this document ๐Ÿ“œ Code Components pulled out of this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions, and they come without warranty, as described in the Simplified BSD License ๐Ÿซถ

Table of Contents ๐Ÿฆ‹

1.  Introduction
  1.1.  Requirements Language
  1.2.  Related Documents
2.  Interface to the Minimal 6TiSCH Configuration
3.  Autonomous Cells
4.  Node Behavior at Boot
  4.1.  Start State
  4.2.  Step 1 - Choosing Frequency
  4.3.  Step 2 - Receiving EBs
  4.4.  Step 3 - Setting up Autonomous Cells for the Join Process
  4.5.  Step 4 - Acquiring a RPL Rank
  4.6.  Step 5 - Setting up First Tx Negotiated Cells
  4.7.  Step 6 - Sending EBs and DIOs
  4.8.  End State
5.  Rules for Adding and Deleting Cells
  5.1.  Adapting to Traffic
  5.2.  Switching Parent
  5.3.  Handling Schedule Collisions
6.  6P SIGNAL Command
7.  Scheduling Function Identifier
8.  Rules for CellList
9.  6P Timeout Value
10. Rule for Ordering Cells
11. Meaning of the Metadata Field
12. 6P Error Handling
13. Schedule Inconsistency Handling
14. MSF Constants
15. MSF Statistics
16. Security Considerations
17. IANA Considerations
  17.1.  MSF Scheduling Function Identifiers
18. References
  18.1.  Normative References
  18.2.  Informative References
Appendix A.  Example Implementation of the SAX Hash Function
Contributors
Authors' Addresses

1. Introduction ๐ŸŒˆ

MSF, the 6TiSCH Minimal Scheduling Function, is defined in this spec and it's a 6TiSCH Scheduling Function (SF) ๐Ÿ’– The role of an SF is entirely defined in [RFC8480]. This spec complements [RFC8480] by providing the rules for when to add and delete cells in the communication schedule โœจ It also satisfies all the requirements for an SF listed in Section 4.2 of [RFC8480] ๐Ÿ‘‘

MSF builds on top of these specs: "Minimal IPv6 over the TSCH Mode of IEEE 802.15.4e (6TiSCH) Configuration" [RFC8180], "6TiSCH Operation Sublayer (6top) Protocol (6P)" [RFC8480], and "Constrained Join Protocol (CoJP) for 6TiSCH" [RFC9031] ๐Ÿงš

So MSF defines two things: how a node behaves when it joins the network, and how the communication schedule gets managed in a distributed fashion ๐Ÿ“ When a node running MSF boots up, it joins by following the six steps in Section 4. The end state of the join process is that the node is synchronized to the network, has mutually authenticated with the network, has identified a routing parent, and has scheduled one negotiated Tx cell (defined in Section 5.1) to/from its routing parent ๐Ÿซถ After joining, the node keeps adding, deleting, and relocating cells as described in Section 5. It does this for three reasons: to match the link-layer resources to the traffic, to handle changing parent, and to handle a schedule collision ๐Ÿ”ฅ

MSF works super closely with the IPv6 Routing Protocol for Low-Power and Lossy Networks (RPL), specifically the routing parent defined in [RFC6550] ๐Ÿฆ‹ This spec only describes how MSF works with the routing parent, and that parent is called the "selected parent" ๐Ÿ’… The activity of MSF toward that single routing parent is called a "MSF session". The performance of MSF is only evaluated when the "selected parent" is the node's preferred parent, but there should be no restrictions on using multiple MSF sessions, one per parent ๐ŸŒธ Spreading traffic over multiple parents is a routing decision, and it's out of scope for MSF ๐Ÿ™ˆ

MSF is designed for a wide range of application domains ๐Ÿ’– It's optimized for applications with regular upstream traffic, meaning traffic going from the nodes to the Destination-Oriented Directed Acyclic Graph (DODAG) root [RFC6550] ๐ŸŒˆ

This spec follows the recommended structure of an SF specification, given in Appendix A of [RFC8480], with these adaptations ๐Ÿ‘‘

  • We reordered some sections, in particular so the section on node behavior at boot (Section 4) shows up early in this specification โœจ
  • We added sections on the interface to the minimal 6TiSCH configuration (Section 2), the use of the SIGNAL command (Section 6), the MSF constants (Section 14), and the MSF statistics (Section 15) ๐Ÿ’œ

1.1. Requirements Language ๐ŸŽ€

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 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here ๐Ÿ’…

This spec uses messages and variables defined in IEEE Std 802.15.4-2015 [IEEE802154] ๐ŸŒธ The hope is that those resources stay in future versions of IEEE Std 802.15.4, and if so, this spec also applies to those future versions ๐Ÿ“ For the rest of the document, [IEEE802154] refers to IEEE Std 802.15.4-2015 as well as any future versions of IEEE Std 802.15.4 that stay compatible โœจ

2. Interface to the Minimal 6TiSCH Configuration ๐Ÿฆ‹

Okay so in a Time-Slotted Channel Hopping (TSCH) network, time gets sliced into time slots ๐ŸŒˆ Those slots are grouped into one or more slotframes that repeat over time โฑ๏ธ The TSCH schedule tells a node what to do in each time slot, like transmit, receive, or sleep [RFC7554] ๐Ÿซถ For time slots used for transmitting or receiving, a channel is assigned to the slot. The tuple (slot, channel) is indicated as a cell of the TSCH schedule ๐Ÿ’– MSF is one of the policies that define how to manage the TSCH schedule ๐Ÿ‘‘

A node implementing MSF SHOULD implement the minimal 6TiSCH configuration [RFC8180], which defines the "minimal cell", a single shared cell that gives minimal connectivity between nodes in the network ๐Ÿ’œ The MSF implementation in this spec is based on the minimal 6TiSCH configuration implementation ๐ŸŽ€ An implementor MAY implement MSF based on other specifications, as long as that specification defines a way to advertise the Enhanced Beacons (EBs) and DODAG Information Objects (DIOs) among the network ๐Ÿงš

MSF uses the minimal cell for broadcast frames, like Enhanced Beacons (EBs) [IEEE802154] and broadcast DODAG Information Objects (DIOs) [RFC6550] ๐ŸŒธ Cells scheduled by MSF are only meant for unicast frames ๐Ÿ“

To make sure there's enough bandwidth on the minimal cell, a node implementing MSF SHOULD enforce some rules for limiting broadcast traffic ๐Ÿ”ฅ For example, the overall broadcast traffic among the node and its neighbors SHOULD NOT exceed one-third of the bandwidth of the minimal cell ๐Ÿ˜ญ One algorithm that meets this requirement is the Trickle timer defined in [RFC6206], which gets applied to DIO messages [RFC6550] โœจ Any other algorithm for limiting broadcast traffic to meet those rules is implementation-specific and out of scope for MSF ๐Ÿ™ˆ

Three slotframes are used in MSF ๐Ÿฆ‹ MSF schedules autonomous cells at Slotframe 1 (Section 3) and 6P negotiated cells at Slotframe 2 (Section 5), while Slotframe 0 is used for bootstrap traffic as defined in the minimal 6TiSCH configuration ๐Ÿ’… Using the same slotframe length for Slotframe 0, 1, and 2 is RECOMMENDED, and that makes it possible to avoid scheduling collisions between autonomous cells and 6P negotiated cells (Section 3) ๐ŸŒˆ The default slotframe length (SLOTFRAME_LENGTH) is RECOMMENDED for Slotframe 0, 1, and 2, although any value can be advertised in the EBs ๐Ÿ’–

3. Autonomous Cells โœจ

okay so MSF nodes start Slotframe 1 with a set of default cells for unicast chats with their neighbors ๐Ÿ’– These are called "autonomous cells" because each node keeps them up on its own, no 6P negotiation needed ๐Ÿฆ‹ Cells that do get scheduled through a 6P Transaction are called "negotiated cells," and those live on Slotframe 2. (How to schedule those is in Section 5 ๐Ÿซถ) There are two flavors of autonomous cell:

Autonomous Rx Cell (AutoRxCell): one cell at a [slotOffset,channelOffset] that's computed as a hash of the node's own 64-bit Extended Unique Identifier (EUI-64) ๐ŸŒธ (more on that next). Its cell options bits are TX=0, RX=1, SHARED=0.

Autonomous Tx Cell (AutoTxCell): one cell at a [slotOffset,channelOffset] that's computed as a hash of the Layer 2 EUI-64 destination address in the unicast frame about to be sent ๐ŸŽ€ (see Section 4.4). Its cell options bits are TX=1, RX=0, SHARED=1.

To work out a [slotOffset,channelOffset] from an EUI-64 address, nodes MUST use the hash function SAX as defined in Section 2 of [SAX-DASFAA], with consistent input parameters (like the ones in Appendix A) ๐Ÿ’… The whole point is to spread the cells across all the channel offsets and every slot offset in Slotframe 1 except the first one. That first time offset gets skipped so it doesn't crash into the minimal cell in Slotframe 0 ๐Ÿ™ˆ Here's how the slot coordinates for a given EUI-64 are worked out:

slotOffset(MAC) = 1 + hash(EUI64, length(Slotframe_1) - 1)

channelOffset(MAC) = hash(EUI64, NUM_CH_OFFSET)

The second input parameter sets the max value the hash can return ๐Ÿงš Other optional SAX parameters decide how well the hash performs. Those can get broadcast in an EB frame or be preconfigured, and for interop, Appendix A has the reference values ๐Ÿ’œ

AutoTxCell isn't permanently parked in the schedule. It gets added or deleted on demand, whenever there's a frame to send ๐Ÿฆ‹ So across the whole network lifetime, nodes maintain their autonomous cells like this:

  • Add an AutoTxCell to the Layer 2 destination address, which is indicated in a frame when there is no 6P negotiated Tx cell in the schedule for that frame to transmit.
  • Remove an AutoTxCell when:
    • there is no frame to transmit on that cell, or
    • there is at least one 6P negotiated Tx cell in the schedule for the frames to transmit.

The AutoRxCell MUST always remain scheduled after synchronization. And 6P CLEAR MUST NOT erase any autonomous cells ๐Ÿ™…โ€โ™€๏ธ (no touching the autonomous ones, bestie!)

Because of hash collisions, sometimes the AutoTxCell and AutoRxCell end up at the same slot offset and/or channel offset ๐Ÿ˜ญ When that happens, AutoTxCell always takes precedence over AutoRxCell. Here's the lowkey tricky bit: AutoTxCell is a shared-type cell that uses a back-off mechanism ๐ŸŒˆ So when they collide, AutoTxCell wins if there's a packet to transmit. When it's in a back-off period, AutoRxCell gets used instead. If there's a conflict with a negotiated cell, autonomous cells take precedence over negotiated cells, as stated in [IEEE802154] โœจ However, when Slotframe 0, 1, and 2 all use the same length value, a negotiated cell can avoid colliding with the AutoRxCell. So the same slotframe length for Slotframe 0, 1, and 2 is RECOMMENDED ๐Ÿ‘‘


4. Node Behavior at Boot ๐Ÿš€

This section walks through what the node SHOULD do from the moment it's switched on until it has successfully joined the network ๐ŸŽ€ Other behaviors may be involved, for example when alternative security solutions are used for the network. Section 4.1 covers the start state and Section 4.8 covers the end state. The other sections go through the six steps of the joining process. We use the terms "pledge" and "joined node" as defined in [RFC9031] ๐Ÿ’–

4.1. Start State ๐ŸŒฑ

A node implementing MSF SHOULD implement the Constrained Join Protocol (CoJP) for 6TiSCH [RFC9031]. As a corollary, a pledge may be preconfigured with the Pre-Shared Key (PSK) for joining before it's switched on, along with any other configuration detailed in [RFC9031] ๐Ÿ” This isn't necessary if the node uses a security solution that isn't PSK-based, like [ZEROTOUCH-JOIN] โœจ

4.2. Step 1 - Choosing Frequency ๐Ÿ“ป

When switched on, the pledge randomly picks a frequency from the channels the network cycles through, then starts listening for EBs on that frequency ๐Ÿฆ‹

4.3. Step 2 - Receiving EBs ๐Ÿ‘‚

Once the pledge gets its first EB, it keeps listening for more EBs so it can learn:

  1. the number of neighbors N in its vicinity, and
  2. which neighbor to choose as a Join Proxy (JP) for the joining process.

After receiving the first EB, a node MAY keep listening for at most MAX_EB_DELAY seconds, or until it has received EBs from NUM_NEIGHBOURS_TO_WAIT distinct neighbors ๐Ÿงš This behavior is defined in [RFC8180].

During this step, the pledge only gets synchronized once it has received enough EBs from the network it wants to join ๐Ÿ’… How to decide whether an EB really comes from the network you want is implementation-specific. It MAY involve filtering EBs by the PANID field they contain, by the presence and contents of the Information Element (IE) defined in [RFC9032], or by the key used to authenticate them ๐ŸŒธ

Which neighbor to use as a JP is also implementation-specific, and it's discussed in [RFC9031] ๐Ÿ’œ

4.4. Step 3 - Setting up Autonomous Cells for the Join Process ๐ŸŽ€

After picking a JP, a node generates a Join Request and installs an AutoTxCell to the JP ๐Ÿฆ‹ The pledge then sends the Join Request to its selected JP over that AutoTxCell, and removes the AutoTxCell once the Join Request is sent out. The JP receives the Join Request through its AutoRxCell, then forwards it to the Join Registrar/Coordinator (JRC), possibly over multiple hops, using the 6P negotiated Tx cells ๐Ÿซถ The JRC sends the Join Response back to the JP, possibly over multiple hops, using AutoTxCells or the 6P negotiated Tx cells.

When the JP gets the Join Response from the JRC, it installs an AutoTxCell to the pledge and sends the Join Response to the pledge over that AutoTxCell. The JP removes that AutoTxCell once the Join Response is sent out. The pledge receives the Join Response on its AutoRxCell, learns the keying material used in the network along with other configuration settings, and becomes a "joined node" ๐ŸŽ‰๐Ÿ‘‘

When 6LoWPAN Neighbor Discovery (ND) [RFC8505] is implemented, the unicast packets used by ND are sent on the AutoTxCell. The detailed process for how ND works during the join process is in [RFC9030] โœจ

4.5. Step 4 - Acquiring a RPL Rank ๐ŸŒณ

Per [RFC6550], the joined node receives DIOs, computes its own Rank, and selects a routing parent ๐Ÿ’–

4.6. Step 5 - Setting up First Tx Negotiated Cells ๐Ÿ“ฆ

Once it has picked a routing parent, the joined node MUST generate a 6P ADD Request and install an AutoTxCell to that parent ๐Ÿ™Œ The 6P ADD Request goes out through the AutoTxCell and contains these fields:

  • CellOptions: Set to TX=1, RX=0, SHARED=0.
  • NumCells: Set to 1.
  • CellList: At least 5 cells, chosen according to Section 8.

The joined node removes the AutoTxCell to the selected parent when the 6P Request is sent out. The parent receives the 6P ADD Request on its AutoRxCell, then generates a 6P ADD Response and installs an AutoTxCell to the joined node. When the parent sends out the 6P ADD Response, it MUST remove that AutoTxCell. The joined node receives the 6P ADD Response on its AutoRxCell and completes the 6P Transaction ๐ŸŽ€ If the 6P ADD transaction fails, the node MUST issue another 6P ADD Request and keep repeating until the Tx cell is installed to the parent ๐Ÿ”

4.7. Step 6 - Sending EBs and DIOs ๐Ÿ“ก

The node starts sending EBs and DIOs on the minimal cell, following the transmit rules for broadcast frames from Section 2 ๐Ÿงš

4.8. End State ๐Ÿ

At the end of the joining process, a new node:

  • is synchronized to the network,
  • is using the link-layer keying material it learned through the secure joining process,
  • has selected one neighbor as its routing parent,
  • has one AutoRxCell,
  • has one negotiated Tx cell to the selected parent,
  • starts to send DIOs, potentially serving as a router for other nodes' traffic, and
  • starts to send EBs, potentially serving as a JP for new pledges.

It's giving main character energy ๐Ÿ‘‘๐Ÿ’…


5. Rules for Adding and Deleting Cells ๐Ÿ› ๏ธ

Once a node has joined the 6TiSCH network, it adds, deletes, or relocates cells with the selected parent for three reasons:

  • to match the link-layer resources to the traffic between the node and the selected parent (Section 5.1),
  • to handle switching the parent (Section 5.2), or
  • to handle a schedule collision (Section 5.3).

These are called "negotiated cells" because they're scheduled through 6P and negotiated with the node's parent ๐Ÿซถ Unless specifically declared otherwise, every cell mentioned in this section is a negotiated cell, and they're installed at Slotframe 2 ๐Ÿฆ‹

5.1. Adapting to Traffic ๐Ÿ“ˆ

A node implementing MSF MUST implement the behavior described in this section. ๐Ÿ’…

The goal of MSF is to manage the communication schedule in the 6TiSCH schedule in a distributed way, no central boss needed. โœจ For a node, that means keeping an eye on how many cells it's actually using with one of its neighbors, usually its selected parent. ๐Ÿฆ‹

  • If the node sees that the number of link-layer frames it's trying to exchange with the selected parent per unit of time is bigger than the capacity of the TSCH negotiated cells it has scheduled with that parent, it sends a 6P ADD command to that parent to add cells to the TSCH schedule. ๐Ÿ”ฅ
  • If the traffic is lower than the capacity, it sends a 6P DELETE command to that parent to delete cells from the TSCH schedule. ๐Ÿงน

The node MUST maintain two separate pairs of the following counters for the selected parent: one pair for the negotiated Tx cells to that parent, and one pair for the negotiated Rx cells to that parent. ๐ŸŽ€

  • NumCellsElapsed: counts the number of negotiated cells that have elapsed since the counter was initialized. It starts at 0. When the current cell is declared as a negotiated cell to the selected parent, NumCellsElapsed goes up by exactly 1, whether the cell is used to transmit or to receive a frame. ๐ŸŒธ
  • NumCellsUsed: counts the number of negotiated cells that have been used. It starts at 0. NumCellsUsed goes up by exactly 1 when, during a negotiated cell to the selected parent, either of these happens:
    • The node sends a frame to the parent. The counter goes up no matter whether a link-layer acknowledgment came back or not. ๐Ÿ“ค
    • The node receives a valid frame from the parent. The counter only goes up when a valid frame per [IEEE802154] is received by the node from its parent. ๐Ÿ“ฅ

The cell option of cells listed in CellList in a 6P Request frame SHOULD be either (Tx=1, Rx=0) only or (Tx=0, Rx=1) only. Both NumCellsElapsed and NumCellsUsed can be used for both types of negotiated cells. ๐Ÿงš

Here's the twist: at first boot there's no negotiated Rx cell installed yet, so the AutoRxCell gets counted too for downstream traffic adaptation. ๐Ÿ™ˆ In that case:

  • NumCellsElapsed goes up by exactly 1 when the current cell is AutoRxCell.
  • NumCellsUsed goes up by exactly 1 when the node receives a frame from the selected parent on AutoRxCell.

Implementors MAY choose to create the same counters for each neighbor and add them as additional statistics in the neighbor table. ๐Ÿ’œ

The counters are used like this:

  1. Both NumCellsElapsed and NumCellsUsed are initialized to 0 when the node boots. ๐ŸŒฑ
  2. When the value of NumCellsElapsed reaches MAX_NUM_CELLS:
    • If NumCellsUsed is greater than LIM_NUMCELLSUSED_HIGH, trigger 6P to add a single cell to the selected parent. โฌ†๏ธ
    • If NumCellsUsed is less than LIM_NUMCELLSUSED_LOW, trigger 6P to remove a single cell to the selected parent. โฌ‡๏ธ
    • Reset both NumCellsElapsed and NumCellsUsed to 0 and restart #2. ๐Ÿ”

The value of MAX_NUM_CELLS depends on the traffic type of the network. Generally speaking, the bigger MAX_NUM_CELLS is, the more accurately the cell usage gets calculated. A bigger value also means less 6P traffic overhead. โœจ Meanwhile, latency won't climb much with a bigger MAX_NUM_CELLS for periodic traffic. For bursty traffic, though, a bigger value does introduce higher latency. ๐Ÿ˜ญ The latency caused by slight changes in traffic load can be eased by the extra scheduled cells. So in this sense, MSF is a Scheduling Function that trades latency for energy by scheduling more cells than needed. โš–๏ธ Setting MAX_NUM_CELLS to a value at least four times the recent maximum number of cells used in a slotframe is RECOMMENDED. For example, a traffic load of two packets per slotframe results in an average of four cells scheduled (two of them used). Using at least double the number of scheduled cells (which is eight) as MAX_NUM_CELLS gives a good resolution on the cell usage calculation. ๐Ÿ“

โš ๏ธ If a node has booted or has disappeared from the network, the cell reserved at the selected parent may stay in the schedule forever. A cleanup mechanism MUST be provided to resolve this issue. The cleanup mechanism is implementation-specific. The goal is to confirm that those negotiated cells are not used anymore by the associated neighbors, and then remove them from the schedule. ๐Ÿงฝ

5.2. Switching Parent ๐Ÿ”€

A node implementing MSF SHOULD implement the behavior described in this section. ๐Ÿซถ

As part of normal operation, RPL can make a node switch parent. The procedure for switching from the old parent to the new parent goes like this:

  1. The node counts the number of negotiated cells it has per slotframe to the old parent. ๐Ÿ”ข
  2. The node triggers one or more 6P ADD commands to schedule the same number of negotiated cells, with the same cell options, to the new parent. ๐Ÿ› ๏ธ
  3. When that successfully completes, the node issues a 6P CLEAR command to its old parent. ๐Ÿ‘‹

Which type of negotiated cell gets installed first depends on which traffic has the higher priority, upstream or downstream. That's application-specific and out of scope of MSF. ๐Ÿคทโ€โ™€๏ธ


5.3. Handling Schedule Collisions ๐Ÿ’ฅ

A node implementing MSF SHOULD implement the behavior described in this section. Other algorithms for handling schedule collisions can be an alternative to the algorithm proposed here. ๐ŸŒˆ

Since scheduling is entirely distributed, there's a nonzero probability that two pairs of nearby neighbor nodes schedule a negotiated cell at the same [slotOffset,channelOffset] location in the TSCH schedule. When that happens, the data exchanged by the two pairs may collide on that cell. We call this a "schedule collision". ๐Ÿ˜ฑ

The node MUST maintain the following counters for each negotiated Tx cell to the selected parent:

  • NumTx: counts the number of transmission attempts on that cell. Each time the node attempts to transmit a frame on that cell, NumTx goes up by exactly 1. ๐Ÿ“จ
  • NumTxAck: counts the number of successful transmission attempts on that cell. Each time the node receives an acknowledgment for a transmission attempt, NumTxAck goes up by exactly 1. โœ…

Since both NumTx and NumTxAck start at 0, we necessarily have NumTxAck less than or equal to NumTx. We call the ratio NumTxAck/NumTx the Packet Delivery Ratio (PDR), and we represent it as a percentage. So a cell with a PDR equal to 50% means half of the frames transmitted are not acknowledged. ๐Ÿ“‰

Each time the node switches parent (or during the join process, when the node selects a parent for the first time), both NumTx and NumTxAck MUST be reset to 0. They keep incrementing over time, as the schedule runs and the node sends frames to that parent. When NumTx reaches MAX_NUMTX, both NumTx and NumTxAck MUST be divided by 2. MAX_NUMTX needs to be a power of two to avoid division error. For example, when MAX_NUMTX is set to 256, and NumTx=255 and NumTxAck=127, the counters become NumTx=128 and NumTxAck=64 if one frame is sent to the parent with an acknowledgment received. This operation doesn't change the value of the PDR, but it lets the counters keep incrementing. ๐Ÿงฎ The value of MAX_NUMTX is implementation-specific.

The key to detecting a schedule collision is this: if a node has several cells to the selected parent, all of them should show the same PDR. A cell with a PDR significantly lower than the others means there are collisions on that cell. ๐Ÿ•ต๏ธโ€โ™€๏ธ

Every HOUSEKEEPINGCOLLISION_PERIOD, the node runs these steps:

  1. It computes, for each negotiated Tx cell with the parent (but not for the autonomous cell), that cell's PDR. ๐Ÿง 
  2. Any cell that hasn't yet had NumTx divided by 2 since it was last reset is skipped in steps 3 and 4. This avoids triggering cell relocation when the values of NumTx and NumTxAck aren't statistically significant yet. ๐Ÿ›‘
  3. It identifies the cell with the highest PDR. ๐Ÿ†
  4. For any other cell, it compares its PDR against that of the cell with the highest PDR. If the subtraction difference between the PDR of the cell and the highest PDR is larger than RELOCATE_PDRTHRES, it triggers the relocation of that cell using a 6P RELOCATE command. ๐Ÿšš

RELOCATION for negotiated Rx cells is not supported by MSF. ๐Ÿ™…โ€โ™€๏ธ


6. 6P SIGNAL Command ๐Ÿšซ

The 6P SIGNAL command is not used by MSF. ๐Ÿ™ˆ

7. Scheduling Function Identifier ๐Ÿชช

The Scheduling Function Identifier (SFID) of MSF is 0. How the value of 0 was chosen is described in Section 17. ๐ŸŽ€

8. Rules for CellList ๐Ÿ“‹

MSF uses two-step 6P Transactions exclusively. 6P Transactions are only initiated by a node towards its parent. As a result, the cells to put in the CellList of a 6P ADD command, and in the candidate CellList of a RELOCATE command, are chosen by the node that initiates the 6P Transaction. In both cases, the same rules apply: ๐Ÿ‘‘

  • The CellList is RECOMMENDED to have five or more cells.
  • Each cell in the CellList MUST have a different slotOffset value.
  • For each cell in the CellList, the node MUST NOT have any scheduled cell on the same slotOffset.
  • The slotOffset value of any cell in the CellList MUST NOT be the same as the slotOffset of the minimal cell (slotOffset=0).
  • The slotOffset of a cell in the CellList SHOULD be randomly and uniformly chosen among all the slotOffset values that satisfy the restrictions above.
  • The channelOffset of a cell in the CellList SHOULD be randomly and uniformly chosen from [0..numFrequencies], where numFrequencies represents the number of frequencies a node can communicate on.

Because cells are picked at random, there's a nonzero chance that nodes in the vicinity have installed cells with the same slotOffset and channelOffset. ๐ŸŽฒ An implementer MAY implement a strategy to monitor the candidate cells before adding them to the CellList, to avoid collisions. For example, a node MAY maintain a candidate cell pool for the CellList. The candidate cells in the pool are preconfigured as Rx cells that promiscuously listen to detect transmissions on those cells. If transmissions that rely on [IEEE802154] are observed on one cell over multiple iterations of the schedule, that cell is probably used by a TSCH neighbor. It then gets moved out of the pool, and a new cell is selected as a candidate. Cells for the CellList are picked straight from the candidate pool when needed. ๐ŸŠโ€โ™€๏ธ

9. 6P Timeout Value โฑ๏ธ

The timeout value is calculated for the worst case, where a 6P response is received, meaning the 6P response was sent out successfully at the very latest retransmission. For each retransmission, the backoff uses the largest value. So the 6P timeout value is calculated as:

((2^MAXBE) - 1) * MAXRETRIES * SLOTFRAME_LENGTH

where:

  • MAXBE, defined in [IEEE802154], is the maximum backoff exponent used. ๐Ÿ”ข
  • MAXRETRIES, defined in [IEEE802154], is the maximum number of retransmissions. ๐Ÿ”
  • SLOTFRAME_LENGTH represents the length of the slotframe. ๐Ÿฆ‹

10. Rule for Ordering Cells ๐ŸŽ€

Okay bestie, cells get sorted by slotOffset first, then channelOffset as the tiebreaker. โœจ Here's a correctly ordered example, where each pair is the [slotOffset,channelOffset] of a cell in the schedule:

[1,3],[1,4],[2,0],[5,3],[6,0],[6,3],[7,9]

Look at slot 1 coming before slot 2, and then channel 3 coming before channel 4 inside slot 1. Sorted, no cap ๐Ÿ’…

11. Meaning of the Metadata Field ๐Ÿงš

The Metadata field is not used by MSF. Zero drama, it just isn't a thing for MSF ๐Ÿ™ˆ

12. 6P Error Handling ๐Ÿ’€

Section 6.2.4 of [RFC8480] lists the 6P return codes. Table 1 lists those same error codes, plus the behavior a node implementing MSF SHOULD follow. ๐Ÿซถ

                +=================+======================+
                | Code            | RECOMMENDED Behavior |
                +=================+======================+
                | RC_SUCCESS      | nothing              |
                +-----------------+----------------------+
                | RC_EOL          | nothing              |
                +-----------------+----------------------+
                | RC_ERR          | quarantine           |
                +-----------------+----------------------+
                | RC_RESET        | quarantine           |
                +-----------------+----------------------+
                | RC_ERR_VERSION  | quarantine           |
                +-----------------+----------------------+
                | RC_ERR_SFID     | quarantine           |
                +-----------------+----------------------+
                | RC_ERR_SEQNUM   | clear                |
                +-----------------+----------------------+
                | RC_ERR_CELLLIST | clear                |
                +-----------------+----------------------+
                | RC_ERR_BUSY     | waitretry            |
                +-----------------+----------------------+
                | RC_ERR_LOCKED   | waitretry            |
                +-----------------+----------------------+

                  Table 1: Recommended Behavior for Each
                              6P Error Code

Here's what each behavior from Table 1 means, periodt:

  • nothing: This return code is not an error, so no error handling behavior gets triggered. ๐ŸŒˆ
  • clear: Abort the 6P Transaction. Issue a 6P CLEAR command to that neighbor (this command may fail at the link layer). Then remove all cells scheduled with that neighbor from the local schedule. ๐Ÿงน
  • quarantine: Same behavior as for "clear". On top of that, remove the node from the neighbor and routing tables. Place the node's identifier in a quarantine list for QUARANTINE_DURATION. While it's in quarantine, drop all frames received from that node. ๐Ÿšซ
  • waitretry: Abort the 6P Transaction. Wait for a duration randomly and uniformly chosen from [WAIT_DURATION_MIN,WAIT_DURATION_MAX]. Then retry the same transaction. โณ

13. Schedule Inconsistency Handling ๐Ÿ”ฅ

The behavior when schedule inconsistency is detected is explained in Table 1, for 6P return code RC_ERR_SEQNUM. Go check the clear row, it's giving answers ๐Ÿ”

14. MSF Constants ๐Ÿ‘‘

Table 2 lists MSF constants and their RECOMMENDED values. โœจ

           +==============================+===================+
           | Name                         | RECOMMENDED value |
           +==============================+===================+
           | SLOTFRAME_LENGTH             | 101 slots         |
           +------------------------------+-------------------+
           | NUM_CH_OFFSET                | 16                |
           +------------------------------+-------------------+
           | MAX_NUM_CELLS                | 100               |
           +------------------------------+-------------------+
           | LIM_NUMCELLSUSED_HIGH        | 75                |
           +------------------------------+-------------------+
           | LIM_NUMCELLSUSED_LOW         | 25                |
           +------------------------------+-------------------+
           | MAX_NUMTX                    | 256               |
           +------------------------------+-------------------+
           | HOUSEKEEPINGCOLLISION_PERIOD | 1 min             |
           +------------------------------+-------------------+
           | RELOCATE_PDRTHRES            | 50 %              |
           +------------------------------+-------------------+
           | QUARANTINE_DURATION          | 5 min             |
           +------------------------------+-------------------+
           | WAIT_DURATION_MIN            | 30 s              |
           +------------------------------+-------------------+
           | WAIT_DURATION_MAX            | 60 s              |
           +------------------------------+-------------------+

           Table 2: MSF Constants and Their RECOMMENDED Values

15. MSF Statistics ๐Ÿ“Š

Table 3 lists MSF statistics and their RECOMMENDED widths. Stats with main character energy ๐Ÿ’–

                  +=================+===================+
                  | Name            | RECOMMENDED width |
                  +=================+===================+
                  | NumCellsElapsed | 1 byte            |
                  +-----------------+-------------------+
                  | NumCellsUsed    | 1 byte            |
                  +-----------------+-------------------+
                  | NumTx           | 1 byte            |
                  +-----------------+-------------------+
                  | NumTxAck        | 1 byte            |
                  +-----------------+-------------------+

                     Table 3: MSF Statistics and Their
                             RECOMMENDED Widths

16. Security Considerations ๐Ÿ”

Okay, this section is serious, so listen up ๐Ÿฅน MSF defines a series of "rules" for the node to follow. It triggers several actions that are carried out by the protocols defined in the following specifications: "Minimal IPv6 over the TSCH Mode of IEEE 802.15.4e (6TiSCH) Configuration" [RFC8180], "6TiSCH Operation Sublayer (6top) Protocol (6P)" [RFC8480], and "Constrained Join Protocol (CoJP) for 6TiSCH" [RFC9031]. Confidentiality and authentication of MSF control and data traffic are provided by these specifications, and their security considerations continue to apply to MSF. In particular, MSF does not define a new protocol or packet format. ๐Ÿ›ก๏ธ

MSF uses autonomous cells for initial bootstrap and the transport of join traffic. Autonomous cells are computed as a hash of nodes' EUI-64 addresses. This makes the coordinates of autonomous cell an easy target for an attacker, as EUI-64 addresses are visible on the wire and are not encrypted by the link-layer security mechanism. ๐Ÿ˜ฌ With the coordinates of autonomous cells available, the attacker can launch a selective jamming attack against any node's AutoRxCell. If the attacker targets a node acting as a JP, it can prevent pledges from using that JP to join the network. The pledge detects such a situation through the absence of a link-layer acknowledgment for its Join Request. As it is expected that each pledge will have more than one JP available to join the network, one available countermeasure for the pledge is to pseudorandomly select a new JP when the link to the previous JP appears bad. Such a strategy alleviates the issue of the attacker randomly jamming to disturb the network, but does not help in the case the attacker is targeting a particular pledge. In that case, the attacker can jam the AutoRxCell of the pledge in order to prevent it from receiving the join response. This situation should be detected through the absence of a particular node from the network and handled by the network administrator through out-of-band means. ๐Ÿšจ

MSF adapts to traffic containing packets from the IP layer. It is possible that the IP packet has a nonzero DSCP (Differentiated Services Code Point) [RFC2474] value in its IPv6 header. The decision how to handle that packet belongs to the upper layer and is out of scope of MSF. As long as the decision is made to hand over to MAC layer to transmit, MSF will take that packet into account when adapting to traffic. ๐Ÿ“ฆ

Note that nonzero DSCP values may imply that the traffic originated at unauthenticated pledges (see [RFC9031]). The implementation at the IPv6 layer SHOULD rate limit this join traffic before it is passed to the 6top sublayer where MSF can observe it. If there is no rate limit for join traffic, intermediate nodes in the 6TiSCH network may be prone to a resource exhaustion attack, with the attacker injecting unauthenticated traffic from the network edge. ๐Ÿ’€ The assumption is that the rate-limiting function is aware of the available bandwidth in the 6top Layer 3 bundle(s) towards a next hop, not directly from MSF, but from an interaction with the 6top sublayer that ultimately manages the bundles under MSF's guidance. How this rate limit is implemented is out of scope of MSF. ๐Ÿ™Œ

17. IANA Considerations ๐Ÿฆ‹

17.1. MSF Scheduling Function Identifiers ๐ŸŒธ

This document adds the following number to the "6P Scheduling Function Identifiers" subregistry, part of the "IPv6 Over the TSCH Mode of IEEE 802.15.4 (6TiSCH)" registry, as defined by [RFC8480]:

      +======+===================================+===========+
      | SFID | Name                              | Reference |
      +======+===================================+===========+
      | 0    | Minimal Scheduling Function (MSF) | RFC 9033  |
      +------+-----------------------------------+-----------+

          Table 4: New SFID in the "6P Scheduling
                  Function Identifiers" Subregistry

The SFID was chosen from the range 0-127, which has the registration procedure of IETF Review or IESG Approval [RFC8126]. Registry rules, but make them cute ๐ŸŽ€

18. References ๐Ÿ“š

18.1. Normative References ๐Ÿ“šโœจ

Okay bestie, these are the references the spec needs you to have read. Lots of IEEE and RFC energy here ๐Ÿค“๐Ÿ’œ

[IEEE802154]
           IEEE, "IEEE Standard for Low-Rate Wireless Networks", IEEE
           Standard 802.15.4-2015, DOI 10.1109/IEEESTD.2016.7460875,
           April 2016,
           <https://ieeexplore.ieee.org/document/7460875>.

[RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
           Requirement Levels", BCP 14, RFC 2119,
           DOI 10.17487/RFC2119, March 1997,
           <https://www.rfc-editor.org/info/rfc2119>.

[RFC2474]  Nichols, K., Blake, S., Baker, F., and D. Black,
           "Definition of the Differentiated Services Field (DS
           Field) in the IPv4 and IPv6 Headers", RFC 2474,
           DOI 10.17487/RFC2474, December 1998,
           <https://www.rfc-editor.org/info/rfc2474>.

[RFC6550]  Winter, T., Ed., Thubert, P., Ed., Brandt, A., Hui, J.,
           Kelsey, R., Levis, P., Pister, K., Struik, R., Vasseur,
           JP., and R. Alexander, "RPL: IPv6 Routing Protocol for
           Low-Power and Lossy Networks", RFC 6550,
           DOI 10.17487/RFC6550, March 2012,
           <https://www.rfc-editor.org/info/rfc6550>.

[RFC8126]  Cotton, M., Leiba, B., and T. Narten, "Guidelines for
           Writing an IANA Considerations Section in RFCs", BCP 26,
           RFC 8126, DOI 10.17487/RFC8126, June 2017,
           <https://www.rfc-editor.org/info/rfc8126>.

[RFC8174]  Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
           2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
           May 2017, <https://www.rfc-editor.org/info/rfc8174>.

[RFC8180]  Vilajosana, X., Ed., Pister, K., and T. Watteyne, "Minimal
           IPv6 over the TSCH Mode of IEEE 802.15.4e (6TiSCH)
           Configuration", BCP 210, RFC 8180, DOI 10.17487/RFC8180,
           May 2017, <https://www.rfc-editor.org/info/rfc8180>.

[RFC8480]  Wang, Q., Ed., Vilajosana, X., and T. Watteyne, "6TiSCH
           Operation Sublayer (6top) Protocol (6P)", RFC 8480,
           DOI 10.17487/RFC8480, November 2018,
           <https://www.rfc-editor.org/info/rfc8480>.

[RFC9030]  Thubert, P., Ed., "An Architecture for IPv6 over the Time-
           Slotted Channel Hopping Mode of IEEE 802.15.4 (6TiSCH)",
           RFC 9030, DOI 10.17487/RFC9030, May 2021,
           <https://www.rfc-editor.org/info/rfc9030>.

[RFC9031]  Vuฤiniฤ‡, M., Ed., Simon, J., Pister, K., and M.
           Richardson, "Constrained Join Protocol (CoJP) for 6TiSCH",
           RFC 9031, DOI 10.17487/RFC9031, May 2021,
           <https://www.rfc-editor.org/info/rfc9031>.

[RFC9032]  Dujovne, D., Ed. and M. Richardson, "Encapsulation of
           6TiSCH Join and Enrollment Information Elements",
           RFC 9032, DOI 10.17487/RFC9032, May 2021,
           <https://www.rfc-editor.org/info/rfc9032>.

[SAX-DASFAA]
           Ramakrishna, M.V. and J. Zobel, "Performance in Practice
           of String Hashing Functions", DASFAA,
           DOI 10.1142/9789812819536_0023, 1997,
           <https://doi.org/10.1142/9789812819536_0023>.

18.2. Informative References ๐ŸŒธ

These ones are the nice-to-know extras. Super useful for context, not strictly required ๐Ÿซถ

[RFC6206]  Levis, P., Clausen, T., Hui, J., Gnawali, O., and J. Ko,
           "The Trickle Algorithm", RFC 6206, DOI 10.17487/RFC6206,
           March 2011, <https://www.rfc-editor.org/info/rfc6206>.

[RFC7554]  Watteyne, T., Ed., Palattella, M., and L. Grieco, "Using
           IEEE 802.15.4e Time-Slotted Channel Hopping (TSCH) in the
           Internet of Things (IoT): Problem Statement", RFC 7554,
           DOI 10.17487/RFC7554, May 2015,
           <https://www.rfc-editor.org/info/rfc7554>.

[RFC8505]  Thubert, P., Ed., Nordmark, E., Chakrabarti, S., and C.
           Perkins, "Registration Extensions for IPv6 over Low-Power
           Wireless Personal Area Network (6LoWPAN) Neighbor
           Discovery", RFC 8505, DOI 10.17487/RFC8505, November 2018,
           <https://www.rfc-editor.org/info/rfc8505>.

[ZEROTOUCH-JOIN]
           Richardson, M., "6tisch Zero-Touch Secure Join protocol",
           Work in Progress, Internet-Draft, draft-ietf-6tisch-
           dtsecurity-zerotouch-join-04, 8 July 2019,
           <https://tools.ietf.org/html/draft-ietf-6tisch-dtsecurity-
           zerotouch-join-04>.

Appendix A. Example Implementation of the SAX Hash Function ๐Ÿงš๐Ÿ’–

Time for the fun part! This appendix is a little example implementation of the SAX hash function, so everybody can be on the same page ๐Ÿ”ฅ

To support interoperability, this section provides an example implementation of the SAX hash function [SAX-DASFAA]. The inputs to the function are:

  • T, which is the hashing table length.
  • c, which is the characters of string s, to be hashed.

In MSF, T is replaced by the length of slotframe 1. String s is replaced by the node EUI-64 address. The characters of the string, c0 through c7, are the eight bytes of the EUI-64 address.

The SAX hash function needs a shift operation, which is defined like this:

  • L_shift(v,b), which refers to the left shift of variable v by b bits
  • R_shift(v,b), which refers to the right shift of variable v by b bits

Here are the steps to calculate the hash value with the SAX hash function, no cap ๐Ÿ’…

  1. Initialize variable h, which is the intermediate hash value, to h0, and variable i, which is the index of the bytes of the EUI-64 address, to 0.
  2. Sum the value of L_shift(h,l_bit), R_shift(h,r_bit), and ci.
  3. Calculate the result of the exclusive OR between the sum value in Step 2 and h.
  4. Modulo the result of Step 3 by T.
  5. Assign the result of Step 4 to h.
  6. Increase i by 1.
  7. Repeat Step 2 to Step 6 until i reaches to 8.

The value of variable h is the hash value of the SAX hash function. Iconic โœจ

The values of h0, l_bit, and r_bit in Steps 1 and 2 are configured as:

      h0 = 0

      l_bit = 0

      r_bit = 1

The appropriate values of l_bit and r_bit could vary depending on the set of nodes' EUI-64 addresses. How to find those values is out of the scope of this specification. Not me going "that's a whole other spec" ๐Ÿ™ˆ

Contributors ๐ŸŽ€

Shoutout to these legends who helped make this happen ๐Ÿ‘‘

Beshr Al Nahas
Chalmers University

Email: beshr@chalmers.se


Olaf Landsiedel
Chalmers University

Email: olafl@chalmers.se


Yasuyuki Tanaka
Toshiba

Email: yatch1.tanaka@toshiba.co.jp

Authors' Addresses ๐Ÿฆ‹

And here's where you can find the authors ๐ŸŒˆ

Tengfei Chang (editor)
Inria
2 rue Simone Iff
75012 Paris
France

Email: tengfei.chang@gmail.com


Maliลกa Vuฤiniฤ‡
Inria
2 rue Simone Iff
75012 Paris
France

Email: malisa.vucinic@inria.fr


Xavier Vilajosana
Universitat Oberta de Catalunya
156 Rambla Poblenou
08018 Barcelona Catalonia
Spain

Email: xvilajosana@uoc.edu


Simon Duquennoy
RISE SICS
Isafjordsgatan 22
SE-164 29 Kista
Sweden

Email: simon.duquennoy@gmail.com


Diego Dujovne
Universidad Diego Portales
Escuela de Informรกtica y Telecomunicaciones
Av. Ejรฉrcito 441
Santiago
Regiรณn Metropolitana
Chile

Phone: +56 (2) 676-8121
Email: diego.dujovne@mail.udp.cl
๐Ÿ“ฆ where this page comes from