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