idnits 2.17.1 draft-ietf-6tisch-msf-15.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (31 March 2020) is 1485 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) -- Looks like a reference, but probably isn't: '1' on line 647 -- Looks like a reference, but probably isn't: '3' on line 647 -- Looks like a reference, but probably isn't: '4' on line 647 -- Looks like a reference, but probably isn't: '2' on line 647 -- Looks like a reference, but probably isn't: '0' on line 647 -- Looks like a reference, but probably isn't: '5' on line 647 -- Looks like a reference, but probably isn't: '6' on line 647 -- Looks like a reference, but probably isn't: '7' on line 647 -- Looks like a reference, but probably isn't: '9' on line 647 == Outdated reference: A later version (-15) exists of draft-ietf-6tisch-minimal-security-13 == Outdated reference: A later version (-14) exists of draft-ietf-6tisch-enrollment-enhanced-beacon-06 == Outdated reference: A later version (-30) exists of draft-ietf-6tisch-architecture-28 ** Downref: Normative reference to an Informational draft: draft-ietf-6tisch-architecture (ref. 'I-D.ietf-6tisch-architecture') -- Possible downref: Non-RFC (?) normative reference: ref. 'IEEE802154' -- Possible downref: Non-RFC (?) normative reference: ref. 'SAX-DASFAA' Summary: 1 error (**), 0 flaws (~~), 4 warnings (==), 12 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 6TiSCH T. Chang, Ed. 3 Internet-Draft M. Vucinic 4 Intended status: Standards Track Inria 5 Expires: 2 October 2020 X. Vilajosana 6 Universitat Oberta de Catalunya 7 S. Duquennoy 8 RISE SICS 9 D. Dujovne 10 Universidad Diego Portales 11 31 March 2020 13 6TiSCH Minimal Scheduling Function (MSF) 14 draft-ietf-6tisch-msf-15 16 Abstract 18 This specification defines the 6TiSCH Minimal Scheduling Function 19 (MSF). This Scheduling Function describes both the behavior of a 20 node when joining the network, and how the communication schedule is 21 managed in a distributed fashion. MSF is built upon the 6TiSCH 22 Operation Sublayer Protocol (6P) and the Minimal Security Framework 23 for 6TiSCH. 25 Requirements Language 27 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 28 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 29 "OPTIONAL" in this document are to be interpreted as described in BCP 30 14 [RFC2119] [RFC8174] when, and only when, they appear in all 31 capitals, as shown here. 33 Status of This Memo 35 This Internet-Draft is submitted in full conformance with the 36 provisions of BCP 78 and BCP 79. 38 Internet-Drafts are working documents of the Internet Engineering 39 Task Force (IETF). Note that other groups may also distribute 40 working documents as Internet-Drafts. The list of current Internet- 41 Drafts is at https://datatracker.ietf.org/drafts/current/. 43 Internet-Drafts are draft documents valid for a maximum of six months 44 and may be updated, replaced, or obsoleted by other documents at any 45 time. It is inappropriate to use Internet-Drafts as reference 46 material or to cite them other than as "work in progress." 48 This Internet-Draft will expire on 2 October 2020. 50 Copyright Notice 52 Copyright (c) 2020 IETF Trust and the persons identified as the 53 document authors. All rights reserved. 55 This document is subject to BCP 78 and the IETF Trust's Legal 56 Provisions Relating to IETF Documents (https://trustee.ietf.org/ 57 license-info) in effect on the date of publication of this document. 58 Please review these documents carefully, as they describe your rights 59 and restrictions with respect to this document. Code Components 60 extracted from this document must include Simplified BSD License text 61 as described in Section 4.e of the Trust Legal Provisions and are 62 provided without warranty as described in the Simplified BSD License. 64 Table of Contents 66 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 67 2. Interface to the Minimal 6TiSCH Configuration . . . . . . . . 4 68 3. Autonomous Cells . . . . . . . . . . . . . . . . . . . . . . 5 69 4. Node Behavior at Boot . . . . . . . . . . . . . . . . . . . . 6 70 4.1. Start State . . . . . . . . . . . . . . . . . . . . . . . 6 71 4.2. Step 1 - Choosing Frequency . . . . . . . . . . . . . . . 7 72 4.3. Step 2 - Receiving EBs . . . . . . . . . . . . . . . . . 7 73 4.4. Step 3 - Setting up Autonomous Cells for the Join 74 Process . . . . . . . . . . . . . . . . . . . . . . . . . 7 75 4.5. Step 4 - Acquiring a RPL Rank . . . . . . . . . . . . . . 8 76 4.6. Step 5 - Setting up first Tx negotiated Cells . . . . . . 8 77 4.7. Step 6 - Send EBs and DIOs . . . . . . . . . . . . . . . 8 78 4.8. End State . . . . . . . . . . . . . . . . . . . . . . . . 8 79 5. Rules for Adding/Deleting Cells . . . . . . . . . . . . . . . 9 80 5.1. Adapting to Traffic . . . . . . . . . . . . . . . . . . . 9 81 5.2. Switching Parent . . . . . . . . . . . . . . . . . . . . 11 82 5.3. Handling Schedule Collisions . . . . . . . . . . . . . . 11 83 6. 6P SIGNAL command . . . . . . . . . . . . . . . . . . . . . . 13 84 7. Scheduling Function Identifier . . . . . . . . . . . . . . . 13 85 8. Rules for CellList . . . . . . . . . . . . . . . . . . . . . 13 86 9. 6P Timeout Value . . . . . . . . . . . . . . . . . . . . . . 14 87 10. Rule for Ordering Cells . . . . . . . . . . . . . . . . . . . 14 88 11. Meaning of the Metadata Field . . . . . . . . . . . . . . . . 14 89 12. 6P Error Handling . . . . . . . . . . . . . . . . . . . . . . 14 90 13. Schedule Inconsistency Handling . . . . . . . . . . . . . . . 15 91 14. MSF Constants . . . . . . . . . . . . . . . . . . . . . . . . 15 92 15. MSF Statistics . . . . . . . . . . . . . . . . . . . . . . . 15 93 16. Security Considerations . . . . . . . . . . . . . . . . . . . 16 94 17. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 17 95 17.1. MSF Scheduling Function Identifiers . . . . . . . . . . 17 96 18. Contributors . . . . . . . . . . . . . . . . . . . . . . . . 17 97 19. References . . . . . . . . . . . . . . . . . . . . . . . . . 17 98 19.1. Normative References . . . . . . . . . . . . . . . . . . 17 99 19.2. Informative References . . . . . . . . . . . . . . . . . 19 100 Appendix A. Example of Implementation of SAX hash function . . . 20 101 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 20 103 1. Introduction 105 The 6TiSCH Minimal Scheduling Function (MSF), defined in this 106 specification, is a 6TiSCH Scheduling Function (SF). The role of an 107 SF is entirely defined in [RFC8480]. This specification complements 108 [RFC8480] by providing the rules of when to add/delete cells in the 109 communication schedule. This specification satisfies all the 110 requirements for an SF listed in Section 4.2 of [RFC8480]. 112 MSF builds on top of the following specifications: the Minimal IPv6 113 over the TSCH Mode of IEEE 802.15.4e (6TiSCH) Configuration 114 [RFC8180], the 6TiSCH Operation Sublayer Protocol (6P) [RFC8480], and 115 the Minimal Security Framework for 6TiSCH 116 [I-D.ietf-6tisch-minimal-security]. 118 MSF defines both the behavior of a node when joining the network, and 119 how the communication schedule is managed in a distributed fashion. 120 When a node running MSF boots up, it joins the network by following 121 the 6 steps described in Section 4. The end state of the join 122 process is that the node is synchronized to the network, has mutually 123 authenticated with the network, has identified a routing parent, and 124 has scheduled one negotiated Tx cell (defined in Section 5.1) to/from 125 its routing parent. After the join process, the node can 126 continuously add/delete/relocate cells, as described in Section 5. 127 It does so for 3 reasons: to match the link-layer resources to the 128 traffic, to handle changing parent and to handle a schedule 129 collision. 131 MSF works closely with the IPv6 Routing Protocol for Low-Power and 132 Lossy Networks (RPL), specifically the routing parent defined in 133 [RFC6550]. This specification only describes how MSF works with the 134 selected routing parent, which is phrased as "selected parent". The 135 activity of MSF towards the single routing parent is called a "MSF 136 session". Though the performance of MSF is evaluated only when the 137 "selected parent" represents the node's preferred parent, there 138 should be no restrictions to use multiple MSF sessions, one per 139 parent. The distribution of traffic over multiple parents is a 140 routing decision that is out of scope for MSF. 142 MSF is designed to operate in a wide range of application domains. 143 It is optimized for applications with regular upstream traffic, from 144 the nodes to the Destination-Oriented Directed Acyclic Graph (DODAG 145 [RFC6550]) root. 147 This specification follows the recommended structure of an SF 148 specification, given in Appendix A of [RFC8480], with the following 149 adaptations: 151 * We have reordered some sections, in particular to have the section 152 on the node behavior at boot (Section 4) appear early in this 153 specification. 154 * We added sections on the interface to the minimal 6TiSCH 155 configuration (Section 2), the use of the SIGNAL command 156 (Section 6), the MSF constants (Section 14) and the MSF statistics 157 (Section 15). 159 2. Interface to the Minimal 6TiSCH Configuration 161 In a TSCH network, time is sliced up into time slots. The time slots 162 are grouped as one or multiple slotframes which repeat over time. 163 The TSCH schedule instructs a node what to do at each time slots, 164 such as transmit, receive or sleep [RFC7554]. In case of a slot to 165 transmit or receive, a channel is assigned to the time slot. The 166 tuple (slot, channel) is indicated as a cell of TSCH schedule. MSF 167 is one of the policies defining how to manage the TSCH schedule. 169 A node implementing MSF SHOULD implement the Minimal 6TiSCH 170 Configuration [RFC8180], which defines the "minimal cell", a single 171 shared cell providing minimal connectivity between the nodes in the 172 network. The MSF implementation provided in this specification is 173 based on the implementation of the Minimal 6TiSCH Configuration. 174 However, an implementor MAY implement MSF based on other 175 specifications as long as the specification defines a way to 176 advertise the EB/DIO among the network. 178 MSF uses the minimal cell for broadcast frames such as Enhanced 179 Beacons (EBs) [IEEE802154] and broadcast DODAG Information Objects 180 (DIOs) [RFC6550]. Cells scheduled by MSF are meant to be used only 181 for unicast frames. 183 To ensure there is enough bandwidth available on the minimal cell, a 184 node implementing MSF SHOULD enforce some rules for limiting the 185 traffic of broadcast frames. For example, the overall broadcast 186 traffic among the node and its neighbors SHOULD NOT exceed 1/3 of the 187 bandwidth of minimal cell. One of the algorithms that fulfills this 188 requirement is the Trickle timer defined in [RFC6206] which is 189 applied on DIO messages [RFC6550]. However, any such algorithm of 190 limiting the broadcast traffic to meet those rules is implementation- 191 specific and is out of the scope of MSF. 193 3 slotframes are used in MSF. MSF schedules autonomous cells at 194 Slotframe 1 (Section 3) and 6P negotiated cells at Slotframe 2 195 (Section 5) ,wh ile Slotframe 0 is used for the bootstrap traffic as 196 defined in the Minimal 6TiSCH Configuration. The same slotframe 197 length for Slotframe 0, 1 and 2 is RECOMMENDED. Thus it is possible 198 to avoid the scheduling collision between the autonomous cells and 6P 199 negotiated cells (Section 3). The default slotframe length 200 (SLOTFRAME_LENGTH) is RECOMMENDED for Slotframe 0, 1 and 2, although 201 any value can be advertised in the EBs. 203 3. Autonomous Cells 205 MSF nodes initialize Slotframe 1 with a set of default cells for 206 unicast communication with their neighbors. These cells are called 207 'autonomous cells', because they are maintained autonomously by each 208 node without negotiation through 6P. Cells scheduled by 6P 209 transaction are called 'negotiated cells' which are reserved on 210 Slotframe 2. How to schedule negotiated cells is detailed in 211 Section 5. There are two types of autonomous cells: 213 * Autonomous Rx Cell (AutoRxCell), one cell at a 214 [slotOffset,channelOffset] computed as a hash of the EUI64 of the 215 node itself (detailed next). Its cell options bits are assigned 216 as TX=0, RX=1, SHARED=0. 217 * Autonomous Tx Cell (AutoTxCell), one cell at a 218 [slotOffset,channelOffset] computed as a hash of the layer 2 EUI64 219 destination address in the unicast frame to be transmitted 220 (detailed in Section 4.4). Its cell options bits are assigned as 221 TX=1, RX=0, SHARED=1. 223 To compute a [slotOffset,channelOffset] from an EUI64 address, nodes 224 MUST use the hash function SAX as defined in Section 2 of 225 [SAX-DASFAA] with consistent input parameters, for example, those 226 defined in Appendix A. The coordinates are computed to distribute 227 the cells across all channel offsets, and all but the first slot 228 offset of Slotframe 1. The first time offset is skipped to avoid 229 colliding with the minimal cell in Slotframe 0. The slot coordinates 230 derived from a given EUI64 address are computed as follows: 232 * slotOffset(MAC) = 1 + hash(EUI64, length(Slotframe_1) - 1) 233 * channelOffset(MAC) = hash(EUI64, NUM_CH_OFFSET) 235 The second input parameter defines the maximum return value of the 236 hash function. Other optional parameters defined in SAX determine 237 the performance of SAX hash function. Those parameters could be 238 broadcasted in EB frame or pre-configured. For interoperability 239 purposes, the values of those parameters can be referred from 240 Appendix A. 242 AutoTxCell is not permanently installed in the schedule but added/ 243 deleted on demand when there is a frame to sent. Throughout the 244 network lifetime, nodes maintain the autonomous cells as follows: 246 * Add an AutoTxCell to the layer 2 destination address which is 247 indicated in a frame when there is no 6P negotiated Tx cell in 248 schedule for that frame to transmit. 249 * Remove an AutoTxCell when: 250 - there is no frame to transmit on that cell, or 251 - there is at least one 6P negotiated Tx cell in the schedule for 252 the frames to transmit. 254 The AutoRxCell MUST always remain scheduled after synchronization. 255 6P CLEAR MUST NOT erase any autonomous cells. 257 Because of hash collisions, there will be cases that the AutoTxCell 258 and AutoRxCell are scheduled at the same slot offset and/or channel 259 offset. In such cases, AutoTxCell always take precedence over 260 AutoRxCell. In case of conflicting with a negotiated cell, 261 autonomous cells take precedence over negotiated cell, which is 262 stated in [IEEE802154]. However, when the Slotframe 0, 1 and 2 use 263 the same length value, it is possible for negotiated cell to avoid 264 the collision with AutoRxCell. Hence, the same slotframe length for 265 Slotframe 0, 1 and 2 is RECOMMENDED. 267 4. Node Behavior at Boot 269 This section details the behavior the node SHOULD follow from the 270 moment it is switched on, until it has successfully joined the 271 network. Alternative behaviors may be involved, for example, when 272 alternative security solutions are used for the network. Section 4.1 273 details the start state; Section 4.8 details the end state. The 274 other sections detail the 6 steps of the joining process. We use the 275 term "pledge" and "joined node", as defined in 276 [I-D.ietf-6tisch-minimal-security]. 278 4.1. Start State 280 A node implementing MSF SHOULD implement the Constrained Join 281 Protocol (CoJP) for 6TiSCH [I-D.ietf-6tisch-minimal-security]. As a 282 corollary, this means that a pledge, before being switched on, may be 283 pre-configured with the Pre-Shared Key (PSK) for joining, as well as 284 any other configuration detailed in 285 ([I-D.ietf-6tisch-minimal-security]). This is not necessary if the 286 node implements a security solution not based on PSKs, such as 287 ([I-D.ietf-6tisch-dtsecurity-zerotouch-join]). 289 4.2. Step 1 - Choosing Frequency 291 When switched on, the pledge randomly chooses a frequency from the 292 channels that the network cycles amongst, and starts listening for 293 EBs on that frequency. 295 4.3. Step 2 - Receiving EBs 297 Upon receiving the first EB, the pledge continue listening for 298 additional EBs to learn: 300 1. the number of neighbors N in its vicinity 301 2. which neighbor to choose as a Join Proxy (JP) for the joining 302 process 304 After having received the first EB, a node MAY keep listening for at 305 most MAX_EB_DELAY seconds or until it has received EBs from 306 NUM_NEIGHBOURS_TO_WAIT distinct neighbors. This behavior is defined 307 in [RFC8180]. 309 During this step, the pledge only gets synchronized when it received 310 enough EB from the network it wishes to join. How to decide whether 311 an EB originates from a node from the network it wishes to join is 312 implementation-specific, but MAY involve filtering EBs by the PAN ID 313 field it contains, the presence and contents of the IE defined in 314 [I-D.ietf-6tisch-enrollment-enhanced-beacon], or the key used to 315 authenticate it. 317 The decision of which neighbor to use as a JP is implementation- 318 specific, and discussed in [I-D.ietf-6tisch-minimal-security]. 320 4.4. Step 3 - Setting up Autonomous Cells for the Join Process 322 After selected a JP, a node generates a Join Request and installs an 323 AutoTxCell to the JP. The Join Request is then sent by the pledge to 324 its selected JP over the AutoTxCell. The AutoTxCell is removed by 325 the pledge when the Join Request is sent out. The JP receives the 326 Join Request through its AutoRxCell. Then it forwards the Join 327 Request to the join registrar/coordinator (JRC), possibly over 328 multiple hops, over the 6P negotiated Tx cells. Similarly, the JRC 329 sends the Join Response to the JP, possibly over multiple hops, over 330 AutoTxCells or the 6P negotiated Tx cells. When the JP received the 331 Join Response from the JRC, it installs an AutoTxCell to the pledge 332 and sends that Join Response to the pledge over AutoTxCell. The 333 AutoTxCell is removed by the JP when the Join Response is sent out. 334 The pledge receives the Join Response from its AutoRxCell, thereby 335 learns the keying material used in the network, as well as other 336 configuration settings, and becomes a "joined node". 338 When 6LoWPAN Neighbor Discovery ([RFC8505]) (ND) is implemented, the 339 unicast packets used by ND are sent on the AutoTxCell. The specific 340 process how the ND works during the Join process is detailed in 341 [I-D.ietf-6tisch-architecture]. 343 4.5. Step 4 - Acquiring a RPL Rank 345 Per [RFC6550], the joined node receives DIOs, computes its own Rank, 346 and selects a routing parent. 348 4.6. Step 5 - Setting up first Tx negotiated Cells 350 Once it has selected a routing parent, the joined node MUST generate 351 a 6P ADD Request and install an AutoTxCell to that parent. The 6P 352 ADD Request is sent out through the AutoTxCell, containing the 353 following fields: 355 * CellOptions: set to TX=1,RX=0,SHARED=0 356 * NumCells: set to 1 357 * CellList: at least 5 cells, chosen according to Section 8 359 The joined node removes the AutoTxCell to the selected parent when 360 the 6P Request is sent out. That parent receives the 6P ADD Request 361 from its AutoRxCell. Then it generates a 6P ADD Response and 362 installs an AutoTxCell to the joined node. When the parent sends out 363 the 6P ADD Response, it MUST remove that AutoTxCell. The joined node 364 receives the 6P ADD Response from its AutoRxCell and completes the 6P 365 transaction. In case the 6P ADD transaction failed, the node MUST 366 issue another 6P ADD Request and repeat until the Tx cell is 367 installed to the parent. 369 4.7. Step 6 - Send EBs and DIOs 371 The node starts sending EBs and DIOs on the minimal cell, while 372 following the transmit rules for broadcast frames from Section 2. 374 4.8. End State 376 For a new node, the end state of the joining process is: 378 * it is synchronized to the network 379 * it is using the link-layer keying material it learned through the 380 secure joining process 381 * it has selected one neighbor as its routing parent 382 * it has one AutRxCell 383 * it has one negotiated Tx cell to the selected parent 384 * it starts to send DIOs, potentially serving as a router for other 385 nodes' traffic 387 * it starts to send EBs, potentially serving as a JP for new pledge 389 5. Rules for Adding/Deleting Cells 391 Once a node has joined the 6TiSCH network, it adds/deletes/relocates 392 cells with the selected parent for three reasons: 394 * to match the link-layer resources to the traffic between the node 395 and the selected parent (Section 5.1) 396 * to handle switching parent or(Section 5.2) 397 * to handle a schedule collision (Section 5.3) 399 Those cells are called 'negotiated cells' as they are scheduled 400 through 6P, negotiated with the node's parent. Without specific 401 declaring, all cells mentioned in this section are negotiated cells 402 and they are installed at Slotframe 2. 404 5.1. Adapting to Traffic 406 A node implementing MSF MUST implement the behavior described in this 407 section. 409 The goal of MSF is to manage the communication schedule in the 6TiSCH 410 schedule in a distributed manner. For a node, this translates into 411 monitoring the current usage of the cells it has to one of its 412 neighbors, most cases to the selected parent. 414 * If the node determines that the number of link-layer frames it is 415 attempting to exchange with the selected parent per unit of time 416 is larger than the capacity offered by the TSCH negotiated cells 417 it has scheduled with it, the node issues a 6P ADD command to that 418 parent to add cells to the TSCH schedule. 419 * If the traffic is lower than the capacity, the node issues a 6P 420 DELETE command to that parent to delete cells from the TSCH 421 schedule. 423 The node MUST maintain two separate pairs of the following counters 424 for the selected parent, one for the negotiated Tx cells to that 425 parent and one for the negotiated Rx cells to that parent. 427 NumCellsElapsed : Counts the number of negotiated cells that have 428 elapsed since the counter was initialized. This counter is 429 initialized at 0. When the current cell is declared as a 430 negotiated cell to the selected parent, NumCellsElapsed is 431 incremented by exactly 1, regardless of whether the cell is used 432 to transmit/receive a frame. 433 NumCellsUsed: Counts the number of negotiated cells that have been 434 used. This counter is initialized at 0. NumCellsUsed is 435 incremented by exactly 1 when, during a negotiated cell to the 436 selected parent, either of the following happens: 437 * The node sends a frame to the parent. The counter increments 438 regardless of whether a link-layer acknowledgment was received 439 or not. 440 * The node receives a valid frame from the parent. The counter 441 increments only when the frame is a valid IEEE802.15.4 frame. 443 The cell option of cells listed in CellList in 6P Request frame 444 SHOULD be either (Tx=1, Rx=0) only or (Tx=0, Rx=1) only. Both 445 NumCellsElapsed and NumCellsUsed counters can be used to both type of 446 negotiated cells. 448 As there is no negotiated Rx Cell installed at initial time, the 449 AutoRxCell is taken into account as well for downstream traffic 450 adaptation. In this case: 452 * NumCellsElapsed is incremented by exactly 1 when the current cell 453 is AutoRxCell. 454 * NumCellsUsed is incremented by exactly 1 when the node receives a 455 frame from the selected parent on AutoRxCell. 457 Implementors MAY choose to create the same counters for each 458 neighbor, and add them as additional statistics in the neighbor 459 table. 461 The counters are used as follows: 463 1. Both NumCellsElapsed and NumCellsUsed are initialized to 0 when 464 the node boots. 465 2. When the value of NumCellsElapsed reaches MAX_NUM_CELLS: 466 * If NumCellsUsed > LIM_NUMCELLSUSED_HIGH, trigger 6P to add a 467 single cell to the selected parent 468 * If NumCellsUsed < LIM_NUMCELLSUSED_LOW, trigger 6P to remove a 469 single cell to the selected parent 470 * Reset both NumCellsElapsed and NumCellsUsed to 0 and go to 471 step 2. 473 The value of MAX_NUM_CELLS is chosen according to the traffic type of 474 the network. Generally speaking, the larger the value MAX_NUM_CELLS 475 is, the more accurate the cell usage is calculated. The 6P traffic 476 overhead using a larger value of MAX_NUM_CELLS could be reduced as 477 well. Meanwhile, the latency won't increase much by using a larger 478 value of MAX_NUM_CELLS for periodic traffic type. For burst traffic 479 type, larger value of MAX_NUM_CELLS indeed introduces higher latency. 480 The latency caused by slight changes of traffic load can be absolved 481 by the additional scheduled cells. In this sense, MSF is a 482 scheduling function trading latency with energy by scheduling more 483 cells than needed. It is recommended to set MAX_NUM_CELLS value at 484 least 4x of the maximum number of used cells in a slot frame in 485 recent history. For example, a 2 packets/slotframe traffic load 486 results an average 4 cells scheduled (2 cells are used), using at 487 least the value of double number of scheduled cells (which is 8) as 488 MAX_NUM_CELLS gives a good resolution on cell usage calculation. 490 In case that a node booted or disappeared from the network, the cell 491 reserved at the selected parent may be kept in the schedule forever. 492 A clean-up mechanism MUST be provided to resolve this issue. The 493 clean-up mechanism is implementation-specific. The goal is to 494 confirm those negotiated cells are not used anymore by the associated 495 neighbors and remove them from the schedule. 497 5.2. Switching Parent 499 A node implementing MSF SHOULD implement the behavior described in 500 this section. 502 Part of its normal operation, the RPL routing protocol can have a 503 node switch parent. The procedure for switching from the old parent 504 to the new parent is: 506 1. the node counts the number of negotiated cells it has per 507 slotframe to the old parent 508 2. the node triggers one or more 6P ADD commands to schedule the 509 same number of negotiated cells with same cell options to the new 510 parent 511 3. when that successfully completes, the node issues a 6P CLEAR 512 command to its old parent 514 For what type of negotiated cell should be installed first, it 515 depends on which traffic has the higher priority, upstream or 516 downstream, which is application-specific and out-of-scope of MSF. 518 5.3. Handling Schedule Collisions 520 A node implementing MSF SHOULD implement the behavior described in 521 this section. Other schedule collisions handling algorithm can be an 522 alternative of the algorithm proposed in this section. 524 Since scheduling is entirely distributed, there is a non-zero 525 probability that two pairs of nearby neighbor nodes schedule a 526 negotiated cell at the same [slotOffset,channelOffset] location in 527 the TSCH schedule. In that case, data exchanged by the two pairs may 528 collide on that cell. We call this case a "schedule collision". 530 The node MUST maintain the following counters for each negotiated Tx 531 cell to the selected parent: 533 NumTx: Counts the number of transmission attempts on that cell. 534 Each time the node attempts to transmit a frame on that cell, 535 NumTx is incremented by exactly 1. 536 NumTxAck: Counts the number of successful transmission attempts on 537 that cell. Each time the node receives an acknowledgment for a 538 transmission attempt, NumTxAck is incremented by exactly 1. 540 Since both NumTx and NumTxAck are initialized to 0, we necessarily 541 have NumTxAck <= NumTx. We call Packet Delivery Ratio (PDR) the 542 ratio NumTxAck/NumTx; and represent it as a percentage. A cell with 543 PDR=50% means that half of the frames transmitted are not 544 acknowledged. 546 Each time the node switches parent (or during the join process when 547 the node selects a parent for the first time), both NumTx and 548 NumTxAck MUST be reset to 0. They increment over time, as the 549 schedule is executed and the node sends frames to that parent. When 550 NumTx reaches MAX_NUMTX, both NumTx and NumTxAck MUST be divided by 551 2. MAX_NUMTX needs to be a power of two to avoid division error. 552 For example, when MAX_NUMTX is set to 256, from NumTx=255 and 553 NumTxAck=127, the counters become NumTx=128 and NumTxAck=64 if one 554 frame is sent to the parent with an Acknowledgment received. This 555 operation does not change the value of the PDR, but allows the 556 counters to keep incrementing. The value of MAX_NUMTX is 557 implementation-specific. 559 The key for detecting a schedule collision is that, if a node has 560 several cells to the selected parent, all cells should exhibit the 561 same PDR. A cell which exhibits a PDR significantly lower than the 562 others indicates than there are collisions on that cell. 564 Every HOUSEKEEPINGCOLLISION_PERIOD, the node executes the following 565 steps: 567 1. It computes, for each negotiated Tx cell with the parent (not for 568 the autonomous cell), that cell's PDR. 569 2. Any cell that hasn't yet had NumTx divided by 2 since it was last 570 reset is skipped in steps 3 and 4. This avoids triggering cell 571 relocation when the values of NumTx and NumTxAck are not 572 statistically significant yet. 573 3. It identifies the cell with the highest PDR. 574 4. For any other cell, it compares its PDR against that of the cell 575 with the highest PDR. If the subtraction difference between the 576 PDR of the cell and the highest PDR is larger than 577 RELOCATE_PDRTHRES, it triggers the relocation of that cell using 578 a 6P RELOCATE command. 580 The RELOCATION for negotiated Rx cells is not supported by MSF. 582 6. 6P SIGNAL command 584 The 6P SIGNAL command is not used by MSF. 586 7. Scheduling Function Identifier 588 The Scheduling Function Identifier (SFID) of MSF is 589 IANA_6TISCH_SFID_MSF. How the value of IANA_6TISCH_SFID_MSF is 590 chosen is described in Section 17. 592 8. Rules for CellList 594 MSF uses 2-step 6P Transactions exclusively. 6P transactions are 595 only initiated by a node towards its parent. As a result, the cells 596 to put in the CellList of a 6P ADD command, and in the candidate 597 CellList of a RELOCATE command, are chosen by the node initiating the 598 6P transaction. In both cases, the same rules apply: 600 * The CellList is RECOMMENDED to have 5 or more cells. 601 * Each cell in the CellList MUST have a different slotOffset value. 602 * For each cell in the CellList, the node MUST NOT have any 603 scheduled cell on the same slotOffset. 604 * The slotOffset value of any cell in the CellList MUST NOT be the 605 same as the slotOffset of the minimal cell (slotOffset=0). 606 * The slotOffset of a cell in the CellList SHOULD be randomly and 607 uniformly chosen among all the slotOffset values that satisfy the 608 restrictions above. 609 * The channelOffset of a cell in the CellList SHOULD be randomly and 610 uniformly chosen in [0..numFrequencies], where numFrequencies 611 represents the number of frequencies a node can communicate on. 613 As a consequence of randomly cell selection, there is a non-zero 614 chance that nodes in the vicinity installed cells with same 615 slotOffset and channelOffset. An implementer MAY implement a 616 strategy to monitor the candidate cells before adding them in 617 CellList to avoid collision. For example, a node MAY maintain a 618 candidate cell pool for the CellList. The candidate cells in the 619 pool are pre-configured as Rx cells to promiscuously listen to detect 620 transmissions on those cells. If IEEE802.15.4 transmissions are 621 observed on one cell over multiple iterations of the schedule, that 622 cell is probably used by a TSCH neighbor. It is moved out from the 623 pool and a new cell is selected as a candidate cell. The cells in 624 CellList are picked from the candidate pool directly when required. 626 9. 6P Timeout Value 628 The timeout value is calculated for the worst case that a 6P response 629 is received, which means the 6P response is sent out successfully at 630 the very latest retransmission. And for each retransmission, it 631 backs-off with largest value. Hence the 6P timeout value is 632 calculated as ((2^MAXBE)-1)*MAXRETRIES*SLOTFRAME_LENGTH, where: 634 * MAXBE, defined in IEEE802.15.4, is the maximum backoff exponent 635 used 636 * MAXRETRIES, define din IEEE802.15.4, is the maximum retransmission 637 times 638 * SLOTFRAME_LENGTH represents the length of slotframe 640 10. Rule for Ordering Cells 642 Cells are ordered slotOffset first, channelOffset second. 644 The following sequence is correctly ordered (each element represents 645 the [slottOffset,channelOffset] of a cell in the schedule): 647 [1,3],[1,4],[2,0],[5,3],[6,0],[6,3],[7,9] 649 11. Meaning of the Metadata Field 651 The Metadata field is not used by MSF. 653 12. 6P Error Handling 655 Section 6.2.4 of [RFC8480] lists the 6P Return Codes. Figure 1 lists 656 the same error codes, and the behavior a node implementing MSF SHOULD 657 follow. 659 +-----------------+----------------------+ 660 | Code | RECOMMENDED behavior | 661 +-----------------+----------------------+ 662 | RC_SUCCESS | nothing | 663 | RC_EOL | nothing | 664 | RC_ERR | quarantine | 665 | RC_RESET | quarantine | 666 | RC_ERR_VERSION | quarantine | 667 | RC_ERR_SFID | quarantine | 668 | RC_ERR_SEQNUM | clear | 669 | RC_ERR_CELLLIST | clear | 670 | RC_ERR_BUSY | waitretry | 671 | RC_ERR_LOCKED | waitretry | 672 +-----------------+----------------------+ 673 Figure 1: Recommended behavior for each 6P Error Code. 675 The meaning of each behavior from Figure 1 is: 677 nothing: Indicates that this Return Code is not an error. No error 678 handling behavior is triggered. 679 clear: Abort the 6P Transaction. Issue a 6P CLEAR command to that 680 neighbor (this command may fail at the link layer). Remove all 681 cells scheduled with that neighbor from the local schedule. 682 quarantine: Same behavior as for "clear". In addition, remove the 683 node from the neighbor and routing tables. Place the node's 684 identifier in a quarantine list for QUARANTINE_DURATION. When in 685 quarantine, drop all frames received from that node. 686 waitretry: Abort the 6P Transaction. Wait for a duration randomly 687 and uniformly chosen in [WAIT_DURATION_MIN,WAIT_DURATION_MAX]. 688 Retry the same transaction. 690 13. Schedule Inconsistency Handling 692 The behavior when schedule inconsistency is detected is explained in 693 Figure 1, for 6P Return Code RC_ERR_SEQNUM. 695 14. MSF Constants 697 Figure 2 lists MSF Constants and their RECOMMENDED values. 699 +------------------------------+-------------------+ 700 | Name | RECOMMENDED value | 701 +------------------------------+-------------------+ 702 | SLOTFRAME_LENGTH | 101 slots | 703 | NUM_CH_OFFSET | 16 | 704 | MAX_NUM_CELLS | 100 | 705 | LIM_NUMCELLSUSED_HIGH | 75 | 706 | LIM_NUMCELLSUSED_LOW | 25 | 707 | MAX_NUMTX | 256 | 708 | HOUSEKEEPINGCOLLISION_PERIOD | 1 min | 709 | RELOCATE_PDRTHRES | 50 % | 710 | QUARANTINE_DURATION | 5 min | 711 | WAIT_DURATION_MIN | 30 s | 712 | WAIT_DURATION_MAX | 60 s | 713 +------------------------------+-------------------+ 715 Figure 2: MSF Constants and their RECOMMENDED values. 717 15. MSF Statistics 719 Figure 3 lists MSF Statistics and their RECOMMENDED width. 721 +-----------------+-------------------+ 722 | Name | RECOMMENDED width | 723 +-----------------+-------------------+ 724 | NumCellsElapsed | 1 byte | 725 | NumCellsUsed | 1 byte | 726 | NumTx | 1 byte | 727 | NumTxAck | 1 byte | 728 +-----------------+-------------------+ 730 Figure 3: MSF Statistics and their RECOMMENDED width. 732 16. Security Considerations 734 MSF defines a series of "rules" for the node to follow. It triggers 735 several actions, that are carried out by the protocols defined in the 736 following specifications: the Minimal IPv6 over the TSCH Mode of IEEE 737 802.15.4e (6TiSCH) Configuration [RFC8180], the 6TiSCH Operation 738 Sublayer Protocol (6P) [RFC8480], and the Constrained Join Protocol 739 (CoJP) for 6TiSCH [I-D.ietf-6tisch-minimal-security]. The security 740 considrations of the specifications continue to apply in the MSF 741 scope. In particular, MSF does not define a new protocol or packet 742 format. 744 MSF uses autonomous cells for initial bootstrap and the transport of 745 join traffic. Autonomous cells are computed as a hash of nodes' 746 EUI64 addresses. This makes the coordinates of autonomous cell an 747 easy target for an attacker, as EUI64 addresses are visible on the 748 wire and are not encrypted by the link-layer security mechanism. 749 With the coordinates of autonomous cells available, the attacker can 750 launch a selective jamming attack against any nodes' AutoRxCell. If 751 the attacker targets a node acting as a JP, it can prevent pledges 752 from using that JP to join the network. The pledge detects such a 753 situation through the absence of a link-layer acknowledgment for its 754 Join Request. As it is expected that each pledge will have more than 755 one JP available to join the network, one available countermeasure 756 for the pledge is to pseudo-randomly select a new JP when the link to 757 the previous JP appears bad. Such strategy alleviates the issue of 758 the attacker randomly jamming to disturb the network but does not 759 help in case the attacker is targeting a particular pledge. In that 760 case, the attacker can jam the AutoRxCell of the pledge, in order to 761 prevent it from receiving the join response. This situation should 762 be detected through the absence of a particular node from the network 763 and handled by the network administrator through out-of-band means. 765 MSF adapts to traffic containing packets from the IP layer. It is 766 possible that the IP packet has a non-zero DSCP (Diffserv Code Point 767 [RFC2474]) value in its IPv6 header. The decision how to hand that 768 packet belongs to the upper layer and is out of scope of MSF. As 769 long as the decision is made to hand over to MAC layer to transmit, 770 MSF will take that packet into account when adapting to traffic. 772 Note that non-zero DSCP value may imply that the traffic is 773 originated at unauthenticated pledges, referring to 774 [I-D.ietf-6tisch-minimal-security]. The implementation at IPv6 layer 775 SHOULD rate-limit this join traffic before it is passed to 6top 776 sublayer where MSF can observe it. In case there is no rate limit 777 for join traffic, intermediate nodes in the 6TiSCH network may be 778 prone to a resource exhaustion attack, with the attacker injecting 779 unauthenticated traffic from the network edge. The assumption is 780 that the rate limiting function is aware of the available bandwidth 781 in the 6top L3 bundle(s) towards a next hop, not directly from MSF, 782 but from an interaction with the 6top sublayer that manages 783 ultimately the bundles under MSF's guidance. How this rate-limit is 784 implemented is out of scope of MSF. 786 17. IANA Considerations 788 17.1. MSF Scheduling Function Identifiers 790 This document adds the following number to the "6P Scheduling 791 Function Identifiers" sub-registry, part of the "IPv6 over the TSCH 792 mode of IEEE 802.15.4e (6TiSCH) parameters" registry, as defined by 793 [RFC8480]: 795 +----------------------+-----------------------------+-------------+ 796 | SFID | Name | Reference | 797 +----------------------+-----------------------------+-------------+ 798 | IANA_6TISCH_SFID_MSF | Minimal Scheduling Function | RFC_THIS | 799 | | (MSF) | | 800 +----------------------+-----------------------------+-------------+ 802 Figure 4: New SFID in 6P Scheduling Function Identifiers subregistry. 804 IANA_6TISCH_SFID_MSF is chosen from range 0-127, which is used for 805 IETF Review or IESG Approval. 807 18. Contributors 809 * Beshr Al Nahas (Chalmers University, beshr@chalmers.se) 810 * Olaf Landsiedel (Chalmers University, olafl@chalmers.se) 811 * Yasuyuki Tanaka (Inria-Paris, yasuyuki.tanaka@inria.fr) 813 19. References 815 19.1. Normative References 817 [RFC8180] Vilajosana, X., Ed., Pister, K., and T. Watteyne, "Minimal 818 IPv6 over the TSCH Mode of IEEE 802.15.4e (6TiSCH) 819 Configuration", BCP 210, RFC 8180, DOI 10.17487/RFC8180, 820 May 2017, . 822 [RFC8480] Wang, Q., Ed., Vilajosana, X., and T. Watteyne, "6TiSCH 823 Operation Sublayer (6top) Protocol (6P)", RFC 8480, 824 DOI 10.17487/RFC8480, November 2018, 825 . 827 [RFC6550] Winter, T., Ed., Thubert, P., Ed., Brandt, A., Hui, J., 828 Kelsey, R., Levis, P., Pister, K., Struik, R., Vasseur, 829 JP., and R. Alexander, "RPL: IPv6 Routing Protocol for 830 Low-Power and Lossy Networks", RFC 6550, 831 DOI 10.17487/RFC6550, March 2012, 832 . 834 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 835 Requirement Levels", BCP 14, RFC 2119, 836 DOI 10.17487/RFC2119, March 1997, 837 . 839 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 840 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 841 May 2017, . 843 [RFC2474] Nichols, K., Blake, S., Baker, F., and D. Black, 844 "Definition of the Differentiated Services Field (DS 845 Field) in the IPv4 and IPv6 Headers", RFC 2474, 846 DOI 10.17487/RFC2474, December 1998, 847 . 849 [I-D.ietf-6tisch-minimal-security] 850 Vucinic, M., Simon, J., Pister, K., and M. Richardson, 851 "Minimal Security Framework for 6TiSCH", Work in Progress, 852 Internet-Draft, draft-ietf-6tisch-minimal-security-13, 28 853 October 2019, . 856 [I-D.ietf-6tisch-enrollment-enhanced-beacon] 857 Dujovne, D. and M. Richardson, "IEEE 802.15.4 Information 858 Element encapsulation of 6TiSCH Join and Enrollment 859 Information", Work in Progress, Internet-Draft, draft- 860 ietf-6tisch-enrollment-enhanced-beacon-06, 4 November 861 2019, . 864 [I-D.ietf-6tisch-architecture] 865 Thubert, P., "An Architecture for IPv6 over the TSCH mode 866 of IEEE 802.15.4", Work in Progress, Internet-Draft, 867 draft-ietf-6tisch-architecture-28, 29 October 2019, 868 . 871 [IEEE802154] 872 IEEE standard for Information Technology, "IEEE Std 873 802.15.4 Standard for Low-Rate Wireless Personal Area 874 Networks (WPANs)", DOI 10.1109/IEEE P802.15.4-REVd/D01, 875 . 877 [SAX-DASFAA] 878 Ramakrishna, M.V. and J. Zobel, "Performance in Practice 879 of String Hashing Functions", DASFAA , 880 DOI 10.1142/9789812819536_0023, 1997, 881 . 883 19.2. Informative References 885 [RFC7554] Watteyne, T., Ed., Palattella, M., and L. Grieco, "Using 886 IEEE 802.15.4e Time-Slotted Channel Hopping (TSCH) in the 887 Internet of Things (IoT): Problem Statement", RFC 7554, 888 DOI 10.17487/RFC7554, May 2015, 889 . 891 [I-D.ietf-6tisch-dtsecurity-zerotouch-join] 892 Richardson, M., "6tisch Zero-Touch Secure Join protocol", 893 Work in Progress, Internet-Draft, draft-ietf-6tisch- 894 dtsecurity-zerotouch-join-04, 8 July 2019, 895 . 898 [RFC6206] Levis, P., Clausen, T., Hui, J., Gnawali, O., and J. Ko, 899 "The Trickle Algorithm", RFC 6206, DOI 10.17487/RFC6206, 900 March 2011, . 902 [RFC8505] Thubert, P., Ed., Nordmark, E., Chakrabarti, S., and C. 903 Perkins, "Registration Extensions for IPv6 over Low-Power 904 Wireless Personal Area Network (6LoWPAN) Neighbor 905 Discovery", RFC 8505, DOI 10.17487/RFC8505, November 2018, 906 . 908 Appendix A. Example of Implementation of SAX hash function 910 Considering the interoperability, this section provides an example of 911 implemention SAX hash function [SAX-DASFAA]. The input parameters of 912 the function are: 914 * T, which is the hashing table length 915 * c, which is the characters of string s, to be hashed 917 In MSF, the T is replaced by the length of slotframe 1. String s is 918 replaced by the mote EUI64 address. The characters of the string c0, 919 c1, ..., c7 are the 8 bytes of EUI64 address. 921 The SAX hash function requires shift operation which is defined as 922 follow: 924 * L_shift(v,b), which refers to left shift variable v by b bits 925 * R_shift(v,b), which refers to right shift variable v by b bits 927 The steps to calculate the hash value of SAX hash function are: 929 1. initialize variable h to h0 and variable i to 0, where h is the 930 intermediate hash value and i is the index of the bytes of EUI64 931 address 932 2. sum the value of L_shift(h,l_bit), R_shift(h,r_bit) and ci 933 3. calculate the result of exclusive or between the sum value in 934 Step 2 and h 935 4. modulo the result of Step 3 by T 936 5. assign the result of Step 4 to h 937 6. increase i by 1 938 7. repeat Step2 to Step 6 until i reaches to 8 940 The value of variable h is the hash value of SAX hash function. 942 The values of h0, l_bit and r_bit in Step 1 and 2 are configured as: 944 * h0 = 0 945 * l_bit = 0 946 * r_bit = 1 948 The appropriate values of l_bit and r_bit could vary depending on the 949 the set of motes' EUI64 address. How to find those values is out of 950 the scope of this specification. 952 Authors' Addresses 954 Tengfei Chang (editor) 955 Inria 956 2 rue Simone Iff 957 75012 Paris 958 France 960 Email: tengfei.chang@inria.fr 962 Malisa Vucinic 963 Inria 964 2 rue Simone Iff 965 75012 Paris 966 France 968 Email: malisa.vucinic@inria.fr 970 Xavier Vilajosana 971 Universitat Oberta de Catalunya 972 156 Rambla Poblenou 973 08018 Barcelona Catalonia 974 Spain 976 Email: xvilajosana@uoc.edu 978 Simon Duquennoy 979 RISE SICS 980 Isafjordsgatan 22 981 SE- 164 29 Kista 982 Sweden 984 Email: simon.duquennoy@gmail.com 986 Diego Dujovne 987 Universidad Diego Portales 988 Escuela de Informatica y Telecomunicaciones 989 Av. Ejercito 441 990 Santiago 991 Region Metropolitana 992 Chile 994 Phone: +56 (2) 676-8121 995 Email: diego.dujovne@mail.udp.cl