6TiSCH | Q. Wang, Ed. |
Internet-Draft | Univ. of Sci. and Tech. Beijing |
Intended status: Standards Track | X. Vilajosana |
Expires: December 24, 2017 | Universitat Oberta de Catalunya |
T. Watteyne | |
Analog Devices | |
June 22, 2017 |
6top Protocol (6P)
draft-ietf-6tisch-6top-protocol-06
This document defines the 6top Protocol (6P), which enables distributed scheduling in 6TiSCH networks. 6P allows neighbor nodes to add/delete TSCH cells to one another. 6P is part of the 6TiSCH Operation Sublayer (6top), the next higher layer to the IEEE Std 802.15.4 TSCH medium access control layer. The 6top Scheduling Function (SF) decides when to add/delete cells, and triggers 6P Transactions. Several SFs can be defined, each identified by a different 6top Scheduling Function Identifier (SFID). This document lists the requirements for an SF, but leaves the definition of the SF out of scope. SFs are expected to be defined in future companion specifications.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."
This Internet-Draft will expire on December 24, 2017.
Copyright (c) 2017 IETF Trust and the persons identified as the document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.
This document is an Internet Draft, so work-in-progress by nature. It contains the following work-in-progress elements:
All communication in a 6TiSCH network is orchestrated by a schedule [RFC7554]. This specification defines the 6top Protocol (6P), part of the 6TiSCH Operation sublayer (6top). 6P allows a node to communicate with a neighbor to add/delete TSCH cells to one another. This results in distributed schedule management in a 6TiSCH network.
(R) / \ / \ (B)-----(C) | | | | (A) (D)
Figure 1: A simple 6TiSCH network.
The example network depicted in Figure 1 is used to describe the interaction between nodes. We consider the canonical case where node "A" issues 6P requests to node "B". We keep this example throughout this document. Throughout the document, node A will always represent the node that issues a 6P request; node B the node that receives this request.
We consider that node A monitors the communication cells it has in its schedule to node B:
This results in distributed schedule management in a 6TiSCH network.
The 6top Scheduling Function (SF) defines when to add/delete a cell to a neighbor. Different applications require different SFs, so the SF is left out of scope of this document. Different SFs are expected to be defined in future companion specifications. A node MAY implement multiple SFs and run them at the same time. At least one SF MUST be running. The SFID field contained in all 6P messages allows a node to invoke the appropriate SF on a per-transaction basis.
Section 3 describes the 6TiSCH Operation Sublayer (6top). Section 4 defines the 6top Protocol (6P). Section 5 provides guidelines on how to design an SF.
As depicted in Figure 2, the 6TiSCH Operation Sublayer (6top) is the next higher layer to the IEEE Std 802.15.4 TSCH medium access control (MAC) layer [IEEE802154-2015]. We use "802.15.4" as a short version of "IEEE Std 802.15.4" in this document.
. | . | | higher layers | +------------------------------------------+ | 6top | +------------------------------------------+ | IEEE Std 802.15.4 TSCH | | . | .
Figure 2: The 6top sublayer in the protocol stack.
The roles of the 6top sublayer are to:
Each cell in the schedule is either "hard" or "soft":
In the context of this specification, all the cells used by 6top are soft cells. Hard cells can be used for example when "hard-coding" a schedule [I-D.ietf-6tisch-minimal].
6P MAY be used alongside the Minimal 6TiSCH Configuration [I-D.ietf-6tisch-minimal]. In this case, it is RECOMMENDED to use 2 slotframes, as depicted in Figure 3:
| 0 1 2 3 4 | 0 1 2 3 4 | +------------------------+------------------------+ Slotframe 0 | | | | | | | | | | | 5 slots long | EB | | | | | EB | | | | | | | | | | | | | | | | +-------------------------------------------------+ | 0 1 2 3 4 5 6 7 8 9 | +-------------------------------------------------+ Slotframe 1 | | | | | | | | | | | 10 slots long | |A->B| | | | | | |B->A| | | | | | | | | | | | | +-------------------------------------------------+
Figure 3: 2-slotframe structure when using 6P alongside the Minimal 6TiSCH Configuration.
The Minimal 6TiSCH Configuration cell SHOULD be allocated from a slotframe of higher priority than the slotframe used by 6P for dynamic cell allocation. In this way, dynamically allocated cells cannot "mask" the cells used by the Minimal 6TiSCH Configuration. 6top MAY support additional slotframes; how to use additional slotframes is out of the scope for this document.
The 6top Protocol (6P) enables two neighbor nodes to add/delete/relocate cells to their TSCH schedule. Conceptually, two neighbor nodes "negotiate" the location of the cells to add, delete, or relocate.
We call "6P Transaction" a complete negotiation between two neighbor nodes. A 6P Transaction starts when a node wishes to add/delete/relocate one or more cells to one of its neighbors. A 6P Transaction ends when the cell(s) have been added/deleted/relocated from the schedule of both nodes, or when the 6P Transaction has failed.
The 6P messages exchanged between nodes A and B during a 6P Transaction SHOULD be exchanged on dedicated cells between A and B. If no dedicated cells are scheduled between nodes A and B, shared cells are be used.
Consistency between the schedules of the two neighbor nodes is of utmost importance. A loss of consistency (e.g. node A has a transmit cell to node B, but node B does not have the corresponding reception cell) can cause loss of connectivity. To verify consistency, neighbor nodes increment the "schedule generation" number of their schedule each time their schedule is modified. Neighbor nodes exchange the schedule generation number as part of each 6P Transaction to detect possible inconsistencies. This mechanism is explained in Section 4.4.7.
An implementation MUST include a mechanism to associate each scheduled cell with the SF that scheduled it. This mechanism is implementation-specific and out of the scope of this document.
A 6P Transaction can consist of 2 or 3 steps. An SF MUST specify whether to use 2-step or 3-step transactions (or both).
We illustrate 2-step and 3-step transactions using the topology in Figure 1.
Figure 4 shows an example 2-step 6P Transaction. Several elements are left out to simplify understanding.
+----------+ +----------+ | Node A | | Node B | +----+-----+ +-----+----+ | | | 6P ADD Request | | Type = REQUEST | | Code = ADD | | NumCells = 2 | timeout | CellList = [(1,2),(2,2),(3,5)] | --- |-------------------------------------->| | | | | | 6P Response | | | Type = RESPONSE | | | Code = SUCCESS | | | CellList = [(2,2),(3,5)] | X |<--------------------------------------| | |
Figure 4: An example 2-step 6P Transaction.
In this example, the 2-step transaction occurs as follows:
2-step transaction is used when node A selects the candidate cells.
Figure 5 shows an example 3-step 6P Transaction. Several elements are left out to simplify understanding.
+----------+ +----------+ | Node A | | Node B | +----+-----+ +-----+----+ | | | 6P ADD Request | | Type = REQUEST | | Code = ADD | | NumCells = 2 | timeout | CellList = [] | --- |-------------------------------------->| | | | | | 6P Response | | | Type = RESPONSE | | | Code = SUCCESS | | | CellList = [(1,2),(2,2),(3,5)] | timeout X |<--------------------------------------| --- | | | | 6P Confirmation | | | Type = CONFIRMATION | | | Code = SUCCESS | | | CellList = [(2,2),(3,5)] | | |-------------------------------------->| X | |
Figure 5: An example 3-step 6P Transaction.
In this example, the 3-step transaction occurs as follows:
3-step transaction is used when node B selects the candidate cells.
6P messages are carried as payload of a 802.15.4 Payload Information Element (IE) [IEEE802154-2015]. 6P messages travel over a single hop.
This document defines the "6top IE", a subtype of the IETF IE defined in [I-D.kivinen-802-15-ie], with subtype IANA_6TOP_SUBIE_ID. The length of the 6top IE content is variable.
All 6P messages follow the generic format shown in Figure 6.
1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |Version| T | R | Code | SFID | SeqNum| GEN | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Other Fields... +-+-+-+-+-+-+-+-+-
Figure 6: Generic 6P Message Format.
An 8-bit 6P CellOptions bitmap is present in the following 6P requests: ADD, DELETE, COUNT, LIST, RELOCATE.
The contents of the 6P CellOptions bitmap apply to all elements in the CellList field. Section 8.2.6 contains the RECOMMENDED format of the 6P CellOptions bitmap. Figure 7 contains the RECOMMENDED meaning of the 6P CellOptions bitmap for the 6P COUNT and 6P LIST requests.
Note: assuming node A issues the 6P command to node B. +-------------+-----------------------------------------------+ | CellOptions | cells scheduled with A that are to be selected| | Value | by B when receiving a 6P message from A | +-------------+-----------------------------------------------+ |TX=0,RX=0,S=0| select all cells | +-------------+-----------------------------------------------+ |TX=1,RX=0,S=0| select the cells scheduled marked as RX | +-------------+-----------------------------------------------+ |TX=0,RX=1,S=0| select the cells marked as TX | +-------------+-----------------------------------------------+ |TX=1,RX=1,S=0| select the cells marked as TX and RX | +-------------+-----------------------------------------------+ |TX=0,RX=0,S=1| select the cells marked as SHARE | +-------------+-----------------------------------------------+ |TX=1,RX=0,S=1| select the cells marked as RX and SHARE | +-------------+-----------------------------------------------+ |TX=0,RX=1,S=1| select the cells marked as TX and SHARE | +-------------+-----------------------------------------------+ |TX=1,RX=1,S=1| select the cells marked as TX and RX and SHARE| +-------------+-----------------------------------------------+
Figure 7: Meaning of the 6P CellOptions bitmap for the 6P COUNT and the 6P LIST requests.
The CellOptions is an opaque set of bits, sent unmodified to the SF. The SF MAY redefine the format of the CellOptions bitmap. The SF MAY redefine the meaning of the CellOptions bitmap.
A CellList field MAY be present in a 6P ADD Request, a 6P DELETE Request, a 6P RELOCATE Request, a 6P Response or a 6P Confirmation. It is composed of zero, one or more 6P Cell containers. The contents of the CellOptions field specify the options associated with all cells in the CellList. This necessarily means that the same options are associated with all cells in the CellList.
The 6P Cell is a 4-byte field, its RECOMMENDED format is:
1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | slotOffset | channelOffset | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 8: 6P Cell Format.
The CellList is an opaque set of bytes, sent unmodified to the SF. The SF MAY redefine the format of the CellList field.
Cells are added by using the 6P ADD command. The Type field (T) is set to REQUEST. The Code field is set to ADD. Figure 9 defines the format of a 6P ADD Request.
1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |Version| T | R | Code | SFID | SeqNum| GEN | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Metadata | CellOptions | NumCells | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | CellList ... +-+-+-+-+-+-+-+-+-
Figure 9: 6P ADD Request Format.
Figure 10 defines the format of a 6P ADD Response and Confirmation.
1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |Version| T | R | Code | SFID | SeqNum| GEN | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | CellList ... +-+-+-+-+-+-+-+-+-
Figure 10: 6P ADD Response and Confirmation Formats.
Consider the topology in Figure 1 where the SF on node A decides to add NumCells cells to node B.
Node A's SF selects NumCandidate cells from its schedule as candidate cells to node B. The CellOptions field specifies the type of these cells. NumCandidate MUST be larger or equal to NumCells. How many cells it selects (NumCandidate) and how that selection is done is specified in the SF and out of scope of this document. Node A sends a 6P ADD Request to node B which contains the CellOptions, the value of NumCells and a selection of NumCandidate cells in the CellList. In case the NumCandidate cells do not fit in a single packet, this operation MUST be split in multiple independent 6P ADD Requests, each for a subset of the number of cells that eventually need to be added.
Upon receiving the request, node B's SF verifies which of the cells in the CellList it can install in node B's schedule following the specified CellOptions field. How that selection is done is specified in the SF and out of scope of this document. The verification can succeed (NumCells cells from the CellList can be used), fail (none of the cells from the CellList can be used) or partially succeed (less than NumCells cells from the CellList can be used). In all cases, node B MUST send a 6P Response with return code set to SUCCESS, and which specifies the list of cells that were scheduled following the CellOptions field. That can contain 0 elements (when the verification failed), NumCells elements (succeeded) or between 0 and NumCells elements (partially succeeded).
Upon receiving the response, node A adds the cells specified in the CellList according to the request CellOptions field.
Cells are deleted by using the 6P DELETE command. The Type field (T) is set to REQUEST. The Code field is set to DELETE. Figure 11 defines the format of a 6P DELETE Request.
1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |Version| T | R | Code | SFID | SeqNum| GEN | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Metadata | CellOptions | NumCells | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | CellList ... +-+-+-+-+-+-+-+-+-
Figure 11: 6P DELETE Request Format.
Figure 12 defines the format of a 6P DELETE Response and Confirmation.
1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |Version| T | R | Code | SFID | SeqNum| GEN | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | CellList ... +-+-+-+-+-+-+-+-+-
Figure 12: 6P DELETE Response and Confirmation Formats.
The behavior for deleting cells is equivalent to that of adding cells except that:
Cell relocation consists in moving a cell to a different [slotOffset,channelOffset] location in the schedule. The Type field (T) is set to REQUEST. The Code is set to RELOCATE. Figure 13 defines the format of a 6P RELOCATE Request.
1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |Version| T | R | Code | SFID | SeqNum| GEN | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Metadata | CellOptions | NumCells | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Rel. CellList ... |Cand. CellList (Optional) ... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 13: 6P RELOCATE Request Format.
Figure 14 defines the format of a 6P RELOCATE Response and Confirmation.
1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |Version| T | R | Code | SFID | SeqNum| GEN | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | CellList ... +-+-+-+-+-+-+-+-+-
Figure 14: 6P RELOCATE Response and Confirmation Formats.
Node A's SF wants to relocate NumCells cells. Node A creates a 6P RELOCATE Request, and indicates the cells to relocate in the Relocation CellList. It also selects NumCandidate cells from its schedule as candidate cells for node B, and puts those in the Candidate CellList. The CellOptions field specifies the type of the cell(s) to relocate. NumCandidate MUST be larger or equal to NumCells. How many cells it selects (NumCandidate) and how that selection is done is specified in the SF and out of scope of this document. Node A sends the 6P RELOCATE Request to node B.
Upon receiving the request, node B's SF verifies that all the cells in the Relocation CellList are indeed scheduled with node A, and are associate the options specified in the CellOptions field. If that check fails, node B MUST send a 6P Response to node A with return code CELLLIST_ERR. If that check passes, node B's SF verifies which of the cells in the Candidate CellList it can install in its schedule. How that selection is done is specified in the SF and out of scope of this document. That verification on Candidate CellList can succeed (NumCells cells from the Candidate CellList can be used), fail (none of the cells from the Candidate CellList can be used) or partially succeed (less than NumCells cells from the Candidate CellList can be used). In all cases, node B MUST send a 6P Response with return code set to SUCCESS, and which specifies the list of cells that were scheduled following the CellOptions field. That can contain 0 elements (when the verification failed), NumCells elements (succeeded) or between 0 and NumCells elements (partially succeeded). If N < NumCells cells appear in the CellList, this means first N cells in the Relocation CellList have been relocated, the remainder have not.
Upon receiving the response, node A relocates the cells specified in Relocation CellList of its RELOCATE Request to the new location specified in the CellList of the 6P Response.
+----------+ +----------+ | Node A | | Node B | +----+-----+ +-----+----+ | | | 6P RELOCATE Request | | Type = REQUEST | | Code = RELOCATE | | NumCells = 2 | | R.CellList = [(1,2),(2,2)] | | C.CellList = [(3,2),(4,2),(6,5)] | |-------------------------------------->| B relocates | | (1,2)->(4,2) | 6P Response | but cannot | Type = RESPONSE | relocate (2,2) | Code = SUCCESS | | CellList = [(4,2)] | A relocates |<--------------------------------------| (1,2)->(4,2)| |
Figure 15: 6P RELOCATE Example.
To retrieve the number of scheduled cells at B, node A issues a 6P COUNT command. The Type field (T) is set to REQUEST. The Code field is set to COUNT. Figure 16 defines the format of a 6P COUNT Request.
1 2 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |Version| T | R | Code | SFID | SeqNum| GEN | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Metadata | CellOptions | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 16: 6P COUNT Request Format.
Figure 17 defines the format of a 6P COUNT Response.
1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |Version| T | R | Code | SFID | SeqNum| GEN | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | NumCells | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 17: 6P COUNT Response Format.
Node A issues a COUNT command to node B, specifying a set of cell options. Upon receiving the 6P COUNT request, node B goes through its schedule and counts the number of cells scheduled with node A in its own schedule, and which match the cell options in the CellOptions field of the request. Section 4.2.3 details the use of the CellOptions field.
Node B issues a 6P response to node A with return code set to SUCCESS, and with NumCells containing the number of cells that match the request.
To retrieve the list of scheduled cells at B, node A issues a 6P LIST command. The Type field (T) is set to REQUEST. The Code field is set to LIST. Figure 18 defines the format of a 6P LIST Request.
1 2 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |Version| T | R | Code | SFID | SeqNum| GEN | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Metadata | CellOptions | Reserved | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Offset | MaxNumCells | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 18: 6P LIST Request Format.
Figure 19 defines the format of a 6P LIST Response.
1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |Version| T | R | Code | SFID | SeqNum| GEN | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | CellList ... +-+-+-+-+-+-+-+-+-
Figure 19: 6P LIST Response Format.
When receiving a LIST command, node B returns the cells in its schedule that match the CellOptions field as specified in Section 4.2.3
When node B receives a LIST request, the returned CellList in the 6P Response contains between 1 and MaxNumCells cells, starting from the specified offset. Node B SHOULD include as many cells as fit in the frame. If the response contains the last cell, Node B MUST set the Code field in the response to EOL, indicating to Node A that there no more cells that match the request. Node B MUST return at least one cell, unless the specified Offset is beyond the end of B's cell list in its schedule. If node B has less than Offset cells that match the request, node B returns an empty CellList and a Code field set to EOL.
To clear the schedule between nodes A and B (for example after a schedule inconsistency is detected), node A issues a CLEAR command. The Type field (T) is set to 6P Request. The Code field is set to CLEAR. Figure 20 defines the format of a 6P CLEAR Request.
1 2 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |Version| T | R | Code | SFID | SeqNum| GEN | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Metadata | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 20: 6P CLEAR Request Format.
Figure 21 defines the format of a 6P CLEAR Response.
1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |Version| T | R | Code | SFID | SeqNum| GEN | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 21: 6P CLEAR Response Format.
When a 6P CLEAR command is issued from node A to node B, both nodes A and B MUST remove all the cells scheduled between them. That is, node A MUST remove all the cells scheduled with B, and node B MUST remove all the cells scheduled with A. In a 6P CLEAR command, the generation counter GEN MUST NOT be checked. That is, its value is "don't care". In particular, even if the request contains a GEN value that would normally cause node B to detect a schedule generation mismatch, the transaction MUST NOT be aborted.
All messages contain a Version field. If multiple Versions of the 6P protocol have been defined (in future specifications for Version values different from 0), a node MAY implement multiple protocol versions at the same time. When receiving a 6P message with a Version number it does not implement, a node MUST reply with a 6P Response with a Return Code field set to VER_ERR. The Version field in the 6P Response MUST be the same as the Version field in the corresponding 6P Request. In a 3-step transaction, the Version field in the 6P Confirmation MUST match that of the 6P Request and 6P Response in the same transaction.
All messages contain a SFID field. A node MAY support multiple SFs at the same time. When receiving a 6P message with an unsupported SFID, a node MUST reply with a 6P Response and a return code of SFID_ERR. The SFID field in the 6P Response MUST be the same as the SFID field in the corresponding 6P Request. In a 3-step transaction, the SFID field in the 6P Confirmation MUST match that of the 6P Request and 6P Response in the same transaction.
Only a single 6P Transaction between two neighbors, in a given direction, can take place at the same time. That is, a node MUST NOT issue a new 6P Request to a given neighbor before having received the 6P Response for a previous request to that neighbor, except when the previous 6P Transaction has timed out. If a node receives a 6P Request from a given neighbor before having sent the 6P Response to the previous 6P Request from that neighbor, it MUST send back a 6P Response with a return code of RESET. A node receiving RESET code MUST abort the transaction and consider it never happened.
Nodes A and B MAY support having two transactions going on at the same time, one in each direction. Similarly, a node MAY support concurrent 6P Transactions from different neighbors. In this case, the cells involved in an ongoing 6P Transaction MUST be locked until the transaction finishes. For example, in Figure 1, node C can have a different ongoing 6P Transaction with nodes B and R. In case a node does not have enough resources to handle concurrent 6P Transactions from different neighbors it MUST reply with a 6P Response with return code NORES. In case the requested cells are locked, it MUST reply to that request with a 6P Response with return code BUSY. The node receiving BUSY or an NORES MAY implement a retry mechanism, defined by the SF.
A timeout occurs when the node sending the 6P Request has not received the 6P Response within a specified amount of time determined by the SF. In a 3-step transaction, a timeout also occurs when the node sending the 6P Response has not received the 6P Confirmation. The timeout should be longer than the longest possible time it can take for the exchange to finish. The value of the timeout hence depends on the number of cells scheduled between the neighbor nodes, the maximum number of link-layer retransmissions, etc. The SF MUST determine the value of the timeout. The value of the timeout is out of scope of this document.
A SeqNum mismatch happens when a node receives a 6P Response or 6P Confirmation with SeqNum value different from the SeqNum value in the 6P Request. When it detects a SeqNum mismatch, the node MUST drop the packet and consider the 6P Transaction as having failed.
In case the receiver of a 6P Request fails during a 6P Transaction and is unable to complete it, it SHOULD reply to that Request with a 6P Response with return code RESET. Upon receiving this 6P Response, the initiator of the 6P Transaction MUST consider the 6P Transaction as failed.
Similarly, in the case of 3-step transaction, when the receiver of a 6P Response fails during the 6P Transaction and is unable to complete it, it SHOULD reply to that 6P Response with a 6P Confirmation with return code RESET. Upon receiving this 6P Confirmation, the sender of the 6P Response MUST consider the 6P Transaction as failed.
For each neighbor, a node maintains a 4-bit generation number. The generation number counts the number of transactions that have modified the schedule with the particular neighbor so far. This number is a variable internal to the node.
The generation number is incremented as a 4-bit lollipop counter. Its possible values are:
+---------+---------------------------+ | Value | Meaning | +---------+---------------------------+ | 0x0 | Clear or never scheduled | | 0x1-0x9 | Lollipop Counter values | | 0xa-0xf | Reserved | +---------+---------------------------+
Figure 22: Possible values of the generation number.
The generation number is set to 0 upon initialization, and after a 6P CLEAR command. The generation number is incremented by exactly 1 each time a cell with that neighbor is added/deleted/relocated from the schedule (e.g. after a successful 6P ADD, 6P DELETE or 6P RELOCATE transaction). The value rolls from 0x9 to 0x1 (i.e. not 0x0). This results in a lollipop counter with 0x0 the start value, and 0x1-0x9 the count values. Values from 0xa to 0xf are reserved and MUST NOT be used.
Each 6P message contains a GEN field, used to indicate the current generation number of the node transmitting the message. The value of the GEN field MUST be set according to the following rules:
Upon receiving a 6P message, a node MUST do the following checks:
If any of these comparisons is false, the node has detected a schedule generation inconsistency.
When a schedule generation inconsistency is detected:
It is up to the Scheduling Function to define the action to take when an schedule generation inconsistency is detected. The RECOMMENDED action is to issue a 6P CLEAR command.
A return code marked as YES in the "Is Error" column in Figure 27 indicates an error. When a node receives a 6P Response or 6P Confirmation with such an error, it MUST consider the 6P Transaction failed. In particular, if this was a response to a 6P ADD/DELETE/RELOCATE Request, the node MUST NOT add/delete/relocate any of the cells involved in this 6P Transaction. Similarly, a node sending a 6P Response or a 6P Confirmation with an error code MUST NOT add/delete/relocate any cells as part of that 6P Transaction. Defining what to do after an error has occurred is out of scope of this document. The SF defines what to do after an error has occurred.
6P messages are secured through link-layer security. When link-layer security is enabled, the 6P messages MUST be secured. This is possible because 6P messages are carried as Payload IE.
Each SF has a 1-byte identifier. Section 8.2.5 defines the rules for applying for an SFID.
The specification for an SF
The following section structure for a SF document is RECOMMENDED:
This section records the status of known implementations of the protocol defined by this specification at the time of posting of this Internet-Draft, and is based on a proposal described in [RFC6982]. The description of implementations in this section is intended to assist the IETF in its decision processes in progressing drafts to RFCs. Please note that the listing of any individual implementation here does not imply endorsement by the IETF. Furthermore, no effort has been spent to verify the information presented here that was supplied by IETF contributors. This is not intended as, and must not be construed to be, a catalog of available implementations or their features. Readers are advised to note that other implementations may exist.
According to [RFC6982], "this will allow reviewers and working groups to assign due consideration to documents that have the benefit of running code, which may serve as evidence of valuable experimentation and feedback that have made the implemented protocols more mature. It is up to the individual working groups to use this information as they see fit".
6P messages are carried inside 802.15.4 Payload Information Elements (IEs). Those Payload IEs are encrypted and authenticated at the link layer through CCM*. 6P benefits from the same level of security as any other Payload IE. The 6P protocol does not define its own security mechanisms. A key management solution is out of scope for this document. The 6P protocol will benefit for the key management solution used in the network.
This document adds the following number to the "IEEE Std 802.15.4 IETF IE subtype IDs" registry defined by [I-D.kivinen-802-15-ie]:
+--------------------+------+-----------+ | Subtype | Name | Reference | +--------------------+------+-----------+ | IANA_6TOP_SUBIE_ID | 6P | RFCXXXX | +--------------------+------+-----------+
Figure 23: IETF IE Subtype '6P'.
This section defines sub-registries within the "IPv6 over the TSCH mode of IEEE 802.15.4e (6TiSCH) parameters" registry, hereafter referred to as the "6TiSCH parameters" registry. Each sub-registry is described in a subsection.
The name of the sub-registry is "CoAP Version Numbers".
A Note included in this registry should say: "In the 6top Protocol (6P) [RFCXXXX] there is a field to identify the version of the protocol. This field is 4 bits in size."
Each entry in the sub-registry must include the Version in the range 0-15, and a reference to the 6P version's documentation.
The initial entry in this sub-registry is as follows:
+---------+------------+ | Version | Reference | +---------+------------+ | 0 | RFCXXXX | +---------+------------+
Figure 24: 6P Version Numbers.
All other Version Numbers are Unassigned.
The IANA policy for future additions to this sub-registry is "IETF Review or IESG Approval" as described in [RFC5226].
The name of the sub-registry is "6P Message Types".
A Note included in this registry should say: "In the 6top Protocol (6P) version 0 [RFCXXXX], there is a field to identify the type of message. This field is 2 bits in size."
Each entry in the sub-registry must include the Type in the range b00-b11, the corresponding Name, and a reference to the 6P message type's documentation.
Initial entries in this sub-registry are as follows:
+------+--------------+-----------+ | Type | Name | Reference | +------+--------------+-----------+ | b00 | REQUEST | RFCXXXX | | b01 | RESPONSE | RFCXXXX | | b10 | CONFIRMATION | RFCXXXX | +------+--------------+-----------+
Figure 25: 6P Message Types.
All other Message Types are Reserved.
The IANA policy for future additions to this sub-registry is "IETF Review or IESG Approval" as described in [RFC5226].
The name of the sub-registry is "6P Command Identifiers".
A Note included in this registry should say: "In the 6top Protocol (6P) version 0 [RFCXXXX], there is a Code field which is 8 bits in size. In a 6P Request, the value of this Code field is used to identify the command."
Each entry in the sub-registry must include the Identifier in the range 0-255, the corresponding Name, and a reference to the 6P command identifier's documentation.
Initial entries in this sub-registry are as follows:
+------------+------------+-----------+ | Identifier | Name | Reference | +------------+------------+-----------+ | 0 | Reserved | | | 1 | ADD | RFCXXXX | | 2 | DELETE | RFCXXXX | | 3 | RELOCATE | RFCXXXX | | 4 | COUNT | RFCXXXX | | 5 | LIST | RFCXXXX | | 6 | CLEAR | RFCXXXX | | 7-254 | Unassigned | | | 255 | Reserved | | +------------+------------+-----------+
Figure 26: 6P Command Identifiers.
The IANA policy for future additions to this sub-registry is "IETF Review or IESG Approval" as described in [RFC5226].
The name of the sub-registry is "6P Return Codes".
A Note included in this registry should say: "In the 6top Protocol (6P) version 0 [RFCXXXX], there is a Code field which is 8 bits in size. In a 6P Response or 6P Confirmation, the value of this Code field is used to identify the return code."
Each entry in the sub-registry must include the Code in the range 0-255, the corresponding Name, the corresponding Description, and a reference to the 6P return code's documentation.
Initial entries in this sub-registry are as follows:
+--------+-------------+---------------------------+-----------+ | Code | Name | Description | Is Error? | +--------+-------------+---------------------------+-----------+ | 0 | SUCCESS | operation succeeded | No | | 1 | ERROR | generic error | Yes | | 2 | EOL | end of list | No | | 3 | RESET | critical error, reset | Yes | | 4 | VER_ERR | unsupported 6P version | Yes | | 5 | SFID_ERR | unsupported SFID | Yes | | 6 | GEN_ERR | wrong schedule generation | Yes | | 7 | BUSY | busy | Yes | | 8 | NORES | not enough resources | Yes | | 9 | CELLLIST_ERR| cellList error | Yes | +--------+-------------+---------------------------+-----------+
Figure 27: 6P Return Codes.
All other Message Types are Unassigned.
The IANA policy for future additions to this sub-registry is "IETF Review or IESG Approval" as described in [RFC5226].
6P Scheduling Function Identifiers.
A Note included in this registry should say: "In the 6top Protocol (6P) version 0 [RFCXXXX], there is a field to identify the scheduling function to handle the message. This field is 8 bits in size."
Each entry in the sub-registry must include the SFID in the range 0-255, the corresponding Name, and a reference to the 6P Scheduling Function's documentation.
The initial entry in this sub-registry is as follows:
+-------+--------------------------+----------------------------+ | SFID | Name | Reference | +-------+--------------------------+----------------------------+ | 0 | Scheduling Function Zero | draft-ietf-6tisch-6top-sf0 | +-------+--------------------------+----------------------------+
Figure 28: SF Identifiers (SFID).
All other Message Types are Unassigned.
The IANA policy for future additions to this sub-registry depends on the value of the SFID, as defined in Figure 29. These specifications must follow the guidelines of Section 5.
+-----------+------------------------------+ | Range | Registration Procedures | +-----------+------------------------------+ | 0-128 | IETF Review or IESG Approval | | 128-255 | Expert Review | +-----------+------------------------------+
Figure 29: SF Identifier (SFID): Registration Procedures.
The name of the sub-registry is "6P CellOptions bitmap".
A Note included in this registry should say: "In the 6top Protocol (6P) version 0 [RFCXXXX], there is an optional CellOptions field which is 8 bits in size."
Each entry in the sub-registry must include the bit position in the range 0-7, the corresponding Name, and a reference to the bit's documentation.
Initial entries in this sub-registry are as follows:
+-----+---------------+-----------+ | bit | Name | Reference | +-----+---------------+-----------+ | 0 | TX (Transmit) | RFCXXXX | | 1 | RX (Receive) | RFCXXXX | | 2 | SHARED | RFCXXXX | | 3-7 | Reserved | | +-----+---------------+-----------+
Figure 30: 6P CellOptions bitmap.
All other Message Types are Reserved.
The IANA policy for future additions to this sub-registry is "IETF Review or IESG Approval" as described in [RFC5226].
[I-D.kivinen-802-15-ie] | Kivinen, T. and P. Kinney, "IEEE 802.15.4 Information Element for IETF", Internet-Draft draft-kivinen-802-15-ie-06, March 2017. |
[IEEE802154-2015] | IEEE standard for Information Technology, "IEEE Std 802.15.4-2015 - IEEE Standard for Low-Rate Wireless Personal Area Networks (WPANs)", October 2015. |
[RFC2119] | Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997. |
[I-D.ietf-6tisch-minimal] | Vilajosana, X., Pister, K. and T. Watteyne, "Minimal 6TiSCH Configuration", Internet-Draft draft-ietf-6tisch-minimal-21, February 2017. |
[OpenWSN] | Watteyne, T., Vilajosana, X., Kerkez, B., Chraim, F., Weekly, K., Wang, Q., Glaser, S. and K. Pister, "OpenWSN: a Standards-Based Low-Power Wireless Development Environment", Transactions on Emerging Telecommunications Technologies , August 2012. |
[RFC5226] | Narten, T. and H. Alvestrand, "Guidelines for Writing an IANA Considerations Section in RFCs", RFC 5226, DOI 10.17487/RFC5226, May 2008. |
[RFC6982] | Sheffer, Y. and A. Farrel, "Improving Awareness of Running Code: The Implementation Status Section", RFC 6982, DOI 10.17487/RFC6982, July 2013. |
[RFC7554] | Watteyne, T., Palattella, M. and L. Grieco, "Using IEEE 802.15.4e Time-Slotted Channel Hopping (TSCH) in the Internet of Things (IoT): Problem Statement", RFC 7554, DOI 10.17487/RFC7554, May 2015. |