idnits 2.17.1 draft-ietf-6tisch-msf-09.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 (12 December 2019) is 1597 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 631 -- Looks like a reference, but probably isn't: '3' on line 631 -- Looks like a reference, but probably isn't: '4' on line 631 -- Looks like a reference, but probably isn't: '2' on line 631 -- Looks like a reference, but probably isn't: '0' on line 631 -- Looks like a reference, but probably isn't: '5' on line 631 -- Looks like a reference, but probably isn't: '6' on line 631 -- Looks like a reference, but probably isn't: '7' on line 631 -- Looks like a reference, but probably isn't: '9' on line 631 ** Downref: Normative reference to an Informational RFC: RFC 7554 == 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-2015' Summary: 2 errors (**), 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: 14 June 2020 X. Vilajosana 6 Universitat Oberta de Catalunya 7 S. Duquennoy 8 RISE SICS 9 D. Dujovne 10 Universidad Diego Portales 11 12 December 2019 13 6TiSCH Minimal Scheduling Function (MSF) 14 draft-ietf-6tisch-msf-09 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 14 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 . . . . . . . . . . . . . . . . . 19 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-2015] and broadcast DODAG Information 176 Objects (DIOs) [RFC6550]. Cells scheduled by MSF are meant to be 177 used only 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-2015]. However, when the Slotframe 0, 1 and 2 254 use the same length value, it is possible for negotiated cell to 255 avoid 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 the following counters for the selected parent 413 on both negotiated Tx and Rx cells: 415 NumCellsElapsed : Counts the number of negotiated cells that have 416 elapsed since the counter was initialized. This counter is 417 initialized at 0. When the current cell is declared as a 418 negotiated cell to the selected parent, NumCellsElapsed is 419 incremented by exactly 1, regardless of whether the cell is used 420 to transmit/receive a frame. 421 NumCellsUsed: Counts the number of negotiated cells that have been 422 used. This counter is initialized at 0. NumCellsUsed is 423 incremented by exactly 1 when, during a negotiated cell to the 424 selected parent, either of the following happens: 425 * The node sends a frame to the parent. The counter increments 426 regardless of whether a link-layer acknowledgment was received 427 or not. 428 * The node receives a valid frame from the parent. The counter 429 increments only when the frame is a valid IEEE802.15.4 frame. 431 The cell option of cells listed in CellList in 6P Request frame 432 SHOULD be either Tx=1 only or Rx=1 only. Both NumCellsElapsed and 433 NumCellsUsed counters can be used to both type of negotiated cells. 435 As there is no negotiated Rx Cell installed at initial time, the 436 AutoRxCell is taken into account as well for downstream traffic 437 adaptation. In this case: 439 * NumCellsElapsed is incremented by exactly 1 when the current cell 440 is AutoRxCell. 441 * NumCellsUsed is incremented by exactly 1 when the node receives a 442 frame from the selected parent on AutoRxCell. 444 Implementors MAY choose to create the same counters for each 445 neighbor, and add them as additional statistics in the neighbor 446 table. 448 The counters are used as follows: 450 1. Both NumCellsElapsed and NumCellsUsed are initialized to 0 when 451 the node boots. 452 2. When the value of NumCellsElapsed reaches MAX_NUM_CELLS: 453 * If NumCellsUsed > LIM_NUMCELLSUSED_HIGH, trigger 6P to add a 454 single cell to the selected parent 455 * If NumCellsUsed < LIM_NUMCELLSUSED_LOW, trigger 6P to remove a 456 single cell to the selected parent 457 * Reset both NumCellsElapsed and NumCellsUsed to 0 and go to 458 step 2. 460 The value of MAX_NUM_CELLS is chosen according to the traffic type of 461 the network. Generally speaking, the larger the value MAX_NUM_CELLS 462 is, the more accurate the cell usage is calculated. The 6P traffic 463 overhead using a larger value of MAX_NUM_CELLS could be reduced as 464 well. Meanwhile, the latency won't increase much by using a larger 465 value of MAX_NUM_CELLS for periodic traffic type. For burst traffic 466 type, larger value of MAX_NUM_CELLS indeed introduces higher latency. 467 The latency caused by slight changes of traffic load can be absolved 468 by the additional scheduled cells. In this sense, MSF is a 469 scheduling function trading latency with energy by scheduling more 470 cells than needed. It is recommended to set MAX_NUM_CELLS value at 471 least 4x of the maximum number of used cells in a slot frame in 472 recent history. For example, a 2 packets/slotframe traffic load 473 results an average 4 cells scheduled (2 cells are used), using at 474 least the value of double number of scheduled cells (which is 8) as 475 MAX_NUM_CELLS gives a good resolution on cell usage calculation. 477 In case that a node booted or disappeared from the network, the cell 478 reserved at the selected parent may be kept in the schedule forever. 479 A clean-up mechanism MUST be provided to resolve this issue. The 480 clean-up mechanism is implementation-specific. It could either be a 481 periodic polling to the neighbors the nodes have negotiated cells 482 with, or monitoring the activities on those cells. The goal is to 483 confirm those negotiated cells are not used anymore by the associated 484 neighbors and remove them from the schedule. 486 5.2. Switching Parent 488 A node implementing MSF SHOULD implement the behavior described in 489 this section. 491 Part of its normal operation, the RPL routing protocol can have a 492 node switch parent. The procedure for switching from the old parent 493 to the new parent is: 495 1. the node counts the number of negotiated cells it has per 496 slotframe to the old parent 497 2. the node triggers one or more 6P ADD commands to schedule the 498 same number of negotiated cells with same cell options to the new 499 parent 500 3. when that successfully completes, the node issues a 6P CLEAR 501 command to its old parent 503 For what type of negotiated cell should be installed first, it 504 depends on which traffic has the higher priority, upstream or 505 downstream, which is application-specific and out-of-scope of MSF. 507 5.3. Handling Schedule Collisions 509 A node implementing MSF SHOULD implement the behavior described in 510 this section. The "MUST" statements in this section hence only apply 511 if the node implements schedule collision handling. 513 Since scheduling is entirely distributed, there is a non-zero 514 probability that two pairs of nearby neighbor nodes schedule a 515 negotiated cell at the same [slotOffset,channelOffset] location in 516 the TSCH schedule. In that case, data exchanged by the two pairs may 517 collide on that cell. We call this case a "schedule collision". 519 The node MUST maintain the following counters for each negotiated Tx 520 cell to the selected parent: 522 NumTx: Counts the number of transmission attempts on that cell. 523 Each time the node attempts to transmit a frame on that cell, 524 NumTx is incremented by exactly 1. 525 NumTxAck: Counts the number of successful transmission attempts on 526 that cell. Each time the node receives an acknowledgment for a 527 transmission attempt, NumTxAck is incremented by exactly 1. 529 Since both NumTx and NumTxAck are initialized to 0, we necessarily 530 have NumTxAck <= NumTx. We call Packet Delivery Ratio (PDR) the 531 ratio NumTxAck/NumTx; and represent it as a percentage. A cell with 532 PDR=50% means that half of the frames transmitted are not 533 acknowledged. 535 Each time the node switches parent (or during the join process when 536 the node selects a parent for the first time), both NumTx and 537 NumTxAck MUST be reset to 0. They increment over time, as the 538 schedule is executed and the node sends frames to that parent. When 539 NumTx reaches MAX_NUMTX, both NumTx and NumTxAck MUST be divided by 540 2. For example, when MAX_NUMTX is set to 256, from NumTx=255 and 541 NumTxAck=127, the counters become NumTx=128 and NumTxAck=64 if one 542 frame is sent to the parent with an Acknowledgment received. This 543 operation does not change the value of the PDR, but allows the 544 counters to keep incrementing. The value of MAX_NUMTX is 545 implementation-specific. 547 The key for detecting a schedule collision is that, if a node has 548 several cells to the selected parent, all cells should exhibit the 549 same PDR. A cell which exhibits a PDR significantly lower than the 550 others indicates than there are collisions on that cell. 552 Every HOUSEKEEPINGCOLLISION_PERIOD, the node executes the following 553 steps: 555 1. It computes, for each negotiated Tx cell with the parent (not for 556 the autonomous cell), that cell's PDR. 557 2. Any cell that hasn't yet had NumTx divided by 2 since it was last 558 reset is skipped in steps 3 and 4. This avoids triggering cell 559 relocation when the values of NumTx and NumTxAck are not 560 statistically significant yet. 561 3. It identifies the cell with the highest PDR. 562 4. For any other cell, it compares its PDR against that of the cell 563 with the highest PDR. If the difference is larger than 564 RELOCATE_PDRTHRES, it triggers the relocation of that cell using 565 a 6P RELOCATE command. 567 The RELOCATION for negotiated Rx cells is not supported by MSF. 569 6. 6P SIGNAL command 571 The 6P SIGNAL command is not used by MSF. 573 7. Scheduling Function Identifier 575 The Scheduling Function Identifier (SFID) of MSF is 576 IANA_6TISCH_SFID_MSF. 578 8. Rules for CellList 580 MSF uses 2-step 6P Transactions exclusively. 6P transactions are 581 only initiated by a node towards its parent. As a result, the cells 582 to put in the CellList of a 6P ADD command, and in the candidate 583 CellList of a RELOCATE command, are chosen by the node initiating the 584 6P transaction. In both cases, the same rules apply: 586 * The CellList is RECOMMENDED to have 5 or more cells. 587 * Each cell in the CellList MUST have a different slotOffset value. 588 * For each cell in the CellList, the node MUST NOT have any 589 scheduled cell on the same slotOffset. 590 * The slotOffset value of any cell in the CellList MUST NOT be the 591 same as the slotOffset of the minimal cell (slotOffset=0). 592 * The slotOffset of a cell in the CellList SHOULD be randomly and 593 uniformly chosen among all the slotOffset values that satisfy the 594 restrictions above. 595 * The channelOffset of a cell in the CellList SHOULD be randomly and 596 uniformly chosen in [0..numFrequencies], where numFrequencies 597 represents the number of frequencies a node can communicate on. 599 As a consequence of randomly cell selection, there is a non-zero 600 chance that nodes in the vicinity installed cells with same 601 slotOffset and channelOffset. An implementer MAY implement a 602 strategy to monitor the candidate cells before adding them in 603 CellList to avoid collision. For example, a node MAY maintain a 604 candidate cell pool for the CellList. The candidate cells in the 605 pool are pre-configured as Rx cells to promiscuously listen to detect 606 transmissions on those cells. If IEEE802.15.4 transmissions are 607 observed on one cell over multiple iterations of the schedule, that 608 cell is probably used by a TSCH neighbor. It is moved out from the 609 pool and a new cell is selected as a candidate cell. The cells in 610 CellList are picked from the candidate pool directly when required. 612 9. 6P Timeout Value 614 It is calculated for the worst case that a 6P response is received, 615 which means the 6P response is sent out successfully at the very 616 latest retransmission. And for each retransmission, it backs-off 617 with largest value. Hence the 6P timeout value is calculated as 618 ((2^MAXBE)-1)*MAXRETRIES*SLOTFRAME_LENGTH, where: 620 * MAXBE is the maximum backoff exponent used 621 * MAXRETRIES is the maximum retransmission times 622 * SLOTFRAME_LENGTH represents the length of slotframe 624 10. Rule for Ordering Cells 626 Cells are ordered slotOffset first, channelOffset second. 628 The following sequence is correctly ordered (each element represents 629 the [slottOffset,channelOffset] of a cell in the schedule): 631 [1,3],[1,4],[2,0],[5,3],[6,0],[6,3],[7,9] 633 11. Meaning of the Metadata Field 635 The Metadata field is not used by MSF. 637 12. 6P Error Handling 639 Section 6.2.4 of [RFC8480] lists the 6P Return Codes. Figure 1 lists 640 the same error codes, and the behavior a node implementing MSF SHOULD 641 follow. 643 +-----------------+----------------------+ 644 | Code | RECOMMENDED behavior | 645 +-----------------+----------------------+ 646 | RC_SUCCESS | nothing | 647 | RC_EOL | nothing | 648 | RC_ERR | quarantine | 649 | RC_RESET | quarantine | 650 | RC_ERR_VERSION | quarantine | 651 | RC_ERR_SFID | quarantine | 652 | RC_ERR_SEQNUM | clear | 653 | RC_ERR_CELLLIST | clear | 654 | RC_ERR_BUSY | waitretry | 655 | RC_ERR_LOCKED | waitretry | 656 +-----------------+----------------------+ 658 Figure 1: Recommended behavior for each 6P Error Code. 660 The meaning of each behavior from Figure 1 is: 662 nothing: Indicates that this Return Code is not an error. No error 663 handling behavior is triggered. 664 clear: Abort the 6P Transaction. Issue a 6P CLEAR command to that 665 neighbor (this command may fail at the link layer). Remove all 666 cells scheduled with that neighbor from the local schedule. 667 quarantine: Same behavior as for "clear". In addition, remove the 668 node from the neighbor and routing tables. Place the node's 669 identifier in a quarantine list for QUARANTINE_DURATION. When in 670 quarantine, drop all frames received from that node. 672 waitretry: Abort the 6P Transaction. Wait for a duration randomly 673 and uniformly chosen in [WAIT_DURATION_MIN,WAIT_DURATION_MAX]. 674 Retry the same transaction. 676 13. Schedule Inconsistency Handling 678 The behavior when schedule inconsistency is detected is explained in 679 Figure 1, for 6P Return Code RC_ERR_SEQNUM. 681 14. MSF Constants 683 Figure 2 lists MSF Constants and their RECOMMENDED values. 685 +------------------------------+-------------------+ 686 | Name | RECOMMENDED value | 687 +------------------------------+-------------------+ 688 | NUM_CH_OFFSET | 16 | 689 | KA_PERIOD | 1 min | 690 | LIM_NUMCELLSUSED_HIGH | 75 | 691 | LIM_NUMCELLSUSED_LOW | 25 | 692 | MAX_NUM_CELLS | 100 | 693 | HOUSEKEEPINGCOLLISION_PERIOD | 1 min | 694 | RELOCATE_PDRTHRES | 50 % | 695 | SLOTFRAME_LENGTH | 101 slots | 696 | QUARANTINE_DURATION | 5 min | 697 | WAIT_DURATION_MIN | 30 s | 698 | WAIT_DURATION_MAX | 60 s | 699 +------------------------------+-------------------+ 701 Figure 2: MSF Constants and their RECOMMENDED values. 703 15. MSF Statistics 705 Figure 3 lists MSF Statistics and their RECOMMENDED width. 707 +-----------------+-------------------+ 708 | Name | RECOMMENDED width | 709 +-----------------+-------------------+ 710 | NumCellsElapsed | 1 byte | 711 | NumCellsUsed | 1 byte | 712 | NumTx | 1 byte | 713 | NumTxAck | 1 byte | 714 +-----------------+-------------------+ 716 Figure 3: MSF Statistics and their RECOMMENDED width. 718 16. Security Considerations 720 MSF defines a series of "rules" for the node to follow. It triggers 721 several actions, that are carried out by the protocols defined in the 722 following specifications: the Minimal IPv6 over the TSCH Mode of IEEE 723 802.15.4e (6TiSCH) Configuration [RFC8180], the 6TiSCH Operation 724 Sublayer Protocol (6P) [RFC8480], and the Minimal Security Framework 725 for 6TiSCH [I-D.ietf-6tisch-minimal-security]. In particular, MSF 726 does not define a new protocol or packet format. 728 MSF uses autonomous cells for initial bootstrap and the transport of 729 join traffic. Autonomous cells are computed as a hash of nodes' 730 EUI64 addresses. This makes the coordinates of autonomous cell an 731 easy target for an attacker, as EUI64 addresses are visible on the 732 wire and are not encrypted by the link-layer security mechanism. 733 With the coordinates of autonomous cells available, the attacker can 734 launch a selective jamming attack against any nodes' AutoRxCell. If 735 the attacker targets a node acting as a JP, it can prevent pledges 736 from using that JP to join the network. The pledge detects such a 737 situation through the absence of a link-layer acknowledgment for its 738 Join Request. As it is expected that each pledge will have more than 739 one JP available to join the network, one available countermeasure 740 for the pledge is to pseudo-randomly select a new JP when the link to 741 the previous JP appears bad. Such strategy alleviates the issue of 742 the attacker randomly jamming to disturb the network but does not 743 help in case the attacker is targeting a particular pledge. In that 744 case, the attacker can jam the AutoRxCell of the pledge, in order to 745 prevent it from receiving the join response. This situation should 746 be detected through the absence of a particular node from the network 747 and handled by the network administrator through out-of-band means, 748 e.g. by moving the node outside the radio range of the attacker. 750 MSF adapts to traffics containing packets from IP layer. It is 751 possible that the IP packet has a non-zero DSCP (Diffserv Code Point 752 [RFC2597]) value in its IPv6 header. The decision whether to hand 753 over that packet to MAC layer to transmit or to drop that packet 754 belongs to the upper layer and is out of scope of MSF. As long as 755 the decision is made to hand over to MAC layer to transmit, MSF will 756 take that packet into account when adapting to traffic. 758 Note that non-zero DSCP value may imply that the traffic is 759 originated at unauthenticated pledges, referring to 760 [I-D.ietf-6tisch-minimal-security]. The implementation at IPv6 layer 761 SHOULD ensure that this join traffic is rate-limited before it is 762 passed to MSF. In case there is no rate limit for join traffic, 763 intermediate nodes in the 6TiSCH network may be prone to a resource 764 exhaustion attack, with the attacker injecting unauthenticated 765 traffic from the network edge. The assumption is that the rate 766 limiting function is aware of the available bandwidth in the 6top L3 767 bundle(s) towards a next hop, not directly from MSF, but from an 768 interaction with the 6top sublayer that manages ultimately the 769 bundles under MSF's guidance. How this rate limit is set is out of 770 scope of MSF. 772 17. IANA Considerations 774 17.1. MSF Scheduling Function Identifiers 776 This document adds the following number to the "6P Scheduling 777 Function Identifiers" sub-registry, part of the "IPv6 over the TSCH 778 mode of IEEE 802.15.4e (6TiSCH) parameters" registry, as defined by 779 [RFC8480]: 781 +----------------------+-----------------------------+-------------+ 782 | SFID | Name | Reference | 783 +----------------------+-----------------------------+-------------+ 784 | IANA_6TISCH_SFID_MSF | Minimal Scheduling Function | RFC_THIS | 785 | | (MSF) | | 786 +----------------------+-----------------------------+-------------+ 788 Figure 4: IETF IE Subtype '6P'. 790 18. References 792 18.1. Normative References 794 [RFC8180] Vilajosana, X., Ed., Pister, K., and T. Watteyne, "Minimal 795 IPv6 over the TSCH Mode of IEEE 802.15.4e (6TiSCH) 796 Configuration", BCP 210, RFC 8180, DOI 10.17487/RFC8180, 797 May 2017, . 799 [RFC8480] Wang, Q., Ed., Vilajosana, X., and T. Watteyne, "6TiSCH 800 Operation Sublayer (6top) Protocol (6P)", RFC 8480, 801 DOI 10.17487/RFC8480, November 2018, 802 . 804 [RFC7554] Watteyne, T., Ed., Palattella, M., and L. Grieco, "Using 805 IEEE 802.15.4e Time-Slotted Channel Hopping (TSCH) in the 806 Internet of Things (IoT): Problem Statement", RFC 7554, 807 DOI 10.17487/RFC7554, May 2015, 808 . 810 [RFC6550] Winter, T., Ed., Thubert, P., Ed., Brandt, A., Hui, J., 811 Kelsey, R., Levis, P., Pister, K., Struik, R., Vasseur, 812 JP., and R. Alexander, "RPL: IPv6 Routing Protocol for 813 Low-Power and Lossy Networks", RFC 6550, 814 DOI 10.17487/RFC6550, March 2012, 815 . 817 [RFC6206] Levis, P., Clausen, T., Hui, J., Gnawali, O., and J. Ko, 818 "The Trickle Algorithm", RFC 6206, DOI 10.17487/RFC6206, 819 March 2011, . 821 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 822 Requirement Levels", BCP 14, RFC 2119, 823 DOI 10.17487/RFC2119, March 1997, 824 . 826 [RFC2597] Heinanen, J., Baker, F., Weiss, W., and J. Wroclawski, 827 "Assured Forwarding PHB Group", RFC 2597, 828 DOI 10.17487/RFC2597, June 1999, 829 . 831 [RFC8505] Thubert, P., Ed., Nordmark, E., Chakrabarti, S., and C. 832 Perkins, "Registration Extensions for IPv6 over Low-Power 833 Wireless Personal Area Network (6LoWPAN) Neighbor 834 Discovery", RFC 8505, DOI 10.17487/RFC8505, November 2018, 835 . 837 [I-D.ietf-6tisch-minimal-security] 838 Vucinic, M., Simon, J., Pister, K., and M. Richardson, 839 "Minimal Security Framework for 6TiSCH", Work in Progress, 840 Internet-Draft, draft-ietf-6tisch-minimal-security-13, 28 841 October 2019, . 844 [I-D.ietf-6tisch-enrollment-enhanced-beacon] 845 Dujovne, D. and M. Richardson, "IEEE 802.15.4 Information 846 Element encapsulation of 6TiSCH Join and Enrollment 847 Information", Work in Progress, Internet-Draft, draft- 848 ietf-6tisch-enrollment-enhanced-beacon-06, 4 November 849 2019, . 852 [I-D.ietf-6tisch-architecture] 853 Thubert, P., "An Architecture for IPv6 over the TSCH mode 854 of IEEE 802.15.4", Work in Progress, Internet-Draft, 855 draft-ietf-6tisch-architecture-28, 29 October 2019, 856 . 859 [IEEE802154-2015] 860 IEEE standard for Information Technology, "IEEE Std 861 802.15.4-2015 Standard for Low-Rate Wireless Personal Area 862 Networks (WPANs)", December 2015. 864 18.2. Informative References 866 [I-D.ietf-6tisch-dtsecurity-zerotouch-join] 867 Richardson, M., "6tisch Zero-Touch Secure Join protocol", 868 Work in Progress, Internet-Draft, draft-ietf-6tisch- 869 dtsecurity-zerotouch-join-04, 8 July 2019, 870 . 873 [SAX-DASFAA] 874 Ramakrishna, M.V. and J. Zobel, "Performance in Practice 875 of String Hashing Functions", DASFAA , 1997. 877 Appendix A. Contributors 879 Beshr Al Nahas (Chalmers University, beshr@chalmers.se) Olaf 880 Landsiedel (Chalmers University, olafl@chalmers.se) Yasuyuki Tanaka 881 (Inria-Paris, yasuyuki.tanaka@inria.fr) 883 Appendix B. Example of Implementation of SAX hash function 885 Considering the interoperability, this section provides an example of 886 implemention SAX hash function [SAX-DASFAA]. The input parameters of 887 the function are: 889 * T, which is the hashing table length 890 * c, which is the characters of string s, to be hashed 892 In MSF, the T is replaced by the length slotframe 1. String s is 893 replaced by the mote EUI64 address. The characters of the string c0, 894 c1, ..., c7 are the 8 bytes of EUI64 address. 896 The SAX hash function requires shift operation which is defined as 897 follow: 899 * L_shift(v,b), which refers to left shift variable v by b bits 900 * R_shift(v,b), which refers to right shift variable v by b bits 902 The steps to calculate the hash value of SAX hash function are: 904 1. initialize variable h to h0 and variable i to 0, where h is the 905 intermediate hash value and i is the index of the bytes of EUI64 906 address 907 2. sum the value of L_shift(h,l_bit), R_shift(h,r_bit) and ci 908 3. calculate the result of exclusive or between the sum value in 909 Step 2 and h 910 4. modulo the result of Step 3 by T 911 5. assign the result of Step 4 to h 912 6. increase i by 1 913 7. repeat Step2 to Step 6 until i reaches to 8 914 8. assign the result of Step 5 to h 916 The value of variable h is the hash value of SAX hash function. 918 The values of h0, l_bit and r_bit in Step 1 and 2 are configured as: 920 * h0 = 0 921 * l_bit = 0 922 * r_bit = 1 924 The appropriate values of l_bit and r_bit could vary depending on the 925 the set of motes' EUI64 address. How to find those values is out of 926 the scope of this specification. 928 Authors' Addresses 930 Tengfei Chang (editor) 931 Inria 932 2 rue Simone Iff 933 75012 Paris 934 France 936 Email: tengfei.chang@inria.fr 938 Malisa Vucinic 939 Inria 940 2 rue Simone Iff 941 75012 Paris 942 France 944 Email: malisa.vucinic@inria.fr 946 Xavier Vilajosana 947 Universitat Oberta de Catalunya 948 156 Rambla Poblenou 949 08018 Barcelona Catalonia 950 Spain 952 Email: xvilajosana@uoc.edu 953 Simon Duquennoy 954 RISE SICS 955 Isafjordsgatan 22 956 SE- 164 29 Kista 957 Sweden 959 Email: simon.duquennoy@ri.se 961 Diego Dujovne 962 Universidad Diego Portales 963 Escuela de Informatica y Telecomunicaciones, Av. Ejercito 441 964 Santiago 965 Region Metropolitana 966 Chile 968 Phone: +56 (2) 676-8121 969 Email: diego.dujovne@mail.udp.cl