< draft-ietf-lpwan-ipv6-static-context-hc-10.txt   draft-ietf-lpwan-ipv6-static-context-hc-11.txt >
lpwan Working Group A. Minaburo lpwan Working Group A. Minaburo
Internet-Draft Acklio Internet-Draft Acklio
Intended status: Informational L. Toutain Intended status: Informational L. Toutain
Expires: September 1, 2018 IMT-Atlantique Expires: October 15, 2018 IMT-Atlantique
C. Gomez C. Gomez
Universitat Politecnica de Catalunya Universitat Politecnica de Catalunya
February 28, 2018 April 13, 2018
LPWAN Static Context Header Compression (SCHC) and fragmentation for LPWAN Static Context Header Compression (SCHC) and fragmentation for
IPv6 and UDP IPv6 and UDP
draft-ietf-lpwan-ipv6-static-context-hc-10 draft-ietf-lpwan-ipv6-static-context-hc-11
Abstract Abstract
This document defines the Static Context Header Compression (SCHC) This document defines the Static Context Header Compression (SCHC)
framework, which provides header compression and fragmentation framework, which provides header compression and fragmentation
functionality. SCHC has been tailored for Low Power Wide Area functionality. SCHC has been tailored for Low Power Wide Area
Networks (LPWAN). Networks (LPWAN).
SCHC compression is based on a common static context stored in LPWAN SCHC compression is based on a common static context stored in both
devices and in the network. This document applies SCHC compression LPWAN devices and in the network sides. This document defines SCHC
to IPv6/UDP headers. This document also specifies a fragmentation header compression mechanism and its deployment for IPv6/UDP headers.
and reassembly mechanism that is used to support the IPv6 MTU This document also specifies a fragmentation and reassembly mechanism
requirement over LPWAN technologies. Fragmentation is mandatory for that is used to support the IPv6 MTU requirement over the LPWAN
IPv6 datagrams that, after SCHC compression or when it has not been technologies. The Fragmentation is needed for IPv6 datagrams that,
possible to apply such compression, still exceed the layer two after SCHC compression or when it has not been possible to apply such
maximum payload size. compression, still exceed the layer two maximum payload size.
The SCHC header compression mechanism is independent of the specific The SCHC header compression mechanism is independent of the specific
LPWAN technology over which it will be used. Note that this document LPWAN technology over which it will be used. Note that this document
defines generic functionality. This document purposefully offers defines generic functionalities and advisedly offers flexibility with
flexibility with regard to parameter settings and mechanism choices, regard to parameters settings and mechanism choices, that are
that are expected to be made in other, technology-specific, expected to be made in other technology-specific documents.
documents.
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79. provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at https://datatracker.ietf.org/drafts/current/. Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on September 1, 2018. This Internet-Draft will expire on October 15, 2018.
Copyright Notice Copyright Notice
Copyright (c) 2018 IETF Trust and the persons identified as the Copyright (c) 2018 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(https://trustee.ietf.org/license-info) in effect on the date of (https://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
skipping to change at page 2, line 30 skipping to change at page 2, line 30
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3
2. LPWAN Architecture . . . . . . . . . . . . . . . . . . . . . 4 2. LPWAN Architecture . . . . . . . . . . . . . . . . . . . . . 4
3. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 5 3. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 5
4. SCHC overview . . . . . . . . . . . . . . . . . . . . . . . . 8 4. SCHC overview . . . . . . . . . . . . . . . . . . . . . . . . 8
5. Rule ID . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 5. Rule ID . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
6. Static Context Header Compression . . . . . . . . . . . . . . 10 6. Static Context Header Compression . . . . . . . . . . . . . . 12
6.1. SCHC C/D Rules . . . . . . . . . . . . . . . . . . . . . 11 6.1. SCHC C/D Rules . . . . . . . . . . . . . . . . . . . . . 13
6.2. Rule ID for SCHC C/D . . . . . . . . . . . . . . . . . . 13 6.2. Rule ID for SCHC C/D . . . . . . . . . . . . . . . . . . 15
6.3. Packet processing . . . . . . . . . . . . . . . . . . . . 13 6.3. Packet processing . . . . . . . . . . . . . . . . . . . . 15
6.4. Matching operators . . . . . . . . . . . . . . . . . . . 15 6.4. Matching operators . . . . . . . . . . . . . . . . . . . 17
6.5. Compression Decompression Actions (CDA) . . . . . . . . . 16 6.5. Compression Decompression Actions (CDA) . . . . . . . . . 17
6.5.1. not-sent CDA . . . . . . . . . . . . . . . . . . . . 17 6.5.1. not-sent CDA . . . . . . . . . . . . . . . . . . . . 19
6.5.2. value-sent CDA . . . . . . . . . . . . . . . . . . . 17 6.5.2. value-sent CDA . . . . . . . . . . . . . . . . . . . 19
6.5.3. mapping-sent CDA . . . . . . . . . . . . . . . . . . 17 6.5.3. mapping-sent CDA . . . . . . . . . . . . . . . . . . 19
6.5.4. LSB(y) CDA . . . . . . . . . . . . . . . . . . . . . 18 6.5.4. LSB(y) CDA . . . . . . . . . . . . . . . . . . . . . 19
6.5.5. DEViid, APPiid CDA . . . . . . . . . . . . . . . . . 18 6.5.5. DEViid, APPiid CDA . . . . . . . . . . . . . . . . . 20
6.5.6. Compute-* . . . . . . . . . . . . . . . . . . . . . . 18 6.5.6. Compute-* . . . . . . . . . . . . . . . . . . . . . . 20
7. Fragmentation . . . . . . . . . . . . . . . . . . . . . . . . 19 7. Fragmentation . . . . . . . . . . . . . . . . . . . . . . . . 20
7.1. Overview . . . . . . . . . . . . . . . . . . . . . . . . 19 7.1. Overview . . . . . . . . . . . . . . . . . . . . . . . . 20
7.2. Fragmentation Tools . . . . . . . . . . . . . . . . . . . 19 7.2. Fragmentation Tools . . . . . . . . . . . . . . . . . . . 21
7.3. Reliability modes . . . . . . . . . . . . . . . . . . . . 22 7.3. Reliability modes . . . . . . . . . . . . . . . . . . . . 24
7.4. Fragmentation Formats . . . . . . . . . . . . . . . . . . 24 7.4. Fragmentation Formats . . . . . . . . . . . . . . . . . . 26
7.4.1. Fragment format . . . . . . . . . . . . . . . . . . . 24 7.4.1. Fragment format . . . . . . . . . . . . . . . . . . . 26
7.4.2. All-1 and All-0 formats . . . . . . . . . . . . . . . 25 7.4.2. All-1 and All-0 formats . . . . . . . . . . . . . . . 27
7.4.3. ACK format . . . . . . . . . . . . . . . . . . . . . 26 7.4.3. SCHC ACK format . . . . . . . . . . . . . . . . . . . 28
7.4.4. Abort formats . . . . . . . . . . . . . . . . . . . . 29 7.4.4. Abort formats . . . . . . . . . . . . . . . . . . . . 31
7.5. Baseline mechanism . . . . . . . . . . . . . . . . . . . 30 7.5. Baseline mechanism . . . . . . . . . . . . . . . . . . . 32
7.5.1. No-ACK . . . . . . . . . . . . . . . . . . . . . . . 31 7.5.1. No-ACK . . . . . . . . . . . . . . . . . . . . . . . 33
7.5.2. ACK-Always . . . . . . . . . . . . . . . . . . . . . 32 7.5.2. ACK-Always . . . . . . . . . . . . . . . . . . . . . 34
7.5.3. ACK-on-Error . . . . . . . . . . . . . . . . . . . . 34 7.5.3. ACK-on-Error . . . . . . . . . . . . . . . . . . . . 36
7.6. Supporting multiple window sizes . . . . . . . . . . . . 36 7.6. Supporting multiple window sizes . . . . . . . . . . . . 38
7.7. Downlink SCHC fragment transmission . . . . . . . . . . . 36 7.7. Downlink SCHC Fragment transmission . . . . . . . . . . . 38
8. Padding management . . . . . . . . . . . . . . . . . . . . . 37 8. Padding management . . . . . . . . . . . . . . . . . . . . . 39
9. SCHC Compression for IPv6 and UDP headers . . . . . . . . . . 38 9. SCHC Compression for IPv6 and UDP headers . . . . . . . . . . 40
9.1. IPv6 version field . . . . . . . . . . . . . . . . . . . 38 9.1. IPv6 version field . . . . . . . . . . . . . . . . . . . 40
9.2. IPv6 Traffic class field . . . . . . . . . . . . . . . . 38 9.2. IPv6 Traffic class field . . . . . . . . . . . . . . . . 40
9.3. Flow label field . . . . . . . . . . . . . . . . . . . . 38 9.3. Flow label field . . . . . . . . . . . . . . . . . . . . 40
9.4. Payload Length field . . . . . . . . . . . . . . . . . . 39 9.4. Payload Length field . . . . . . . . . . . . . . . . . . 41
9.5. Next Header field . . . . . . . . . . . . . . . . . . . . 39 9.5. Next Header field . . . . . . . . . . . . . . . . . . . . 41
9.6. Hop Limit field . . . . . . . . . . . . . . . . . . . . . 39 9.6. Hop Limit field . . . . . . . . . . . . . . . . . . . . . 41
9.7. IPv6 addresses fields . . . . . . . . . . . . . . . . . . 39 9.7. IPv6 addresses fields . . . . . . . . . . . . . . . . . . 41
9.7.1. IPv6 source and destination prefixes . . . . . . . . 40 9.7.1. IPv6 source and destination prefixes . . . . . . . . 42
9.7.2. IPv6 source and destination IID . . . . . . . . . . . 40 9.7.2. IPv6 source and destination IID . . . . . . . . . . . 42
9.8. IPv6 extensions . . . . . . . . . . . . . . . . . . . . . 41 9.8. IPv6 extensions . . . . . . . . . . . . . . . . . . . . . 43
9.9. UDP source and destination port . . . . . . . . . . . . . 41 9.9. UDP source and destination port . . . . . . . . . . . . . 43
9.10. UDP length field . . . . . . . . . . . . . . . . . . . . 41 9.10. UDP length field . . . . . . . . . . . . . . . . . . . . 43
9.11. UDP Checksum field . . . . . . . . . . . . . . . . . . . 41 9.11. UDP Checksum field . . . . . . . . . . . . . . . . . . . 43
10. Security considerations . . . . . . . . . . . . . . . . . . . 42 10. Security considerations . . . . . . . . . . . . . . . . . . . 44
10.1. Security considerations for header compression . . . . . 42 10.1. Security considerations for header compression . . . . . 44
10.2. Security considerations for SCHC fragmentation . . . . . 42 10.2. Security considerations for SCHC Fragmentation . . . . . 44
11. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 43 11. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 45
12. References . . . . . . . . . . . . . . . . . . . . . . . . . 43 12. References . . . . . . . . . . . . . . . . . . . . . . . . . 45
12.1. Normative References . . . . . . . . . . . . . . . . . . 43 12.1. Normative References . . . . . . . . . . . . . . . . . . 45
12.2. Informative References . . . . . . . . . . . . . . . . . 44 12.2. Informative References . . . . . . . . . . . . . . . . . 46
Appendix A. SCHC Compression Examples . . . . . . . . . . . . . 44 Appendix A. SCHC Compression Examples . . . . . . . . . . . . . 46
Appendix B. Fragmentation Examples . . . . . . . . . . . . . . . 47 Appendix B. Fragmentation Examples . . . . . . . . . . . . . . . 49
Appendix C. Fragmentation State Machines . . . . . . . . . . . . 53 Appendix C. Fragmentation State Machines . . . . . . . . . . . . 55
Appendix D. Note . . . . . . . . . . . . . . . . . . . . . . . . 60 Appendix D. SCHC Parameters - Ticket #15 . . . . . . . . . . . . 62
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 60 Appendix E. Note . . . . . . . . . . . . . . . . . . . . . . . . 63
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 63
1. Introduction 1. Introduction
This document defines a header compression scheme and fragmentation This document defines a header compression scheme and fragmentation
functionality, both specially tailored for Low Power Wide Area functionality, both specially tailored for Low Power Wide Area
Networks (LPWAN). Networks (LPWAN).
Header compression is needed to efficiently bring Internet Header compression is needed to efficiently bring Internet
connectivity to the node within an LPWAN network. Some LPWAN connectivity to the node within an LPWAN network. Some LPWAN
networks properties can be exploited to get an efficient header networks properties can be exploited to get an efficient header
skipping to change at page 5, line 32 skipping to change at page 5, line 36
() () () / \ +---------+ +-----------+ () () () / \ +---------+ +-----------+
Dev Radio Gateways NGW Dev Radio Gateways NGW
Figure 1: LPWAN Architecture Figure 1: LPWAN Architecture
3. Terminology 3. Terminology
This section defines the terminology and acronyms used in this This section defines the terminology and acronyms used in this
document. document.
o Abort. A SCHC fragment format to signal the other end-point that o Abort. A SCHC Fragment format to signal the other end-point that
the on-going fragment transmission is stopped and finished. the on-going fragment transmission is stopped and finished.
o ACK (Acknowledgment). A SCHC fragment format used to report the o All-0. The SCHC Fragment format for the last frame of a window
success or unsuccess reception of a set of SCHC fragments.
o All-0. The SCHC fragment format for the last frame of a window
that is not the last one of a packet (see Window in this that is not the last one of a packet (see Window in this
glossary). glossary).
o All-1. The SCHC fragment format for the last frame of the packet. o All-1. The SCHC Fragment format for the last frame of the packet.
o All-0 empty. An All-0 SCHC fragment without a payload. It is o All-0 empty. An All-0 SCHC Fragment without a payload. It is
used to request the ACK with the encoded Bitmap when the used to request the SCHC ACK with the encoded Bitmap when the
Retransmission Timer expires, in a window that is not the last one Retransmission Timer expires, in a window that is not the last one
of a packet. of a packet.
o All-1 empty. An All-1 SCHC fragment without a payload. It is o All-1 empty. An All-1 SCHC Fragment without a payload. It is
used to request the ACK with the encoded Bitmap when the used to request the SCHC ACK with the encoded Bitmap when the
Retransmission Timer expires in the last window of a packet. Retransmission Timer expires in the last window of a packet.
o App: LPWAN Application. An application sending/receiving IPv6 o App: LPWAN Application. An application sending/receiving IPv6
packets to/from the Device. packets to/from the Device.
o APP-IID: Application Interface Identifier. Second part of the o APP-IID: Application Interface Identifier. Second part of the
IPv6 address that identifies the application server interface. IPv6 address that identifies the application server interface.
o Bi: Bidirectional, a rule entry that applies to headers of packets o Bi: Bidirectional, a rule entry that applies to headers of packets
travelling in both directions (Up and Dw). travelling in both directions (Up and Dw).
o Bitmap: a field of bits in an acknowledgment message that tells o Bitmap: a field of bits in an acknowledgment message that tells
the sender which SCHC fragments of a window were correctly the sender which SCHC Fragments of a window were correctly
received. received.
o C: Checked bit. Used in an acknowledgment (ACK) header to o C: Checked bit. Used in an acknowledgment (SCHC ACK) header to
determine if the MIC locally computed by the receiver matches (1) determine if the MIC locally computed by the receiver matches (1)
the received MIC or not (0). the received MIC or not (0).
o CDA: Compression/Decompression Action. Describes the reciprocal o CDA: Compression/Decompression Action. Describes the reciprocal
pair of actions that are performed at the compressor to compress a pair of actions that are performed at the compressor to compress a
header field and at the decompressor to recover the original header field and at the decompressor to recover the original
header field value. header field value.
o Compress Residue. The bytes that need to be sent after applying o Compress Residue. The bytes that need to be sent after applying
the SCHC compression over each header field the SCHC compression over each header field
skipping to change at page 6, line 42 skipping to change at page 6, line 46
o Dev: Device. A node connected to the LPWAN. A Dev SHOULD o Dev: Device. A node connected to the LPWAN. A Dev SHOULD
implement SCHC. implement SCHC.
o Dev-IID: Device Interface Identifier. Second part of the IPv6 o Dev-IID: Device Interface Identifier. Second part of the IPv6
address that identifies the device interface. address that identifies the device interface.
o DI: Direction Indicator. This field tells which direction of o DI: Direction Indicator. This field tells which direction of
packet travel (Up, Dw or Bi) a rule applies to. This allows for packet travel (Up, Dw or Bi) a rule applies to. This allows for
assymmetric processing. assymmetric processing.
o DTag: Datagram Tag. This SCHC fragmentation header field is set to o DTag: Datagram Tag. This SCHC Fragmentation header field is set to
the same value for all SCHC fragments carrying the same IPv6 the same value for all SCHC Fragments carrying the same IPv6
datagram. datagram.
o Dw: Dw: Downlink direction for compression/decompression in both o Dw: Dw: Downlink direction for compression/decompression in both
sides, from SCHC C/D in the network to SCHC C/D in the Dev. sides, from SCHC C/D in the network to SCHC C/D in the Dev.
o FCN: Fragment Compressed Number. This SCHC fragmentation header o FCN: Fragment Compressed Number. This SCHC Fragmentation header
field carries an efficient representation of a larger-sized field carries an efficient representation of a larger-sized
fragment number. fragment number.
o Field Description. A line in the Rule Table. o Field Description. A line in the Rule Table.
o FID: Field Identifier. This is an index to describe the header o FID: Field Identifier. This is an index to describe the header
fields in a Rule. fields in a Rule.
o FL: Field Length is the length of the field in bits for fixed o FL: Field Length is the length of the field in bits for fixed
values or a type (variable, token length, ...) for length unknown values or a type (variable, token length, ...) for length unknown
at the rule creation. The length of a header field is defined in at the rule creation. The length of a header field is defined in
the specific protocol standard. the specific protocol standard.
o FP: Field Position is a value that is used to identify the o FP: Field Position is a value that is used to identify the
position where each instance of a field appears in the header. position where each instance of a field appears in the header.
o SCHC Fragment: A data unit that carries a subset of a SCHC packet.
SCHC Fragmentation is needed when the size of a SCHC packet
exceeds the available payload size of the underlying L2 technology
data unit.
o IID: Interface Identifier. See the IPv6 addressing architecture o IID: Interface Identifier. See the IPv6 addressing architecture
[RFC7136] [RFC7136]
o Inactivity Timer. A timer used after receiving a SCHC fragment to o Inactivity Timer. A timer used after receiving a SCHC Fragment to
detect when there is an error and there is no possibility to detect when there is an error and there is no possibility to
continue an on-going SCHC fragmented packet transmission. continue an on-going SCHC Fragmented packet transmission.
o L2: Layer two. The immediate lower layer SCHC interfaces with. o L2: Layer two. The immediate lower layer SCHC interfaces with.
It is provided by an underlying LPWAN technology. It is provided by an underlying LPWAN technology.
o MIC: Message Integrity Check. A SCHC fragmentation header field o MIC: Message Integrity Check. A SCHC Fragmentation header field
computed over an IPv6 packet before fragmentation, used for error computed over an IPv6 packet before fragmentation, used for error
detection after IPv6 packet reassembly. detection after IPv6 packet reassembly.
o MO: Matching Operator. An operator used to match a value o MO: Matching Operator. An operator used to match a value
contained in a header field with a value contained in a Rule. contained in a header field with a value contained in a Rule.
o Retransmission Timer. A timer used by the SCHC fragment sender o Retransmission Timer. A timer used by the SCHC Fragment sender
during an on-going SCHC fragmented packet transmission to detect during an on-going SCHC Fragmented packet transmission to detect
possible link errors when waiting for a possible incoming ACK. possible link errors when waiting for a possible incoming SCHC
ACK.
o Rule: A set of header field values. o Rule: A set of header field values.
o Rule entry: A row in the rule that describes a header field. o Rule entry: A column in the rule that describes a parameter of the
header field.
o Rule ID: An identifier for a rule, SCHC C/D in both sides share o Rule ID: An identifier for a rule, SCHC C/D in both sides share
the same Rule ID for a specific packet. A set of Rule IDs are the same Rule ID for a specific packet. A set of Rule IDs are
used to support SCHC fragmentation functionality. used to support SCHC Fragmentation functionality.
o SCHC ACK: A SCHC acknowledgement for fragmentation, this format
used to report the success or unsuccess reception of a set of SCHC
Fragments. See Section 7 for more details.
o SCHC C/D: Static Context Header Compression Compressor/ o SCHC C/D: Static Context Header Compression Compressor/
Decompressor. A mechanism used in both sides, at the Dev and at Decompressor. A mechanism used in both sides, at the Dev and at
the network to achieve Compression/Decompression of headers. SCHC the network to achieve Compression/Decompression of headers. SCHC
C/D uses SCHC rules to perform compression and decompression. C/D uses SCHC rules to perform compression and decompression.
o SCHC packet: A packet (e.g. an IPv6 packet) whose header has been o SCHC Fragment: A data unit that carries a subset of a SCHC Packet.
SCHC Fragmentation is needed when the size of a SCHC packet
exceeds the available payload size of the underlying L2 technology
data unit.see Section 7.
o SCHC Packet: A packet (e.g. an IPv6 packet) whose header has been
compressed as per the header compression mechanism defined in this compressed as per the header compression mechanism defined in this
document. If the header compression process is unable to actually document. If the header compression process is unable to actually
compress the packet header, the packet with the uncompressed compress the packet header, the packet with the uncompressed
header is still called a SCHC packet (in this case, a Rule ID is header is still called a SCHC Packet (in this case, a Rule ID is
used to indicate that the packet header has not been compressed). used to indicate that the packet header has not been compressed).
See Section 6 for more details.
o TV: Target value. A value contained in the Rule that will be o TV: Target value. A value contained in the Rule that will be
matched with the value of a header field. matched with the value of a header field.
o Up: Uplink direction for compression/decompression in both sides, o Up: Uplink direction for compression/decompression in both sides,
from the Dev SCHC C/D to the network SCHC C/D. from the Dev SCHC C/D to the network SCHC C/D.
o W: Window bit. A SCHC fragment header field used in Window mode o W: Window bit. A SCHC Fragment header field used in Window mode
({Frag}), which carries the same value for all SCHC fragments of a Section 7, which carries the same value for all SCHC Fragments of
window. a window.
o Window: A subset of the SCHC fragments needed to carry a packet o Window: A subset of the SCHC Fragments needed to carry a packet
({Frag}). Section 7.
4. SCHC overview 4. SCHC overview
SCHC can be abstracted as an adaptation layer below IPv6 and the SCHC can be abstracted as an adaptation layer between IPv6 and the
underlying LPWAN technology. SCHC that comprises two sublayers (i.e. underlying LPWAN technology. SCHC comprises two sublayers (i.e. the
the Compression sublayer and the Fragmentation sublayer), as shown in Compression sublayer and the Fragmentation sublayer), as shown in
Figure 2. Figure 2.
+----------------+ +----------------+
| IPv6 | | IPv6 |
+- +----------------+ +- +----------------+
| | Compression | | | Compression |
SCHC < +----------------+ SCHC < +----------------+
| | Fragmentation | | | Fragmentation |
+- +----------------+ +- +----------------+
|LPWAN technology| |LPWAN technology|
+----------------+ +----------------+
Figure 2: Protocol stack comprising IPv6, SCHC and an LPWAN Figure 2: Protocol stack comprising IPv6, SCHC and an LPWAN
technology technology
As per this document, when a packet (e.g. an IPv6 packet) needs to be As per this document, when a packet (e.g. an IPv6 packet) needs to be
transmitted, header compression is first applied to the packet. The transmitted, header compression is first applied to the packet. The
resulting packet after header compression (whose header MAY actually resulting packet after header compression (whose header may or may
be smaller than that of the original packet or not) is called a SCHC not actually be smaller than that of the original packet) is called a
packet. Subsequently, and if the SCHC packet size exceeds the layer SCHC Packet. If the SCHC Packet size exceeds the layer 2 (L2) MTU,
2 (L2) MTU, fragmentation is then applied to the SCHC packet. This fragmentation is then applied to the SCHC Packet. The SCHC Packet or
process is illustrated by Figure 3 the SCHC Fragments are then transmitted over the LPWAN. The
reciprocal operations take place at the receiver. This process is
illustrated by Figure 3.
A packet (e.g. an IPv6 packet) A packet (e.g. an IPv6 packet)
| | ^
V v |
+------------------------------+ +-------------------+ +--------------------+
|SCHC Compression/Decompression| | SCHC Compression | | SCHC Decompression |
+------------------------------+ +------------------+ +--------------------+
| | |
SCHC packet | |
| | |
V | If no fragmentation (*) |
+------------------+ +----------------- SCHC Packet ------------>|
|SCHC Fragmentation| (if needed) | |
+------------------+ | |
| +--------------------+ +-----------------+
V | SCHC Fragmentation | | SCHC Reassembly |
SCHC Fragment(s) (if needed) +--------------------+ +-----------------+
^ | ^ |
| | | |
| | | |
| | | |
| | | |
| | | |
| +---------- SCHC Fragments ----------+ |
+-------------- SCHC ACK ------------------------+
SENDER RECEIVER
Figure 3: SCHC operations from a sender point of view: header *: see {{Frag}} to define the use of Fragmentation and the
compression and fragmentation technology-specific documents for the L2 decision.
Figure 3: SCHC operations taking place at the sender and the receiver
The SCHC Packet Compressed Header is formed by the Rule ID and the
Compress Residue both have a variable size, and in some cases, the
Compress Residue is not present depending on the Header Compression
achievement, see Section 6 for more details. The SCHC Packet has the
following format:
| Rule ID + Compress Residue |
+---------------------------------+--------------------+
| Compressed Header | Payload |
+---------------------------------+--------------------+
Figure 4: SCHC Packet
The Fragment Header size is variable and depends on the Fragmentation
parameters. The Fragment payload may contain: Compressed Header or
Payload or both and its size depends on the L2 data unit, see
Section 7. The SCHC Fragment has the following format:
| Rule ID + DTAG + W + FCN [+ MIC ] | Comp. Header | Payload |
+-----------------------------------+-------------------------+
| Fragment Header | Fragment |
+-----------------------------------+-------------------------+
Figure 5: SCHC Fragment
The SCHC ACK is byte aligned and the ACK Header and the encoded
Bitmap both have variable size. The SCHC ACK is used only in
Fragmentation and has the following format:
|Rule ID + DTag + W|
+------------------+-------- ... ---------+
| ACK Header | encoded Bitmap |
+------------------+-------- ... ---------+
Figure 6: SCHC ACK
5. Rule ID 5. Rule ID
Rule ID are identifiers used to select either the correct context to Rule ID are identifiers used to select either the correct context to
be used for Compression/Decompression functionalities or for SCHC be used for Compression/Decompression functionalities or for SCHC
Fragmentation or after trying to do SCHC C/D and SCHC fragmentation Fragmentation or after trying to do SCHC C/D and SCHC Fragmentation
the packet is sent as is. The size of the Rule ID is not specified the packet is sent as is. The size of the Rule ID is not specified
in this document, as it is implementation-specific and can vary in this document, as it is implementation-specific and can vary
according to the LPWAN technology and the number of Rules, among according to the LPWAN technology and the number of Rules, among
others. others.
The Rule IDs identifiers are: * In the SCHC C/D context the Rule used The Rule IDs identifiers are used:
to keep the Field Description of the header packet.
o In the SCHC C/D context to keep the Field Description of the
header packet.
o In SCHC Fragmentation to identify the specific modes and settings. o In SCHC Fragmentation to identify the specific modes and settings.
In bidirectional SCHC fragmentation at least two Rules In bidirectional SCHC Fragmentation at least two Rules
ID are needed. ID are needed.
o To identify the SCHC ACK in fragmentation
o And at least one Rule ID MAY be reserved to the case where no SCHC o And at least one Rule ID MAY be reserved to the case where no SCHC
C/D nor SCHC fragmentation were possible. C/D nor SCHC Fragmentation were possible.
6. Static Context Header Compression 6. Static Context Header Compression
In order to perform header compression, this document defines a In order to perform header compression, this document defines a
mechanism called Static Context Header Compression (SCHC), which is mechanism called Static Context Header Compression (SCHC), which is
based on using context, i.e. a set of rules to compress or decompress based on using context, i.e. a set of rules to compress or decompress
headers. SCHC avoids context synchronization, which is the most headers. SCHC avoids context synchronization, which is the most
bandwidth-consuming operation in other header compression mechanisms bandwidth-consuming operation in other header compression mechanisms
such as RoHC [RFC5795]. Since the nature of packets are highly such as RoHC [RFC5795]. Since the nature of packets are highly
predictable in LPWAN networks, static contexts MAY be stored predictable in LPWAN networks, static contexts MAY be stored
skipping to change at page 10, line 37 skipping to change at page 12, line 34
| UDP | | UDP | | UDP | | UDP |
| IPv6 | | IPv6 | | IPv6 | | IPv6 |
| | | | | | | |
|SCHC Comp / Frag| | | |SCHC Comp / Frag| | |
+--------+-------+ +-------+------+ +--------+-------+ +-------+------+
| +--+ +----+ +-----------+ . | +--+ +----+ +-----------+ .
+~~ |RG| === |NGW | === | SCHC |... Internet .. +~~ |RG| === |NGW | === | SCHC |... Internet ..
+--+ +----+ |Comp / Frag| +--+ +----+ |Comp / Frag|
+-----------+ +-----------+
Figure 4: Architecture Figure 7: Architecture
Figure 4 The figure represents the architecture for SCHC (Static Figure 7 The figure represents the architecture for SCHC (Static
Context Header Compression) Compression / Fragmentation where SCHC C/ Context Header Compression) Compression / Fragmentation where SCHC C/
D (Compressor/Decompressor) and SCHC Fragmentation are performed. It D (Compressor/Decompressor) and SCHC Fragmentation are performed. It
is based on [I-D.ietf-lpwan-overview] terminology. SCHC Compression is based on [I-D.ietf-lpwan-overview] terminology. SCHC Compression
/ Fragmentation is located on both sides of the transmission in the / Fragmentation is located on both sides of the transmission in the
Dev and in the Network side. In the Uplink direction, the Device Dev and in the Network side. In the Uplink direction, the Device
application packets use IPv6 or IPv6/UDP protocols. Before sending application packets use IPv6 or IPv6/UDP protocols. Before sending
these packets, the Dev compresses their headers using SCHC C/D and if these packets, the Dev compresses their headers using SCHC C/D and if
the SCHC packet resulting from the compression exceeds the maximum the SCHC Packet resulting from the compression exceeds the maximum
payload size of the underlying LPWAN technology, SCHC fragmentation payload size of the underlying LPWAN technology, SCHC Fragmentation
is performed, see Section 7. The resulting SCHC fragments are sent is performed, see Section 7. The resulting SCHC Fragments are sent
as one or more L2 frames to an LPWAN Radio Gateway (RG) which as one or more L2 frames to an LPWAN Radio Gateway (RG) which
forwards the frame(s) to a Network Gateway (NGW). forwards the frame(s) to a Network Gateway (NGW).
The NGW sends the data to an SCHC Fragmentation and then to the SCHC The NGW sends the data to an SCHC Fragmentation and then to the SCHC
C/D for decompression. The SCHC C/D in the Network side can be C/D for decompression. The SCHC C/D in the Network side can be
located in the Network Gateway (NGW) or somewhere else as long as a located in the Network Gateway (NGW) or somewhere else as long as a
tunnel is established between the NGW and the SCHC Compression / tunnel is established between the NGW and the SCHC Compression /
Fragmentation. Note that, for some LPWAN technologies, it MAY be Fragmentation. Note that, for some LPWAN technologies, it MAY be
suitable to locate SCHC fragmentation and reassembly functionality suitable to locate SCHC Fragmentation and reassembly functionality
nearer the NGW, in order to better deal with time constraints of such nearer the NGW, in order to better deal with time constraints of such
technologies. The SCHC C/Ds on both sides MUST share the same set of technologies. The SCHC C/Ds on both sides MUST share the same set of
Rules. After decompression, the packet can be sent over the Internet Rules. After decompression, the packet can be sent over the Internet
to one or several LPWAN Application Servers (App). to one or several LPWAN Application Servers (App).
The SCHC Compression / Fragmentation process is symmetrical, The SCHC Compression / Fragmentation process is symmetrical,
therefore the same description applies to the reverse direction. therefore the same description applies to the reverse direction.
6.1. SCHC C/D Rules 6.1. SCHC C/D Rules
The main idea of the SCHC compression scheme is to transmit the Rule The main idea of the SCHC compression scheme is to transmit the Rule
ID to the other end instead of sending known field values. This Rule ID to the other end instead of sending known field values. This Rule
ID identifies a rule that provides the closest match to the original ID identifies a rule that provides the closest match to the original
packet values. Hence, when a value is known by both ends, it is only packet values. Hence, when a value is known by both ends, it is only
necessary to send the corresponding Rule ID over the LPWAN network. necessary to send the corresponding Rule ID over the LPWAN network.
How Rules are generated is out of the scope of this document. The How Rules are generated is out of the scope of this document. The
rule MAY be changed but it will be specified in another document. rule MAY be changed but it will be specified in another document.
The context contains a list of rules (cf. Figure 5). Each Rule The context contains a list of rules (cf. Figure 8). Each Rule
contains itself a list of Fields Descriptions composed of a field contains itself a list of Fields Descriptions composed of a field
identifier (FID), a field length (FL), a field position (FP), a identifier (FID), a field length (FL), a field position (FP), a
direction indicator (DI), a target value (TV), a matching operator direction indicator (DI), a target value (TV), a matching operator
(MO) and a Compression/Decompression Action (CDA). (MO) and a Compression/Decompression Action (CDA).
/-----------------------------------------------------------------\ /-----------------------------------------------------------------\
| Rule N | | Rule N |
/-----------------------------------------------------------------\| /-----------------------------------------------------------------\|
| Rule i || | Rule i ||
/-----------------------------------------------------------------\|| /-----------------------------------------------------------------\||
skipping to change at page 12, line 23 skipping to change at page 13, line 49
|+-------+--+--+--+------------+-----------------+---------------+||| |+-------+--+--+--+------------+-----------------+---------------+|||
||Field 2|FL|FP|DI|Target Value|Matching Operator|Comp/Decomp Act|||| ||Field 2|FL|FP|DI|Target Value|Matching Operator|Comp/Decomp Act||||
|+-------+--+--+--+------------+-----------------+---------------+||| |+-------+--+--+--+------------+-----------------+---------------+|||
||... |..|..|..| ... | ... | ... |||| ||... |..|..|..| ... | ... | ... ||||
|+-------+--+--+--+------------+-----------------+---------------+||/ |+-------+--+--+--+------------+-----------------+---------------+||/
||Field N|FL|FP|DI|Target Value|Matching Operator|Comp/Decomp Act||| ||Field N|FL|FP|DI|Target Value|Matching Operator|Comp/Decomp Act|||
|+-------+--+--+--+------------+-----------------+---------------+|/ |+-------+--+--+--+------------+-----------------+---------------+|/
| | | |
\-----------------------------------------------------------------/ \-----------------------------------------------------------------/
Figure 5: Compression/Decompression Context Figure 8: Compression/Decompression Context
The Rule does not describe how to delineate each field in the The Rule does not describe how to delineate each field in the
original packet header. This MUST be known from the compressor/ original packet header. This MUST be known from the compressor/
decompressor. The rule only describes the compression/decompression decompressor. The rule only describes the compression/decompression
behavior for each header field. In the rule, the Fields Descriptions behavior for each header field. In the rule, the Fields Descriptions
are listed in the order in which the fields appear in the packet are listed in the order in which the fields appear in the packet
header. header.
The Rule also describes the Compression Residue sent regarding the The Rule also describes the Compression Residue sent regarding the
order of the Fields Descriptions in the Rule. order of the Fields Descriptions in the Rule.
skipping to change at page 12, line 49 skipping to change at page 14, line 29
o Field Length (FL) represents the length of the field in bits for o Field Length (FL) represents the length of the field in bits for
fixed values or a type (variable, token length, ...) for Field fixed values or a type (variable, token length, ...) for Field
Description length unknown at the rule creation. The length of a Description length unknown at the rule creation. The length of a
header field is defined in the specific protocol standard. header field is defined in the specific protocol standard.
o Field Position (FP): indicating if several instances of a field o Field Position (FP): indicating if several instances of a field
exist in the headers which one is targeted. The default position exist in the headers which one is targeted. The default position
is 1. is 1.
o A direction indicator (DI) indicating the packet direction(s) this o A direction indicator (DI) indicates the packet direction(s) this
Field Description applies to. Three values are possible: Field Description applies to. Three values are possible:
* UPLINK (Up): this Field Description is only applicable to * UPLINK (Up): this Field Description is only applicable to
packets sent by the Dev to the App, packets sent by the Dev to the App,
* DOWNLINK (Dw): this Field Description is only applicable to * DOWNLINK (Dw): this Field Description is only applicable to
packets sent from the App to the Dev, packets sent from the App to the Dev,
* BIDIRECTIONAL (Bi): this Field Description is applicable to * BIDIRECTIONAL (Bi): this Field Description is applicable to
packets travelling both Up and Dw. packets travelling both Up and Dw.
skipping to change at page 14, line 27 skipping to change at page 16, line 7
* When the DI has matched, then the next step is to identify the * When the DI has matched, then the next step is to identify the
fields according to Field Position (FP). If the Field Position fields according to Field Position (FP). If the Field Position
does not correspond, the Rule is not used and the SCHC C/D does not correspond, the Rule is not used and the SCHC C/D
proceeds to consider the next Rule. proceeds to consider the next Rule.
* Once the DI and the FP correspond to the header information, * Once the DI and the FP correspond to the header information,
each field's value of the packet is then compared to the each field's value of the packet is then compared to the
corresponding Target Value (TV) stored in the Rule for that corresponding Target Value (TV) stored in the Rule for that
specific field using the matching operator (MO). specific field using the matching operator (MO).
* If all the fields in the packet's header satisfy all the If all the fields in the packet's header satisfy all the
matching operators (MO) of a Rule (i.e. all MO results are matching operators (MO) of a Rule (i.e. all MO results are
True), the fields of the header are then compressed according True), the fields of the header are then compressed according
to the Compression/Decompression Actions (CDAs) and a to the Compression/Decompression Actions (CDAs) and a
compressed header (with possibly a Compressed Residue) SHOULD compressed header (with possibly a Compressed Residue) SHOULD
be obtained. Otherwise, the next Rule is tested. be obtained. Otherwise, the next Rule is tested.
* If no eligible Rule is found, then the header MUST be sent * If no eligible Rule is found, then the header MUST be sent
without compression, depending on the L2 PDU size, this is one without compression, depending on the L2 PDU size, this is one
of the case that MAY require the use of the SCHC fragmentation of the case that MAY require the use of the SCHC Fragmentation
process. process.
o Sending: If an eligible Rule is found, the Rule ID is sent to the o Sending: If an eligible Rule is found, the Rule ID is sent to the
other end followed by the Compression Residue (which could be other end followed by the Compression Residue (which could be
empty) and directly followed by the payload. The product of the empty) and directly followed by the payload. The product of the
Compression Residue is sent in the order expressed in the Rule for Compression Residue is sent in the order expressed in the Rule for
all the fields. The way the Rule ID is sent depends on the all the fields. The way the Rule ID is sent depends on the
specific LPWAN layer two technology. For example, it can be specific LPWAN layer two technology. For example, it can be
either included in a Layer 2 header or sent in the first byte of either included in a Layer 2 header or sent in the first byte of
the L2 payload. (Cf. Figure 6). This process will be specified the L2 payload. (Cf. Figure 9). This process will be specified
in the LPWAN technology-specific document and is out of the scope in the LPWAN technology-specific document and is out of the scope
of the present document. On LPWAN technologies that are byte- of the present document. On LPWAN technologies that are byte-
oriented, the compressed header concatenated with the original oriented, the compressed header concatenated with the original
packet payload is padded to a multiple of 8 bits, if needed. See packet payload is padded to a multiple of 8 bits, if needed. See
Section 8 for details. Section 8 for details.
o Decompression: When doing decompression, in the network side the o Decompression: When doing decompression, in the network side the
SCHC C/D needs to find the correct Rule based on the L2 address SCHC C/D needs to find the correct Rule based on the L2 address
and in this way, it can use the Dev-ID and the Rule-ID. In the and in this way, it can use the Dev-ID and the Rule-ID. In the
Dev side, only the Rule ID is needed to identify the correct Rule Dev side, only the Rule ID is needed to identify the correct Rule
skipping to change at page 15, line 25 skipping to change at page 17, line 9
the compressed header format and associates the values to the the compressed header format and associates the values to the
header fields. The receiver applies the CDA action to reconstruct header fields. The receiver applies the CDA action to reconstruct
the original header fields. The CDA application order can be the original header fields. The CDA application order can be
different from the order given by the Rule. For instance, different from the order given by the Rule. For instance,
Compute-* SHOULD be applied at the end, after all the other CDAs. Compute-* SHOULD be applied at the end, after all the other CDAs.
+--- ... --+------- ... -------+------------------+~~~~~~~ +--- ... --+------- ... -------+------------------+~~~~~~~
| Rule ID |Compression Residue| packet payload |padding | Rule ID |Compression Residue| packet payload |padding
+--- ... --+------- ... -------+------------------+~~~~~~~ +--- ... --+------- ... -------+------------------+~~~~~~~
(optional) (optional)
<----- compressed header ------> |----- compressed header ------|
Figure 6: SCHC C/D Packet Format Figure 9: SCHC C/D Packet Format
6.4. Matching operators 6.4. Matching operators
Matching Operators (MOs) are functions used by both SCHC C/D Matching Operators (MOs) are functions used by both SCHC C/D
endpoints involved in the header compression/decompression. They are endpoints involved in the header compression/decompression. They are
not typed and can be indifferently applied to integer, string or any not typed and can be indifferently applied to integer, string or any
other data type. The result of the operation can either be True or other data type. The result of the operation can either be True or
False. MOs are defined as follows: False. MOs are defined as follows:
o equal: The match result is True if a field value in a packet and o equal: The match result is True if a field value in a packet and
skipping to change at page 16, line 28 skipping to change at page 18, line 20
|value-sent |send |build from received value | |value-sent |send |build from received value |
|mapping-sent |send index |value from index on a table | |mapping-sent |send index |value from index on a table |
|LSB(y) |send LSB |TV, received value | |LSB(y) |send LSB |TV, received value |
|compute-length |elided |compute length | |compute-length |elided |compute length |
|compute-checksum |elided |compute UDP checksum | |compute-checksum |elided |compute UDP checksum |
|Deviid |elided |build IID from L2 Dev addr | |Deviid |elided |build IID from L2 Dev addr |
|Appiid |elided |build IID from L2 App addr | |Appiid |elided |build IID from L2 App addr |
\--------------------+-------------+----------------------------/ \--------------------+-------------+----------------------------/
y=size of the transmitted bits y=size of the transmitted bits
Figure 7: Compression and Decompression Functions Figure 10: Compression and Decompression Functions
Figure 7 summarizes the basic functions that can be used to compress Figure 10 summarizes the basic functions that can be used to compress
and decompress a field. The first column lists the actions name. and decompress a field. The first column lists the actions name.
The second and third columns outline the reciprocal compression/ The second and third columns outline the reciprocal compression/
decompression behavior for each action. decompression behavior for each action.
Compression is done in order that Fields Descriptions appear in the Compression is done in order that Fields Descriptions appear in the
Rule. The result of each Compression/Decompression Action is Rule. The result of each Compression/Decompression Action is
appended to the working Compression Residue in that same order. The appended to the working Compression Residue in that same order. The
receiver knows the size of each compressed field which can be given receiver knows the size of each compressed field which can be given
by the rule or MAY be sent with the compressed header. by the rule or MAY be sent with the compressed header.
If the field is identified as being variable in the Field If the field is identified as being variable in the Field
Description, then the size of the Compression Residue value in bytes Description, then the size of the Compression Residue value in bytes
MUST be sent first using the following coding: MUST be sent first using the following coding:
o If the size is between 0 and 14 bytes, it is sent as a 4-bits o If the size is between 0 and 14 bytes, it is sent as a 4-bits
integer. integer.
o For values between 15 and 255, the first 4 bits sent are set to 1 o For values between 15 and 254, the first 4 bits sent are set to 1
and the size is sent using 8 bits integer. and the size is sent using 8 bits integer.
o For higher values of size, the first 12 bits are set to 1 and the o For higher values of size, the first 12 bits are set to 1 and the
next two bytes contain the size value as a 16 bits integer. next two bytes contain the size value as a 16 bits integer.
o If a field does not exist in the packet but in the Rule and its FL o If a field does not exist in the packet but in the Rule and its FL
is variable, the size zero MUST be used. is variable, the size zero MUST be used.
6.5.1. not-sent CDA 6.5.1. not-sent CDA
skipping to change at page 19, line 10 skipping to change at page 20, line 45
o compute-checksum: computes a checksum from the information already o compute-checksum: computes a checksum from the information already
received by the SCHC C/D. This field MAY be used to compute UDP received by the SCHC C/D. This field MAY be used to compute UDP
checksum. checksum.
7. Fragmentation 7. Fragmentation
7.1. Overview 7.1. Overview
In LPWAN technologies, the L2 data unit size typically varies from In LPWAN technologies, the L2 data unit size typically varies from
tens to hundreds of bytes. The SCHC fragmentation MAY be used either tens to hundreds of bytes. The SCHC Fragmentation MAY be used either
because after applying SCHC C/D or when SCHC C/D is not possible the because after applying SCHC C/D or when SCHC C/D is not possible the
entire SCHC packet still exceeds the L2 data unit. entire SCHC Packet still exceeds the L2 data unit.
The SCHC fragmentation functionality defined in this document has The SCHC Fragmentation functionality defined in this document has
been designed under the assumption that data unit out-of- sequence been designed under the assumption that data unit out-of- sequence
delivery will not happen between the entity performing fragmentation delivery will not happen between the entity performing fragmentation
and the entity performing reassembly. This assumption allows and the entity performing reassembly. This assumption allows
reducing the complexity and overhead of the SCHC fragmentation reducing the complexity and overhead of the SCHC Fragmentation
mechanism. mechanism.
To adapt the SCHC fragmentation to the capabilities of LPWAN To adapt the SCHC Fragmentation to the capabilities of LPWAN
technologies is required to enable optional SCHC fragment technologies is required to enable optional SCHC Fragment
retransmission and to allow a stepper delivery for the reliability of retransmission and to allow a stepper delivery for the reliability of
SCHC fragments. This document does not make any decision with regard SCHC Fragments. This document does not make any decision with regard
to which SCHC fragment delivery reliability mode will be used over a to which SCHC Fragment delivery reliability mode will be used over a
specific LPWAN technology. These details will be defined in other specific LPWAN technology. These details will be defined in other
technology-specific documents. technology-specific documents.
7.2. Fragmentation Tools 7.2. Fragmentation Tools
This subsection describes the different tools that are used to enable This subsection describes the different tools that are used to enable
the SCHC fragmentation functionality defined in this document, such the SCHC Fragmentation functionality defined in this document, such
as fields in the SCHC fragmentation header frames (see the related as fields in the SCHC Fragmentation header frames (see the related
formats in Section 7.4), and the different parameters supported in formats in Section 7.4), and the different parameters supported in
the reliability modes such as timers and parameters. the reliability modes such as timers and parameters.
o Rule ID. The Rule ID is present in the SCHC fragment header and o Rule ID. The Rule ID is present in the SCHC Fragment header and
in the ACK header format. The Rule ID in a SCHC fragment header in the SCHC ACK header format. The Rule ID in a SCHC fragment
is used to identify that a SCHC fragment is being carried, which header is used to identify that a SCHC Fragment is being carried,
SCHC fragmentation reliability mode is used and which window size which SCHC Fragmentation reliability mode is used and which window
is used. The Rule ID in the SCHC fragmentation header also allows size is used. The Rule ID in the SCHC Fragmentation header also
interleaving non-fragmented packets and SCHC fragments that carry allows interleaving non-fragmented
other SCHC packets. The Rule ID in an ACK identifies the message packets and SCHC Fragments that carry other SCHC Packets. The
as an ACK. Rule ID in an SCHC ACK identifies the message as an SCHC ACK.
o Fragment Compressed Number (FCN). The FCN is included in all SCHC o Fragment Compressed Number (FCN). The FCN is included in all SCHC
fragments. This field can be understood as a truncated, Fragments. This field can be understood as a truncated,
efficient representation of a larger-sized fragment number, and efficient representation of a larger-sized fragment number, and
does not carry an absolute SCHC fragment number. There are two does not carry an absolute SCHC Fragment number. There are two
FCN reserved values that are used for controlling the SCHC FCN reserved values that are used for controlling the SCHC
fragmentation process, as described next: Fragmentation process, as described next:
* The FCN value with all the bits equal to 1 (All-1) denotes the * The FCN value with all the bits equal to 1 (All-1) denotes the
last SCHC fragment of a packet. The last window of a packet is last SCHC Fragment of a packet. The last window of a packet is
called an All-1 window. called an All-1 window.
* The FCN value with all the bits equal to 0 (All-0) denotes the * The FCN value with all the bits equal to 0 (All-0) denotes the
last SCHC fragment of a window that is not the last one of the last SCHC Fragment of a window that is not the last one of the
packet. Such a window is called an All-0 window. packet. Such a window is called an All-0 window.
The rest of the FCN values are assigned in a sequentially The rest of the FCN values are assigned in a sequentially
decreasing order, which has the purpose to avoid possible decreasing order, which has the purpose to avoid possible
ambiguity for the receiver that might arise under certain ambiguity for the receiver that might arise under certain
conditions. In the SCHC fragments, this field is an unsigned conditions. In the SCHC Fragments, this field is an unsigned
integer, with a size of N bits. In the No-ACK mode, it is set to integer, with a size of N bits. In the No-ACK mode, it is set to
1 bit (N=1), All-0 is used in all SCHC fragments and All-1 for the 1 bit (N=1), All-0 is used in all SCHC Fragments and All-1 for the
last one. For the other reliability modes, it is recommended to last one. For the other reliability modes, it is recommended to
use a number of bits (N) equal to or greater than 3. use a number of bits (N) equal to or greater than 3.
Nevertheless, the appropriate value of N MUST be defined in the Nevertheless, the appropriate value of N MUST be defined in the
corresponding technology-specific profile documents. For windows corresponding technology-specific profile documents. For windows
that are not the last one from a SCHC fragmented packet, the FCN that are not the last one from a SCHC Fragmented packet, the FCN
for the last SCHC fragment in such windows is an All-0. This for the last SCHC Fragment in such windows is an All-0. This
indicates that the window is finished and communication proceeds indicates that the window is finished and communication proceeds
according to the reliability mode in use. The FCN for the last according to the reliability mode in use. The FCN for the last
SCHC fragment in the last window is an All-1, indicating the last SCHC Fragment in the last window is an All-1, indicating the last
SCHC fragment of the SCHC packet. It is also important to note SCHC Fragment of the SCHC Packet. It is also important to note
that, in the No-ACK mode or when N=1, the last SCHC fragment of that, in the No-ACK mode or when N=1, the last SCHC Fragment of
the packet will carry a FCN equal to 1, while all previous SCHC the packet will carry a FCN equal to 1, while all previous SCHC
fragments will carry a FCN of 0. For further details see Fragments will carry a FCN to 0. For further details see
Section 7.5. The highest FCN in the window, denoted MAX_WIND_FCN, Section 7.5. The highest FCN in the window, denoted MAX_WIND_FCN,
MUST be a value equal to or smaller than 2^N-2. (Example for N=5, MUST be a value equal to or smaller than 2^N-2. (Example for N=5,
MAX_WIND_FCN MAY be set to 23, then subsequent FCNs are set MAX_WIND_FCN MAY be set to 23, then subsequent FCNs are set
sequentially and in decreasing order, and the FCN will wrap from 0 sequentially and in decreasing order, and the FCN will wrap from 0
back to 23). back to 23).
o Datagram Tag (DTag). The DTag field, if present, is set to the o Datagram Tag (DTag). The DTag field, if present, is set to the
same value for all SCHC fragments carrying the same SCHC same value for all SCHC Fragments carrying the same SCHC
packet, and to different values for different datagrams. Using packet, and to different values for different SCHC Packets. Using
this field, the sender can interleave fragments from different this field, the sender can interleave fragments from different
SCHC packets, while the receiver can still tell them apart. In SCHC Packets, while the receiver can still tell them apart. In
the SCHC fragment formats, the size of the DTag field is T bits, the SCHC Fragment formats, the size of the DTag field is T bits,
which MAY be set to a value greater than or equal to 0 bits. For which MAY be set to a value greater than or equal to 0 bits. For
each new SCHC packet processed by the sender, DTag MUST be each new SCHC Packet processed by the sender, DTag MUST be
sequentially increased, from 0 to 2^T - 1 wrapping back from 2^T - sequentially increased, from 0 to 2^T - 1 wrapping back from 2^T -
1 to 0. In the ACK format, DTag carries the same value as the 1 to 0. In the SCHC ACK format, DTag carries the same value as
DTag field in the SCHC fragments for which this ACK is intended. the DTag field in the SCHC Fragments for which this SCHC ACK is
intended. When there is no Dtag, there can be only 1 SCHC Packet
in transist. And only after all its fragments have been
transmitted another SCHC Packet could be sent. The length of
DTag, denoted T is not given in this document because is technolgy
dependant, and will be defined in the corresponding technology-
documents. DTag is based on the number of simultaneous packets
supported.
o W (window): W is a 1-bit field. This field carries the same value o W (window): W is a 1-bit field. This field carries the same value
for all SCHC fragments of a window, and it is complemented for the for all SCHC Fragments of a window, and it is complemented for the
next window. The initial value for this field is 0. In the ACK next window. The initial value for this field is 0. In the SCHC
format, this field also has a size of 1 bit. In all ACKs, the W ACK format, this field also has a size of 1 bit. In all SCHC
bit carries the same value as the W bit carried by the SCHC ACKs, the W bit carries the same value as the W bit carried by the
fragments whose reception is being positively or negatively SCHC Fragments whose reception is being positively or negatively
acknowledged by the ACK. acknowledged by the SCHC ACK.
o Message Integrity Check (MIC). This field, which has a size of M o Message Integrity Check (MIC). This field is computed by the
bits, is computed by the sender over the complete SCHC packet sender over the complete SCHC Packet and before SCHC
before SCHC fragmentation. The MIC allows the receiver to check fragmentation. The MIC allows the receiver to check errors in the
errors in the reassembled packet, while it also enables reassembled packet, while it also enables compressing the UDP
compressing the UDP checksum by use of SCHC compression. The checksum by use of SCHC compression. The CRC32 as 0xEDB88320
CRC32 as 0xEDB88320 (i.e. the reverse representation of the (i.e. the reverse representation of the polynomial used e.g. in
polynomial used e.g. in the Ethernet standard [RFC3385]) is the Ethernet standard [RFC3385]) is recommended as the default
recommended as the default algorithm for computing the MIC. algorithm for computing the MIC. Nevertheless, other algorithms
Nevertheless, other algorithms MAY be required and are defined in MAY be required and are defined in the technology-specific
the technology-specific documents. documents as well as the length in bits of the MIC used.
o C (MIC checked): C is a 1-bit field. This field is used in the o C (MIC checked): C is a 1-bit field. This field is used in the
ACK packets to report the outcome of the MIC check, i.e. whether SCHC ACK packets to report the outcome of the MIC check, i.e.
the reassembled packet was correctly received or not. A value of whether the reassembled packet was correctly received or not. A
1 represents a positive MIC check at the receiver side (i.e. the value of 1 represents a positive MIC check at the receiver side
MIC computed by the receiver matches the received MIC). (i.e. the MIC computed by the receiver matches the received MIC).
o Retransmission Timer. A SCHC fragment sender uses it after the o Retransmission Timer. A SCHC Fragment sender uses it after the
transmission of a window to detect a transmission error of the ACK transmission of a window to detect a transmission error of the
corresponding to this window. Depending on the reliability mode, SCHC ACK corresponding to this window. Depending on the
it will lead to a request an ACK retransmission (in ACK-Always reliability mode, it will lead to a request an SCHC ACK
mode) or it will trigger the transmission of the next window (in retransmission (in ACK-Always mode) or it will trigger the
ACK-on-Error mode). The duration of this timer is not defined in transmission of the next window (in ACK-on-Error mode). The
this document and MUST be defined in the corresponding technology duration of this timer is not defined in this document and MUST be
documents. defined in the corresponding technology documents.
o Inactivity Timer. A SCHC fragment receiver uses it to take action o Inactivity Timer. A SCHC Fragment receiver uses it to take action
when there is a problem in the transmission of SCHC fragments. when there is a problem in the transmission of SCHC fragments.
Such a problem could be detected by the receiver not getting a Such a problem could be detected by the receiver not getting a
single SCHC fragment during a given period of time or not getting single SCHC Fragment during a given period of time or not getting
a given number of packets in a given period of time. When this a given number of packets in a given period of time. When this
happens, an Abort message will be sent (see related text later in happens, an Abort message will be sent (see related text later in
this section). Initially, and each time a SCHC fragment is this section). Initially, and each time a SCHC Fragment is
received, the timer is reinitialized. The duration of this timer received, the timer is reinitialized. The duration of this timer
is not defined in this document and MUST be defined in the is not defined in this document and MUST be defined in the
specific technology document. specific technology document.
o Attempts. This counter counts the requests for a missing ACK. o Attempts. This counter counts the requests for a missing SCHC
When it reaches the value MAX_ACK_REQUESTS, the sender assume ACK. When it reaches the value MAX_ACK_REQUESTS, the sender
there are recurrent SCHC fragment transmission errors and assume there are recurrent SCHC Fragment transmission errors and
determines that an Abort is needed. The default value offered determines that an Abort is needed. The default value offered
MAX_ACK_REQUESTS is not stated in this document, and it is MAX_ACK_REQUESTS is not stated in this document, and it is
expected to be defined in the specific technology document. The expected to be defined in the specific technology document. The
Attempts counter is defined per window. It is initialized each Attempts counter is defined per window. It is initialized each
time a new window is used. time a new window is used.
o Bitmap. The Bitmap is a sequence of bits carried in an ACK. Each o Bitmap. The Bitmap is a sequence of bits carried in an SCHC ACK.
bit in the Bitmap corresponds to a SCHC fragment of the current Each bit in the Bitmap corresponds to a SCHC fragment of the
window, and provides feedback on whether the SCHC fragment has current window, and provides feedback on whether the SCHC Fragment
been received or not. The right-most position on the Bitmap has been received or not. The right-most position on the Bitmap
reports if the All-0 or All-1 fragment has been received or not. reports if the All-0 or All-1 fragment has been received or not.
Feedback on the SCHC fragment with the highest FCN value is Feedback on the SCHC fragment with the highest FCN value is
provided by the bit in the left-most position of the Bitmap. In provided by the bit in the left-most position of the Bitmap. In
the Bitmap, a bit set to 1 indicates that the SCHC fragment of FCN the Bitmap, a bit set to 1 indicates that the SCHC Fragment of FCN
corresponding to that bit position has been correctly sent and corresponding to that bit position has been correctly sent and
received. The text above describes the internal representation of received. The text above describes the internal representation of
the Bitmap. When inserted in the ACK for transmission from the the Bitmap. When inserted in the SCHC ACK for transmission from
receiver to the sender, the Bitmap MAY be truncated for energy/ the receiver to the sender, the Bitmap MAY be truncated for
bandwidth optimisation, see more details in Section 7.4.3.1. energy/bandwidth optimisation, see more details in
Section 7.4.3.1.
o Abort. On expiration of the Inactivity timer, or when Attempts o Abort. On expiration of the Inactivity timer, or when Attempts
reached MAX_ACK_REQUESTS or upon an occurrence of some other reached MAX_ACK_REQUESTS or upon an occurrence of some other
error, the sender or the receiver MUST use the Abort. When the error, the sender or the receiver MUST use the Abort. When the
receiver needs to abort the on-going SCHC fragmented packet receiver needs to abort the on-going SCHC Fragmented packet
transmission, it sends the Receiver-Abort format. When the sender transmission, it sends the Receiver-Abort format. When the sender
needs to abort the transmission, it sends the Sender-Abort format. needs to abort the transmission, it sends the Sender-Abort format.
None of the Abort are acknowledged. None of the Abort are acknowledged.
o Padding (P). If it is needed, the number of bits used for padding o Padding (P). If it is needed, the number of bits used for padding
is not defined and depends on the size of the Rule ID, DTag and is not defined and depends on the size of the Rule ID, DTag and
FCN fields, and on the L2 payload size (see Section 8). Some ACKs FCN fields, and on the L2 payload size (see Section 8). Some SCHC
are byte-aligned and do not need padding (see Section 7.4.3.1). ACKs are byte-aligned and do not need padding (see
Section 7.4.3.1).
7.3. Reliability modes 7.3. Reliability modes
This specification defines three reliability modes: No-ACK, ACK- This specification defines three reliability modes: No-ACK, ACK-
Always and ACK-on-Error. ACK-Always and ACK-on-Error operate on Always and ACK-on-Error. ACK-Always and ACK-on-Error operate on
windows of SCHC fragments. A window of SCHC fragments is a subset of windows of SCHC Fragments. A window of SCHC Fragments is a subset of
the full set of SCHC fragments needed to carry a packet or an SCHC the full set of SCHC Fragments needed to carry a packet or an SCHC
packet. Packet.
o No-ACK. No-ACK is the simplest SCHC fragment reliability mode. o No-ACK. No-ACK is the simplest SCHC Fragment reliability mode.
The receiver does not generate overhead in the form of The receiver does not generate overhead in the form of
acknowledgments (ACKs). However, this mode does not enhance acknowledgments (ACKs). However, this mode does not enhance
reliability beyond that offered by the underlying LPWAN reliability beyond that offered by the underlying LPWAN
technology. In the No-ACK mode, the receiver MUST NOT issue ACKs. technology. In the No-ACK mode, the receiver MUST NOT issue SCHC
See further details in Section 7.5.1. ACKs. See further details in Section 7.5.1.
o ACK-Always. The ACK-Always mode provides flow control using a o ACK-Always. The ACK-Always mode provides flow control using a
window scheme. This mode is also able to handle long bursts of window scheme. This mode is also able to handle long bursts of
lost SCHC fragments since detection of such events can be done lost SCHC Fragments since detection of such events can be done
before the end of the SCHC packet transmission as long as the before the end of the SCHC Packet transmission as long as the
window size is short enough. However, such benefit comes at the window size is short enough. However, such benefit comes at the
expense of ACK use. In ACK-Always the receiver sends an ACK after expense of SCHC ACK use. In ACK-Always the receiver sends an SCHC
a window of SCHC fragments has been received, where a window of ACK after a window of SCHC Fragments has been received, where a
SCHC fragments is a subset of the whole number of SCHC fragments window of SCHC Fragments is a subset of the whole number of SCHC
needed to carry a complete SCHC packet. The ACK is used to inform Fragments needed to carry a complete SCHC Packet. The SCHC ACK is
the sender if a SCHC fragment in the actual window has been lost used to inform the sender if a SCHC fragment in the actual window
or well received. Upon an ACK reception, the sender retransmits has been lost or well received. Upon an SCHC ACK reception, the
the lost SCHC fragments. When an ACK is lost and the sender has sender retransmits the lost SCHC Fragments. When an SCHC ACK is
not received it before the expiration of the Inactivity Timer, the lost and the sender has not received it before the expiration of
sender uses an ACK request by sending the All-1 empty SCHC the Inactivity Timer, the sender uses an SCHC ACK request by
fragment. The maximum number of ACK requests is MAX_ACK_REQUESTS. sending the All-1 empty SCHC Fragment. The maximum number of SCHC
If the MAX_ACK_REQUEST is reached the transmission needs to be ACK requests is MAX_ACK_REQUESTS. If the MAX_ACK_REQUEST is
Aborted. See further details in Section 7.5.2. reached the transmission needs to be Aborted. See further details
in {{ACK- Always-subsection}}.
o ACK-on-Error. The ACK-on-Error mode is suitable for links o ACK-on-Error. The ACK-on-Error mode is suitable for links
offering relatively low L2 data unit loss probability. In this offering relatively low L2 data unit loss probability. In this
mode, the SCHC fragment receiver reduces the number of ACKs mode, the SCHC Fragment receiver reduces the number of SCHC ACKs
transmitted, which MAY be especially beneficial in asymmetric transmitted, which MAY be especially beneficial in asymmetric
scenarios. Because the SCHC fragments use the uplink of the scenarios. Because the SCHC Fragments use the uplink of the
underlying LPWAN technology, which has higher capacity than underlying LPWAN technology, which has higher capacity than
downlink. The receiver transmits an ACK only after the complete downlink. The receiver transmits an SCHC ACK only after the
window transmission and if at least one SCHC fragment of this complete window transmission and if at least one SCHC Fragment of
window has been lost. An exception to this behavior is in the this window has been lost. An exception to this behavior is in
last window, where the receiver MUST transmit an ACK, including the last window, where the receiver MUST transmit an SCHC ACK,
the C bit set based on the MIC checked result, even if all the including the C bit set based on the MIC checked result, even if
SCHC fragments of the last window have been correctly received. all the SCHC Fragments of the last window have been correctly
The ACK gives the state of all the SCHC fragments (received or received. The SCHC ACK gives the state of all the SCHC Fragments
lost). Upon an ACK reception, the sender retransmits the lost (received or lost). Upon an SCHC ACK reception, the sender
SCHC fragments. If an ACK is not transmitted back by the receiver retransmits the lost SCHC Fragments. If an SCHC ACK is not
at the end of a window, the sender assumes that all SCHC fragments transmitted back by the receiver at the end of a window, the
have been correctly received. When the ACK is lost, the sender sender assumes that all SCHC Fragments have been correctly
assumes that all SCHC fragments covered by the lost ACK have been received. When the SCHC ACK is lost, the sender assumes that all
successfully delivered, so the sender continues transmitting the SCHC Fragments covered by the lost SCHC ACK have been successfully
next window of SCHC fragments. If the next SCHC fragments delivered, so the sender continues transmitting the next window of
received belong to the next window, the receiver will abort the SCHC Fragments. If the next SCHC Fragments received belong to the
on-going fragmented packet transmission. See further details in next window, the receiver will abort the on-going fragmented
{{ACK-on-Error- subsection}}. packet transmission. See further details in Section 7.5.3.
The same reliability mode MUST be used for all SCHC fragments of an The same reliability mode MUST be used for all SCHC Fragments of an
SCHC packet. The decision on which reliability mode will be used and SCHC Packet. The decision on which reliability mode will be used and
whether the same reliability mode applies to all SCHC packets is an whether the same reliability mode applies to all SCHC Packets is an
implementation problem and is out of the scope of this document. implementation problem and is out of the scope of this document.
Note that the reliability mode choice is not necessarily tied to a Note that the reliability mode choice is not necessarily tied to a
particular characteristic of the underlying L2 LPWAN technology, e.g. particular characteristic of the underlying L2 LPWAN technology, e.g.
the No-ACK mode MAY be used on top of an L2 LPWAN technology with the No-ACK mode MAY be used on top of an L2 LPWAN technology with
symmetric characteristics for uplink and downlink. This document symmetric characteristics for uplink and downlink. This document
does not make any decision as to which SCHC fragment reliability does not make any decision as to which SCHC Fragment reliability
mode(s) are supported by a specific LPWAN technology. mode(s) are supported by a specific LPWAN technology.
Examples of the different reliability modes described are provided in Examples of the different reliability modes described are provided in
Appendix B. Appendix B.
7.4. Fragmentation Formats 7.4. Fragmentation Formats
This section defines the SCHC fragment format, the All-0 and All-1 This section defines the SCHC Fragment format, the All-0 and All-1
formats, the ACK format and the Abort formats. formats, the SCHC ACK format and the Abort formats.
7.4.1. Fragment format 7.4.1. Fragment format
A SCHC fragment comprises a SCHC fragment header, a SCHC fragment A SCHC Fragment comprises a SCHC Fragment header, a SCHC Fragment
payload and padding bits (if needed). A SCHC fragment conforms to payload and padding bits (if needed). A SCHC Fragment conforms to
the general format shown in Figure 8. The SCHC fragment payload the general format shown in Figure 11. The SCHC Fragment payload
carries a subset of SCHC packet. A SCHC fragment is the payload of carries a subset of SCHC Packet. A SCHC Fragment is the payload of
the L2 protocol data unit (PDU). Padding MAY be added in SCHC the L2 protocol data unit (PDU). Padding MAY be added in SCHC
fragments and in ACKs if necessary, therefore a padding field is Fragments and in SCHC ACKs if necessary, therefore a padding field is
optional (this is explicitly indicated in Figure 8 for the sake of optional (this is explicitly indicated in Figure 11 for the sake of
illustration clarity. illustration clarity.
+-----------------+-----------------------+~~~~~~~~~~~~~~~ +-----------------+-----------------------+~~~~~~~~~~~~~~~
| Fragment Header | Fragment payload | padding (opt.) | Fragment Header | Fragment payload | padding (opt.)
+-----------------+-----------------------+~~~~~~~~~~~~~~~ +-----------------+-----------------------+~~~~~~~~~~~~~~~
Figure 8: Fragment general format. Presence of a padding field is Figure 11: Fragment general format. Presence of a padding field is
optional optional
In ACK-Always or ACK-on-Error, SCHC fragments except the last one In ACK-Always or ACK-on-Error, SCHC Fragments except the last one
SHALL conform the detailed format defined in {{Fig- NotLastWin}}. The SHALL conform the detailed format defined in Figure 12. The total
total size of the fragment header is R bits. Where is R is not a size of the fragment header is not byte aligned.
multiple of 8 bits.
<------------ R -----------> |---Fragmentation Header----|
<--T--> 1 <--N--> |-- T --|1|-- N --|
+-- ... --+- ... -+-+- ... -+--------...-------+ +-- ... --+- ... -+-+- ... -+--------...-------+
| Rule ID | DTag |W| FCN | Fragment payload | | Rule ID | DTag |W| FCN | Fragment payload |
+-- ... --+- ... -+-+- ... -+--------...-------+ +-- ... --+- ... -+-+- ... -+--------...-------+
Figure 9: Fragment Detailed Format for Fragments except the Last One, Figure 12: Fragment Detailed Format for Fragments except the Last
Window mode One, Window mode
In the No-ACK mode, SCHC fragments except the last one SHALL conform In the No-ACK mode, SCHC Fragments except the last one SHALL conform
to the detailed format defined in Figure 10. The total size of the to the detailed format defined in Figure 13. The total size of the
fragment header is R bits. fragment header is not byte aligned.
<------------ R -----------> |---Fragmentation Header---|
<--T--> <--N--> |-- T --|-- N --|
+-- ... --+- ... -+- ... -+--------...-------+ +-- ... --+- ... -+- ... -+--------...-------+
| Rule ID | DTag | FCN | Fragment payload | | Rule ID | DTag | FCN | Fragment payload |
+-- ... --+- ... -+- ... -+--------...-------+ +-- ... --+- ... -+- ... -+--------...-------+
Figure 10: Fragment Detailed Format for Fragments except the Last Figure 13: Fragment Detailed Format for Fragments except the Last
One, No-ACK mode One, No-ACK mode
In all these cases, R may not be a multiple of 8 bits. In all these cases, the total size of the fragment header is not byte
aligned.
7.4.2. All-1 and All-0 formats 7.4.2. All-1 and All-0 formats
The All-0 format is used for sending the last SCHC fragment of a The All-0 format is used for sending the last SCHC Fragment of a
window that is not the last window of the packet. window that is not the last window of the packet.
<------------ R -----------> |-- T --|1|-- N --|
<- T -> 1 <- N -> +-- ... --+- ... -+-+- ... -+--- ... ---+
+-- ... --+- ... -+-+- ... -+--- ... ---+ | Rule ID | DTag |W| 0..0 | payload |
| Rule ID | DTag |W| 0..0 | payload | +-- ... --+- ... -+-+- ... -+--- ... ---+
+-- ... --+- ... -+-+- ... -+--- ... ---+
Figure 11: All-0 fragment detailed format Figure 14: All-0 fragment detailed format
The All-0 empty fragment format is used by a sender to request the The All-0 empty fragment format is used by a sender to request the
retransmission of an ACK by the receiver. It is only used in ACK- retransmission of an SCHC ACK by the receiver. It is only used in
Always mode. ACK-Always mode.
<------------ R -----------> |-- T --|1|-- N --|
<- T -> 1 <- N ->
+-- ... --+- ... -+-+- ... -+ +-- ... --+- ... -+-+- ... -+
| Rule ID | DTag |W| 0..0 | (no payload) | Rule ID | DTag |W| 0..0 | (no payload)
+-- ... --+- ... -+-+- ... -+ +-- ... --+- ... -+-+- ... -+
Figure 12: All-0 empty fragment detailed format Figure 15: All-0 empty fragment detailed format
In the No-ACK mode, the last SCHC fragment of an IPv6 datagram SHALL In the No-ACK mode, the last SCHC Fragment of an IPv6 datagram SHALL
contain a SCHC fragment header that conforms to the detaield format contain a SCHC Fragment header that conforms to the detaield format
shown in Figure 13. The total size of this SCHC fragment header is shown in Figure 16.
R+M bits.
<------------ R -----------> |-- T --|-N=1-|
<- T -> <N=1> <---- M ---->
+---- ... ---+- ... -+-----+---- ... ----+---...---+ +---- ... ---+- ... -+-----+---- ... ----+---...---+
| Rule ID | DTag | 1 | MIC | payload | | Rule ID | DTag | 1 | MIC | payload |
+---- ... ---+- ... -+-----+---- ... ----+---...---+ +---- ... ---+- ... -+-----+---- ... ----+---...---+
Figure 13: All-1 Fragment Detailed Format for the Last Fragment, No- Figure 16: All-1 Fragment Detailed Format for the Last Fragment, No-
ACK mode ACK mode
In any of the Window modes, the last fragment of an IPv6 datagram In any of the Window modes, the last fragment of an IPv6 datagram
SHALL contain a SCHC fragment header that conforms to the detailed SHALL contain a SCHC Fragment header that conforms to the detailed
format shown in Figure 14. The total size of the SCHC fragment format shown in Figure 17. The total size of the SCHC Fragment
header in this format is R+M bits. header in this format is not byte aligned.
<------------ R -----------> |-- T --|1|-- N --|
<- T -> 1 <- N -> <---- M ---->
+-- ... --+- ... -+-+- ... -+---- ... ----+---...---+ +-- ... --+- ... -+-+- ... -+---- ... ----+---...---+
| Rule ID | DTag |W| 11..1 | MIC | payload | | Rule ID | DTag |W| 11..1 | MIC | payload |
+-- ... --+- ... -+-+- ... -+---- ... ----+---...---+ +-- ... --+- ... -+-+- ... -+---- ... ----+---...---+
(FCN) (FCN)
Figure 14: All-1 Fragment Detailed Format for the Last Fragment, ACK- Figure 17: All-1 Fragment Detailed Format for the Last Fragment, ACK-
Always or ACK-on-Error Always or ACK-on-Error
In either ACK-Always or ACK-on-Error, in order to request a In either ACK-Always or ACK-on-Error, in order to request a
retransmission of the ACK for the All-1 window, the fragment sender retransmission of the SCHC ACK for the All-1 window, the fragment
uses the format shown in Figure 15. The total size of the SCHC sender uses the format shown in Figure 18. The total size of the
fragment header in this format is R+M bits. SCHC Fragment header in not byte aligned.
<------------ R -----------> |-- T --|1|-- N --|
<- T -> 1 <- N -> <---- M ---->
+-- ... --+- ... -+-+- ... -+---- ... ----+ +-- ... --+- ... -+-+- ... -+---- ... ----+
| Rule ID | DTag |W| 1..1 | MIC | (no payload) | Rule ID | DTag |W| 1..1 | MIC | (no payload)
+-- ... --+- ... -+-+- ... -+---- ... ----+ +-- ... --+- ... -+-+- ... -+---- ... ----+
Figure 15: All-1 for Retries format, also called All-1 empty Figure 18: All-1 for Retries format, also called All-1 empty
The values for R, N, T and M are not specified in this document, and The values for Fragmentation Header, N, T and the length of MIC are
SHOULD be determined in other documents (e.g. technology-specific not specified in this document, and SHOULD be determined in other
profile documents). documents (e.g. technology-specific profile documents).
7.4.3. ACK format 7.4.3. SCHC ACK format
The format of an ACK that acknowledges a window that is not the last The format of an SCHC ACK that acknowledges a window that is not the
one (denoted as All-0 window) is shown in Figure 16. last one (denoted as All-0 window) is shown in Figure 19.
<--------- R --------> |-- T --|1|
<- T -> 1 +---- ... --+- ... -+-+---- ... -----+
+---- ... --+-... -+-+---- ... -----+ | Rule ID | DTag |W|encoded Bitmap| (no payload)
| Rule ID | DTag |W|encoded Bitmap| (no payload) +---- ... --+- ... -+-+---- ... -----+
+---- ... --+-... -+-+---- ... -----+
Figure 16: ACK format for All-0 windows Figure 19: ACK format for All-0 windows
To acknowledge the last window of a packet (denoted as All-1 window), To acknowledge the last window of a packet (denoted as All-1 window),
a C bit (i.e. MIC checked) following the W bit is set to 1 to a C bit (i.e. MIC checked) following the W bit is set to 1 to
indicate that the MIC check computed by the receiver matches the MIC indicate that the MIC check computed by the receiver matches the MIC
present in the All-1 fragment. If the MIC check fails, the C bit is present in the All-1 fragment. If the MIC check fails, the C bit is
set to 0 and the Bitmap for the All-1 window follows. set to 0 and the Bitmap for the All-1 window follows.
<---------- R ---------> |-- T --|1|1|
<- T -> 1 1 +---- ... --+- ... -+-+-+
+---- ... --+-... -+-+-+ | Rule ID | DTag |W|1| (MIC correct)
| Rule ID | DTag |W|1| (MIC correct) +---- ... --+- ... -+-+-+
+---- ... --+-... -+-+-+
+---- ... --+-... -+-+-+----- ... -----+ +---- ... --+- ... -+-+-+----- ... -----+
| Rule ID | DTag |W|0|encoded Bitmap |(MIC Incorrect) | Rule ID | DTag |W|0|encoded Bitmap |(MIC Incorrect)
+---- ... --+-... -+-+-+----- ... -----+ +---- ... --+- ... -+-+-+----- ... -----+
C C
Figure 17: Format of an ACK for All-1 windows Figure 20: Format of an SCHC ACK for All-1 windows
7.4.3.1. Bitmap Encoding 7.4.3.1. Bitmap Encoding
The Bitmap is transmitted by a receiver as part of the ACK format. The Bitmap is transmitted by a receiver as part of the SCHC ACK
An ACK message MAY include padding at the end to align its number of format. An SCHC ACK message MAY include padding at the end to align
transmitted bits to a multiple of 8 bits. its number of transmitted bits to a multiple of 8 bits.
Note that the ACK sent in response to an All-1 fragment includes the Note that the SCHC ACK sent in response to an All-1 fragment includes
C bit. Therefore, the window size and thus the encoded Bitmap size the C bit. Therefore, the window size and thus the encoded Bitmap
need to be determined taking into account the available space in the size need to be determined taking into account the available space in
layer two frame payload, where there will be 1 bit less for an ACK the layer two frame payload, where there will be 1 bit less for an
sent in response to an All-1 fragment than in other ACKs. Note that SCHC ACK sent in response to an All-1 fragment than in other SCHC
the maximum number of SCHC fragments of the last window is one unit ACKs. Note that the maximum number of SCHC Fragments of the last
smaller than that of the previous windows. window is one unit smaller than that of the previous windows.
When the receiver transmits an encoded Bitmap with a SCHC fragment When the receiver transmits an encoded Bitmap with a SCHC Fragment
that has not been sent during the transmission, the sender will Abort that has not been sent during the transmission, the sender will Abort
the transmission. the transmission.
<---- Bitmap bits ----> |---- Bitmap bits ----|
| Rule ID | DTag |W|1|0|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1| | Rule ID | DTag |W|1|0|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|
|--- byte boundary ----| 1 byte next | 1 byte next | |--- byte boundary ----| 1 byte next | 1 byte next |
Figure 18: A non-encoded Bitmap Figure 21: A non-encoded Bitmap
In order to reduce the resulting frame size, the encoded Bitmap is In order to reduce the resulting frame size, the encoded Bitmap is
shortened by applying the following algorithm: all the right-most shortened by applying the following algorithm: all the right-most
contiguous bytes in the encoded Bitmap that have all their bits set contiguous bytes in the encoded Bitmap that have all their bits set
to 1 MUST NOT be transmitted. Because the SCHC fragment sender knows to 1 MUST NOT be transmitted. Because the SCHC Fragment sender knows
the actual Bitmap size, it can reconstruct the original Bitmap with the actual Bitmap size, it can reconstruct the original Bitmap with
the trailing 1 bit optimized away. In the example shown in the trailing 1 bit optimized away. In the example shown in
Figure 19, the last 2 bytes of the Bitmap shown in Figure 18 comprise Figure 22, the last 2 bytes of the Bitmap shown in Figure 21 comprise
bits that are all set to 1, therefore they are not sent. bits that are all set to 1, therefore they are not sent.
<------- R -------> |-- T --|1|
<- T -> 1 +---- ... --+- ... -+-+-+-+
+---- ... --+-... -+-+-+-+ | Rule ID | DTag |W|1|0|
| Rule ID | DTag |W|1|0| +---- ... --+- ... -+-+-+-+
+---- ... --+-... -+-+-+-+ |---- byte boundary -----|
|---- byte boundary -----|
Figure 19: Optimized Bitmap format Figure 22: Optimized Bitmap format
Figure 20 shows an example of an ACK with FCN ranging from 6 down to Figure 23 shows an example of an SCHC ACK with FCN ranging from 6
0, where the Bitmap indicates that the second and the fifth SCHC down to 0, where the Bitmap indicates that the second and the fifth
fragments have not been correctly received. SCHC Fragments have not been correctly received.
<------ R ------>6 5 4 3 2 1 0 (*) 6 5 4 3 2 1 0 (*)
<- T -> 1 |-- T --|1|
+---------+------+-+-+-+-+-+-+-+-----+ +---------+-------+-+-+-+-+-+-+-+-----+
| Rule ID | DTag |W|1|0|1|1|0|1|all-0| Bitmap(before tx) | Rule ID | DTag |W|1|0|1|1|0|1|all-0| Bitmap(before tx)
+---------+------+-+-+-+-+-+-+-+-----+ +---------+-------+-+-+-+-+-+-+-+-----+
|<-- byte boundary ->|<---- 1 byte---->| |<-- byte boundary ->|<---- 1 byte---->|
(*)=(FCN values) (*)=(FCN values)
+---------+------+-+-+-+-+-+-+-+-----+~~ +---------+------+-+-+-+-+-+-+-+-----+~~
| Rule ID | DTag |W|1|0|1|1|0|1|all-0|Padding(opt.) encoded Bitmap | Rule ID | DTag |W|1|0|1|1|0|1|all-0|Padding(opt.) encoded Bitmap
+---------+------+-+-+-+-+-+-+-+-----+~~ +---------+------+-+-+-+-+-+-+-+-----+~~
|<-- byte boundary ->|<---- 1 byte---->| |<-- byte boundary ->|<---- 1 byte---->|
Figure 20: Example of a Bitmap before transmission, and the Figure 23: Example of a Bitmap before transmission, and the
transmitted one, in any window except the last one transmitted one, in any window except the last one
Figure 21 shows an example of an ACK with FCN ranging from 6 down to Figure 24 shows an example of an SCHC ACK with FCN ranging from 6
0, where the Bitmap indicates that the MIC check has failed but there down to 0, where the Bitmap indicates that the MIC check has failed
are no missing SCHC fragments. but there are no missing SCHC Fragments.
<------- R -------> 6 5 4 3 2 1 7 (*) <------- R -------> 6 5 4 3 2 1 7 (*)
<- T -> 1 1 |-- T --|1|
| Rule ID | DTag |W|0|1|1|1|1|1|1|1|padding| Bitmap (before tx) | Rule ID | DTag |W|0|1|1|1|1|1|1|1|padding| Bitmap (before tx)
|---- byte boundary -----| 1 byte next | |---- byte boundary -----| 1 byte next |
C C
+---- ... --+-... -+-+-+-+ +---- ... --+-... -+-+-+-+
| Rule ID | DTag |W|0|1| encoded Bitmap | Rule ID | DTag |W|0|1| encoded Bitmap
+---- ... --+-... -+-+-+-+ +---- ... --+-... -+-+-+-+
|<--- byte boundary ---->| |---- byte boundary -----|
(*) = (FCN values indicating the order) (*) = (FCN values indicating the order)
Figure 21: Example of the Bitmap in ACK-Always or ACK-on-Error for Figure 24: Example of the Bitmap in ACK-Always or ACK-on-Error for
the last window, for N=3) the last window, for N=3)
7.4.4. Abort formats 7.4.4. Abort formats
Abort are coded as exceptions to the previous coding, a specific Abort are coded as exceptions to the previous coding, a specific
format is defined for each direction. When a SCHC fragment sender format is defined for each direction. When a SCHC Fragment sender
needs to abort the transmission, it sends the Sender-Abort format needs to abort the transmission, it sends the Sender-Abort format
Figure 22, that is an All-1 fragment with no MIC or payload. In Figure 25, that is an All-1 fragment with no MIC or payload. In
regular cases All-1 fragment contains at least a MIC value. This regular cases All-1 fragment contains at least a MIC value. This
absence of the MIC value indicates an Abort. absence of the MIC value indicates an Abort.
When a SCHC fragment receiver needs to abort the on-going SCHC When a SCHC Fragment receiver needs to abort the on-going SCHC
fragmented packet transmission, it transmits the Receiver- Abort Fragmented packet transmission, it transmits the Receiver- Abort
format Figure 23, creating an exception in the encoded Bitmap coding. format Figure 26, creating an exception in the encoded Bitmap coding.
Encoded Bitmap avoid sending the rigth most bits of the Bitmap set to Encoded Bitmap avoid sending the rigth most bits of the Bitmap set to
1. Abort is coded as an ACK message with a Bitmap set to 1 until the 1. Abort is coded as an SCHC ACK message with a Bitmap set to 1
byte boundary, followed by an extra 0xFF byte. Such message never until the byte boundary, followed by an extra 0xFF byte. Such
occurs in a regular acknowledgement and is view as an abort. message never occurs in a regular acknowledgement and is view as an
abort.
None of these messages are not acknowledged nor retransmitted. None of these messages are not acknowledged nor retransmitted.
The sender uses the Sender-Abort when the MAX_ACK_REQUEST is reached. The sender uses the Sender-Abort when the MAX_ACK_REQUEST is reached.
The receiver uses the Receiver-Abort when the Inactivity timer The receiver uses the Receiver-Abort when the Inactivity timer
expires, or in the ACK-on-Error mode, ACK is lost and the sender expires, or in the ACK-on-Error mode, SCHC ACK is lost and the sender
transmits SCHC fragments of a new window. Some other cases for Abort transmits SCHC Fragments of a new window. Some other cases for Abort
are explained in the Section 7.5 or Appendix C. are explained in the Section 7.5 or Appendix C.
<------------- R -----------><--- 1 byte ---> |-- Fragmentation Header ---|--- 1 byte ----|
+--- ... ---+- ... -+-+-...-+-+-+-+-+-+-+-+-+ +--- ... ---+- ... -+-+-...-+-+-+-+-+-+-+-+-+
| Rule ID | DTag |W| FCN | FF | (no MIC & no payload) | Rule ID | DTag |W| FCN | FF | (no MIC & no payload)
+--- ... ---+- ... -+-+-...-+-+-+-+-+-+-+-+-+ +--- ... ---+- ... -+-+-...-+-+-+-+-+-+-+-+-+
Figure 22: Sender-Abort format. All FCN fields in this format are Figure 25: Sender-Abort format. All FCN fields in this format are
set to 1 set to 1
<----- byte boundary ------><--- 1 byte ---> |----- byte boundary ------|---- 1 byte ---|
+---- ... --+-... -+-+-+-+-+-+-+-+-+-+-+-+-+ +---- ... --+-... -+-+-+-+-+-+-+-+-+-+-+-+-+
| Rule ID | DTag |W| 1..1| FF | | Rule ID | DTag |W| 1..1| FF |
+---- ... --+-... -+-+-+-+-+-+-+-+-+-+-+-+-+ +---- ... --+-... -+-+-+-+-+-+-+-+-+-+-+-+-+
Figure 23: Receiver-Abort format Figure 26: Receiver-Abort format
7.5. Baseline mechanism 7.5. Baseline mechanism
If after applying SCHC header compression (or when SCHC header If after applying SCHC header compression (or when SCHC header
compression is not possible) the SCHC packet does not fit within the compression is not possible) the SCHC Packet does not fit within the
payload of a single L2 data unit, the SCHC packet SHALL be broken payload of a single L2 data unit, the SCHC Packet SHALL be broken
into SCHC fragments and the fragments SHALL be sent to the fragment into SCHC Fragments and the fragments SHALL be sent to the fragment
receiver. The fragment receiver needs to identify all the SCHC receiver. The fragment receiver needs to identify all the SCHC
fragments that belong to a given SCHC packet. To this end, the Fragments that belong to a given SCHC Packet. To this end, the
receiver SHALL use: receiver SHALL use:
o The sender's L2 source address (if present), o The sender's L2 source address (if present),
o The destination's L2 address (if present), o The destination's L2 address (if present),
o Rule ID, o Rule ID,
o DTag (if present). o DTag (if present).
Then, the fragment receiver MAY determine the SCHC fragment Then, the fragment receiver MAY determine the SCHC Fragment
reliability mode that is used for this SCHC fragment based on the reliability mode that is used for this SCHC Fragment based on the
Rule ID in that fragment. Rule ID in that fragment.
After a SCHC fragment reception, the receiver starts constructing the After a SCHC Fragment reception, the receiver starts constructing the
SCHC packet. It uses the FCN and the arrival order of each SCHC SCHC Packet. It uses the FCN and the arrival order of each SCHC
fragment to determine the location of the individual fragments within Fragment to determine the location of the individual fragments within
the SCHC packet. For example, the receiver MAY place the fragment the SCHC Packet. For example, the receiver MAY place the fragment
payload within a payload datagram reassembly buffer at the location payload within a payload datagram reassembly buffer at the location
determined from the FCN, the arrival order of the SCHC fragments, and determined from the FCN, the arrival order of the SCHC Fragments, and
the fragment payload sizes. In Window mode, the fragment receiver the fragment payload sizes. In Window mode, the fragment receiver
also uses the W bit in the received SCHC fragments. Note that the also uses the W bit in the received SCHC Fragments. Note that the
size of the original, unfragmented packet cannot be determined from size of the original, unfragmented packet cannot be determined from
fragmentation headers. fragmentation headers.
Fragmentation functionality uses the FCN value to transmit the SCHC Fragmentation functionality uses the FCN value to transmit the SCHC
fragments. It has a length of N bits where the All-1 and All-0 FCN Fragments. It has a length of N bits where the All-1 and All-0 FCN
values are used to control the fragmentation transmission. The rest values are used to control the fragmentation transmission. The rest
of the FCN numbers MUST be assigned sequentially in a decreasing of the FCN numbers MUST be assigned sequentially in a decreasing
order, the first FCN of a window is RECOMMENDED to be MAX_WIND_FCN, order, the first FCN of a window is RECOMMENDED to be MAX_WIND_FCN,
i.e. the highest possible FCN value depending on the FCN number of i.e. the highest possible FCN value depending on the FCN number of
bits. bits.
In all modes, the last SCHC fragment of a packet MUST contain a MIC In all modes, the last SCHC Fragment of a packet MUST contain a MIC
which is used to check if there are errors or missing SCHC fragments which is used to check if there are errors or missing SCHC Fragments
and MUST use the corresponding All-1 fragment format. Note that a and MUST use the corresponding All-1 fragment format. Note that a
SCHC fragment with an All-0 format is considered the last SCHC SCHC Fragment with an All-0 format is considered the last SCHC
fragment of the current window. Fragment of the current window.
If the receiver receives the last fragment of a datagram (All-1), it If the receiver receives the last fragment of a datagram (All-1), it
checks for the integrity of the reassembled datagram, based on the checks for the integrity of the reassembled datagram, based on the
MIC received. In No-ACK, if the integrity check indicates that the MIC received. In No-ACK, if the integrity check indicates that the
reassembled datagram does not match the original datagram (prior to reassembled datagram does not match the original datagram (prior to
fragmentation), the reassembled datagram MUST be discarded. In fragmentation), the reassembled datagram MUST be discarded. In
Window mode, a MIC check is also performed by the fragment receiver Window mode, a MIC check is also performed by the fragment receiver
after reception of each subsequent SCHC fragment retransmitted after after reception of each subsequent SCHC Fragment retransmitted after
the first MIC check. the first MIC check.
There are three reliability modes: No-ACK, ACK-Always and ACK-on- There are three reliability modes: No-ACK, ACK-Always and ACK-on-
Error. In ACK-Always and ACK-on-Error, a jumping window protocol Error. In ACK-Always and ACK-on-Error, a jumping window protocol
uses two windows alternatively, identified as 0 and 1. A SCHC uses two windows alternatively, identified as 0 and 1. A SCHC
fragment with all FCN bits set to 0 (i.e. an All-0 fragment) Fragment with all FCN bits set to 0 (i.e. an All-0 fragment)
indicates that the window is over (i.e. the SCHC fragment is the last indicates that the window is over (i.e. the SCHC Fragment is the last
one of the window) and allows to switch from one window to the next one of the window) and allows to switch from one window to the next
one. The All-1 FCN in a SCHC fragment indicates that it is the last one. The All-1 FCN in a SCHC Fragment indicates that it is the last
fragment of the packet being transmitted and therefore there will not fragment of the packet being transmitted and therefore there will not
be another window for this packet. be another window for this packet.
7.5.1. No-ACK 7.5.1. No-ACK
In the No-ACK mode, there is no feedback communication from the In the No-ACK mode, there is no feedback communication from the
fragment receiver. The sender will send all the SCHC fragments of a fragment receiver. The sender will send all the SCHC fragments of a
packet without any possibility of knowing if errors or losses have packet without any possibility of knowing if errors or losses have
occurred. As, in this mode, there is no need to identify specific occurred. As, in this mode, there is no need to identify specific
SCHC fragments, a one-bit FCN MAY be used. Consequently, the FCN SCHC Fragments, a one-bit FCN MAY be used. Consequently, the FCN
All-0 value is used in all SCHC fragments except the last one, which All-0 value is used in all SCHC fragments except the last one, which
carries an All-1 FCN and the MIC. The receiver will wait for SCHC carries an All-1 FCN and the MIC. The receiver will wait for SCHC
fragments and will set the Inactivity timer. The receiver will use Fragments and will set the Inactivity timer. The receiver will use
the MIC contained in the last SCHC fragment to check for errors. the MIC contained in the last SCHC Fragment to check for errors.
When the Inactivity Timer expires or if the MIC check indicates that When the Inactivity Timer expires or if the MIC check indicates that
the reassembled packet does not match the original one, the receiver the reassembled packet does not match the original one, the receiver
will release all resources allocated to reassembling this packet. will release all resources allocated to reassembling this packet.
The initial value of the Inactivity Timer will be determined based on The initial value of the Inactivity Timer will be determined based on
the characteristics of the underlying LPWAN technology and will be the characteristics of the underlying LPWAN technology and will be
defined in other documents (e.g. technology-specific profile defined in other documents (e.g. technology-specific profile
documents). documents).
7.5.2. ACK-Always 7.5.2. ACK-Always
In ACK-Always, the sender transmits SCHC fragments by using the two- In ACK-Always, the sender transmits SCHC Fragments by using the two-
jumping-windows procedure. A delay between each SCHC fragment can be jumping-windows procedure. A delay between each SCHC fragment can be
added to respect local regulations or other constraints imposed by added to respect local regulations or other constraints imposed by
the applications. Each time a SCHC fragment is sent, the FCN is the applications. Each time a SCHC fragment is sent, the FCN is
decreased by one. When the FCN reaches value 0 and there are more decreased by one. When the FCN reaches value 0 and there are more
SCHC fragments to be sent after, the sender transmits the last SCHC SCHC Fragments to be sent after, the sender transmits the last SCHC
fragment of this window using the All-0 fragment format, it starts Fragment of this window using the All-0 fragment format, it starts
the Retransmission Timer and waits for an ACK. On the other hand, if the transmitted is the last SCHC Fragment of the SCHC Packet, the
the FCN has reached 0 and the SCHC fragment to be transmitted is the sender uses the All-1 fragment format, which includes a MIC. The
last SCHC fragment of the SCHC packet, the sender uses the All-1 sender sets the Retransmission Timer and waits for the SCHC ACK to
fragment format, which includes a MIC. The sender sets the know if transmission errors have occured.
Retransmission Timer and waits for the ACK to know if transmission
errors have occured.
The Retransmission Timer is dimensioned based on the LPWAN technology The Retransmission Timer is dimensioned based on the LPWAN technology
in use. When the Retransmission Timer expires, the sender sends an in use. When the Retransmission Timer expires, the sender sends an
All-0 empty (resp. All-1 empty) fragment to request again the ACK All-0 empty (resp. All-1 empty) fragment to request again the SCHC
for the window that ended with the All-0 (resp. All-1) fragment just ACK for the window that ended with the All-0 (resp. All-1) fragment
sent. The window number is not changed. just sent. The window number is not changed.
After receiving an All-0 or All-1 fragment, the receiver sends an ACK After receiving an All-0 or All-1 fragment, the receiver sends an
with an encoded Bitmap reporting whether any SCHC fragments have been SCHC ACK with an encoded Bitmap reporting whether any SCHC fragments
lost or not. When the sender receives an ACK, it checks the W bit have been lost or not. When the sender receives an SCHC ACK, it
carried by the ACK. Any ACK carrying an unexpected W bit value is checks the W bit carried by the SCHC ACK. Any SCHC ACK carrying an
discarded. If the W bit value of the received ACK is correct, the unexpected W bit value is discarded. If the W bit value of the
sender analyzes the rest of the ACK message, such as the encoded received SCHC ACK is correct, the sender analyzes the rest of the
Bitmap and the MIC. If all the SCHC fragments sent for this window SCHC ACK message, such as the encoded Bitmap and the MIC. If all the
have been well received, and if at least one more SCHC fragment needs SCHC Fragments sent for this window have been well received, and if
to be sent, the sender advances its sending window to the next window at least one more SCHC Fragment needs to be sent, the sender advances
value and sends the next SCHC fragments. If no more SCHC fragments its sending window to the next window value and sends the next SCHC
have to be sent, then the SCHC fragmented packet transmission is Fragments. If no more SCHC Fragments have to be sent, then the SCHC
finished. fragmented packet transmission is finished.
However, if one or more SCHC fragments have not been received as per However, if one or more SCHC Fragments have not been received as per
the ACK (i.e. the corresponding bits are not set in the encoded the SCHC ACK (i.e. the corresponding bits are not set in the encoded
Bitmap) then the sender resends the missing SCHC fragments. When all Bitmap) then the sender resends the missing SCHC Fragments. When all
missing SCHC fragments have been retransmitted, the sender starts the missing SCHC Fragments have been retransmitted, the sender starts the
Retransmission Timer, even if an All-0 or an All-1 has not been sent Retransmission Timer, even if an All-0 or an All-1 has not been sent
as part of this retransmission and waits for an ACK. Upon receipt of as part of this retransmission and waits for an SCHC ACK. Upon
the ACK, if one or more SCHC fragments have not yet been received, receipt of the SCHC ACK, if one or more SCHC Fragments have not yet
the counter Attempts is increased and the sender resends the missing been received, the counter Attempts is increased and the sender
SCHC fragments again. When Attempts reaches MAX_ACK_REQUESTS, the resends the missing SCHC Fragments again. When Attempts reaches
sender aborts the on-going SCHC fragmented packet transmission by MAX_ACK_REQUESTS, the sender aborts the on-going SCHC Fragmented
sending an Abort message and releases any resources for transmission packet transmission by sending an Abort message and releases any
of the packet. The sender also aborts an on-going SCHC fragmented resources for transmission of the packet. The sender also aborts an
packet transmission when a failed MIC check is reported by the on-going SCHC Fragmented packet transmission when a failed MIC check
receiver or when a SCHC fragment that has not been sent is reported is reported by the receiver or when a SCHC Fragment that has not been
in the encoded Bitmap. sent is reported in the encoded Bitmap.
On the other hand, at the beginning, the receiver side expects to On the other hand, at the beginning, the receiver side expects to
receive window 0. Any SCHC fragment received but not belonging to receive window 0. Any SCHC Fragment received but not belonging to
the current window is discarded. All SCHC fragments belonging to the the current window is discarded. All SCHC Fragments belonging to the
correct window are accepted, and the actual SCHC fragment number correct window are accepted, and the actual SCHC Fragment number
managed by the receiver is computed based on the FCN value. The managed by the receiver is computed based on the FCN value. The
receiver prepares the encoded Bitmap to report the correctly received receiver prepares the encoded Bitmap to report the correctly received
and the missing SCHC fragments for the current window. After each and the missing SCHC Fragments for the current window. After each
SCHC fragment is received the receiver initializes the Inactivity SCHC Fragment is received the receiver initializes the Inactivity
timer, if the Inactivity Timer expires the transmission is aborted. timer, if the Inactivity Timer expires the transmission is aborted.
When an All-0 fragment is received, it indicates that all the SCHC When an All-0 fragment is received, it indicates that all the SCHC
fragments have been sent in the current window. Since the sender is Fragments have been sent in the current window. Since the sender is
not obliged to always send a full window, some SCHC fragment number not obliged to always send a full window, some SCHC Fragment number
not set in the receiver memory SHOULD not correspond to losses. The not set in the receiver memory SHOULD not correspond to losses. The
receiver sends the corresponding ACK, the Inactivity Timer is set and receiver sends the corresponding SCHC ACK, the Inactivity Timer is
the transmission of the next window by the sender can start. set and the transmission of the next window by the sender can start.
If an All-0 fragment has been received and all SCHC fragments of the If an All-0 fragment has been received and all SCHC Fragments of the
current window have also been received, the receiver then expects a current window have also been received, the receiver then expects a
new Window and waits for the next SCHC fragment. Upon receipt of a new Window and waits for the next SCHC Fragment. Upon receipt of a
SCHC fragment, if the window value has not changed, the received SCHC SCHC Fragment, if the window value has not changed, the received SCHC
fragments are part of a retransmission. A receiver that has already Fragments are part of a retransmission. A receiver that has already
received a SCHC fragment SHOULD discard it, otherwise, it updates the received a SCHC Fragment SHOULD discard it, otherwise, it updates the
encoded Bitmap. If all the bits of the encoded Bitmap are set to encoded Bitmap. If all the bits of the encoded Bitmap are set to
one, the receiver MUST send an ACK without waiting for an All-0 one, the receiver MUST send an SCHC ACK without waiting for an All-0
fragment and the Inactivity Timer is initialized. fragment and the Inactivity Timer is initialized.
On the other hand, if the window value of the next received SCHC On the other hand, if the window value of the next received SCHC
fragment is set to the next expected window value, this means that Fragment is set to the next expected window value, this means that
the sender has received a correct encoded Bitmap reporting that all the sender has received a correct encoded Bitmap reporting that all
SCHC fragments have been received. The receiver then updates the SCHC Fragments have been received. The receiver then updates the
value of the next expected window. value of the next expected window.
When an All-1 fragment is received, it indicates that the last SCHC When an All-1 fragment is received, it indicates that the last SCHC
fragment of the packet has been sent. Since the last window is not Fragment of the packet has been sent. Since the last window is not
always full, the MIC will be used to detect if all SCHC fragments of always full, the MIC will be used to detect if all SCHC Fragments of
the packet have been received. A correct MIC indicates the end of the packet have been received. A correct MIC indicates the end of
the transmission but the receiver MUST stay alive for an Inactivity the transmission but the receiver MUST stay alive for an Inactivity
Timer period to answer to any empty All-1 fragments the sender MAY Timer period to answer to any empty All-1 fragments the sender MAY
send if ACKs sent by the receiver are lost. If the MIC is incorrect, send if SCHC ACKs sent by the receiver are lost. If the MIC is
some SCHC fragments have been lost. The receiver sends the ACK incorrect, some SCHC Fragments have been lost. The receiver sends
regardless of successful SCHC fragmented packet reception or not, the the SCHC ACK regardless of successful SCHC Fragmented packet
Inactitivity Timer is set. In case of an incorrect MIC, the receiver reception or not, the Inactitivity Timer is set. In case of an
waits for SCHC fragments belonging to the same window. After incorrect MIC, the receiver waits for SCHC Fragments belonging to the
MAX_ACK_REQUESTS, the receiver will abort the on-going SCHC same window. After MAX_ACK_REQUESTS, the receiver will abort the on-
fragmented packet transmission by transmitting a the Receiver-Abort going SCHC Fragmented packet transmission by transmitting a the
format. The receiver also aborts upon Inactivity Timer expiration. Receiver-Abort format. The receiver also aborts upon Inactivity
Timer expiration.
7.5.3. ACK-on-Error 7.5.3. ACK-on-Error
The senders behavior for ACK-on-Error and ACK-Always are similar. The senders behavior for ACK-on-Error and ACK-Always are similar.
The main difference is that in ACK-on-Error the ACK with the encoded The main difference is that in ACK-on-Error the SCHC ACK with the
Bitmap is not sent at the end of each window but only when at least encoded Bitmap is not sent at the end of each window but only when at
one SCHC fragment of the current window has been lost. Excepts for least one SCHC Fragment of the current window has been lost. Excepts
the last window where an ACK MUST be sent to finish the transmission. for the last window where an SCHC ACK MUST be sent to finish the
transmission.
In ACK-on-Error, the Retransmission Timer expiration will be In ACK-on-Error, the Retransmission Timer expiration will be
considered as a positive acknowledgment. This timer is set after considered as a positive acknowledgment. This timer is set after
sending an All-0 or an All-1 fragment. When the All-1 fragment has sending an All-0 or an All-1 fragment. When the All-1 fragment has
been sent, then the on-going SCHC fragmentation process is finished been sent, then the on-going SCHC Fragmentation process is finished
and the sender waits for the last ACK. If the Retransmission Timer and the sender waits for the last SCHC ACK. If the Retransmission
expires while waiting for the ACK for the last window, an All-1 empty Timer expires while waiting for the SCHC ACK for the last window, an
MUST be sent to request the last ACK by the sender to complete the All-1 empty MUST be sent to request the last SCHC ACK by the sender
SCHC fragmented packet transmission. When it expires the sender to complete the SCHC Fragmented packet transmission. When it expires
continue sending SCHC fragments of the next window. the sender continue sending SCHC Fragments of the next window.
If the sender receives an ACK, it checks the window value. ACKs with If the sender receives an SCHC ACK, it checks the window value. SCHC
an unexpected window number are discarded. If the window number on ACKs with an unexpected window number are discarded. If the window
the received encoded Bitmap is correct, the sender verifies if the number on the received encoded Bitmap is correct, the sender verifies
receiver has received all SCHC fragments of the current window. When if the receiver has received all SCHC fragments of the current
at least one SCHC fragment has been lost, the counter Attempts is window. When at least one SCHC Fragment has been lost, the counter
increased by one and the sender resends the missing SCHC fragments Attempts is increased by one and the sender resends the missing SCHC
again. When Attempts reaches MAX_ACK_REQUESTS, the sender sends an Fragments again. When Attempts reaches MAX_ACK_REQUESTS, the sender
Abort message and releases all resources for the on-going SCHC sends an Abort message and releases all resources for the on-going
fragmented packet transmission. When the retransmission of the SCHC Fragmented packet transmission. When the retransmission of the
missing SCHC fragments is finished, the sender starts listening for missing SCHC Fragments is finished, the sender starts listening for
an ACK (even if an All-0 or an All-1 has not been sent during the an SCHC ACK (even if an All-0 or an All-1 has not been sent during
retransmission) and initializes the Retransmission Timer. After the retransmission) and initializes the Retransmission Timer. After
sending an All-1 fragment, the sender listens for an ACK, initializes sending an All-1 fragment, the sender listens for an SCHC ACK,
Attempts, and starts the Retransmission Timer. If the Retransmission initializes Attempts, and starts the Retransmission Timer. If the
Timer expires, Attempts is increased by one and an empty All-1 Retransmission Timer expires, Attempts is increased by one and an
fragment is sent to request the ACK for the last window. If Attempts empty All-1 fragment is sent to request the SCHC ACK for the last
reaches MAX_ACK_REQUESTS, the sender aborts the on-going SCHC window. If Attempts reaches MAX_ACK_REQUESTS, the sender aborts the
fragmented packet transmission by transmitting the Sender-Abort on-going SCHC Fragmented packet transmission by transmitting the
fragment. Sender-Abort fragment.
Unlike the sender, the receiver for ACK-on-Error has a larger amount Unlike the sender, the receiver for ACK-on-Error has a larger amount
of differences compared with ACK-Always. First, an ACK is not sent of differences compared with ACK-Always. First, an SCHC ACK is not
unless there is a lost SCHC fragment or an unexpected behavior. With sent unless there is a lost SCHC Fragment or an unexpected behavior.
the exception of the last window, where an ACK is always sent With the exception of the last window, where an SCHC ACK is always
regardless of SCHC fragment losses or not. The receiver starts by sent regardless of SCHC Fragment losses or not. The receiver starts
expecting SCHC fragments from window 0 and maintains the information by expecting SCHC Fragments from window 0 and maintains the
regarding which SCHC fragments it receives. After receiving an SCHC information regarding which SCHC Fragments it receives. After
fragment, the Inactivity Timer is set. If no further SCHC fragment receiving an SCHC Fragment, the Inactivity Timer is set. If no
are received and the Inactivity Timer expires, the SCHC fragment further SCHC Fragment are received and the Inactivity Timer expires,
receiver aborts the on-going SCHC fragmented packet transmission by the SCHC Fragment receiver aborts the on-going SCHC Fragmented packet
transmitting the Receiver-Abort data unit. transmission by transmitting the Receiver-Abort data unit.
Any SCHC fragment not belonging to the current window is discarded. Any SCHC Fragment not belonging to the current window is discarded.
The actual SCHC fragment number is computed based on the FCN value. The actual SCHC Fragment number is computed based on the FCN value.
When an All-0 fragment is received and all SCHC fragments have been When an All-0 fragment is received and all SCHC Fragments have been
received, the receiver updates the expected window value and expects received, the receiver updates the expected window value and expects
a new window and waits for the next SCHC fragment. a new window and waits for the next SCHC Fragment.
If the window value of the next SCHC fragment has not changed, the If the window value of the next SCHC Fragment has not changed, the
received SCHC fragment is a retransmission. A receiver that has received SCHC Fragment is a retransmission. A receiver that has
already received an SCHC fragment discard it. If all SCHC fragments already received an SCHC Fragment discard it. If all SCHC Fragments
of a window (that is not the last one) have been received, the of a window (that is not the last one) have been received, the
receiver does not send an ACK. While the receiver waits for the next receiver does not send an SCHC ACK. While the receiver waits for the
window and if the window value is set to the next value, and if an next window and if the window value is set to the next value, and if
All-1 fragment with the next value window arrived the receiver knows an All-1 fragment with the next value window arrived the receiver
that the last SCHC fragment of the packet has been sent. Since the knows that the last SCHC Fragment of the packet has been sent. Since
last window is not always full, the MIC will be used to detect if all the last window is not always full, the MIC will be used to detect if
SCHC fragments of the window have been received. A correct MIC check all SCHC Fragments of the window have been received. A correct MIC
indicates the end of the SCHC fragmented packet transmission. An ACK check indicates the end of the SCHC Fragmented packet transmission.
is sent by the SCHC fragment receiver. In case of an incorrect MIC, An ACK is sent by the SCHC Fragment receiver. In case of an
the receiver waits for SCHC fragments belonging to the same window or incorrect MIC, the receiver waits for SCHC Fragments belonging to the
the expiration of the Inactivity Timer. The latter will lead the same window or the expiration of the Inactivity Timer. The latter
receiver to abort the on-going SCHC fragmented packet transmission. will lead the receiver to abort the on-going SCHC fragmented packet
transmission.
If after receiving an All-0 fragment the receiver missed some SCHC If after receiving an All-0 fragment the receiver missed some SCHC
fragments, the receiver uses an ACK with the encoded Bitmap to ask Fragments, the receiver uses an SCHC ACK with the encoded Bitmap to
the retransmission of the missing fragments and expect to receive ask the retransmission of the missing fragments and expect to receive
SCHC fragments with the actual window. While waiting the SCHC Fragments with the actual window. While waiting the
retransmission an All-0 empty fragment is received, the receiver retransmission an All-0 empty fragment is received, the receiver
sends again the ACK with the encoded Bitmap, if the SCHC fragments sends again the SCHC ACK with the encoded Bitmap, if the SCHC
received belongs to another window or an All-1 fragment is received, Fragments received belongs to another window or an All-1 fragment is
the transmission is aborted by sending a Receiver-Abort fragment. received, the transmission is aborted by sending a Receiver-Abort
Once it has received all the missing fragments it waits for the next fragment. Once it has received all the missing fragments it waits
window fragments. for the next window fragments.
7.6. Supporting multiple window sizes 7.6. Supporting multiple window sizes
For ACK-Always or ACK-on-Error, implementers MAY opt to support a For ACK-Always or ACK-on-Error, implementers MAY opt to support a
single window size or multiple window sizes. The latter, when single window size or multiple window sizes. The latter, when
feasible, may provide performance optimizations. For example, a feasible, may provide performance optimizations. For example, a
large window size SHOULD be used for packets that need to be carried large window size SHOULD be used for packets that need to be carried
by a large number of SCHC fragments. However, when the number of by a large number of SCHC Fragments. However, when the number of
SCHC fragments required to carry a packet is low, a smaller window SCHC Fragments required to carry a packet is low, a smaller window
size, and thus a shorter Bitmap, MAY be sufficient to provide size, and thus a shorter Bitmap, MAY be sufficient to provide
feedback on all SCHC fragments. If multiple window sizes are feedback on all SCHC Fragments. If multiple window sizes are
supported, the Rule ID MAY be used to signal the window size in use supported, the Rule ID MAY be used to signal the window size in use
for a specific packet transmission. for a specific packet transmission.
Note that the same window size MUST be used for the transmission of Note that the same window size MUST be used for the transmission of
all SCHC fragments that belong to the same SCHC packet. all SCHC Fragments that belong to the same SCHC Packet.
7.7. Downlink SCHC fragment transmission 7.7. Downlink SCHC Fragment transmission
In some LPWAN technologies, as part of energy-saving techniques, In some LPWAN technologies, as part of energy-saving techniques,
downlink transmission is only possible immediately after an uplink downlink transmission is only possible immediately after an uplink
transmission. In order to avoid potentially high delay in the transmission. In order to avoid potentially high delay in the
downlink transmission of a SCHC fragmented datagram, the SCHC downlink transmission of a SCHC Fragmented datagram, the SCHC
fragment receiver MAY perform an uplink transmission as soon as Fragment receiver MAY perform an uplink transmission as soon as
possible after reception of a SCHC fragment that is not the last one. possible after reception of a SCHC Fragment that is not the last one.
Such uplink transmission MAY be triggered by the L2 (e.g. an L2 ACK Such uplink transmission MAY be triggered by the L2 (e.g. an L2 ACK
sent in response to a SCHC fragment encapsulated in a L2 frame that sent in response to a SCHC Fragment encapsulated in a L2 frame that
requires an L2 ACK) or it MAY be triggered from an upper layer. requires an L2 ACK) or it MAY be triggered from an upper layer.
For downlink transmission of a SCHC fragmented packet in ACK-Always For downlink transmission of a SCHC Fragmented packet in ACK-Always
mode, the SCHC fragment receiver MAY support timer-based mode, the SCHC Fragment receiver MAY support timer-based SCHC ACK
ACKretransmission. In this mechanism, the SCHC fragment receiver retransmission. In this mechanism, the SCHC Fragment receiver
initializes and starts a timer (the Inactivity Timer is used) after initializes and starts a timer (the Inactivity Timer is used) after
the transmission of an ACK, except when the ACK is sent in response the transmission of an SCHC ACK, except when the SCHC ACK is sent in
to the last SCHC fragment of a packet (All-1 fragment). In the response to the last SCHC Fragment of a packet (All-1 fragment). In
latter case, the SCHC fragment receiver does not start a timer after the latter case, the SCHC Fragment receiver does not start a timer
transmission of the ACK. after transmission of the SCHC ACK.
If, after transmission of an ACK that is not an All-1 fragment, and If, after transmission of an SCHC ACK that is not an All-1 fragment,
before expiration of the corresponding Inactivity timer, the SCHC and before expiration of the corresponding Inactivity timer, the SCHC
fragment receiver receives a SCHC fragment that belongs to the Fragment receiver receives a SCHC Fragment that belongs to the
current window (e.g. a missing SCHC fragment from the current window) current window (e.g. a missing SCHC Fragment from the current window)
or to the next window, the Inactivity timer for the ACK is stopped. or to the next window, the Inactivity timer for the SCHC ACK is
However, if the Inactivity timer expires, the ACK is resent and the stopped. However, if the Inactivity timer expires, the SCHC ACK is
Inactivity timer is reinitialized and restarted. resent and the Inactivity timer is reinitialized and restarted.
The default initial value for the Inactivity timer, as well as the The default initial value for the Inactivity timer, as well as the
maximum number of retries for a specific ACK, denoted maximum number of retries for a specific SCHC ACK, denoted
MAX_ACK_RETRIES, are not defined in this document, and need to be MAX_ACK_RETRIES, are not defined in this document, and need to be
defined in other documents (e.g. technology-specific profiles). The defined in other documents (e.g. technology-specific profiles). The
initial value of the Inactivity timer is expected to be greater than initial value of the Inactivity timer is expected to be greater than
that of the Retransmission timer, in order to make sure that a that of the Retransmission timer, in order to make sure that a
(buffered) SCHC fragment to be retransmitted can find an opportunity (buffered) SCHC Fragment to be retransmitted can find an opportunity
for that transmission. for that transmission.
When the SCHC fragment sender transmits the All-1 fragment, it starts When the SCHC Fragment sender transmits the All-1 fragment, it starts
its Retransmission Timer with a large timeout value (e.g. several its Retransmission Timer with a large timeout value (e.g. several
times that of the initial Inactivity timer). If an ACK is received times that of the initial Inactivity timer). If an SCHC ACK is
before expiration of this timer, the SCHC fragment sender retransmits received before expiration of this timer, the SCHC Fragment sender
any lost SCHC fragments reported by the ACK, or if the ACK confirms retransmits any lost SCHC Fragments reported by the SCHC ACK, or if
successful reception of all SCHC fragments of the last window, the the SCHC ACK confirms successful reception of all SCHC Fragments of
transmission of the SCHC fragmented packet is considered complete. the last window, the transmission of the SCHC Fragmented packet is
If the timer expires, and no ACK has been received since the start of considered complete. If the timer expires, and no SCHC ACK has been
the timer, the SCHC fragment sender assumes that the All-1 fragment received since the start of the timer, the SCHC Fragment sender
has been successfully received (and possibly, the last ACK has been assumes that the All-1 fragment has been successfully received (and
lost: this mechanism assumes that the retransmission timer for the possibly, the last SCHC ACK has been lost: this mechanism assumes
All-1 fragment is long enough to allow several ACK retries if the that the retransmission timer for the All-1 fragment is long enough
All-1 fragment has not been received by the SCHC fragment receiver, to allow several SCHC ACK retries if the All-1 fragment has not been
and it also assumes that it is unlikely that several ACKs become all received by the SCHC Fragment receiver, and it also assumes that it
lost). is unlikely that several ACKs become all lost).
8. Padding management 8. Padding management
Default padding is defined for L2 frame with a variable length of Default padding is defined for L2 frame with a variable length of
bytes. Padding is done twice, after compression and in the all-1 bytes. Padding is done twice, after compression and in the all-1
fragmentation. fragmentation.
In compression, the rule and the compression residues are not aligned In compression, the rule and the compression residues are not aligned
on a byte, but payload following the residue is always a multiple of on a byte, but payload following the residue is always a multiple of
8 bits. In that case, padding bits can be added after the payload to 8 bits. In that case, padding bits can be added after the payload to
reach the first byte boundary. Since the rule and the residue give reach the first byte boundary. Since the rule and the residue give
the length of the SCHC header and payload is always a multiple of 8 the length of the SCHC header and payload is always a multiple of 8
bits, the receiver can without ambiguity remove the padding bits bits, the receiver can without ambiguity remove the padding bits
which never excide 7 bits. which never excide 7 bits.
SCHC fragmentation works on a byte aligned (i.e. padded SCHC packet). SCHC Fragmentation works on a byte aligned (i.e. padded SCHC Packet).
Fragmentation header may not be aligned on byte boundary, but each Fragmentation header may not be aligned on byte boundary, but each
fragment except the last one (All-1 fragment) must sent the maximum fragment except the last one (All-1 fragment) must sent the maximum
bits as possible. Only the last fragment need to introduce padding bits as possible. Only the last fragment need to introduce padding
to reach the next boundary limit. Since the SCHC is known to be a to reach the next boundary limit. Since the SCHC is known to be a
multiple of 8 bits, the receiver can remove the extra bit to reach multiple of 8 bits, the receiver can remove the extra bit to reach
this limit. this limit.
Default padding mechanism do not need to send the padding length and Default padding mechanism do not need to send the padding length and
can lead to a maximum of 14 bits of padding. can lead to a maximum of 14 bits of padding.
The padding is not mandatory and is optional to the technology-
specific document to give a different solution. In this docuement
there are some inputs on how to manage the padding.
9. SCHC Compression for IPv6 and UDP headers 9. SCHC Compression for IPv6 and UDP headers
This section lists the different IPv6 and UDP header fields and how This section lists the different IPv6 and UDP header fields and how
they can be compressed. they can be compressed.
9.1. IPv6 version field 9.1. IPv6 version field
This field always holds the same value. Therefore, in the rule, TV This field always holds the same value. Therefore, in the rule, TV
is set to 6, MO to "equal" and CDA to "not-sent". is set to 6, MO to "equal" and CDA to "not-sent".
skipping to change at page 40, line 17 skipping to change at page 42, line 17
Both ends MUST be synchronized with the appropriate prefixes. For a Both ends MUST be synchronized with the appropriate prefixes. For a
specific flow, the source and destination prefixes can be unique and specific flow, the source and destination prefixes can be unique and
stored in the context. It can be either a link-local prefix or a stored in the context. It can be either a link-local prefix or a
global prefix. In that case, the TV for the source and destination global prefix. In that case, the TV for the source and destination
prefixes contain the values, the MO is set to "equal" and the CDA is prefixes contain the values, the MO is set to "equal" and the CDA is
set to "not-sent". set to "not-sent".
If the rule is intended to compress packets with different prefix If the rule is intended to compress packets with different prefix
values, match-mapping SHOULD be used. The different prefixes are values, match-mapping SHOULD be used. The different prefixes are
listed in the TV, the MO is set to "match-mapping" and the CDA is set listed in the TV, the MO is set to "match-mapping" and the CDA is set
to "mapping-sent". See Figure 25 to "mapping-sent". See Figure 28
Otherwise, the TV contains the prefix, the MO is set to "equal" and Otherwise, the TV contains the prefix, the MO is set to "equal" and
the CDA is set to "value-sent". the CDA is set to "value-sent".
9.7.2. IPv6 source and destination IID 9.7.2. IPv6 source and destination IID
If the DEV or APP IID are based on an LPWAN address, then the IID can If the DEV or APP IID are based on an LPWAN address, then the IID can
be reconstructed with information coming from the LPWAN header. In be reconstructed with information coming from the LPWAN header. In
that case, the TV is not set, the MO is set to "ignore" and the CDA that case, the TV is not set, the MO is set to "ignore" and the CDA
is set to "DEViid" or "APPiid". Note that the LPWAN technology is set to "DEViid" or "APPiid". Note that the LPWAN technology
skipping to change at page 41, line 51 skipping to change at page 43, line 51
If the payload is small, the TV can be set to 0x0000, the MO set to If the payload is small, the TV can be set to 0x0000, the MO set to
"MSB" and the CDA to "LSB". "MSB" and the CDA to "LSB".
In other cases, the length SHOULD be sent and the CDA is replaced by In other cases, the length SHOULD be sent and the CDA is replaced by
"value-sent". "value-sent".
9.11. UDP Checksum field 9.11. UDP Checksum field
IPv6 mandates a checksum in the protocol above IP. Nevertheless, if IPv6 mandates a checksum in the protocol above IP. Nevertheless, if
a more efficient mechanism such as L2 CRC or MIC is carried by or a more efficient mechanism such as L2 CRC or MIC is carried by or
over the L2 (such as in the LPWAN SCHC fragmentation process (see over the L2 (such as in the LPWAN SCHC Fragmentation process (see
Section 7)), the UDP checksum transmission can be avoided. In that Section 7)), the UDP checksum transmission can be avoided. In that
case, the TV is not set, the MO is set to "ignore" and the CDA is set case, the TV is not set, the MO is set to "ignore" and the CDA is set
to "compute-checksum". to "compute-checksum".
In other cases, the checksum SHOULD be explicitly sent. The TV is In other cases, the checksum SHOULD be explicitly sent. The TV is
not set, the MO is set to "ignore" and the CDF is set to "value- not set, the MO is set to "ignore" and the CDF is set to "value-
sent". sent".
10. Security considerations 10. Security considerations
10.1. Security considerations for header compression 10.1. Security considerations for header compression
A malicious header compression could cause the reconstruction of a A malicious header compression could cause the reconstruction of a
wrong packet that does not match with the original one. Such a wrong packet that does not match with the original one. Such a
corruption MAY be detected with end-to-end authentication and corruption MAY be detected with end-to-end authentication and
integrity mechanisms. Header Compression does not add more security integrity mechanisms. Header Compression does not add more security
problem than what is already needed in a transmission. For instance, problem than what is already needed in a transmission. For instance,
to avoid an attack, never re-construct a packet bigger than some to avoid an attack, never re-construct a packet bigger than some
configured size (with 1500 bytes as generic default). configured size (with 1500 bytes as generic default).
10.2. Security considerations for SCHC fragmentation 10.2. Security considerations for SCHC Fragmentation
This subsection describes potential attacks to LPWAN SCHC This subsection describes potential attacks to LPWAN SCHC
fragmentation and suggests possible countermeasures. Fragmentation and suggests possible countermeasures.
A node can perform a buffer reservation attack by sending a first A node can perform a buffer reservation attack by sending a first
SCHC fragment to a target. Then, the receiver will reserve buffer SCHC Fragment to a target. Then, the receiver will reserve buffer
space for the IPv6 packet. Other incoming SCHC fragmented packets space for the IPv6 packet. Other incoming SCHC Fragmented packets
will be dropped while the reassembly buffer is occupied during the will be dropped while the reassembly buffer is occupied during the
reassembly timeout. Once that timeout expires, the attacker can reassembly timeout. Once that timeout expires, the attacker can
repeat the same procedure, and iterate, thus creating a denial of repeat the same procedure, and iterate, thus creating a denial of
service attack. The (low) cost to mount this attack is linear with service attack. The (low) cost to mount this attack is linear with
the number of buffers at the target node. However, the cost for an the number of buffers at the target node. However, the cost for an
attacker can be increased if individual SCHC fragments of multiple attacker can be increased if individual SCHC Fragments of multiple
packets can be stored in the reassembly buffer. To further increase packets can be stored in the reassembly buffer. To further increase
the attack cost, the reassembly buffer can be splitted into SCHC the attack cost, the reassembly buffer can be split into SCHC
fragment-sized buffer slots. Once a packet is complete, it is Fragment-sized buffer slots. Once a packet is complete, it is
processed normally. If buffer overload occurs, a receiver can processed normally. If buffer overload occurs, a receiver can
discard packets based on the sender behavior, which MAY help identify discard packets based on the sender behavior, which MAY help identify
which SCHC fragments have been sent by an attacker. which SCHC Fragments have been sent by an attacker.
In another type of attack, the malicious node is required to have In another type of attack, the malicious node is required to have
overhearing capabilities. If an attacker can overhear a SCHC overhearing capabilities. If an attacker can overhear a SCHC
fragment, it can send a spoofed duplicate (e.g. with random payload) Fragment, it can send a spoofed duplicate (e.g. with random payload)
to the destination. If the LPWAN technology does not support to the destination. If the LPWAN technology does not support
suitable protection (e.g. source authentication and frame counters to suitable protection (e.g. source authentication and frame counters to
prevent replay attacks), a receiver cannot distinguish legitimate prevent replay attacks), a receiver cannot distinguish legitimate
from spoofed SCHC fragments. Therefore, the original IPv6 packet from spoofed SCHC Fragments. Therefore, the original IPv6 packet
will be considered corrupt and will be dropped. To protect resource- will be considered corrupt and will be dropped. To protect resource-
constrained nodes from this attack, it has been proposed to establish constrained nodes from this attack, it has been proposed to establish
a binding among the SCHC fragments to be transmitted by a node, by a binding among the SCHC Fragments to be transmitted by a node, by
applying content-chaining to the different SCHC fragments, based on applying content-chaining to the different SCHC Fragments, based on
cryptographic hash functionality. The aim of this technique is to cryptographic hash functionality. The aim of this technique is to
allow a receiver to identify illegitimate SCHC fragments. allow a receiver to identify illegitimate SCHC Fragments.
Further attacks MAY involve sending overlapped fragments (i.e. Further attacks MAY involve sending overlapped fragments (i.e.
comprising some overlapping parts of the original IPv6 datagram). comprising some overlapping parts of the original IPv6 datagram).
Implementers SHOULD make sure that the correct operation is not Implementers SHOULD make sure that the correct operation is not
affected by such event. affected by such event.
In Window mode - ACK on error, a malicious node MAY force a SCHC In Window mode - ACK on error, a malicious node MAY force a SCHC
fragment sender to resend a SCHC fragment a number of times, with the Fragment sender to resend a SCHC Fragment a number of times, with the
aim to increase consumption of the SCHC fragment sender's resources. aim to increase consumption of the SCHC Fragment sender's resources.
To this end, the malicious node MAY repeatedly send a fake ACK to the To this end, the malicious node MAY repeatedly send a fake ACK to the
SCHC fragment sender, with a Bitmap that reports that one or more SCHC Fragment sender, with a Bitmap that reports that one or more
SCHC fragments have been lost. In order to mitigate this possible SCHC Fragments have been lost. In order to mitigate this possible
attack, MAX_ACK_RETRIES MAY be set to a safe value which allows to attack, MAX_ACK_RETRIES MAY be set to a safe value which allows to
limit the maximum damage of the attack to an acceptable extent. limit the maximum damage of the attack to an acceptable extent.
However, note that a high setting for MAX_ACK_RETRIES benefits SCHC However, note that a high setting for MAX_ACK_RETRIES benefits SCHC
fragment reliability modes, therefore the trade-off needs to be Fragment reliability modes, therefore the trade-off needs to be
carefully considered. carefully considered.
11. Acknowledgements 11. Acknowledgements
Thanks to Dominique Barthel, Carsten Bormann, Philippe Clavier, Thanks to Dominique Barthel, Carsten Bormann, Philippe Clavier,
Eduardo Ingles Sanchez, Arunprabhu Kandasamy, Rahul Jadhav, Sergio Eduardo Ingles Sanchez, Arunprabhu Kandasamy, Rahul Jadhav, Sergio
Lopez Bernal, Antony Markovski, Alexander Pelov, Pascal Thubert, Juan Lopez Bernal, Antony Markovski, Alexander Pelov, Pascal Thubert, Juan
Carlos Zuniga, Diego Dujovne, Edgar Ramos, and Shoichi Sakane for Carlos Zuniga, Diego Dujovne, Edgar Ramos, and Shoichi Sakane for
useful design consideration and comments. useful design consideration and comments.
skipping to change at page 44, line 46 skipping to change at page 46, line 46
The most common case using the mechanisms defined in this document The most common case using the mechanisms defined in this document
will be a LPWAN Dev that embeds some applications running over CoAP. will be a LPWAN Dev that embeds some applications running over CoAP.
In this example, three flows are considered. The first flow is for In this example, three flows are considered. The first flow is for
the device management based on CoAP using Link Local IPv6 addresses the device management based on CoAP using Link Local IPv6 addresses
and UDP ports 123 and 124 for Dev and App, respectively. The second and UDP ports 123 and 124 for Dev and App, respectively. The second
flow will be a CoAP server for measurements done by the Device (using flow will be a CoAP server for measurements done by the Device (using
ports 5683) and Global IPv6 Address prefixes alpha::IID/64 to ports 5683) and Global IPv6 Address prefixes alpha::IID/64 to
beta::1/64. The last flow is for legacy applications using different beta::1/64. The last flow is for legacy applications using different
ports numbers, the destination IPv6 address prefix is gamma::1/64. ports numbers, the destination IPv6 address prefix is gamma::1/64.
Figure 24 presents the protocol stack for this Device. IPv6 and UDP Figure 27 presents the protocol stack for this Device. IPv6 and UDP
are represented with dotted lines since these protocols are are represented with dotted lines since these protocols are
compressed on the radio link. compressed on the radio link.
Management Data Management Data
+----------+---------+---------+ +----------+---------+---------+
| CoAP | CoAP | legacy | | CoAP | CoAP | legacy |
+----||----+---||----+---||----+ +----||----+---||----+---||----+
. UDP . UDP | UDP | . UDP . UDP | UDP |
................................ ................................
. IPv6 . IPv6 . IPv6 . . IPv6 . IPv6 . IPv6 .
+------------------------------+ +------------------------------+
| SCHC Header compression | | SCHC Header compression |
| and fragmentation | | and fragmentation |
+------------------------------+ +------------------------------+
| LPWAN L2 technologies | | LPWAN L2 technologies |
+------------------------------+ +------------------------------+
DEV or NGW DEV or NGW
Figure 24: Simplified Protocol Stack for LP-WAN Figure 27: Simplified Protocol Stack for LP-WAN
Note that in some LPWAN technologies, only the Devs have a device ID. Note that in some LPWAN technologies, only the Devs have a device ID.
Therefore, when such technologies are used, it is necessary to Therefore, when such technologies are used, it is necessary to
statically define an IID for the Link Local address for the SCHC C/D. statically define an IID for the Link Local address for the SCHC C/D.
Rule 0 Rule 0
+----------------+--+--+--+---------+--------+------------++------+ +----------------+--+--+--+---------+--------+------------++------+
| Field |FL|FP|DI| Value | Match | Comp Decomp|| Sent | | Field |FL|FP|DI| Value | Match | Comp Decomp|| Sent |
| | | | | | Opera. | Action ||[bits]| | | | | | | Opera. | Action ||[bits]|
+----------------+--+--+--+---------+---------------------++------+ +----------------+--+--+--+---------+---------------------++------+
skipping to change at page 46, line 48 skipping to change at page 48, line 48
|IPv6 DEViid |64|1 |Bi| | ignore | DEViid || | |IPv6 DEViid |64|1 |Bi| | ignore | DEViid || |
|IPv6 APPprefix |64|1 |Bi|gamma/64 | equal | not-sent || | |IPv6 APPprefix |64|1 |Bi|gamma/64 | equal | not-sent || |
|IPv6 APPiid |64|1 |Bi|::1000 | equal | not-sent || | |IPv6 APPiid |64|1 |Bi|::1000 | equal | not-sent || |
+================+==+==+==+=========+========+============++======+ +================+==+==+==+=========+========+============++======+
|UDP DEVport |16|1 |Bi|8720 | MSB(12)| LSB(4) || [4] | |UDP DEVport |16|1 |Bi|8720 | MSB(12)| LSB(4) || [4] |
|UDP APPport |16|1 |Bi|8720 | MSB(12)| LSB(4) || [4] | |UDP APPport |16|1 |Bi|8720 | MSB(12)| LSB(4) || [4] |
|UDP Length |16|1 |Bi| | ignore | comp-length|| | |UDP Length |16|1 |Bi| | ignore | comp-length|| |
|UDP checksum |16|1 |Bi| | ignore | comp-chk || | |UDP checksum |16|1 |Bi| | ignore | comp-chk || |
+================+==+==+==+=========+========+============++======+ +================+==+==+==+=========+========+============++======+
Figure 25: Context rules Figure 28: Context rules
All the fields described in the three rules depicted on Figure 25 are All the fields described in the three rules depicted on Figure 28 are
present in the IPv6 and UDP headers. The DEViid-DID value is found present in the IPv6 and UDP headers. The DEViid-DID value is found
in the L2 header. in the L2 header.
The second and third rules use global addresses. The way the Dev The second and third rules use global addresses. The way the Dev
learns the prefix is not in the scope of the document. learns the prefix is not in the scope of the document.
The third rule compresses port numbers to 4 bits. The third rule compresses port numbers to 4 bits.
Appendix B. Fragmentation Examples Appendix B. Fragmentation Examples
This section provides examples for the different fragment reliability This section provides examples for the different fragment reliability
modes specified in this document. modes specified in this document.
Figure 26 illustrates the transmission in No-ACK mode of an IPv6 Figure 29 illustrates the transmission in No-ACK mode of an IPv6
packet that needs 11 fragments. FCN is 1 bit wide. packet that needs 11 fragments. FCN is 1 bit wide.
Sender Receiver Sender Receiver
|-------FCN=0-------->| |-------FCN=0-------->|
|-------FCN=0-------->| |-------FCN=0-------->|
|-------FCN=0-------->| |-------FCN=0-------->|
|-------FCN=0-------->| |-------FCN=0-------->|
|-------FCN=0-------->| |-------FCN=0-------->|
|-------FCN=0-------->| |-------FCN=0-------->|
|-------FCN=0-------->| |-------FCN=0-------->|
|-------FCN=0-------->| |-------FCN=0-------->|
|-------FCN=0-------->| |-------FCN=0-------->|
|-------FCN=0-------->| |-------FCN=0-------->|
|-----FCN=1 + MIC --->|MIC checked: success => |-----FCN=1 + MIC --->|MIC checked: success =>
Figure 26: Transmission in No-ACK mode of an IPv6 packet carried by Figure 29: Transmission in No-ACK mode of an IPv6 packet carried by
11 fragments 11 fragments
In the following examples, N (i.e. the size if the FCN field) is 3 In the following examples, N (i.e. the size if the FCN field) is 3
bits. Therefore, the All-1 FCN value is 7. bits. Therefore, the All-1 FCN value is 7.
Figure 27 illustrates the transmission in ACK-on-Error of an IPv6 Figure 30 illustrates the transmission in ACK-on-Error of an IPv6
packet that needs 11 fragments, with MAX_WIND_FCN=6 and no fragment packet that needs 11 fragments, with MAX_WIND_FCN=6 and no fragment
loss. loss.
Sender Receiver Sender Receiver
|-----W=0, FCN=6----->| |-----W=0, FCN=6----->|
|-----W=0, FCN=5----->| |-----W=0, FCN=5----->|
|-----W=0, FCN=4----->| |-----W=0, FCN=4----->|
|-----W=0, FCN=3----->| |-----W=0, FCN=3----->|
|-----W=0, FCN=2----->| |-----W=0, FCN=2----->|
|-----W=0, FCN=1----->| |-----W=0, FCN=1----->|
|-----W=0, FCN=0----->| |-----W=0, FCN=0----->|
(no ACK) (no ACK)
|-----W=1, FCN=6----->| |-----W=1, FCN=6----->|
|-----W=1, FCN=5----->| |-----W=1, FCN=5----->|
|-----W=1, FCN=4----->| |-----W=1, FCN=4----->|
|--W=1, FCN=7 + MIC-->|MIC checked: success => |--W=1, FCN=7 + MIC-->|MIC checked: success =>
|<---- ACK, W=1 ------| |<---- ACK, W=1 ------|
Figure 27: Transmission in ACK-on-Error mode of an IPv6 packet Figure 30: Transmission in ACK-on-Error mode of an IPv6 packet
carried by 11 fragments, with MAX_WIND_FCN=6 and no loss. carried by 11 fragments, with MAX_WIND_FCN=6 and no loss.
Figure 28 illustrates the transmission in ACK-on-Error mode of an Figure 31 illustrates the transmission in ACK-on-Error mode of an
IPv6 packet that needs 11 fragments, with MAX_WIND_FCN=6 and three IPv6 packet that needs 11 fragments, with MAX_WIND_FCN=6 and three
lost fragments. lost fragments.
Sender Receiver Sender Receiver
|-----W=0, FCN=6----->| |-----W=0, FCN=6----->|
|-----W=0, FCN=5----->| |-----W=0, FCN=5----->|
|-----W=0, FCN=4--X-->| |-----W=0, FCN=4--X-->|
|-----W=0, FCN=3----->| |-----W=0, FCN=3----->|
|-----W=0, FCN=2--X-->| 7 |-----W=0, FCN=2--X-->| 7
|-----W=0, FCN=1----->| / |-----W=0, FCN=1----->| /
skipping to change at page 48, line 47 skipping to change at page 50, line 47
|-----W=0, FCN=2----->| |-----W=0, FCN=2----->|
(no ACK) (no ACK)
|-----W=1, FCN=6----->| |-----W=1, FCN=6----->|
|-----W=1, FCN=5----->| |-----W=1, FCN=5----->|
|-----W=1, FCN=4--X-->| |-----W=1, FCN=4--X-->|
|- W=1, FCN=7 + MIC ->|MIC checked: failed |- W=1, FCN=7 + MIC ->|MIC checked: failed
|<-----ACK, W=1-------|C=0 Bitmap:1100001 |<-----ACK, W=1-------|C=0 Bitmap:1100001
|-----W=1, FCN=4----->|MIC checked: success => |-----W=1, FCN=4----->|MIC checked: success =>
|<---- ACK, W=1 ------|C=1, no Bitmap |<---- ACK, W=1 ------|C=1, no Bitmap
Figure 28: Transmission in ACK-on-Error mode of an IPv6 packet Figure 31: Transmission in ACK-on-Error mode of an IPv6 packet
carried by 11 fragments, with MAX_WIND_FCN=6 and three lost carried by 11 fragments, with MAX_WIND_FCN=6 and three lost
fragments. fragments.
Figure 29 illustrates the transmission in ACK-Always mode of an IPv6 Figure 32 illustrates the transmission in ACK-Always mode of an IPv6
packet that needs 11 fragments, with MAX_WIND_FCN=6 and no loss. packet that needs 11 fragments, with MAX_WIND_FCN=6 and no loss.
Sender Receiver Sender Receiver
|-----W=0, FCN=6----->| |-----W=0, FCN=6----->|
|-----W=0, FCN=5----->| |-----W=0, FCN=5----->|
|-----W=0, FCN=4----->| |-----W=0, FCN=4----->|
|-----W=0, FCN=3----->| |-----W=0, FCN=3----->|
|-----W=0, FCN=2----->| |-----W=0, FCN=2----->|
|-----W=0, FCN=1----->| |-----W=0, FCN=1----->|
|-----W=0, FCN=0----->| |-----W=0, FCN=0----->|
|<-----ACK, W=0-------| Bitmap:1111111 |<-----ACK, W=0-------| Bitmap:1111111
|-----W=1, FCN=6----->| |-----W=1, FCN=6----->|
|-----W=1, FCN=5----->| |-----W=1, FCN=5----->|
|-----W=1, FCN=4----->| |-----W=1, FCN=4----->|
|--W=1, FCN=7 + MIC-->|MIC checked: success => |--W=1, FCN=7 + MIC-->|MIC checked: success =>
|<-----ACK, W=1-------| C=1 no Bitmap |<-----ACK, W=1-------| C=1 no Bitmap
(End) (End)
Figure 29: Transmission in ACK-Always mode of an IPv6 packet carried Figure 32: Transmission in ACK-Always mode of an IPv6 packet carried
by 11 fragments, with MAX_WIND_FCN=6 and no lost fragment. by 11 fragments, with MAX_WIND_FCN=6 and no lost fragment.
Figure 30 illustrates the transmission in ACK-Always mode of an IPv6 Figure 33 illustrates the transmission in ACK-Always mode of an IPv6
packet that needs 11 fragments, with MAX_WIND_FCN=6 and three lost packet that needs 11 fragments, with MAX_WIND_FCN=6 and three lost
fragments. fragments.
Sender Receiver Sender Receiver
|-----W=1, FCN=6----->| |-----W=1, FCN=6----->|
|-----W=1, FCN=5----->| |-----W=1, FCN=5----->|
|-----W=1, FCN=4--X-->| |-----W=1, FCN=4--X-->|
|-----W=1, FCN=3----->| |-----W=1, FCN=3----->|
|-----W=1, FCN=2--X-->| 7 |-----W=1, FCN=2--X-->| 7
|-----W=1, FCN=1----->| / |-----W=1, FCN=1----->| /
skipping to change at page 50, line 26 skipping to change at page 52, line 26
|<-----ACK, W=1-------|Bitmap: |<-----ACK, W=1-------|Bitmap:
|-----W=0, FCN=6----->| |-----W=0, FCN=6----->|
|-----W=0, FCN=5----->| |-----W=0, FCN=5----->|
|-----W=0, FCN=4--X-->| |-----W=0, FCN=4--X-->|
|--W=0, FCN=7 + MIC-->|MIC checked: failed |--W=0, FCN=7 + MIC-->|MIC checked: failed
|<-----ACK, W=0-------| C= 0 Bitmap:11000001 |<-----ACK, W=0-------| C= 0 Bitmap:11000001
|-----W=0, FCN=4----->|MIC checked: success => |-----W=0, FCN=4----->|MIC checked: success =>
|<-----ACK, W=0-------| C= 1 no Bitmap |<-----ACK, W=0-------| C= 1 no Bitmap
(End) (End)
Figure 30: Transmission in ACK-Always mode of an IPv6 packet carried Figure 33: Transmission in ACK-Always mode of an IPv6 packet carried
by 11 fragments, with MAX_WIND_FCN=6 and three lost fragments. by 11 fragments, with MAX_WIND_FCN=6 and three lost fragments.
Figure 31 illustrates the transmission in ACK-Always mode of an IPv6 Figure 34 illustrates the transmission in ACK-Always mode of an IPv6
packet that needs 6 fragments, with MAX_WIND_FCN=6, three lost packet that needs 6 fragments, with MAX_WIND_FCN=6, three lost
fragments and only one retry needed to recover each lost fragment. fragments and only one retry needed to recover each lost fragment.
Sender Receiver Sender Receiver
|-----W=0, FCN=6----->| |-----W=0, FCN=6----->|
|-----W=0, FCN=5----->| |-----W=0, FCN=5----->|
|-----W=0, FCN=4--X-->| |-----W=0, FCN=4--X-->|
|-----W=0, FCN=3--X-->| |-----W=0, FCN=3--X-->|
|-----W=0, FCN=2--X-->| |-----W=0, FCN=2--X-->|
|--W=0, FCN=7 + MIC-->|MIC checked: failed |--W=0, FCN=7 + MIC-->|MIC checked: failed
|<-----ACK, W=0-------|C= 0 Bitmap:1100001 |<-----ACK, W=0-------|C= 0 Bitmap:1100001
|-----W=0, FCN=4----->|MIC checked: failed |-----W=0, FCN=4----->|MIC checked: failed
|-----W=0, FCN=3----->|MIC checked: failed |-----W=0, FCN=3----->|MIC checked: failed
|-----W=0, FCN=2----->|MIC checked: success |-----W=0, FCN=2----->|MIC checked: success
|<-----ACK, W=0-------|C=1 no Bitmap |<-----ACK, W=0-------|C=1 no Bitmap
(End) (End)
Figure 31: Transmission in ACK-Always mode of an IPv6 packet carried Figure 34: Transmission in ACK-Always mode of an IPv6 packet carried
by 11 fragments, with MAX_WIND_FCN=6, three lost framents and only by 11 fragments, with MAX_WIND_FCN=6, three lost framents and only
one retry needed for each lost fragment. one retry needed for each lost fragment.
Figure 32 illustrates the transmission in ACK-Always mode of an IPv6 Figure 35 illustrates the transmission in ACK-Always mode of an IPv6
packet that needs 6 fragments, with MAX_WIND_FCN=6, three lost packet that needs 6 fragments, with MAX_WIND_FCN=6, three lost
fragments, and the second ACK lost. fragments, and the second ACK lost.
Sender Receiver Sender Receiver
|-----W=0, FCN=6----->| |-----W=0, FCN=6----->|
|-----W=0, FCN=5----->| |-----W=0, FCN=5----->|
|-----W=0, FCN=4--X-->| |-----W=0, FCN=4--X-->|
|-----W=0, FCN=3--X-->| |-----W=0, FCN=3--X-->|
|-----W=0, FCN=2--X-->| |-----W=0, FCN=2--X-->|
|--W=0, FCN=7 + MIC-->|MIC checked: failed |--W=0, FCN=7 + MIC-->|MIC checked: failed
skipping to change at page 51, line 27 skipping to change at page 53, line 27
|-----W=0, FCN=4----->|MIC checked: failed |-----W=0, FCN=4----->|MIC checked: failed
|-----W=0, FCN=3----->|MIC checked: failed |-----W=0, FCN=3----->|MIC checked: failed
|-----W=0, FCN=2----->|MIC checked: success |-----W=0, FCN=2----->|MIC checked: success
| X---ACK, W=0-------|C= 1 no Bitmap | X---ACK, W=0-------|C= 1 no Bitmap
timeout | | timeout | |
|--W=0, FCN=7 + MIC-->| |--W=0, FCN=7 + MIC-->|
|<-----ACK, W=0-------|C= 1 no Bitmap |<-----ACK, W=0-------|C= 1 no Bitmap
(End) (End)
Figure 32: Transmission in ACK-Always mode of an IPv6 packet carried Figure 35: Transmission in ACK-Always mode of an IPv6 packet carried
by 11 fragments, with MAX_WIND_FCN=6, three lost fragments, and the by 11 fragments, with MAX_WIND_FCN=6, three lost fragments, and the
second ACK lost. second ACK lost.
Figure 33 illustrates the transmission in ACK-Always mode of an IPv6 Figure 36 illustrates the transmission in ACK-Always mode of an IPv6
packet that needs 6 fragments, with MAX_WIND_FCN=6, with three lost packet that needs 6 fragments, with MAX_WIND_FCN=6, with three lost
fragments, and one retransmitted fragment lost again. fragments, and one retransmitted fragment lost again.
Sender Receiver Sender Receiver
|-----W=0, FCN=6----->| |-----W=0, FCN=6----->|
|-----W=0, FCN=5----->| |-----W=0, FCN=5----->|
|-----W=0, FCN=4--X-->| |-----W=0, FCN=4--X-->|
|-----W=0, FCN=3--X-->| |-----W=0, FCN=3--X-->|
|-----W=0, FCN=2--X-->| |-----W=0, FCN=2--X-->|
|--W=0, FCN=7 + MIC-->|MIC checked: failed |--W=0, FCN=7 + MIC-->|MIC checked: failed
skipping to change at page 52, line 23 skipping to change at page 54, line 23
|-----W=0, FCN=4----->|MIC checked: failed |-----W=0, FCN=4----->|MIC checked: failed
|-----W=0, FCN=3----->|MIC checked: failed |-----W=0, FCN=3----->|MIC checked: failed
|-----W=0, FCN=2--X-->| |-----W=0, FCN=2--X-->|
timeout| | timeout| |
|--W=0, FCN=7 + MIC-->|All-0 empty |--W=0, FCN=7 + MIC-->|All-0 empty
|<-----ACK, W=0-------|C=0 Bitmap: 1111101 |<-----ACK, W=0-------|C=0 Bitmap: 1111101
|-----W=0, FCN=2----->|MIC checked: success |-----W=0, FCN=2----->|MIC checked: success
|<-----ACK, W=0-------|C=1 no Bitmap |<-----ACK, W=0-------|C=1 no Bitmap
(End) (End)
Figure 33: Transmission in ACK-Always mode of an IPv6 packet carried Figure 36: Transmission in ACK-Always mode of an IPv6 packet carried
by 11 fragments, with MAX_WIND_FCN=6, with three lost fragments, and by 11 fragments, with MAX_WIND_FCN=6, with three lost fragments, and
one retransmitted fragment lost again. one retransmitted fragment lost again.
Figure 34 illustrates the transmission in ACK-Always mode of an IPv6 Figure 37 illustrates the transmission in ACK-Always mode of an IPv6
packet that needs 28 fragments, with N=5, MAX_WIND_FCN=23 and two packet that needs 28 fragments, with N=5, MAX_WIND_FCN=23 and two
lost fragments. Note that MAX_WIND_FCN=23 may be useful when the lost fragments. Note that MAX_WIND_FCN=23 may be useful when the
maximum possible Bitmap size, considering the maximum lower layer maximum possible Bitmap size, considering the maximum lower layer
technology payload size and the value of R, is 3 bytes. Note also technology payload size and the value of R, is 3 bytes. Note also
that the FCN of the last fragment of the packet is the one with that the FCN of the last fragment of the packet is the one with
FCN=31 (i.e. FCN=2^N-1 for N=5, or equivalently, all FCN bits set to FCN=31 (i.e. FCN=2^N-1 for N=5, or equivalently, all FCN bits set to
1). 1).
Sender Receiver Sender Receiver
|-----W=0, FCN=23----->| |-----W=0, FCN=23----->|
skipping to change at page 53, line 42 skipping to change at page 55, line 42
|-----W=0, FCN=21----->| |-----W=0, FCN=21----->|
|-----W=0, FCN=10----->| |-----W=0, FCN=10----->|
|<------ACK, W=0-------|no Bitmap |<------ACK, W=0-------|no Bitmap
|-----W=1, FCN=23----->| |-----W=1, FCN=23----->|
|-----W=1, FCN=22----->| |-----W=1, FCN=22----->|
|-----W=1, FCN=21----->| |-----W=1, FCN=21----->|
|--W=1, FCN=31 + MIC-->|MIC checked: sucess => |--W=1, FCN=31 + MIC-->|MIC checked: sucess =>
|<------ACK, W=1-------|no Bitmap |<------ACK, W=1-------|no Bitmap
(End) (End)
Figure 34: Transmission in ACK-Always mode of an IPv6 packet carried Figure 37: Transmission in ACK-Always mode of an IPv6 packet carried
by 28 fragments, with N=5, MAX_WIND_FCN=23 and two lost fragments. by 28 fragments, with N=5, MAX_WIND_FCN=23 and two lost fragments.
Appendix C. Fragmentation State Machines Appendix C. Fragmentation State Machines
The fragmentation state machines of the sender and the receiver, one The fragmentation state machines of the sender and the receiver, one
for each of the different reliability modes, are described in the for each of the different reliability modes, are described in the
following figures: following figures:
+===========+ +===========+
+------------+ Init | +------------+ Init |
skipping to change at page 54, line 23 skipping to change at page 56, line 23
+--------> | Send | send Fragment (FCN=0) +--------> | Send | send Fragment (FCN=0)
+===+=======+ +===+=======+
| last fragment | last fragment
| ~~~~~~~~~~~~ | ~~~~~~~~~~~~
| FCN = 1 | FCN = 1
v send fragment+MIC v send fragment+MIC
+============+ +============+
| END | | END |
+============+ +============+
Figure 35: Sender State Machine for the No-ACK Mode Figure 38: Sender State Machine for the No-ACK Mode
+------+ Not All-1 +------+ Not All-1
+==========+=+ | ~~~~~~~~~~~~~~~~~~~ +==========+=+ | ~~~~~~~~~~~~~~~~~~~
| + <--+ set Inactivity Timer | + <--+ set Inactivity Timer
| RCV Frag +-------+ | RCV Frag +-------+
+=+===+======+ |All-1 & +=+===+======+ |All-1 &
All-1 & | | |MIC correct All-1 & | | |MIC correct
MIC wrong | |Inactivity | MIC wrong | |Inactivity |
| |Timer Exp. | | |Timer Exp. |
v | | v | |
+==========++ | v +==========++ | v
| Error |<-+ +========+==+ | Error |<-+ +========+==+
+===========+ | END | +===========+ | END |
+===========+ +===========+
Figure 36: Receiver State Machine for the No-ACK Mode Figure 39: Receiver State Machine for the No-ACK Mode
+=======+ +=======+
| INIT | FCN!=0 & more frags | INIT | FCN!=0 & more frags
| | ~~~~~~~~~~~~~~~~~~~~~~ | | ~~~~~~~~~~~~~~~~~~~~~~
+======++ +--+ send Window + frag(FCN) +======++ +--+ send Window + frag(FCN)
W=0 | | | FCN- W=0 | | | FCN-
Clear local Bitmap | | v set local Bitmap Clear local Bitmap | | v set local Bitmap
FCN=max value | ++==+========+ FCN=max value | ++==+========+
+> | | +> | |
+---------------------> | SEND | +---------------------> | SEND |
| +==+===+=====+ | +==+===+=====+
skipping to change at page 55, line 48 skipping to change at page 57, line 48
~~~~~~~~~~~~~~~~~~~~~~~~| | | Set Retrans_Timer ~~~~~~~~~~~~~~~~~~~~~~~~| | | Set Retrans_Timer
Stop Retrans_Timer| | | Stop Retrans_Timer| | |
+=============+ | | | +=============+ | | |
| END +<--------+ | | Attemp > MAX_ACK_REQUESTS | END +<--------+ | | Attemp > MAX_ACK_REQUESTS
+=============+ | | ~~~~~~~~~~~~~~~~~~ +=============+ | | ~~~~~~~~~~~~~~~~~~
All-1 Window | v Send Abort All-1 Window | v Send Abort
~~~~~~~~~~~~ | +=+===========+ ~~~~~~~~~~~~ | +=+===========+
MIC_bit ==0 & +>| ERROR | MIC_bit ==0 & +>| ERROR |
Lcl_Bitmap==recv_Bitmap +=============+ Lcl_Bitmap==recv_Bitmap +=============+
Figure 37: Sender State Machine for the ACK-Always Mode Figure 40: Sender State Machine for the ACK-Always Mode
Not All- & w=expected +---+ +---+w = Not expected Not All- & w=expected +---+ +---+w = Not expected
~~~~~~~~~~~~~~~~~~~~~ | | | |~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~ | | | |~~~~~~~~~~~~~~~~
Set local_Bitmap(FCN) | v v |discard Set local_Bitmap(FCN) | v v |discard
++===+===+===+=+ ++===+===+===+=+
+---------------------+ Rcv +--->* ABORT +---------------------+ Rcv +--->* ABORT
| +------------------+ Window | | +------------------+ Window |
| | +=====+==+=====+ | | +=====+==+=====+
| | All-0 & w=expect | ^ w =next & not-All | | All-0 & w=expect | ^ w =next & not-All
| | ~~~~~~~~~~~~~~~~~~ | |~~~~~~~~~~~~~~~~~~~~~ | | ~~~~~~~~~~~~~~~~~~ | |~~~~~~~~~~~~~~~~~~~~~
skipping to change at page 57, line 13 skipping to change at page 59, line 13
+==========+<---------------+ +==========+<---------------+
--->* ABORT --->* ABORT
~~~~~~~ ~~~~~~~
Inactivity_Timer = expires Inactivity_Timer = expires
When DWN_Link When DWN_Link
IF Inactivity_Timer expires IF Inactivity_Timer expires
Send DWL Request Send DWL Request
Attemp++ Attemp++
Figure 38: Receiver State Machine for the ACK-Always Mode Figure 41: Receiver State Machine for the ACK-Always Mode
+=======+ +=======+
| | | |
| INIT | | INIT |
| | FCN!=0 & more frags | | FCN!=0 & more frags
+======++ +--+ ~~~~~~~~~~~~~~~~~~~~~~ +======++ +--+ ~~~~~~~~~~~~~~~~~~~~~~
W=0 | | | send Window + frag(FCN) W=0 | | | send Window + frag(FCN)
~~~~~~~~~~~~~~~~~~ | | | FCN- ~~~~~~~~~~~~~~~~~~ | | | FCN-
Clear local Bitmap | | v set local Bitmap Clear local Bitmap | | v set local Bitmap
FCN=max value | ++=============+ FCN=max value | ++=============+
+> | | +> | |
skipping to change at page 58, line 51 skipping to change at page 60, line 51
+-------------------------+ | | +-------------------------+ | |
| | | |
Local_Bitmap==Recv_Bitmap| | Local_Bitmap==Recv_Bitmap| |
~~~~~~~~~~~~~~~~~~~~~~~~~| |Attemp > MAX_ACK_REQUESTS ~~~~~~~~~~~~~~~~~~~~~~~~~| |Attemp > MAX_ACK_REQUESTS
+=========+Stop Retrans_Timer | |~~~~~~~~~~~~~~~~~~~~~~~ +=========+Stop Retrans_Timer | |~~~~~~~~~~~~~~~~~~~~~~~
| END +<------------------+ v Send Abort | END +<------------------+ v Send Abort
+=========+ +=+=========+ +=========+ +=+=========+
| ERROR | | ERROR |
+===========+ +===========+
Figure 39: Sender State Machine for the ACK-on-Error Mode Figure 42: Sender State Machine for the ACK-on-Error Mode
Not All- & w=expected +---+ +---+w = Not expected Not All- & w=expected +---+ +---+w = Not expected
~~~~~~~~~~~~~~~~~~~~~ | | | |~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~ | | | |~~~~~~~~~~~~~~~~
Set local_Bitmap(FCN) | v v |discard Set local_Bitmap(FCN) | v v |discard
++===+===+===+=+ ++===+===+===+=+
+-----------------------+ +--+ All-0 & full +-----------------------+ +--+ All-0 & full
| ABORT *<---+ Rcv Window | | ~~~~~~~~~~~~ | ABORT *<---+ Rcv Window | | ~~~~~~~~~~~~
| +--------------------+ +<-+ w =next | +--------------------+ +<-+ w =next
| | All-0 empty +->+=+=+===+======+ clear lcl_Bitmap | | All-0 empty +->+=+=+===+======+ clear lcl_Bitmap
| | ~~~~~~~~~~~ | | | ^ | | ~~~~~~~~~~~ | | | ^
skipping to change at page 60, line 5 skipping to change at page 62, line 5
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ v |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ v
|set & send local_Bitmap(FCN) +=+==========+ |set & send local_Bitmap(FCN) +=+==========+
+---------------------------->+ END | +---------------------------->+ END |
+============+ +============+
--->* ABORT --->* ABORT
Only Uplink Only Uplink
Inactivity_Timer = expires Inactivity_Timer = expires
~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~
Send Abort Send Abort
Figure 40: Receiver State Machine for the ACK-on-Error Mode Figure 43: Receiver State Machine for the ACK-on-Error Mode
Appendix D. Note Appendix D. SCHC Parameters - Ticket #15
This gives the list of parameters that need to be defined in the
technology-specific documents, technology developper must evaluate
that L2 has strong enough integrity checking to match SCHC's
assumption:
o LPWAN Architecture. Explain the SCHC entities (Compression and
Fragmentation), how/where are they be represented in the
corresponding technology architecture.
o L2 fragmentation decision
o Rule ID number of rules
o Size of the Rule ID
o The way the Rule ID is sent (L2 or L3) and how (describe)
o Fragmentation delivery reliability mode used in which cases
o Define the number of bits FCN (N) and DTag (T)
o The MIC algorithm to be used and the size if different from the
default CRC32
o Retransmission Timer duration
o Inactivity Timer duration
o Define the MAX_ACK_REQUEST (number of attemps)
o Use of padding or not and how and when to use it
o Take into account that the length of rule-id + N + T + W when
possible is good to have a multiple of 8 bits to complete a byte
and avoid padding
o In the ACK format to have a length for Rule-ID + T + W bit into a
complete number of byte to do optimization more easily
And the following parameters need to be addressed in another document
but not forcely in the technology-specific one:
o The way the contexts are provisioning
o The way the Rules as generated
Appendix E. Note
Carles Gomez has been funded in part by the Spanish Government Carles Gomez has been funded in part by the Spanish Government
(Ministerio de Educacion, Cultura y Deporte) through the Jose (Ministerio de Educacion, Cultura y Deporte) through the Jose
Castillejo grant CAS15/00336, and by the ERDF and the Spanish Castillejo grant CAS15/00336, and by the ERDF and the Spanish
Government through project TEC2016-79988-P. Part of his contribution Government through project TEC2016-79988-P. Part of his contribution
to this work has been carried out during his stay as a visiting to this work has been carried out during his stay as a visiting
scholar at the Computer Laboratory of the University of Cambridge. scholar at the Computer Laboratory of the University of Cambridge.
Authors' Addresses Authors' Addresses
 End of changes. 257 change blocks. 
658 lines changed or deleted 769 lines changed or added

This html diff was produced by rfcdiff 1.48. The latest version is available from http://tools.ietf.org/tools/rfcdiff/