< draft-ietf-lpwan-ipv6-static-context-hc-09.txt   draft-ietf-lpwan-ipv6-static-context-hc-10.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: June 25, 2018 IMT-Atlantique Expires: September 1, 2018 IMT-Atlantique
C. Gomez C. Gomez
Universitat Politecnica de Catalunya Universitat Politecnica de Catalunya
December 22, 2017 February 28, 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-09 draft-ietf-lpwan-ipv6-static-context-hc-10
Abstract Abstract
This document describes a header compression scheme and fragmentation This document defines the Static Context Header Compression (SCHC)
functionality for very low bandwidth networks. These techniques are framework, which provides header compression and fragmentation
specially tailored for Low Power Wide Area Network (LPWAN). functionality. SCHC has been tailored for Low Power Wide Area
Networks (LPWAN).
The Static Context Header Compression (SCHC) offers a great level of
flexibility when processing the header fields. SCHC compression is
based on a common static context stored in a LPWAN device and in the
network. Static context means that the stored information does not
change during packet transmission. The context describes the field
values and keeps information that will not be transmitted through the
constrained network.
SCHC must be used for LPWAN networks because it avoids complex SCHC compression is based on a common static context stored in LPWAN
resynchronization mechanisms, which are incompatible with LPWAN devices and in the network. This document applies SCHC compression
characteristics. And also, because with SCHC, in most cases IPv6/UDP to IPv6/UDP headers. This document also specifies a fragmentation
headers can be reduced to a small identifier called Rule ID. Even and reassembly mechanism that is used to support the IPv6 MTU
though, sometimes, a SCHC compressed packet will not fit in one L2 requirement over LPWAN technologies. Fragmentation is mandatory for
PDU, and the SCHC fragmentation protocol defined in this document may IPv6 datagrams that, after SCHC compression or when it has not been
be used. possible to apply such compression, still exceed the layer two
maximum payload size.
This document describes the SCHC compression/decompression framework The SCHC header compression mechanism is independent of the specific
and applies it to IPv6/UDP headers. This document also specifies a LPWAN technology over which it will be used. Note that this document
fragmentation and reassembly mechanism that is used to support the defines generic functionality. This document purposefully offers
IPv6 MTU requirement over LPWAN technologies. Fragmentation is flexibility with regard to parameter settings and mechanism choices,
mandatory for IPv6 datagrams that, after SCHC compression or when it that are expected to be made in other, technology-specific,
has not been possible to apply such compression, still exceed the L2 documents.
maximum payload size. Similar solutions for other protocols such as
CoAP will be described in separate 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 June 25, 2018. This Internet-Draft will expire on September 1, 2018.
Copyright Notice Copyright Notice
Copyright (c) 2017 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
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
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 . . . . . . . . . . . . . . . . . . . . . . . . 4 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3
2. LPWAN Architecture . . . . . . . . . . . . . . . . . . . . . 4 2. LPWAN Architecture . . . . . . . . . . . . . . . . . . . . . 4
3. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 5 3. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 5
4. Static Context Header Compression . . . . . . . . . . . . . . 7 4. SCHC overview . . . . . . . . . . . . . . . . . . . . . . . . 8
4.1. SCHC Rules . . . . . . . . . . . . . . . . . . . . . . . 8 5. Rule ID . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
4.2. Rule ID . . . . . . . . . . . . . . . . . . . . . . . . . 10 6. Static Context Header Compression . . . . . . . . . . . . . . 10
4.3. Packet processing . . . . . . . . . . . . . . . . . . . . 10 6.1. SCHC C/D Rules . . . . . . . . . . . . . . . . . . . . . 11
4.4. Matching operators . . . . . . . . . . . . . . . . . . . 12 6.2. Rule ID for SCHC C/D . . . . . . . . . . . . . . . . . . 13
4.5. Compression Decompression Actions (CDA) . . . . . . . . . 12 6.3. Packet processing . . . . . . . . . . . . . . . . . . . . 13
4.5.1. not-sent CDA . . . . . . . . . . . . . . . . . . . . 13 6.4. Matching operators . . . . . . . . . . . . . . . . . . . 15
4.5.2. value-sent CDA . . . . . . . . . . . . . . . . . . . 13 6.5. Compression Decompression Actions (CDA) . . . . . . . . . 16
4.5.3. mapping-sent . . . . . . . . . . . . . . . . . . . . 14 6.5.1. not-sent CDA . . . . . . . . . . . . . . . . . . . . 17
4.5.4. LSB CDA . . . . . . . . . . . . . . . . . . . . . . . 14 6.5.2. value-sent CDA . . . . . . . . . . . . . . . . . . . 17
4.5.5. DEViid, APPiid CDA . . . . . . . . . . . . . . . . . 14 6.5.3. mapping-sent CDA . . . . . . . . . . . . . . . . . . 17
4.5.6. Compute-* . . . . . . . . . . . . . . . . . . . . . . 14 6.5.4. LSB(y) CDA . . . . . . . . . . . . . . . . . . . . . 18
5. Fragmentation . . . . . . . . . . . . . . . . . . . . . . . . 15 6.5.5. DEViid, APPiid CDA . . . . . . . . . . . . . . . . . 18
5.1. Overview . . . . . . . . . . . . . . . . . . . . . . . . 15 6.5.6. Compute-* . . . . . . . . . . . . . . . . . . . . . . 18
5.2. Functionalities . . . . . . . . . . . . . . . . . . . . . 15 7. Fragmentation . . . . . . . . . . . . . . . . . . . . . . . . 19
5.3. Delivery Reliability options . . . . . . . . . . . . . . 18 7.1. Overview . . . . . . . . . . . . . . . . . . . . . . . . 19
5.4. Fragmentation Frame Formats . . . . . . . . . . . . . . . 20 7.2. Fragmentation Tools . . . . . . . . . . . . . . . . . . . 19
5.4.1. Fragment format . . . . . . . . . . . . . . . . . . . 20 7.3. Reliability modes . . . . . . . . . . . . . . . . . . . . 22
5.4.2. ACK format . . . . . . . . . . . . . . . . . . . . . 21 7.4. Fragmentation Formats . . . . . . . . . . . . . . . . . . 24
5.4.3. All-1 and All-0 formats . . . . . . . . . . . . . . . 21 7.4.1. Fragment format . . . . . . . . . . . . . . . . . . . 24
5.4.4. Abort formats . . . . . . . . . . . . . . . . . . . . 23 7.4.2. All-1 and All-0 formats . . . . . . . . . . . . . . . 25
5.5. Baseline mechanism . . . . . . . . . . . . . . . . . . . 23 7.4.3. ACK format . . . . . . . . . . . . . . . . . . . . . 26
5.5.1. No ACK . . . . . . . . . . . . . . . . . . . . . . . 24 7.4.4. Abort formats . . . . . . . . . . . . . . . . . . . . 29
5.5.2. The Window modes . . . . . . . . . . . . . . . . . . 25
5.5.3. Bitmap Optimization . . . . . . . . . . . . . . . . . 29 7.5. Baseline mechanism . . . . . . . . . . . . . . . . . . . 30
5.6. Supporting multiple window sizes . . . . . . . . . . . . 31 7.5.1. No-ACK . . . . . . . . . . . . . . . . . . . . . . . 31
5.7. Downlink fragment transmission . . . . . . . . . . . . . 31 7.5.2. ACK-Always . . . . . . . . . . . . . . . . . . . . . 32
6. Padding management . . . . . . . . . . . . . . . . . . . . . 32 7.5.3. ACK-on-Error . . . . . . . . . . . . . . . . . . . . 34
7. SCHC Compression for IPv6 and UDP headers . . . . . . . . . . 33 7.6. Supporting multiple window sizes . . . . . . . . . . . . 36
7.1. IPv6 version field . . . . . . . . . . . . . . . . . . . 33 7.7. Downlink SCHC fragment transmission . . . . . . . . . . . 36
7.2. IPv6 Traffic class field . . . . . . . . . . . . . . . . 33 8. Padding management . . . . . . . . . . . . . . . . . . . . . 37
7.3. Flow label field . . . . . . . . . . . . . . . . . . . . 33 9. SCHC Compression for IPv6 and UDP headers . . . . . . . . . . 38
7.4. Payload Length field . . . . . . . . . . . . . . . . . . 34 9.1. IPv6 version field . . . . . . . . . . . . . . . . . . . 38
7.5. Next Header field . . . . . . . . . . . . . . . . . . . . 34 9.2. IPv6 Traffic class field . . . . . . . . . . . . . . . . 38
7.6. Hop Limit field . . . . . . . . . . . . . . . . . . . . . 34 9.3. Flow label field . . . . . . . . . . . . . . . . . . . . 38
7.7. IPv6 addresses fields . . . . . . . . . . . . . . . . . . 35 9.4. Payload Length field . . . . . . . . . . . . . . . . . . 39
7.7.1. IPv6 source and destination prefixes . . . . . . . . 35 9.5. Next Header field . . . . . . . . . . . . . . . . . . . . 39
7.7.2. IPv6 source and destination IID . . . . . . . . . . . 35 9.6. Hop Limit field . . . . . . . . . . . . . . . . . . . . . 39
7.8. IPv6 extensions . . . . . . . . . . . . . . . . . . . . . 36 9.7. IPv6 addresses fields . . . . . . . . . . . . . . . . . . 39
7.9. UDP source and destination port . . . . . . . . . . . . . 36 9.7.1. IPv6 source and destination prefixes . . . . . . . . 40
7.10. UDP length field . . . . . . . . . . . . . . . . . . . . 36 9.7.2. IPv6 source and destination IID . . . . . . . . . . . 40
7.11. UDP Checksum field . . . . . . . . . . . . . . . . . . . 37 9.8. IPv6 extensions . . . . . . . . . . . . . . . . . . . . . 41
8. Security considerations . . . . . . . . . . . . . . . . . . . 37 9.9. UDP source and destination port . . . . . . . . . . . . . 41
8.1. Security considerations for header compression . . . . . 37 9.10. UDP length field . . . . . . . . . . . . . . . . . . . . 41
8.2. Security considerations for fragmentation . . . . . . . . 37 9.11. UDP Checksum field . . . . . . . . . . . . . . . . . . . 41
9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 38 10. Security considerations . . . . . . . . . . . . . . . . . . . 42
10. References . . . . . . . . . . . . . . . . . . . . . . . . . 38 10.1. Security considerations for header compression . . . . . 42
10.1. Normative References . . . . . . . . . . . . . . . . . . 38 10.2. Security considerations for SCHC fragmentation . . . . . 42
10.2. Informative References . . . . . . . . . . . . . . . . . 39 11. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 43
Appendix A. SCHC Compression Examples . . . . . . . . . . . . . 39 12. References . . . . . . . . . . . . . . . . . . . . . . . . . 43
Appendix B. Fragmentation Examples . . . . . . . . . . . . . . . 42 12.1. Normative References . . . . . . . . . . . . . . . . . . 43
Appendix C. Fragmentation State Machines . . . . . . . . . . . . 48 12.2. Informative References . . . . . . . . . . . . . . . . . 44
Appendix D. Allocation of Rule IDs for fragmentation . . . . . . 55 Appendix A. SCHC Compression Examples . . . . . . . . . . . . . 44
Appendix E. Note . . . . . . . . . . . . . . . . . . . . . . . . 55 Appendix B. Fragmentation Examples . . . . . . . . . . . . . . . 47
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 55 Appendix C. Fragmentation State Machines . . . . . . . . . . . . 53
Appendix D. Note . . . . . . . . . . . . . . . . . . . . . . . . 60
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 60
1. Introduction 1. Introduction
Header compression is mandatory to efficiently bring Internet This document defines a header compression scheme and fragmentation
connectivity to the node within a LPWAN network. Some LPWAN networks functionality, both specially tailored for Low Power Wide Area
properties can be exploited to get an efficient header compression: Networks (LPWAN).
o Topology is star-oriented; therefore, all the packets follow the Header compression is needed to efficiently bring Internet
same path. For the needs of this draft, the architecture can be connectivity to the node within an LPWAN network. Some LPWAN
summarized to Devices (Dev) exchanging information with LPWAN networks properties can be exploited to get an efficient header
Application Server (App) through a Network Gateway (NGW). compression:
o Traffic flows are mostly known in advance since devices embed o The topology is star-oriented which means that all packets follow
built-in applications. Contrary to computers or smartphones, new the same path. For the necessity of this draft, the architecture
applications cannot be easily installed. is simple and is described as Devices (Dev) exchanging information
with LPWAN Application Servers (App) through Network Gateways
(NGW).
The Static Context Header Compression (SCHC) is defined for this o The traffic flows can be known in advance since devices embed
environment. SCHC uses a context where header information is kept in built-in applications. New applications cannot be easily
the header format order. This context is static (the values of the installed in LPWAN devices, as they would in computers or
header fields do not change over time) avoiding complex smartphones.
resynchronization mechanisms, incompatible with LPWAN
characteristics. In most of the cases, IPv6/UDP headers are reduced
to a small context identifier.
The SCHC header compression mechanism is independent of the specific The Static Context Header Compression (SCHC) is defined for this
LPWAN technology over which it will be used. environment. SCHC uses a context, where header information is kept
in the header format order. This context is static: the values of
the header fields do not change over time. This avoids complex
resynchronization mechanisms, that would be incompatible with LPWAN
characteristics. In most cases, a small context identifier is enough
to represent the full IPv6/UDP headers. The SCHC header compression
mechanism is independent of the specific LPWAN technology over which
it is used.
LPWAN technologies impose some strict limitations on traffic. For
instance, devices are sleeping most of the time and MAY receive data
during short periods of time after transmission to preserve battery.
LPWAN technologies are also characterized, among others, by a very LPWAN technologies are also characterized, among others, by a very
reduced data unit and/or payload size [I-D.ietf-lpwan-overview]. reduced data unit and/or payload size [I-D.ietf-lpwan-overview].
However, some of these technologies do not support layer two However, some of these technologies do not provide fragmentation
fragmentation, therefore the only option for them to support the IPv6 functionality, therefore the only option for them to support the IPv6
MTU requirement of 1280 bytes [RFC2460] is the use of a fragmentation MTU requirement of 1280 bytes [RFC2460] is to use a fragmentation
protocol at the adaptation layer below IPv6. This draft defines also protocol at the adaptation layer, below IPv6. In response to this
a fragmentation functionality to support the IPv6 MTU requirement need, this document also defines a fragmentation/reassembly
over LPWAN technologies. Such functionality has been designed under mechanism, which supports the IPv6 MTU requirement over LPWAN
the assumption that data unit reordering will not happen between the technologies. Such functionality has been designed under the
entity performing fragmentation and the entity performing reassembly. assumption that data unit out-of-sequence delivery will not happen
between the entity performing fragmentation and the entity performing
reassembly.
Note that this document defines generic functionality and
purposefully offers flexibility with regard to parameter settings and
mechanism choices, that are expected to be made in other, technology-
specific documents.
2. LPWAN Architecture 2. LPWAN Architecture
LPWAN technologies have similar architectures but different LPWAN technologies have similar network architectures but different
terminology. We can identify different types of entities in a terminology. We can identify different types of entities in a
typical LPWAN network, see Figure 1: typical LPWAN network, see Figure 1:
o Devices (Dev) are the end-devices or hosts (e.g. sensors, o Devices (Dev) are the end-devices or hosts (e.g. sensors,
actuators, etc.). There can be a high density of devices per radio actuators, etc.). There can be a very high density of devices per
gateway. radio gateway.
o The Radio Gateway (RGW), which is the end point of the constrained o The Radio Gateway (RGW), which is the end point of the constrained
link. link.
o The Network Gateway (NGW) is the interconnection node between the o The Network Gateway (NGW) is the interconnection node between the
Radio Gateway and the Internet. Radio Gateway and the Internet.
o LPWAN-AAA Server, which controls the user authentication and the o LPWAN-AAA Server, which controls the user authentication and the
applications. applications.
o Application Server (App) o Application Server (App)
+------+ +------+
() () () | |LPWAN-| () () () | |LPWAN-|
() () () () / \ +---------+ | AAA | () () () () / \ +---------+ | AAA |
() () () () () () / \=====| ^ |===|Server| +-----------+ () () () () () () / \======| ^ |===|Server| +-----------+
() () () | | <--|--> | +------+ |APPLICATION| () () () | | <--|--> | +------+ |APPLICATION|
() () () () / \==========| v |=============| (App) | () () () () / \==========| v |=============| (App) |
() () () / \ +---------+ +-----------+ () () () / \ +---------+ +-----------+
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 All-0. Fragment format for the last frame of a window. o Abort. A SCHC fragment format to signal the other end-point that
the on-going fragment transmission is stopped and finished.
o All-1. Fragment format for the last frame of a packet. o ACK (Acknowledgment). A SCHC fragment format used to report the
success or unsuccess reception of a set of SCHC fragments.
o All-0 empty. Fragment format without payload for requesting the o All-0. The SCHC fragment format for the last frame of a window
Bitmap when the Retransmission Timer expires in a window that is that is not the last one of a packet (see Window in this
not the last one for a fragmented packet transmission. glossary).
o All-1 empty. Fragment format without payload for requesting the o All-1. The SCHC fragment format for the last frame of the packet.
Bitmap when the Retransmission Timer expires in the last window.
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
Retransmission Timer expires, in a window that is not the last one
of a packet.
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
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 to identify the application interface IPv6 address that identifies the application server interface.
o Bi: Bidirectional, a rule entry that applies in both directions. o Bi: Bidirectional, a rule entry that applies to headers of packets
travelling in both directions (Up and Dw).
o Bitmap: a field of bits in an acknowledgment message that tells
the sender which SCHC fragments of a window were correctly
received.
o C: Checked bit. Used in an acknowledgment (ACK) header to o C: Checked bit. Used in an acknowledgment (ACK) header to
determine when the MIC is correct (1) or not (0). determine if the MIC locally computed by the receiver matches (1)
the received MIC or not (0).
o CDA: Compression/Decompression Action. An action that is o CDA: Compression/Decompression Action. Describes the reciprocal
performed for both functionalities to compress a header field or pair of actions that are performed at the compressor to compress a
to recover its original value in the decompression phase. header field and at the decompressor to recover the original
header field value.
o Context: A set of rules used to compress/decompress headers o Compress Residue. The bytes that need to be sent after applying
the SCHC compression over each header field
o Dev: Device. A Node connected to the LPWAN. A Dev may implement o Context: A set of rules used to compress/decompress headers.
SCHC.
o Dev: Device. A node connected to the LPWAN. A Dev SHOULD
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 to identify the device interface address that identifies the device interface.
o DI: Direction Indicator is a differentiator for matching in order o DI: Direction Indicator. This field tells which direction of
to be able to have different values for both sides. packet travel (Up, Dw or Bi) a rule applies to. This allows for
assymmetric processing.
o DTag: Datagram Tag is a fragmentation header field that is set to o DTag: Datagram Tag. This SCHC fragmentation header field is set to
the same value for all fragments carrying the same IPv6 datagram. the same value for all SCHC fragments carrying the same IPv6
datagram.
o Dw: Down Link direction for compression, from SCHC C/D to Dev 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.
o FCN: Fragment Compressed Number is a fragmentation header field o FCN: Fragment Compressed Number. This SCHC fragmentation header
that carries an efficient representation of a larger-sized field carries an efficient representation of a larger-sized
fragment number. fragment number.
o FID: Field Identifier is an index to describe the header fields in o Field Description. A line in the Rule Table.
the Rule
o FL: Field Length is a value to identify if the field is fixed or o FID: Field Identifier. This is an index to describe the header
variable length. fields in a Rule.
o FP: Field Position is a value that is used to identify each o FL: Field Length is the length of the field in bits for fixed
instance a field appears in the header. values or a type (variable, token length, ...) for length unknown
at the rule creation. The length of a header field is defined in
the specific protocol standard.
o FP: Field Position is a value that is used to identify the
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 to end the fragmentation state machine o Inactivity Timer. A timer used after receiving a SCHC fragment to
when there is an error and there is no possibility to continue an detect when there is an error and there is no possibility to
on-going fragmented packet transmission. continue an on-going SCHC fragmented packet transmission.
o MIC: Message Integrity Check. A fragmentation header field o L2: Layer two. The immediate lower layer SCHC interfaces with.
It is provided by an underlying LPWAN technology.
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 fragment sender during o Retransmission Timer. A timer used by the SCHC fragment sender
an on-going fragmented packet transmission to detect possible link during an on-going SCHC fragmented packet transmission to detect
errors when waiting for a possible incoming ACK. possible link errors when waiting for a possible incoming 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 row in the rule that describes a header field.
o Rule ID: An identifier for a rule, SCHC C/D, and Dev share the o Rule ID: An identifier for a rule, SCHC C/D in both sides share
same Rule ID for a specific flow. A set of Rule IDs are used to the same Rule ID for a specific packet. A set of Rule IDs are
support fragmentation functionality. used to support SCHC fragmentation functionality.
o SCHC C/D: Static Context Header Compression Compressor/ o SCHC C/D: Static Context Header Compression Compressor/
Decompressor. A process in the network to achieve compression/ Decompressor. A mechanism used in both sides, at the Dev and at
decompressing headers. SCHC C/D uses SCHC rules to perform the network to achieve Compression/Decompression of headers. SCHC
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
compressed as per the header compression mechanism defined in this
document. If the header compression process is unable to actually
compress the packet header, the packet with the uncompressed
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).
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: Up Link direction for compression, from Dev to SCHC C/D. o Up: Uplink direction for compression/decompression in both sides,
from the Dev SCHC C/D to the network SCHC C/D.
o W: Window bit. A fragment header field used in Window mode (see o W: Window bit. A SCHC fragment header field used in Window mode
section 5), which carries the same value for all fragments of a ({Frag}), which carries the same value for all SCHC fragments of a
window. window.
o Window: A subset of the fragments needed to carry a packet (see o Window: A subset of the SCHC fragments needed to carry a packet
section 5) ({Frag}).
4. Static Context Header Compression 4. SCHC overview
Static Context Header Compression (SCHC) avoids context SCHC can be abstracted as an adaptation layer below IPv6 and the
synchronization, which is the most bandwidth-consuming operation in underlying LPWAN technology. SCHC that comprises two sublayers (i.e.
other header compression mechanisms such as RoHC [RFC5795]. Based on the Compression sublayer and the Fragmentation sublayer), as shown in
the fact that the nature of data flows is highly predictable in LPWAN Figure 2.
networks, some static contexts may be stored on the Device (Dev).
The contexts must be stored in both ends, and it can either be +----------------+
learned by a provisioning protocol or by out of band means or it can | IPv6 |
be pre-provisioned, etc. The way the context is learned on both +- +----------------+
sides are out of the scope of this document. | | Compression |
SCHC < +----------------+
| | Fragmentation |
+- +----------------+
|LPWAN technology|
+----------------+
Figure 2: Protocol stack comprising IPv6, SCHC and an LPWAN
technology
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
resulting packet after header compression (whose header MAY actually
be smaller than that of the original packet or not) is called a SCHC
packet. Subsequently, and if the SCHC packet size exceeds the layer
2 (L2) MTU, fragmentation is then applied to the SCHC packet. This
process is illustrated by Figure 3
A packet (e.g. an IPv6 packet)
|
V
+------------------------------+
|SCHC Compression/Decompression|
+------------------------------+
|
SCHC packet
|
V
+------------------+
|SCHC Fragmentation| (if needed)
+------------------+
|
V
SCHC Fragment(s) (if needed)
Figure 3: SCHC operations from a sender point of view: header
compression and fragmentation
5. Rule ID
Rule ID are identifiers used to select either the correct context to
be used for Compression/Decompression functionalities or for SCHC
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
in this document, as it is implementation-specific and can vary
according to the LPWAN technology and the number of Rules, among
others.
The Rule IDs identifiers are: * In the SCHC C/D context the Rule used
to keep the Field Description of the header packet.
o In SCHC Fragmentation to identify the specific modes and settings.
In bidirectional SCHC fragmentation at least two Rules
ID are needed.
o And at least one Rule ID MAY be reserved to the case where no SCHC
C/D nor SCHC fragmentation were possible.
6. Static Context Header Compression
In order to perform header compression, this document defines a
mechanism called Static Context Header Compression (SCHC), which is
based on using context, i.e. a set of rules to compress or decompress
headers. SCHC avoids context synchronization, which is the most
bandwidth-consuming operation in other header compression mechanisms
such as RoHC [RFC5795]. Since the nature of packets are highly
predictable in LPWAN networks, static contexts MAY be stored
beforehand to omit transmitting some information over the air. The
contexts MUST be stored at both ends, and they can either be learned
by a provisioning protocol, by out of band means, or they can be pre-
provisioned. The way the contexts are provisioned on both ends is
out of the scope of this document.
Dev App Dev App
+--------------+ +--------------+ +----------------+ +--------------+
|APP1 APP2 APP3| |APP1 APP2 APP3| | APP1 APP2 APP3 | |APP1 APP2 APP3|
| | | | | | | |
| UDP | | UDP | | UDP | | UDP |
| IPv6 | | IPv6 | | IPv6 | | IPv6 |
| | | | | | | |
| SCHC C/D | | | |SCHC Comp / Frag| | |
| (context) | | | +--------+-------+ +-------+------+
+-------+------+ +-------+------+ | +--+ +----+ +-----------+ .
| +--+ +----+ +---------+ . +~~ |RG| === |NGW | === | SCHC |... Internet ..
+~~ |RG| === |NGW | === |SCHC C/D |... Internet .. +--+ +----+ |Comp / Frag|
+--+ +----+ |(context)| +-----------+
+---------+
Figure 2: Architecture Figure 4: Architecture
Figure 2 represents the architecture for compression/decompression, Figure 4 The figure represents the architecture for SCHC (Static
it is based on [I-D.ietf-lpwan-overview] terminology. The Device is Context Header Compression) Compression / Fragmentation where SCHC C/
sending applications flows using IPv6 or IPv6/UDP protocols. These D (Compressor/Decompressor) and SCHC Fragmentation are performed. It
flows are compressed by a Static Context Header Compression is based on [I-D.ietf-lpwan-overview] terminology. SCHC Compression
Compressor/Decompressor (SCHC C/D) to reduce headers size. The / Fragmentation is located on both sides of the transmission in the
resulting information is sent to a layer two (L2) frame to a LPWAN Dev and in the Network side. In the Uplink direction, the Device
Radio Network (RG) which forwards the frame to a Network Gateway application packets use IPv6 or IPv6/UDP protocols. Before sending
(NGW). The NGW sends the data to an SCHC C/D for decompression which these packets, the Dev compresses their headers using SCHC C/D and if
shares the same rules with the Dev. The SCHC C/D can be located on the SCHC packet resulting from the compression exceeds the maximum
the Network Gateway (NGW) or in another place as long as a tunnel is payload size of the underlying LPWAN technology, SCHC fragmentation
established between the NGW and the SCHC C/D. The SCHC C/D in both is performed, see Section 7. The resulting SCHC fragments are sent
sides must share the same set of Rules. After decompression, the as one or more L2 frames to an LPWAN Radio Gateway (RG) which
packet can be sent on the Internet to one or several LPWAN forwards the frame(s) to a Network Gateway (NGW).
Application Servers (App).
The SCHC C/D process is bidirectional, so the same principles can be The NGW sends the data to an SCHC Fragmentation and then to the SCHC
applied in the other direction. 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
tunnel is established between the NGW and the SCHC Compression /
Fragmentation. Note that, for some LPWAN technologies, it MAY be
suitable to locate SCHC fragmentation and reassembly functionality
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
Rules. After decompression, the packet can be sent over the Internet
to one or several LPWAN Application Servers (App).
4.1. SCHC Rules The SCHC Compression / Fragmentation process is symmetrical,
therefore the same description applies to the reverse direction.
The main idea of the SCHC compression scheme is to send the Rule id 6.1. SCHC C/D Rules
to the other end instead of sending known field values. This Rule id
identifies a rule that matches as much as possible the original
packet values. When a value is known by both ends, it is not
necessary to send it through the LPWAN network.
The context contains a list of rules (cf. Figure 3). Each Rule The main idea of the SCHC compression scheme is to transmit the Rule
contains itself a list of fields descriptions composed of a field 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
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.
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.
The context contains a list of rules (cf. Figure 5). Each Rule
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 ||
/-----------------------------------------------------------------\|| /-----------------------------------------------------------------\||
| (FID) Rule 1 ||| | (FID) Rule 1 |||
skipping to change at page 9, line 23 skipping to change at page 12, line 23
|+-------+--+--+--+------------+-----------------+---------------+||| |+-------+--+--+--+------------+-----------------+---------------+|||
||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 3: Compression/Decompression Context Figure 5: Compression/Decompression Context
The Rule does not describe the original packet format which must be The Rule does not describe how to delineate each field in the
known from the compressor/decompressor. The rule just describes the original packet header. This MUST be known from the compressor/
compression/decompression behavior for the header fields. In the decompressor. The rule only describes the compression/decompression
rule, the description of the header field should be performed in the behavior for each header field. In the rule, the Fields Descriptions
format packet order. are listed in the order in which the fields appear in the packet
header.
The Rule also describes the compressed header fields which are The Rule also describes the Compression Residue sent regarding the
transmitted regarding their position in the rule which is used for order of the Fields Descriptions in the Rule.
data serialization on the compressor side and data deserialization on
the decompressor side.
The Context describes the header fields and its values with the The Context describes the header fields and its values with the
following entries: following entries:
o A Field ID (FID) is a unique value to define the header field. o Field ID (FID) is a unique value to define the header field.
o A Field Length (FL) is the length of the field that can be of o Field Length (FL) represents the length of the field in bits for
fixed length as in IPv6 or UDP headers or variable length as in fixed values or a type (variable, token length, ...) for Field
CoAP options. Fixed length fields shall be represented by its Description length unknown at the rule creation. The length of a
actual value in bits. Variable length fields shall be represented header field is defined in the specific protocol standard.
by a function or a variable.
o A Field Position (FP) indicating if several instances of the 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. Three o A direction indicator (DI) indicating the packet direction(s) this
values are possible: Field Description applies to. Three values are possible:
* UPLINK (Up) when the field or the value is only present in * 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) when the field or the value is only present in * DOWNLINK (Dw): this Field Description is only applicable to
packet sent from the App to the Dev and packets sent from the App to the Dev,
* BIDIRECTIONAL (Bi) when the field or the value is present * BIDIRECTIONAL (Bi): this Field Description is applicable to
either upstream or downstream. packets travelling both Up and Dw.
o A Target Value (TV) is the value used to make the comparison with o Target Value (TV) is the value used to make the match with the
the packet header field. The Target Value can be of any type packet header field. The Target Value can be of any type
(integer, strings, etc.). For instance, it can be a single value (integer, strings, etc.). For instance, it can be a single value
or a more complex structure (array, list, etc.), such as a JSON or or a more complex structure (array, list, etc.), such as a JSON or
a CBOR structure. a CBOR structure.
o A Matching Operator (MO) is the operator used to make the o Matching Operator (MO) is the operator used to match the Field
comparison between the Field Value and the Target Value. The Value and the Target Value. The Matching Operator may require
Matching Operator may require some parameters. MO is only used some parameters. MO is only used during the compression phase.
during the compression phase. The set of MOs defined in this document can be found in
Section 6.4.
o A Compression Decompression Action (CDA) is used to describe the o Compression Decompression Action (CDA) describes the compression
compression and the decompression process. The CDA may require and decompression processes to be performed after the MO
some parameters, CDA are used in both compression and is applied. The CDA MAY require some parameters to be processed.
decompression phases. CDAs are used in both the compression and the decompression
functions. The set of CDAs defined in this document can be found
in Section 6.5.
4.2. Rule ID 6.2. Rule ID for SCHC C/D
Rule IDs are sent between both compression/decompression elements. Rule IDs are sent by the compression function in one side and are
The size of the Rule ID is not specified in this document, it is received for the decompression function in the other side. In SCHC
implementation-specific and can vary regarding the LPWAN technology, C/D, the Rule IDs are specific to a Dev. Hence, multiple Dev
the number of flows, among others. instances MAY use the same Rule ID to define different header
compression contexts. To identify the correct Rule ID, the SCHC C/D
needs to correlate the Rule ID with the Dev identifier to find the
appropriate Rule to be applied.
Some values in the Rule ID space are reserved for other 6.3. Packet processing
functionalities than header compression as fragmentation. (See
Section 5).
Rule IDs are specific to a Dev. Two Devs may use the same Rule ID for The compression/decompression process follows several steps:
different header compression. To identify the correct Rule ID, the
SCHC C/D needs to combine the Rule ID with the Dev L2 identifier to
find the appropriate Rule.
4.3. Packet processing o Compression Rule selection: The goal is to identify which Rule(s)
will be used to compress the packet's headers. When
doing decompression, in the network side the 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 Dev side, only the
Rule ID is needed to identify the correct Rule since the Dev only
holds Rules that apply to itself. The Rule will be selected by
matching the Fields Descriptions to the packet header as described
below. When the selection of a Rule is done, this Rule is used to
compress the header. The detailed steps for compression Rule
selection are the following:
The compression/decompression process follows several steps: * The first step is to choose the Fields Descriptions by their
direction, using the direction indicator (DI). A Field
Description that does not correspond to the appropriate DI will
be ignored, if all the fields of the packet do not have a Field
Description with the correct DI the Rule is discarded and SCHC
C/D proceeds to explore the next Rule.
o compression Rule selection: The goal is to identify which Rule(s) * When the DI has matched, then the next step is to identify the
will be used to compress the packet's headers. When doing fields according to Field Position (FP). If the Field Position
compression in the NGW side the SCHC C/D needs to find the correct does not correspond, the Rule is not used and the SCHC C/D
Rule to be used by identifying its Dev-ID and the Rule-ID. In the proceeds to consider the next Rule.
Dev, only the Rule-ID may be used. The next step is to choose the
fields by their direction, using the direction indicator (DI), so
the fields that do not correspond to the appropriated DI will be
excluded. Next, then the fields are identified according to their
field identifier (FID) and field position (FP). If the field
position does not correspond, then the Rule is not used and the
SCHC take next Rule. Once the DI and the FP correspond to the
header information, each field's value is then compared to the
corresponding target value (TV) stored in the Rule for that
specific field using the matching operator (MO). If all the
fields in the packet's header satisfy all the matching operators
(MOs) of a Rule (i.e. all results are True), the fields of the
header are then processed according to the Compression/
Decompression Actions (CDAs) and a compressed header is obtained.
Otherwise, the next rule is tested. If no eligible rule is found,
then the header must be sent without compression, in which case
the fragmentation process must be required.
o sending: The Rule ID is sent to the other end followed by the * Once the DI and the FP correspond to the header information,
information resulting from the compression of header fields, each field's value of the packet is then compared to the
directly followed by the payload. The product of field corresponding Target Value (TV) stored in the Rule for that
compression is sent in the order expressed in the Rule for the specific field using the matching operator (MO).
matching fields. The way the Rule ID is sent depends on the
specific LPWAN layer two technology and will be specified in a
specific document and is out of the scope of this document. For
example, it can be either included in a Layer 2 header or sent in
the first byte of the L2 payload. (Cf. Figure 4).
o decompression: In both directions, the receiver identifies the * If all the fields in the packet's header satisfy all the
sender through its device-id (e.g. MAC address) and selects the matching operators (MO) of a Rule (i.e. all MO results are
appropriate Rule through the Rule ID. This Rule gives the True), the fields of the header are then compressed according
compressed header format and associates these values to the header to the Compression/Decompression Actions (CDAs) and a
fields. It applies the CDA action to reconstruct the original compressed header (with possibly a Compressed Residue) SHOULD
header fields. The CDA application order can be different from be obtained. Otherwise, the next Rule is tested.
the order given by the Rule. For instance, Compute-* may be
applied at the end, after all the other CDAs.
If after using SCHC compression and adding the payload to the L2 * If no eligible Rule is found, then the header MUST be sent
frame the datagram is not multiple of 8 bits, padding may be used. without compression, depending on the L2 PDU size, this is one
of the case that MAY require the use of the SCHC fragmentation
process.
+--- ... --+-------------- ... --------------+-----------+--...--+ o Sending: If an eligible Rule is found, the Rule ID is sent to the
| Rule ID |Compressed Hdr Fields information| payload |padding| other end followed by the Compression Residue (which could be
+--- ... --+-------------- ... --------------+-----------+--...--+ empty) and directly followed by the payload. The product of the
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
specific LPWAN layer two technology. For example, it can be
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
in the LPWAN technology-specific document and is out of the scope
of the present document. On LPWAN technologies that are byte-
oriented, the compressed header concatenated with the original
packet payload is padded to a multiple of 8 bits, if needed. See
Section 8 for details.
Figure 4: LPWAN Compressed Format Packet o Decompression: When doing decompression, in the network side the
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
Dev side, only the Rule ID is needed to identify the correct Rule
since the Dev only holds Rules that apply to itself.
4.4. Matching operators The receiver identifies the sender through its device-id (e.g.
MAC address, if exists) and selects the appropriate Rule
from the Rule ID. If a source identifier is present in the L2
technology, it is used to select the Rule ID. This Rule describes
the compressed header format and associates the values to the
header fields. The receiver applies the CDA action to reconstruct
the original header fields. The CDA application order can be
different from the order given by the Rule. For instance,
Compute-* SHOULD be applied at the end, after all the other CDAs.
+--- ... --+------- ... -------+------------------+~~~~~~~
| Rule ID |Compression Residue| packet payload |padding
+--- ... --+------- ... -------+------------------+~~~~~~~
(optional)
<----- compressed header ------>
Figure 6: SCHC C/D Packet Format
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 applied indifferently 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: A field value in a packet matches with a TV in a Rule if o equal: The match result is True if a field value in a packet and
they are equal. the value in the TV are equal.
o ignore: No check is done between a field value in a packet and a o ignore: No check is done between a field value in a packet and a
TV in the Rule. The result of the matching is always true. TV in the Rule. The result of the matching is always true.
o MSB(length): A matching is obtained if the most significant bits o MSB(x): A match is obtained if the most significant x bits of the
of the length field value bits of the header are equal to the TV field value in the header packet are equal to the TV in the Rule.
in the rule. The MSB Matching Operator needs a parameter, The x parameter of the MSB Matching Operator indicates how many
indicating the number of bits, to proceed to the matching. bits are involved in the comparison.
o match-mapping: The goal of mapping-sent is to reduce the size of a o match-mapping: With match-mapping, the Target Value is a list of
field by allocating a shorter value. The Target Value contains a values. Each value of the list is identified by a short ID (or
list of values. Each value is identified by a short ID (or index). Compression is achieved by sending the index instead of
index). This operator matches if a field value is equal to one of the original header field value. This operator matches if the
those target values. header field value is equal to one of the values in the target
list.
4.5. Compression Decompression Actions (CDA) 6.5. Compression Decompression Actions (CDA)
The Compression Decompression Action (CDA) describes the actions The Compression Decompression Action (CDA) describes the actions
taken during the compression of headers fields, and inversely, the taken during the compression of headers fields, and inversely, the
action taken by the decompressor to restore the original value. action taken by the decompressor to restore the original value.
/--------------------+-------------+----------------------------\ /--------------------+-------------+----------------------------\
| Action | Compression | Decompression | | Action | Compression | Decompression |
| | | | | | | |
+--------------------+-------------+----------------------------+ +--------------------+-------------+----------------------------+
|not-sent |elided |use value stored in ctxt | |not-sent |elided |use value stored in ctxt |
|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(length) |send LSB |TV OR 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
Figure 5: Compression and Decompression Functions Figure 7: Compression and Decompression Functions
Figure 5 summarizes the basics functions defined to compress and Figure 7 summarizes the basic functions that can be used to compress
decompress a field. The first column gives the action's name. The and decompress a field. The first column lists the actions name.
second and third columns outline the compression/decompression The second and third columns outline the reciprocal compression/
behavior. decompression behavior for each action.
Compression is done in the rule order and compressed values are sent Compression is done in order that Fields Descriptions appear in the
in that order in the compressed message. The receiver must be able Rule. The result of each Compression/Decompression Action is
to find the size of each compressed field which can be given by the appended to the working Compression Residue in that same order. The
rule or may be sent with the compressed header. receiver knows the size of each compressed field which can be given
by the rule or MAY be sent with the compressed header.
If the field is identified as being variable, then its size must be If the field is identified as being variable in the Field
sent first using the following coding: Description, then the size of the Compression Residue value in bytes
MUST be sent first using the following coding:
o If the size is between 0 and 14 bytes it is sent using 4 bits. o If the size is between 0 and 14 bytes, it is sent as a 4-bits
integer.
o For values between 15 and 255, the first 4 bits sent are set to 1 o For values between 15 and 255, the first 4 bits sent are set to 1
and the size is sent using 8 bits. and the size is sent using 8 bits integer.
o For higher value, the first 12 bits are set to 1 and the size is o For higher values of size, the first 12 bits are set to 1 and the
sent on 2 bytes. next two bytes contain the size value as a 16 bits integer.
4.5.1. not-sent CDA 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.
6.5.1. not-sent CDA
The not-sent function is generally used when the field value is The not-sent function is generally used when the field value is
specified in the rule and therefore known by the both Compressor and specified in the Rule and therefore known by both the Compressor and
Decompressor. This action is generally used with the "equal" MO. If the Decompressor. This action is generally used with the "equal" MO.
MO is "ignore", there is a risk to have a decompressed field value If MO is "ignore", there is a risk to have a decompressed field value
different from the compressed field. different from the compressed field.
The compressor does not send any value in the compressed header for The compressor does not send any value in the Compressed Residue for
the field on which compression is applied. a field on which not-sent compression is applied.
The decompressor restores the field value with the target value The decompressor restores the field value with the Target Value
stored in the matched rule. stored in the matched Rule identified by the received Rule ID.
4.5.2. value-sent CDA 6.5.2. value-sent CDA
The value-sent action is generally used when the field value is not The value-sent action is generally used when the field value is not
known by both Compressor and Decompressor. The value is sent in the known by both Compressor and Decompressor. The value is sent in the
compressed message header. Both Compressor and Decompressor must compressed message header. Both Compressor and Decompressor MUST
know the size of the field, either implicitly (the size is known by know the size of the field, either implicitly (the size is known by
both sides) or explicitly in the compressed header field by both sides) or explicitly in the compression residue by indicating
indicating the length. This function is generally used with the the length, as defined in Section 6.5. This function is generally
"ignore" MO. used with the "ignore" MO.
4.5.3. mapping-sent 6.5.3. mapping-sent CDA
The mapping-sent is used to send a smaller index associated with the The mapping-sent is used to send a smaller index (the index into the
list of values in the Target Value. This function is used together Target Value list of values) instead of the original value. This
with the "match-mapping" MO. function is used together with the "match-mapping" MO.
The compressor looks on the TV to find the field value and send the On the compressor side, the match-mapping Matching Operator searches
corresponding index. The decompressor uses this index to restore the the TV for a match with the header field value and the mapping-sent
field value. CDA appends the corresponding index to the Compression Residue to be
sent. On the decompressor side, the CDA uses the received index to
restore the field value by looking up the list in the TV.
The number of bits sent is the minimal size for coding all the The number of bits sent is the minimal size for coding all the
possible indexes. possible indices.
4.5.4. LSB CDA 6.5.4. LSB(y) CDA
LSB action is used to avoid sending the known part of the packet The LSB(y) action is used together with the "MSB(x)" MO to avoid
field header to the other end. This action is used together with the sending the higher part of the packet field if that part is already
"MSB" MO. A length can be specified in the rule to indicate how many known by the receiving end. A length can be specified in the rule to
bits have to be sent. If the length is not specified, the number of indicate how many bits have to be sent. If the length is not
bits sent is the field length minus the bits' length specified in the specified, the number of bits sent is the original header field
MSB MO. length minus the length specified in the MSB(x) MO.
The compressor sends the "length" Least Significant Bits. The The compressor sends the Least Significant Bits (e.g. LSB of the
decompressor combines the value received with the Target Value. length field). The decompressor combines the value received with the
Target Value depending on the field type.
If this action is made on a variable length field, the remaining size If this action needs to be done on a variable length field, the size
in byte has to be sent before. of the Compressed Residue in bytes MUST be sent as described in
Section 6.5.
4.5.5. DEViid, APPiid CDA 6.5.5. DEViid, APPiid CDA
These functions are used to process respectively the Dev and the App These functions are used to process respectively the Dev and the App
Interface Identifiers (Deviid and Appiid) of the IPv6 addresses. Interface Identifiers (Deviid and Appiid) of the IPv6 addresses.
Appiid CDA is less common since current LPWAN technologies frames Appiid CDA is less common since current LPWAN technologies frames
contain a single address. contain a single address, which is the Dev's address.
The IID value may be computed from the Device ID present in the Layer The IID value MAY be computed from the Device ID present in the Layer
2 header. The computation is specific for each LPWAN technology and 2 header, or from some other stable identifier. The computation is
may depend on the Device ID size. specific for each LPWAN technology and MAY depend on the Device ID
size.
In the downstream direction, these CDA may be used to determine the In the Downlink direction, these Deviid CDA is used to determine the
L2 addresses used by the LPWAN. L2 addresses used by the LPWAN.
4.5.6. Compute-* 6.5.6. Compute-*
These classes of functions are used by the decompressor to compute Some fields are elided during compression and reconstructed during
the compressed field value based on received information. Compressed decompression. This is the case for length and Checksum, so:
fields are elided during compression and reconstructed during
decompression.
o compute-length: compute the length assigned to this field. For o compute-length: computes the length assigned to this field. This
instance, regarding the field ID, this CDA may be used to compute CDA MAY be used to compute IPv6 length or UDP length.
IPv6 length or UDP length.
o compute-checksum: compute 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.
5. Fragmentation 7. Fragmentation
5.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. If after applying SCHC header compression tens to hundreds of bytes. The SCHC fragmentation MAY be used either
or when SCHC header compression is not possible the entire IPv6 because after applying SCHC C/D or when SCHC C/D is not possible the
datagram fits within a single L2 data unit, the fragmentation entire SCHC packet still exceeds the L2 data unit.
mechanism is not used and the packet is sent. Otherwise, the
datagram SHALL be broken into fragments.
LPWAN technologies impose some strict limitations on traffic, (e.g.) The SCHC fragmentation functionality defined in this document has
devices are sleeping most of the time and may receive data during a been designed under the assumption that data unit out-of- sequence
short period of time after transmission to preserve battery. To delivery will not happen between the entity performing fragmentation
adapt the SCHC fragmentation to the capabilities of LPWAN and the entity performing reassembly. This assumption allows
technologies, it is desirable to enable optional fragment reducing the complexity and overhead of the SCHC fragmentation
retransmission and to allow a gradation of fragment delivery mechanism.
reliability. This document does not make any decision with regard to
which fragment delivery reliability option(s) will be used over a
specific LPWAN technology.
An important consideration is that LPWAN networks typically follow a To adapt the SCHC fragmentation to the capabilities of LPWAN
the star topology, and therefore data unit reordering is not expected technologies is required to enable optional SCHC fragment
in such networks. This specification assumes that reordering will retransmission and to allow a stepper delivery for the reliability of
not happen between the entity performing fragmentation and the entity SCHC fragments. This document does not make any decision with regard
performing reassembly. This assumption allows to reduce complexity to which SCHC fragment delivery reliability mode will be used over a
and overhead of the fragmentation mechanism. specific LPWAN technology. These details will be defined in other
technology-specific documents.
5.2. Functionalities 7.2. Fragmentation Tools
This subsection describes the different fields in the fragmentation This subsection describes the different tools that are used to enable
header frames (see the related formats in Section 5.4), as well as the SCHC fragmentation functionality defined in this document, such
the tools that are used to enable the fragmentation functionalities as fields in the SCHC fragmentation header frames (see the related
defined in this document, and the different reliability options formats in Section 7.4), and the different parameters supported in
supported. the reliability modes such as timers and parameters.
o Rule ID. The Rule ID is present in the fragment header and in the o Rule ID. The Rule ID is present in the SCHC fragment header and
ACK header format. The Rule ID in a fragment header is used to in the ACK header format. The Rule ID in a SCHC fragment header
identify that a fragment is being carried, the fragmentation is used to identify that a SCHC fragment is being carried, which
delivery reliability option used and it may indicate the window SCHC fragmentation reliability mode is used and which window size
size in use (if any). The Rule ID in the fragmentation header is used. The Rule ID in the SCHC fragmentation header also allows
also allows to interleave non-fragmented IPv6 datagrams with interleaving non-fragmented packets and SCHC fragments that carry
fragments that carry a larger IPv6 datagram. The Rule ID in an other SCHC packets. The Rule ID in an ACK identifies the message
ACK allows to identify that the message is an ACK. as an ACK.
o Fragment Compressed Number (FCN). The FCN is included in all o Fragment Compressed Number (FCN). The FCN is included in all SCHC
fragments. This field can be understood as a truncated, efficient fragments. This field can be understood as a truncated,
representation of a larger-sized fragment number, and does not efficient representation of a larger-sized fragment number, and
carry an absolute fragment number. There are two FCN reserved does not carry an absolute SCHC fragment number. There are two
values that are used for controlling the fragmentation process, as FCN reserved values that are used for controlling the SCHC
described next. The FCN value with all the bits equal to 1 (All- fragmentation process, as described next:
1) denotes the last fragment of a packet. And the FCN value with
all the bits equal to 0 (All-0) denotes the last fragment of a * The FCN value with all the bits equal to 1 (All-1) denotes the
window (when such window is not the last one of the packet) in any last SCHC fragment of a packet. The last window of a packet is
window mode or the fragments in No ACK mode. The rest of the FCN called an All-1 window.
values are assigned in a sequential and decreasing order, which
has the purpose to avoid possible ambiguity for the receiver that * The FCN value with all the bits equal to 0 (All-0) denotes the
might arise under certain conditions. In the fragments, this last SCHC fragment of a window that is not the last one of the
field is an unsigned integer, with a size of N bits. In the No packet. Such a window is called an All-0 window.
ACK mode it is set to 1 bit (N=1). For the other reliability
options, it is recommended to use a number of bits (N) equal to or The rest of the FCN values are assigned in a sequentially
greater than 3. Nevertheless, the apropriate value will be decreasing order, which has the purpose to avoid possible
defined in the corresponding technology documents. The FCN MUST ambiguity for the receiver that might arise under certain
be set sequentially decreasing from the highest FCN in the window conditions. In the SCHC fragments, this field is an unsigned
(which will be used for the first fragment), and MUST wrap from 0 integer, with a size of N bits. In the No-ACK mode, it is set to
back to the highest FCN in the window. 1 bit (N=1), All-0 is used in all SCHC fragments and All-1 for the
For windows that are not the last one from a fragmented packet, last one. For the other reliability modes, it is recommended to
the FCN for the last fragment in such windows is an All-0. This use a number of bits (N) equal to or greater than 3.
Nevertheless, the appropriate value of N MUST be defined in the
corresponding technology-specific profile documents. For windows
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
indicates that the window is finished and communication proceeds indicates that the window is finished and communication proceeds
according to the reliability option in use. The FCN for the last according to the reliability mode in use. The FCN for the last
fragment in the last window is an All-1. It is also important to SCHC fragment in the last window is an All-1, indicating the last
note that, for No ACK mode or N=1, the last fragment of the packet SCHC fragment of the SCHC packet. It is also important to note
will carry a FCN equal to 1, while all previous fragments will that, in the No-ACK mode or when N=1, the last SCHC fragment of
carry a FCN of 0. the packet will carry a FCN equal to 1, while all previous SCHC
fragments will carry a FCN of 0. For further details see
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,
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
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 fragments carrying the same IPv6 datagram. same value for all SCHC fragments carrying the same SCHC
This field allows to interleave fragments that correspond to packet, and to different values for different datagrams. Using
different IPv6 datagrams. In the fragment formats the size of the this field, the sender can interleave fragments from different
DTag field is T bits, which may be set to a value greater than or SCHC packets, while the receiver can still tell them apart. In
equal to 0 bits. DTag MUST be set sequentially increasing from 0 the SCHC fragment formats, the size of the DTag field is T bits,
to 2^T - 1, and MUST wrap back from 2^T - 1 to 0. In the ACK which MAY be set to a value greater than or equal to 0 bits. For
format, DTag carries the same value as the DTag field in the each new SCHC packet processed by the sender, DTag MUST be
fragments for which this ACK is intended. 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
DTag field in the SCHC fragments for which this ACK is intended.
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 fragments of a window, and it is complemented for the next for all SCHC fragments of a window, and it is complemented for the
window. The initial value for this field is 0. In the ACK next window. The initial value for this field is 0. In the ACK
format, this field also has a size of 1 bit. In all ACKs, the W format, this field also has a size of 1 bit. In all ACKs, the W
bit carries the same value as the W bit carried by the fragments bit carries the same value as the W bit carried by the SCHC
whose reception is being positively or negatively acknowledged by fragments whose reception is being positively or negatively
the ACK. acknowledged by the ACK.
o Message Integrity Check (MIC). This field, which has a size of M o Message Integrity Check (MIC). This field, which has a size of M
bits, is computed by the sender over the complete packet (i.e. a bits, is computed by the sender over the complete SCHC packet
SCHC compressed or an uncompressed IPv6 packet) before 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 is CRC32 as 0xEDB88320 (i.e. the reverse representation of the
polynomial used e.g. in the Ethernet standard [RFC3385]) is
recommended as the default algorithm for computing the MIC. recommended as the default algorithm for computing the MIC.
Nevertheless, other algorithm MAY be mandated in the corresponding Nevertheless, other algorithms MAY be required and are defined in
technology documents (e.g. technology-specific profiles). the technology-specific documents.
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 format packets to report the outcome of the MIC check, i.e. ACK packets to report the outcome of the MIC check, i.e. whether
whether the reassembled packet was correctly received or not. the reassembled packet was correctly received or not. A value of
1 represents a positive MIC check at the receiver side (i.e. the
MIC computed by the receiver matches the received MIC).
o Retransmission Timer. It is used by a fragment sender 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 ACK
corresponding to this window. Depending on the reliability corresponding to this window. Depending on the reliability mode,
option, it will lead to a request for an ACK retransmission on it will lead to a request an ACK retransmission (in ACK-Always
ACK-Always or it will trigger the next window on ACK-on-error. mode) or it will trigger the transmission of the next window (in
The dureation of this timer is not defined in this document and ACK-on-Error mode). The duration of this timer is not defined in
must be defined in the corresponding technology documents (e.g. this document and MUST be defined in the corresponding technology
technology-specific profiles). documents.
o Inactivity Timer. This timer is used by a fragment receiver to
detect when there is a problem in the transmission of fragments
and the receiver does not get any fragment during a period of time
or a number of packets in a period of time. When this happens, an
Abort message needs to be sent. Initially, and each time a
fragment is received the timer is reinitialized. The duration of
this timer is not defined in this document and must be defined in
the specific technology document (e.g. technology-specific
profiles).
o Attempts. It is a counter used to request a missing ACK, and in
consequence to determine when an Abort is needed, because there
are recurrent fragment transmission errors, whose maximum value is
MAX_ACK_REQUESTS. The default value of MAX_ACK_REQUESTS is not
stated in this document, and it is expected to be defined in other
documents (e.g. technology- specific profiles). The Attempts
counter is defined per window, it will be initialized each time a
new window is used.
o Bitmap. The Bitmap is a sequence of bits carried in an ACK for a
given window. Each bit in the Bitmap corresponds to a fragment of
the current window, and provides feedback on whether the fragment
has been received or not. The right-most position on the Bitmap
is used to report whether the All-0 or All-1 fragments have been
received or not. Feedback for a fragment with the highest FCN
value is provided by the left-most position in the Bitmap. In the
Bitmap, a bit set to 1 indicates that the corresponding FCN
fragment has been correctly sent and received. However, the
sending format of the Bitmap will be truncated until a byte
boundary where the last error is given. However, when all the
Bitmap is transmitted, it may be truncated, see more details in
Section 5.5.3
o Abort. In case of error or when the Inactivity timer expires or
MAX_ACK_REQUESTS is reached the sender or the receiver may use the
Abort frames. When the receiver needs to abort the on-going
fragmented packet transmission, it uses the ACK Abort format
packet with all the bits set to 1. When the sender needs to abort
the transmission it will use the All-1 Abort format, this fragment
is not acked.
o Padding (P). Padding will be used to align the last byte of a
fragment with a byte boundary. The number of bits used for
padding is not defined and depends on the size of the Rule ID,
DTag and FCN fields, and on the layer two payload size.
5.3. Delivery Reliability options
This specification defines the following three fragment delivery o Inactivity Timer. A SCHC fragment receiver uses it to take action
reliability options: when there is a problem in the transmission of SCHC fragments.
Such a problem could be detected by the receiver not getting a
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
happens, an Abort message will be sent (see related text later in
this section). Initially, and each time a SCHC fragment is
received, the timer is reinitialized. The duration of this timer
is not defined in this document and MUST be defined in the
specific technology document.
o No ACK. No ACK is the simplest fragment delivery reliability o Attempts. This counter counts the requests for a missing ACK.
option. The receiver does not generate overhead in the form of When it reaches the value MAX_ACK_REQUESTS, the sender assume
acknowledgments (ACKs). However, this option does not enhance there are recurrent SCHC fragment transmission errors and
delivery reliability beyond that offered by the underlying LPWAN determines that an Abort is needed. The default value offered
technology. In the No ACK option, the receiver MUST NOT issue MAX_ACK_REQUESTS is not stated in this document, and it is
ACKs. expected to be defined in the specific technology document. The
Attempts counter is defined per window. It is initialized each
time a new window is used.
o Window mode - ACK always (ACK-Always). o Bitmap. The Bitmap is a sequence of bits carried in an ACK. Each
The ACK-always option provides flow control. In addition, this bit in the Bitmap corresponds to a SCHC fragment of the current
option is able to handle long bursts of lost fragments, since window, and provides feedback on whether the SCHC fragment has
detection of such events can be done before the end of the IPv6 been received or not. The right-most position on the Bitmap
packet transmission, as long as the window size is short enough. reports if the All-0 or All-1 fragment has been received or not.
However, such benefit comes at the expense of ACK use. In ACK- Feedback on the SCHC fragment with the highest FCN value is
always, an ACK is transmitted by the fragment receiver after a provided by the bit in the left-most position of the Bitmap. In
window of fragments has been sent. A window of fragments is a the Bitmap, a bit set to 1 indicates that the SCHC fragment of FCN
subset of the full set of fragments needed to carry an IPv6 corresponding to that bit position has been correctly sent and
packet. In this mode, the ACK informs the sender about received received. The text above describes the internal representation of
and/or missed fragments from the window of fragments. Upon the Bitmap. When inserted in the ACK for transmission from the
receipt of an ACK that informs about any lost fragments, the receiver to the sender, the Bitmap MAY be truncated for energy/
sender retransmits the lost fragments. When an ACK is not bandwidth optimisation, see more details in Section 7.4.3.1.
received by the fragment sender, the latter sends an ACK request
using the All-1 empty fragment.
The maximum number of ACK requests is MAX_ACK_REQUESTS.
o Window mode - ACK-on-error (ACK-on-error). The ACK-on-error o Abort. On expiration of the Inactivity timer, or when Attempts
option is suitable for links offering relatively low L2 data unit reached MAX_ACK_REQUESTS or upon an occurrence of some other
loss probability. This option reduces the number of ACKs error, the sender or the receiver MUST use the Abort. When the
transmitted by the fragment receiver. This may be especially receiver needs to abort the on-going SCHC fragmented packet
beneficial in asymmetric scenarios, e.g. where fragmented data are transmission, it sends the Receiver-Abort format. When the sender
sent uplink and the underlying LPWAN technology downlink capacity needs to abort the transmission, it sends the Sender-Abort format.
or message rate is lower than the uplink one. None of the Abort are acknowledged.
In ACK-on-error, an ACK is transmitted by the fragment receiver
after a window of fragments have been sent, only if at least one
of the fragments in the window has been lost. In this mode, the
ACK informs the sender about received and/or missed fragments from
the window of fragments. Upon receipt of an ACK that informs
about any lost fragments, the sender retransmits the lost
fragments. However, if an ACK is lost, the sender assumes that
all fragments covered by the ACK have been successfully delivered,
and the receiver will abort the on-going fragmented packet
transmission. One exception to this behavior is in the last
window, where the receiver MUST transmit an ACK, even if all the
fragments in the last window have been correctly received.
The same reliability option MUST be used for all fragments of a o Padding (P). If it is needed, the number of bits used for padding
packet. It is up to implementers and/or representatives of the is not defined and depends on the size of the Rule ID, DTag and
underlying LPWAN technology to decide which reliability option to use FCN fields, and on the L2 payload size (see Section 8). Some ACKs
and whether the same reliability option applies to all IPv6 packets are byte-aligned and do not need padding (see Section 7.4.3.1).
or not. Note that the reliability option to be used is not
necessarily tied to the particular characteristics of the underlying
L2 LPWAN technology (e.g. the No ACK reliability option may be used
on top of an L2 LPWAN technology with symmetric characteristics for
uplink and downlink).
This document does not make any decision as to which fragment
delivery reliability option(s) are supported by a specific LPWAN
technology.
Examples of the different reliability options described are provided 7.3. Reliability modes
in Appendix B.
5.4. Fragmentation Frame Formats This specification defines three reliability modes: No-ACK, ACK-
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
the full set of SCHC fragments needed to carry a packet or an SCHC
packet.
This section defines the fragment format, the All-0 and All-1 frame o No-ACK. No-ACK is the simplest SCHC fragment reliability mode.
formats, the ACK format and the Abort frame formats. The receiver does not generate overhead in the form of
acknowledgments (ACKs). However, this mode does not enhance
reliability beyond that offered by the underlying LPWAN
technology. In the No-ACK mode, the receiver MUST NOT issue ACKs.
See further details in Section 7.5.1.
5.4.1. Fragment format o ACK-Always. The ACK-Always mode provides flow control using a
window scheme. This mode is also able to handle long bursts of
lost SCHC fragments since detection of such events can be done
before the end of the SCHC packet transmission as long as 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
a window of SCHC fragments has been received, where a window of
SCHC fragments is a subset of the whole number of SCHC fragments
needed to carry a complete SCHC packet. The ACK is used to inform
the sender if a SCHC fragment in the actual window has been lost
or well received. Upon an ACK reception, the sender retransmits
the lost SCHC fragments. When an ACK is lost and the sender has
not received it before the expiration of the Inactivity Timer, the
sender uses an ACK request by sending the All-1 empty SCHC
fragment. The maximum number of ACK requests is MAX_ACK_REQUESTS.
If the MAX_ACK_REQUEST is reached the transmission needs to be
Aborted. See further details in Section 7.5.2.
A fragment comprises a fragment header, a fragment payload, and o ACK-on-Error. The ACK-on-Error mode is suitable for links
Padding bits (if any). A fragment conforms to the format shown in offering relatively low L2 data unit loss probability. In this
Figure 6. The fragment payload carries a subset of either a SCHC mode, the SCHC fragment receiver reduces the number of ACKs
header or an IPv6 header or the original IPv6 packet data payload. A transmitted, which MAY be especially beneficial in asymmetric
fragment is the payload in the L2 protocol data unit (PDU). scenarios. Because the SCHC fragments use the uplink of the
underlying LPWAN technology, which has higher capacity than
downlink. The receiver transmits an ACK only after the complete
window transmission and if at least one SCHC fragment of this
window has been lost. An exception to this behavior is in the
last window, where the receiver MUST transmit an ACK, including
the C bit set based on the MIC checked result, even if all the
SCHC fragments of the last window have been correctly received.
The ACK gives the state of all the SCHC fragments (received or
lost). Upon an ACK reception, the sender retransmits the lost
SCHC fragments. If an ACK is not transmitted back by the receiver
at the end of a window, the sender assumes that all SCHC fragments
have been correctly received. When the ACK is lost, the sender
assumes that all SCHC fragments covered by the lost ACK have been
successfully delivered, so the sender continues transmitting the
next window of SCHC fragments. If the next SCHC fragments
received belong to the next window, the receiver will abort the
on-going fragmented packet transmission. See further details in
{{ACK-on-Error- subsection}}.
+-----------------+-----------------------+---------+ The same reliability mode MUST be used for all SCHC fragments of an
| Fragment Header | Fragment payload | padding | SCHC packet. The decision on which reliability mode will be used and
+-----------------+-----------------------+---------+ whether the same reliability mode applies to all SCHC packets is an
implementation problem and is out of the scope of this document.
Figure 6: Fragment format. Note that the reliability mode choice is not necessarily tied to a
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
symmetric characteristics for uplink and downlink. This document
does not make any decision as to which SCHC fragment reliability
mode(s) are supported by a specific LPWAN technology.
In the No ACK option, fragments except the last one SHALL contain the Examples of the different reliability modes described are provided in
format as defined in Figure 7. The total size of the fragment header Appendix B.
is R bits.
<------------ R ----------> 7.4. Fragmentation Formats
<--T--> <--N-->
+-- ... --+- ... -+- ... -+---...---+-+
| Rule ID | DTag | FCN | payload |P|
+-- ... --+- ... -+- ... -+---...---+-+
Figure 7: Fragment Format for Fragments except the Last One, No ACK This section defines the SCHC fragment format, the All-0 and All-1
option formats, the ACK format and the Abort formats.
In any of the Window mode options, fragments except the last one 7.4.1. Fragment format
SHALL contain the fragmentation format as defined in Figure 8. The
total size of the fragment header in this format is R bits. .
<------------ R ----------> A SCHC fragment comprises a SCHC fragment header, a SCHC fragment
<--T--> 1 <--N--> payload and padding bits (if needed). A SCHC fragment conforms to
+-- ... --+- ... -+-+- ... -+---...---+-+ the general format shown in Figure 8. The SCHC fragment payload
| Rule ID | DTag |W| FCN | payload |P| 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
fragments and in ACKs if necessary, therefore a padding field is
optional (this is explicitly indicated in Figure 8 for the sake of
illustration clarity.
Figure 8: Fragment Format for Fragments except the Last One, Window +-----------------+-----------------------+~~~~~~~~~~~~~~~
mode | Fragment Header | Fragment payload | padding (opt.)
+-----------------+-----------------------+~~~~~~~~~~~~~~~
5.4.2. ACK format Figure 8: Fragment general format. Presence of a padding field is
optional
The format of an ACK that acknowledges a window that is not the last In ACK-Always or ACK-on-Error, SCHC fragments except the last one
one (denoted as ALL-0 window) is shown in Figure 9. SHALL conform the detailed format defined in {{Fig- NotLastWin}}. The
total size of the fragment header is R bits. Where is R is not a
multiple of 8 bits.
<-------- R -------> <------------ R ----------->
<- T -> 1 <--T--> 1 <--N-->
+---- ... --+-... -+-+----- ... ---+ +-- ... --+- ... -+-+- ... -+--------...-------+
| Rule ID | DTag |W| Bitmap | (no payload) | Rule ID | DTag |W| FCN | Fragment payload |
+---- ... --+-... -+-+----- ... ---+ +-- ... --+- ... -+-+- ... -+--------...-------+
Figure 9: ACK format for All-0 windows Figure 9: Fragment Detailed Format for Fragments except the Last One,
Window mode
To acknowledge the last window of a packet (denoted as All-1 window), In the No-ACK mode, SCHC fragments except the last one SHALL conform
a C bit (i.e. MIC checked) following the W bit is set to 1 to to the detailed format defined in Figure 10. The total size of the
indicate that the MIC check computed by the receiver matches the MIC fragment header is R bits.
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.
<-------- R -------> <- byte boundary -> <------------ R ----------->
<- T -> 1 1 <--T--> <--N-->
+---- ... --+-... -+-+-+ +-- ... --+- ... -+- ... -+--------...-------+
| Rule ID | DTag |W|1| (MIC correct) | Rule ID | DTag | FCN | Fragment payload |
+---- ... --+-... -+-+-+ +-- ... --+- ... -+- ... -+--------...-------+
+---- ... --+-... -+-+-+------- ... -------+ Figure 10: Fragment Detailed Format for Fragments except the Last
| Rule ID | DTag |W|0| Bitmap | (MIC Incorrect) One, No-ACK mode
+---- ... --+-... -+-+-+------- ... -------+
C
Figure 10: Format of an ACK for All-1 windows In all these cases, R may not be a multiple of 8 bits.
5.4.3. All-1 and All-0 formats 7.4.2. All-1 and All-0 formats
The All-0 format is used for the last fragment of a window that is The All-0 format is used for sending the last SCHC fragment of a
not the last window of the packet. window that is not the last window of the packet.
<------------ R ------------> <------------ 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 format Figure 11: All-0 fragment detailed format
The All-0 empty fragment format is used by a sender to request an ACK The All-0 empty fragment format is used by a sender to request the
in ACK-Always mode retransmission of an ACK by the receiver. It is only used in ACK-
Always mode.
<------------ R ------------> <------------ 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 format Figure 12: All-0 empty fragment detailed format
In the No ACK option, the last fragment of an IPv6 datagram SHALL In the No-ACK mode, the last SCHC fragment of an IPv6 datagram SHALL
contain a fragment header that conforms to the format shown in contain a SCHC fragment header that conforms to the detaield format
Figure 13. The total size of this fragment header is R+M bits. shown in Figure 13. The total size of this SCHC fragment header is
R+M bits.
<------------- R ----------> <------------ R ----------->
<- T -> <-N-><----- M -----> <- T -> <N=1> <---- M ---->
+---- ... ---+- ... -+-----+---- ... ----+---...---+ +---- ... ---+- ... -+-----+---- ... ----+---...---+
| Rule ID | DTag | 1 | MIC | payload | | Rule ID | DTag | 1 | MIC | payload |
+---- ... ---+- ... -+-----+---- ... ----+---...---+ +---- ... ---+- ... -+-----+---- ... ----+---...---+
Figure 13: All-1 Fragment Format for the Last Fragment, No ACK option Figure 13: All-1 Fragment Detailed Format for the Last Fragment, No-
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 fragment header that conforms to the format shown in SHALL contain a SCHC fragment header that conforms to the detailed
Figure 14. The total size of the fragment header in this format is format shown in Figure 14. The total size of the SCHC fragment
R+M bits. header in this format is R+M bits.
<------------ R ------------> <------------ R ----------->
<- T -> 1 <- N -> <---- M -----> <- 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 Format for the Last Fragment, Window mode Figure 14: All-1 Fragment Detailed Format for the Last Fragment, ACK-
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 ACK for the All-1 window, the fragment sender
uses the format shown in Figure 15. The total size of the fragment uses the format shown in Figure 15. The total size of the SCHC
header in this format is R+M bits. fragment header in this format is R+M bits.
<------------ R ------------> <------------ R ----------->
<- T -> 1 <- N -> <---- M -----> <- 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 15: 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 R, N, T and M are not specified in this document, and
have to be determined in other documents (e.g. technology-specific SHOULD be determined in other documents (e.g. technology-specific
profile documents). profile documents).
5.4.4. Abort formats 7.4.3. ACK format
The All-1 Abort and the ACK abort messages have the following The format of an ACK that acknowledges a window that is not the last
formats. one (denoted as All-0 window) is shown in Figure 16.
<------ byte boundary ------><--- 1 byte ---> <--------- R -------->
+--- ... ---+- ... -+-+-...-+-+-+-+-+-+-+-+-+ <- T -> 1
| Rule ID | DTag |W| FCN | FF | (no MIC & no payload) +---- ... --+-... -+-+---- ... -----+
+--- ... ---+- ... -+-+-...-+-+-+-+-+-+-+-+-+ | Rule ID | DTag |W|encoded Bitmap| (no payload)
+---- ... --+-... -+-+---- ... -----+
Figure 16: All-1 Abort format Figure 16: ACK format for All-0 windows
<------ byte boundary -----><--- 1 byte ---> 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
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
set to 0 and the Bitmap for the All-1 window follows.
+---- ... --+-... -+-+-+-+-+-+-+-+-+-+-+-+-+ <---------- R --------->
| Rule ID | DTag |W| 1..1| FF | <- T -> 1 1
+---- ... --+-... -+-+-+-+-+-+-+-+-+-+-+-+-+ +---- ... --+-... -+-+-+
| Rule ID | DTag |W|1| (MIC correct)
+---- ... --+-... -+-+-+
Figure 17: ACK Abort format +---- ... --+-... -+-+-+----- ... -----+
| Rule ID | DTag |W|0|encoded Bitmap |(MIC Incorrect)
+---- ... --+-... -+-+-+----- ... -----+
C
5.5. Baseline mechanism Figure 17: Format of an ACK for All-1 windows
The fragment receiver needs to identify all the fragments that belong 7.4.3.1. Bitmap Encoding
to a given IPv6 datagram. To this end, the receiver SHALL use:
o The sender's L2 source address (if present), The Bitmap is transmitted by a receiver as part of the ACK format.
An ACK message MAY include padding at the end to align its number of
transmitted bits to a multiple of 8 bits.
o The destination's L2 address (if present), Note that the ACK sent in response to an All-1 fragment includes the
C bit. Therefore, the window size and thus the encoded Bitmap size
need to be determined taking into account the available space in the
layer two frame payload, where there will be 1 bit less for an ACK
sent in response to an All-1 fragment than in other ACKs. Note that
the maximum number of SCHC fragments of the last window is one unit
smaller than that of the previous windows.
o Rule ID and When the receiver transmits an encoded Bitmap with a SCHC fragment
that has not been sent during the transmission, the sender will Abort
the transmission.
o DTag (the latter, if present). <---- Bitmap bits ---->
| 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 |
Then, the fragment receiver may determine the fragment delivery Figure 18: A non-encoded Bitmap
reliability option that is used for this fragment based on the Rule
ID field in that fragment.
Upon receipt of a link fragment, the receiver starts constructing the In order to reduce the resulting frame size, the encoded Bitmap is
original unfragmented packet. It uses the FCN and the order of shortened by applying the following algorithm: all the right-most
arrival of each fragment to determine the location of the individual contiguous bytes in the encoded Bitmap that have all their bits set
fragments within the original unfragmented packet. A fragment to 1 MUST NOT be transmitted. Because the SCHC fragment sender knows
payload may carry bytes from a SCHC compressed IPv6 header, an the actual Bitmap size, it can reconstruct the original Bitmap with
uncompressed IPv6 header or an IPv6 datagram data payload. An the trailing 1 bit optimized away. In the example shown in
unfragmented packet could be a SCHC compressed or an uncompressed Figure 19, the last 2 bytes of the Bitmap shown in Figure 18 comprise
IPv6 packet (header and data). For example, the receiver may place bits that are all set to 1, therefore they are not sent.
the fragment payload within a payload datagram reassembly buffer at
the location determined from: the FCN, the arrival order of the
fragments, and the fragment payload sizes. In Window mode, the
fragment receiver also uses the W bit in the received fragments.
Note that the size of the original, unfragmented packet cannot be
determined from fragmentation headers.
Fragmentation functionality uses the FCN value, which has a length of <------- R ------->
N bits. The All-1 and All-0 FCN values are used to control the <- T -> 1
fragmentation transmission. The FCN will be assigned sequentially in +---- ... --+-... -+-+-+-+
a decreasing order starting from 2^N-2, i.e. the highest possible FCN | Rule ID | DTag |W|1|0|
value depending on the FCN number of bits, but excluding the All-1 +---- ... --+-... -+-+-+-+
value. In all modes, the last fragment of a packet must contains a |---- byte boundary -----|
MIC which is used to check if there are errors or missing fragments,
and must use the corresponding All-1 fragment format. Also note
that, a fragment with an All-0 format is considered the last fragment
of the current window.
If the recipient receives the last fragment of a datagram (All-1), it Figure 19: Optimized Bitmap format
checks for the integrity of the reassembled datagram, based on the
MIC received. In No ACK, if the integrity check indicates that the
reassembled datagram does not match the original datagram (prior to
fragmentation), the reassembled datagram MUST be discarded. In
Window mode, a MIC check is also performed by the fragment receiver
after reception of each subsequent fragment retransmitted after the
first MIC check.
5.5.1. No ACK Figure 20 shows an example of an ACK with FCN ranging from 6 down to
0, where the Bitmap indicates that the second and the fifth SCHC
fragments have not been correctly received.
In the No ACK mode there is no feedback communication from the <------ R ------>6 5 4 3 2 1 0 (*)
fragment receiver. The sender will send the fragments of a packet <- T -> 1
until the last one without any possibility to know if errors or a +---------+------+-+-+-+-+-+-+-+-----+
losses have occurred. As in this mode there is not a need to | Rule ID | DTag |W|1|0|1|1|0|1|all-0| Bitmap(before tx)
identify specific fragments a one-bit FCN is used, therefore FCN +---------+------+-+-+-+-+-+-+-+-----+
All-0 will be used in all fragments except the last one. The latter |<-- byte boundary ->|<---- 1 byte---->|
will carry an All-1 FCN and will also carry the MIC. The receiver (*)=(FCN values)
will wait for fragments and will set the Inactivity timer. The No
ACK mode will use the MIC contained in the last fragment to check
error. When the Inactivity Timer expires or when the MIC check
indicates that the reassembled packet does not match the original
one, the receiver will release all resources allocated to reassembly
of the packet. The initial value of the Inactivity Timer will be
determined based on the characteristics of the underlying LPWAN
technology and will be defined in other documents (e.g. technology-
specific profile documents).
5.5.2. The Window modes +---------+------+-+-+-+-+-+-+-+-----+~~
| Rule ID | DTag |W|1|0|1|1|0|1|all-0|Padding(opt.) encoded Bitmap
+---------+------+-+-+-+-+-+-+-+-----+~~
|<-- byte boundary ->|<---- 1 byte---->|
In Window modes, a jumping window protocol uses two windows Figure 20: Example of a Bitmap before transmission, and the
alternatively, identified as 0 and 1. A fragment with all FCN bits transmitted one, in any window except the last one
set to 0 (i.e. an All-0 fragment) indicates that the window is over
(i.e. the fragment is the last one of the window) and allows to
switch from one window to the next one. The All-1 FCN in a fragment
indicates that it is the last fragment of the packet being
transmitted and therefore there will not be another window for the
packet.
The Window mode offers two different reliability option modes: ACK- Figure 21 shows an example of an ACK with FCN ranging from 6 down to
on-error and ACK-always. 0, where the Bitmap indicates that the MIC check has failed but there
are no missing SCHC fragments.
5.5.2.1. ACK-Always <------- R -------> 6 5 4 3 2 1 7 (*)
<- T -> 1 1
| Rule ID | DTag |W|0|1|1|1|1|1|1|1|padding| Bitmap (before tx)
|---- byte boundary -----| 1 byte next |
C
+---- ... --+-... -+-+-+-+
| Rule ID | DTag |W|0|1| encoded Bitmap
+---- ... --+-... -+-+-+-+
|<--- byte boundary ---->|
(*) = (FCN values indicating the order)
In ACK-Always, the sender sends fragments by using the two-jumping Figure 21: Example of the Bitmap in ACK-Always or ACK-on-Error for
window procedure. A delay between each fragment can be added to the last window, for N=3)
respect regulation rules or constraints imposed by the applications.
Each time a fragment is sent, the FCN is decreased by one. When the
FCN reaches value 0 and there are more fragments to be sent, an All-0
fragment is sent and the Retransmission Timer is set. The sender
waits for an ACK to know if transmission errors have occurred. Then,
the receiver sends an ACK reporting whether any fragments have been
lost or not by setting the corresponding bits in the Bitmap,
otherwise, an ACK without Bitmap will be sent, allowing transmission
of a new window. When the last fragment of the packet is sent, an
All-1 fragment (which includes a MIC) is used. In that case, the
sender sets the Retransmission Timer to wait for the ACK
corresponding to the last window. During this period, the sender
starts listening to the radio and starts the Retransmission Timer,
which needs to be dimensioned based on the received window available
for the LPWAN technology in use. If the Retransmission Timer
expires, an empty All-0 (or an empty All-1 if the last fragment has
been sent) fragment is sent to ask the receiver to resend its ACK.
The window number is not changed.
When the sender receives an ACK, it checks the W bit carried by the 7.4.4. Abort formats
ACK. Any ACK carrying an unexpected W bit is discarded. If the W
bit value of the received ACK is correct, the sender analyzes the
received Bitmap. If all the fragments sent during the window have
been well received, and if at least one more fragment needs to be
sent, the sender moves its sending window to the next window value
and sends the next fragments. If no more fragments have to be sent,
then the fragmented packet transmission is finished.
However, if one or more fragments have not been received as per the Abort are coded as exceptions to the previous coding, a specific
ACK (i.e. the corresponding bits are not set in the Bitmap) then the format is defined for each direction. When a SCHC fragment sender
sender resends the missing fragments. When all missing fragments needs to abort the transmission, it sends the Sender-Abort format
have been retransmitted, the sender starts the Retransmission Timer Figure 22, that is an All-1 fragment with no MIC or payload. In
(even if an All-0 or an All-1 has not been sent during the regular cases All-1 fragment contains at least a MIC value. This
retransmission) and waits for an ACK. Upon receipt of the ACK, if absence of the MIC value indicates an Abort.
one or more fragments have not yet been received, the counter
Attempts is increased and the sender resends the missing fragments
again. When Attempts reaches MAX_ACK_REQUESTS, the sender aborts the
on-going fragmented packet transmission by sending an Abort message
and releases any resources for transmission of the packet. The
sender also aborts an on-going fragmented packet transmission when a
failed MIC check is reported by the receiver.
On the other hand, at the beginning, the receiver side expects to When a SCHC fragment receiver needs to abort the on-going SCHC
receive window 0. Any fragment received but not belonging to the fragmented packet transmission, it transmits the Receiver- Abort
current window is discarded. All fragments belonging to the correct format Figure 23, creating an exception in the encoded Bitmap coding.
window are accepted, and the actual fragment number managed by the Encoded Bitmap avoid sending the rigth most bits of the Bitmap set to
receiver is computed based on the FCN value. The receiver prepares 1. Abort is coded as an ACK message with a Bitmap set to 1 until the
the Bitmap to report the correctly received and the missing fragments byte boundary, followed by an extra 0xFF byte. Such message never
for the current window. After each fragment is received the receiver occurs in a regular acknowledgement and is view as an abort.
initializes the Inactivity timer, if the Inactivity Timer expires the
transmission is aborted.
When an All-0 fragment is received, it indicates that all the None of these messages are not acknowledged nor retransmitted.
fragments have been sent in the current window. Since the sender is
not obliged to always send a full window, some fragment number not
set in the receiver memory may not correspond to losses. The
receiver sends the corresponding ACK, the Inactivity Timer is set and
the transmission of the next window by the sender can start.
If an All-0 fragment has been received and all fragments of the The sender uses the Sender-Abort when the MAX_ACK_REQUEST is reached.
current window have also been received, the receiver then expects a The receiver uses the Receiver-Abort when the Inactivity timer
new Window and waits for the next fragment. Upon receipt of a expires, or in the ACK-on-Error mode, ACK is lost and the sender
fragment, if the window value has not changed, the received fragments transmits SCHC fragments of a new window. Some other cases for Abort
are part of a retransmission. A receiver that has already received a are explained in the Section 7.5 or Appendix C.
fragment should discard it, otherwise, it updates the Bitmap. If all
the bits of the Bitmap are set to one, the receiver may send an ACK
without waiting for an All-0 fragment and the Inactivity Timer is
initialized.
On the other hand, if the window value of the next received fragment <------------- R -----------><--- 1 byte --->
is set to the next expected window value, this means that the sender +--- ... ---+- ... -+-+-...-+-+-+-+-+-+-+-+-+
has received a correct Bitmap reporting that all fragments have been | Rule ID | DTag |W| FCN | FF | (no MIC & no payload)
received. The receiver then updates the value of the next expected +--- ... ---+- ... -+-+-...-+-+-+-+-+-+-+-+-+
window.
If the receiver receives an All-0 fragment, the sender may send one Figure 22: Sender-Abort format. All FCN fields in this format are
or more fragments per window. Otherwise, some fragments in the set to 1
window have been lost.
When an All-1 fragment is received, it indicates that the last <----- byte boundary ------><--- 1 byte --->
fragment of the packet has been sent. Since the last window is not
always full, the MIC will be used to detect if all fragments of the
packet have been received. A correct MIC indicates the end of the
transmission but the receiver must stay alive for an Inactivity 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, some
fragments have been lost. The receiver sends the ACK regardless of
successful fragmented packet reception or not, the Inactitivity Timer
is set. In case of an incorrect MIC, the receiver waits for
fragments belonging to the same window. After MAX_ACK_REQUESTS, the
receiver will abort the on-going fragmented packet transmission. The
receiver also Aborts upon Inactivity Timer expiration.
5.5.2.2. ACK-on-error +---- ... --+-... -+-+-+-+-+-+-+-+-+-+-+-+-+
| Rule ID | DTag |W| 1..1| FF |
+---- ... --+-... -+-+-+-+-+-+-+-+-+-+-+-+-+
The ACK-on-error sender is similar to ACK-Always, the main difference Figure 23: Receiver-Abort format
being that in ACK-on-error the ACK is not sent at the end of each
window but only when at least one fragment of the current window has
been lost (with the exception of the last window, see next
paragraph). In Ack-on-error, the Retransmission Timer expiration
will be considered as a positive acknowledgment. The Retransmission
Timer is set when sending an All-0 or an All-1 fragment. When the
All-1 fragment has been sent, then the on-going fragmented packet
transmission fragmentation is finished and the sender waits for the
last ACK. At the receiver side, when the All-1 fragment is sent and
the MIC check indicates successful packet reception, an ACK is also
sent to confirm the end of a correct transmission. If the
Retransmission Timer expires, an All-1 empty request for the last ACK
MUST be sent by the sender to complete the fragmented packet
transmission.
If the sender receives an ACK, it checks the window value. ACKs with 7.5. Baseline mechanism
an unexpected window number are discarded. If the window number on
the received Bitmap is correct, the sender verifies if the receiver
has received all fragments of the current window. When at least one
fragment has been lost, the counter Attempts is increased by one and
the sender resends the missing fragments again. When Attempts
reaches MAX_ACK_REQUESTS, the sender sends an Abort message and
releases all resources for the on-going fragmented packet
transmission. When the retransmission of missing 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 retransmission) and initializes
and starts the Retransmission Timer. After sending an All-1
fragment, the sender listens for an ACK, initializes Attempts, and
initializes and starts the Retransmission Timer. If the
Retransmission Timer expires, Attempts is increased by one and an
empty All-1 fragment is sent to request the ACK for the last window.
If Attempts reaches MAX_ACK_REQUESTS, the on-going fragmented packet
transmission is aborted.
Unlike the sender, the receiver for ACK-on-error has a larger amount If after applying SCHC header compression (or when SCHC header
of differences compared with ACK-Always. First, an ACK is not sent compression is not possible) the SCHC packet does not fit within the
unless there is a lost fragment or an unexpected behavior (with the payload of a single L2 data unit, the SCHC packet SHALL be broken
exception of the last window, where an ACK is always sent regardless into SCHC fragments and the fragments SHALL be sent to the fragment
of fragment losses or not). The receiver starts by expecting receiver. The fragment receiver needs to identify all the SCHC
fragments from window 0 and maintains the information regarding which fragments that belong to a given SCHC packet. To this end, the
fragments it receives. After receiving a fragment, the Inactivity receiver SHALL use:
Timer is set, if no fragment has been received and the Inactivity
Timer expires the transmission is aborted.
Any fragment not belonging to the current window is discarded. The o The sender's L2 source address (if present),
actual fragment number is computed based on the FCN value. When an
All-0 fragment is received and all fragments have been received, the
receiver updates the expected window value.
If an All-0 fragment is received, even if another fragment is o The destination's L2 address (if present),
missing, all fragments from the current window have been sent. Since
the sender is not obligated to send a full window, a fragment number
not used may not necessarily correspond to losses. As the receiver
does not know if the missing fragments are lost or not, it sends an
ACK and reinitialises the Inactivity Timer.
On the other hand, after receiving an All-0 fragment, the receiver o Rule ID,
expects a new window and waits for the next fragment.
If the window value of the next fragment has not changed, the
received fragment is a retransmission. A receiver that has already
received a fragment should discard it. If all fragments 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 window and if the
window value is set to the next value, and if an All-1 fragment with
the next value window arrived the receiver aborts the on-going
fragmented packet transmission, and it drops the fragments of the
aborted packet transmission.
If the receiver receives an All-1 fragment, this means that the o DTag (if present).
transmission should be finished. If the MIC is incorrect some
fragments have been lost. Regardless of fragment losses, the
receiver sends an ACK and initializes the Inactivity Timer.
Reception of an All-1 fragment indicates the last fragment of the Then, the fragment receiver MAY determine the SCHC fragment
packet has been sent. Since the last window is not always full, the reliability mode that is used for this SCHC fragment based on the
MIC will be used to detect if all fragments of the window have been Rule ID in that fragment.
received. A correct MIC check indicates the end of the fragmented
packet transmission. An ACK is sent by the fragment receiver. In
case of an incorrect MIC, the receiver waits for fragments belonging
to the same window or the expiration of the Inactivity Timer. The
latter will lead the receiver to abort the on-going fragmented packet
transmission.
5.5.3. Bitmap Optimization After a SCHC fragment reception, the receiver starts constructing the
SCHC packet. It uses the FCN and the arrival order of each SCHC
fragment to determine the location of the individual fragments within
the SCHC packet. For example, the receiver MAY place the fragment
payload within a payload datagram reassembly buffer at the location
determined from the FCN, the arrival order of the SCHC fragments, and
the fragment payload sizes. In Window mode, the fragment receiver
also uses the W bit in the received SCHC fragments. Note that the
size of the original, unfragmented packet cannot be determined from
fragmentation headers.
The Bitmap is transmitted by a receiver as part of the ACK format Fragmentation functionality uses the FCN value to transmit the SCHC
when there are some missing fragments in a window. An ACK message fragments. It has a length of N bits where the All-1 and All-0 FCN
may introduce padding at the end to align transmitted data to a byte values are used to control the fragmentation transmission. The rest
boundary. The first byte boundary includes one or more complete of the FCN numbers MUST be assigned sequentially in a decreasing
bytes, depending on the size of Rule ID and DTag. 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
bits.
Note that the ACK sent in response to an All-1 fragment includes the In all modes, the last SCHC fragment of a packet MUST contain a MIC
C bit. Therefore, the window size and thus the Bitmap size need to which is used to check if there are errors or missing SCHC fragments
be determined taking into account the available space in the layer and MUST use the corresponding All-1 fragment format. Note that a
two frame payload, where there will be 1 bit less for an ACK sent in SCHC fragment with an All-0 format is considered the last SCHC
response to an All-1 fragment than in other ACKs. fragment of the current window.
<---- Bitmap bits ----> If the receiver receives the last fragment of a datagram (All-1), it
| Rule ID | DTag |W|C|0|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1| checks for the integrity of the reassembled datagram, based on the
|--- byte boundary ----| 1 byte next | 1 byte next | MIC received. In No-ACK, if the integrity check indicates that the
reassembled datagram does not match the original datagram (prior to
fragmentation), the reassembled datagram MUST be discarded. In
Window mode, a MIC check is also performed by the fragment receiver
after reception of each subsequent SCHC fragment retransmitted after
the first MIC check.
Figure 18: Bitmap There are three reliability modes: No-ACK, ACK-Always and ACK-on-
Error. In ACK-Always and ACK-on-Error, a jumping window protocol
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)
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. 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
be another window for this packet.
The Bitmap, when transmitted, MUST be optimized in size to reduce the 7.5.1. No-ACK
resulting frame size. The right-most bytes with all Bitmap bits set
to 1 MUST NOT be transmitted. As the receiver knows the Bitmap size,
it can reconstruct the original Bitmap without this optimization. In
the example Figure 19, the last 2 bytes of the Bitmap shown in
Figure 18 comprise all bits set to 1, therefore, the last 2 bytes of
the Bitmap are not sent.
In the last window, when checked bit C value is 1, it means that the In the No-ACK mode, there is no feedback communication from the
received MIC matches the one computed by the receiver, and thus the fragment receiver. The sender will send all the SCHC fragments of a
Bitmap is not sent. Otherwise, the Bitmap needs to be sent after the packet without any possibility of knowing if errors or losses have
C bit. Note that the introduction of a C bit may force to reduce the occurred. As, in this mode, there is no need to identify specific
number of fragments in a window to allow the bitmap to fit in a SCHC fragments, a one-bit FCN MAY be used. Consequently, the FCN
frame. 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
fragments and will set the Inactivity timer. The receiver will use
the MIC contained in the last SCHC fragment to check for errors.
When the Inactivity Timer expires or if the MIC check indicates that
the reassembled packet does not match the original one, the receiver
will release all resources allocated to reassembling this packet.
The initial value of the Inactivity Timer will be determined based on
the characteristics of the underlying LPWAN technology and will be
defined in other documents (e.g. technology-specific profile
documents).
<------- R -------> 7.5.2. ACK-Always
<- T -> 1
+---- ... --+-... -+-+-+-+
| Rule ID | DTag |W|1|0|
+---- ... --+-... -+-+-+-+
|---- byte boundary -----|
Figure 19: Bitmap transmitted fragment format In ACK-Always, the sender transmits SCHC fragments by using the two-
jumping-windows procedure. A delay between each SCHC fragment can be
added to respect local regulations or other constraints imposed by
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
SCHC fragments to be sent after, the sender transmits the last SCHC
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 FCN has reached 0 and the SCHC fragment to be transmitted is the
last SCHC fragment of the SCHC packet, the sender uses the All-1
fragment format, which includes a MIC. The sender sets the
Retransmission Timer and waits for the ACK to know if transmission
errors have occured.
Figure 20 shows an example of an ACK (for N=3), where the Bitmap The Retransmission Timer is dimensioned based on the LPWAN technology
indicates that the second and the fifth fragments have not been in use. When the Retransmission Timer expires, the sender sends an
correctly received. All-0 empty (resp. All-1 empty) fragment to request again the ACK
for the window that ended with the All-0 (resp. All-1) fragment just
sent. The window number is not changed.
<------ R ------>6 5 4 3 2 1 0 (*) After receiving an All-0 or All-1 fragment, the receiver sends an ACK
<- T -> 1 with an encoded Bitmap reporting whether any SCHC fragments have been
| Rule ID | DTag |W|1|0|1|1|0|1|all-0|padding| Bitmap (before tx) lost or not. When the sender receives an ACK, it checks the W bit
|--- byte boundary ----| 1 byte next | carried by the ACK. Any ACK carrying an unexpected W bit value is
(*)=(FCN values indicating the order) discarded. If the W bit value of the received ACK is correct, the
sender analyzes the rest of the ACK message, such as the encoded
Bitmap and the MIC. If all the SCHC fragments sent for this window
have been well received, and if at least one more SCHC fragment needs
to be sent, the sender advances its sending window to the next window
value and sends the next SCHC fragments. If no more SCHC fragments
have to be sent, then the SCHC fragmented packet transmission is
finished.
+---- ... --+-... -+-+-+-+-+-+-+-+-+-+ However, if one or more SCHC fragments have not been received as per
| Rule ID | DTag |W|1|0|1|1|0|1|1|P| transmitted Bitmap the ACK (i.e. the corresponding bits are not set in the encoded
+---- ... --+-... -+-+-+-+-+-+-+-+-+-+ Bitmap) then the sender resends the missing SCHC fragments. When all
|--- byte boundary ----| 1 byte next | 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
as part of this retransmission and waits for an ACK. Upon receipt of
the ACK, if one or more SCHC fragments have not yet been received,
the counter Attempts is increased and the sender resends the missing
SCHC fragments again. When Attempts reaches MAX_ACK_REQUESTS, the
sender aborts the on-going SCHC fragmented packet transmission by
sending an Abort message and releases any resources for transmission
of the packet. The sender also aborts an on-going SCHC fragmented
packet transmission when a failed MIC check is reported by the
receiver or when a SCHC fragment that has not been sent is reported
in the encoded Bitmap.
Figure 20: Example of a Bitmap before transmission, and the On the other hand, at the beginning, the receiver side expects to
transmitted one, in any window except the last one, for N=3 receive window 0. Any SCHC fragment received but not belonging to
the current window is discarded. All SCHC fragments belonging to the
correct window are accepted, and the actual SCHC fragment number
managed by the receiver is computed based on the FCN value. The
receiver prepares the encoded Bitmap to report the correctly received
and the missing SCHC fragments for the current window. After each
SCHC fragment is received the receiver initializes the Inactivity
timer, if the Inactivity Timer expires the transmission is aborted.
Figure 21 shows an example of an ACK (for N=3), where the Bitmap When an All-0 fragment is received, it indicates that all the SCHC
indicates that the MIC check has failed but there are no missing fragments have been sent in the current window. Since the sender is
fragments. not obliged to always send a full window, some SCHC fragment number
not set in the receiver memory SHOULD not correspond to losses. The
receiver sends the corresponding ACK, the Inactivity Timer is set and
the transmission of the next window by the sender can start.
<------- R -------> 6 5 4 3 2 1 7 (*) If an All-0 fragment has been received and all SCHC fragments of the
<- T -> 1 1 current window have also been received, the receiver then expects a
| Rule ID | DTag |W|0|1|1|1|1|1|1|1|padding| Bitmap (before tx) new Window and waits for the next SCHC fragment. Upon receipt of a
|---- byte boundary ----| 1 byte next | 1 byte next | SCHC fragment, if the window value has not changed, the received SCHC
C fragments are part of a retransmission. A receiver that has already
+---- ... --+-... -+-+-+-+ received a SCHC fragment SHOULD discard it, otherwise, it updates the
| Rule ID | DTag |W|0|1| transmitted Bitmap 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
|---- byte boundary -----| fragment and the Inactivity Timer is initialized.
(*) = (FCN values indicating the order)
Figure 21: Example of the Bitmap in Window mode for the last window, On the other hand, if the window value of the next received SCHC
for N=3) fragment is set to the next expected window value, this means that
the sender has received a correct encoded Bitmap reporting that all
SCHC fragments have been received. The receiver then updates the
value of the next expected window.
5.6. Supporting multiple window sizes 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
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 transmission but the receiver MUST stay alive for an Inactivity
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,
some SCHC fragments have been lost. The receiver sends the ACK
regardless of successful SCHC fragmented packet reception or not, the
Inactitivity Timer is set. In case of an incorrect MIC, the receiver
waits for SCHC fragments belonging to the same window. After
MAX_ACK_REQUESTS, the receiver will abort the on-going SCHC
fragmented packet transmission by transmitting a the Receiver-Abort
format. The receiver also aborts upon Inactivity Timer expiration.
For ACK-Always or ACK-on-error, implementers may opt to support a 7.5.3. ACK-on-Error
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
Bitmap is not sent at the end of each window but only when at least
one SCHC fragment of the current window has been lost. Excepts for
the last window where an ACK MUST be sent to finish the transmission.
In ACK-on-Error, the Retransmission Timer expiration will be
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
been sent, then the on-going SCHC fragmentation process is finished
and the sender waits for the last ACK. If the Retransmission Timer
expires while waiting for the ACK for the last window, an All-1 empty
MUST be sent to request the last ACK by the sender to complete the
SCHC fragmented packet transmission. When it expires the sender
continue sending SCHC fragments of the next window.
If the sender receives an ACK, it checks the window value. ACKs with
an unexpected window number are discarded. If the window number on
the received encoded Bitmap is correct, the sender verifies if the
receiver has received all SCHC fragments of the current window. When
at least one SCHC fragment has been lost, the counter Attempts is
increased by one and the sender resends the missing SCHC fragments
again. When Attempts reaches MAX_ACK_REQUESTS, the sender sends an
Abort message and releases all resources for the on-going SCHC
fragmented packet transmission. When the retransmission of the
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
retransmission) and initializes the Retransmission Timer. After
sending an All-1 fragment, the sender listens for an ACK, initializes
Attempts, and starts the Retransmission Timer. If the Retransmission
Timer expires, Attempts is increased by one and an empty All-1
fragment is sent to request the ACK for the last window. If Attempts
reaches MAX_ACK_REQUESTS, the sender aborts the on-going SCHC
fragmented packet transmission by transmitting the Sender-Abort
fragment.
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
unless there is a lost SCHC fragment or an unexpected behavior. With
the exception of the last window, where an ACK is always sent
regardless of SCHC fragment losses or not. The receiver starts by
expecting SCHC fragments from window 0 and maintains the information
regarding which SCHC fragments it receives. After receiving an SCHC
fragment, the Inactivity Timer is set. If no further SCHC fragment
are received and the Inactivity Timer expires, the SCHC fragment
receiver aborts the on-going SCHC fragmented packet transmission by
transmitting the Receiver-Abort data unit.
Any SCHC fragment not belonging to the current window is discarded.
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
received, the receiver updates the expected window value and expects
a new window and waits for the next SCHC fragment.
If the window value of the next SCHC fragment has not changed, the
received SCHC fragment is a retransmission. A receiver that has
already received an SCHC fragment discard it. If all SCHC fragments
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
window and if the window value is set to the next value, and if an
All-1 fragment with the next value window arrived the receiver knows
that the last SCHC 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 the window have been received. A correct MIC check
indicates the end of the SCHC fragmented packet transmission. An ACK
is sent by the SCHC fragment receiver. In case of an incorrect MIC,
the receiver waits for SCHC fragments belonging to the same window or
the expiration of the Inactivity Timer. The latter 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
fragments, the receiver uses an ACK with the encoded Bitmap to ask
the retransmission of the missing fragments and expect to receive
SCHC fragments with the actual window. While waiting the
retransmission an All-0 empty fragment is received, the receiver
sends again the ACK with the encoded Bitmap, if the SCHC fragments
received belongs to another window or an All-1 fragment is received,
the transmission is aborted by sending a Receiver-Abort fragment.
Once it has received all the missing fragments it waits for the next
window fragments.
7.6. Supporting multiple window sizes
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 may be used for packets that need to be carried by large window size SHOULD be used for packets that need to be carried
a large number of fragments. However, when the number of fragments by a large number of SCHC fragments. However, when the number of
required to carry a packet is low, a smaller window size, and thus a SCHC fragments required to carry a packet is low, a smaller window
shorter Bitmap, may be sufficient to provide feedback on all size, and thus a shorter Bitmap, MAY be sufficient to provide
fragments. If multiple window sizes are supported, the Rule ID may feedback on all SCHC fragments. If multiple window sizes are
be used to signal the window size in use for a specific packet supported, the Rule ID MAY be used to signal the window size in use
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 fragments that belong to a packet. all SCHC fragments that belong to the same SCHC packet.
5.7. Downlink 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 for transmission. In order to avoid potentially high delay in the
fragmented datagram transmission in the downlink, the fragment downlink transmission of a SCHC fragmented datagram, the SCHC
receiver MAY perform an uplink transmission as soon as possible after fragment receiver MAY perform an uplink transmission as soon as
reception of a fragment that is not the last one. Such uplink possible after reception of a SCHC fragment that is not the last one.
transmission may be triggered by the L2 (e.g. an L2 ACK sent in Such uplink transmission MAY be triggered by the L2 (e.g. an L2 ACK
response to a fragment encapsulated in a L2 frame that requires an L2 sent in response to a SCHC fragment encapsulated in a L2 frame that
ACK) or it may be triggered from an upper layer. requires an L2 ACK) or it MAY be triggered from an upper layer.
For fragmented packet transmission in the downlink, and when ACK For downlink transmission of a SCHC fragmented packet in ACK-Always
Always is used, the fragment receiver MAY support timer-based ACK mode, the SCHC fragment receiver MAY support timer-based
retransmission. In this mechanism, the fragment receiver initializes ACKretransmission. In this mechanism, the SCHC fragment receiver
and starts a timer (the Inactivity Timer is used) after the initializes and starts a timer (the Inactivity Timer is used) after
transmission of an ACK, except when the ACK is sent in response to the transmission of an ACK, except when the ACK is sent in response
the last fragment of a packet (All-1 fragment). In the latter case, to the last SCHC fragment of a packet (All-1 fragment). In the
the fragment receiver does not start a timer after transmission of latter case, the SCHC fragment receiver does not start a timer after
the ACK. transmission of the ACK.
If, after transmission of an ACK that is not an All-1 fragment, and If, after transmission of an ACK that is not an All-1 fragment, and
before expiration of the corresponding Inactivity timer, the fragment before expiration of the corresponding Inactivity timer, the SCHC
receiver receives a fragment that belongs to the current window (e.g. fragment receiver receives a SCHC fragment that belongs to the
a missing fragment from the current window) or to the next window, current window (e.g. a missing SCHC fragment from the current window)
the Inactivity timer for the ACK is stopped. However, if the or to the next window, the Inactivity timer for the ACK is stopped.
Inactivity timer expires, the ACK is resent and the Inactivity timer However, if the Inactivity timer expires, the ACK is resent and the
is reinitialized and restarted. 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 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) fragment to be retransmitted can find an opportunity for (buffered) SCHC fragment to be retransmitted can find an opportunity
that transmission. for that transmission.
When the fragment sender transmits the All-1 fragment, it initializes
and starts its retransmission timer to a long value (e.g. several
times the initial Inactivity timer). If an ACK is received before
expiration of this timer, the fragment sender retransmits any lost
fragments reported by the ACK, or if the ACK confirms successful
reception of all fragments of the last window, transmission of the
fragmented packet ends. If the timer expires, and no ACK has been
received since the start of the timer, the fragment sender assumes
that the All-1 fragment has been successfully received (and possibly,
the last ACK has been lost: this mechanism assumes that the
retransmission timer for the All-1 fragment is long enough to allow
several ACK retries if the All-1 fragment has not been received by
the fragment receiver, and it also assumes that it is unlikely that
several ACKs become all lost).
6. Padding management When the SCHC fragment sender transmits the All-1 fragment, it starts
its Retransmission Timer with a large timeout value (e.g. several
times that of the initial Inactivity timer). If an ACK is received
before expiration of this timer, the SCHC fragment sender retransmits
any lost SCHC fragments reported by the ACK, or if the ACK confirms
successful reception of all SCHC fragments of the last window, the
transmission of the SCHC fragmented packet is considered complete.
If the timer expires, and no ACK has been received since the start of
the timer, the SCHC fragment sender assumes that the All-1 fragment
has been successfully received (and possibly, the last ACK has been
lost: this mechanism assumes that the retransmission timer for the
All-1 fragment is long enough to allow several ACK retries if the
All-1 fragment has not been received by the SCHC fragment receiver,
and it also assumes that it is unlikely that several ACKs become all
lost).
SCHC header, either for compression, fragmentation or acknowledgment 8. Padding management
does not preserve byte alignment. Since most of the LPWAN network
technologies payload is expressed in an integer number of bytes; the
sender will introduce at the end some padding bits while the receiver
must be able to eliminate them.
The algorithm for padding bit elimination for compressed or Default padding is defined for L2 frame with a variable length of
fragmented frames is simple. Based on the following principle: * The bytes. Padding is done twice, after compression and in the all-1
SCHC header is not aligned on a byte boundary, but its size in bits fragmentation.
is given by the rule.
o The data size is variable, but always a multiple of 8 bits. In compression, the rule and the compression residues are not aligned
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
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
bits, the receiver can without ambiguity remove the padding bits
which never excide 7 bits.
o Padding bits MUST never exceed 7 bits. SCHC fragmentation works on a byte aligned (i.e. padded SCHC packet).
Fragmentation header may not be aligned on byte boundary, but each
fragment except the last one (All-1 fragment) must sent the maximum
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
multiple of 8 bits, the receiver can remove the extra bit to reach
this limit.
In that case, a receiver after decoding the SCHC header, must take Default padding mechanism do not need to send the padding length and
the maximum multiple of 8 bits as data. The remaining bits are can lead to a maximum of 14 bits of padding.
padding bits.
7. 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.
7.1. IPv6 version field 9.1. IPv6 version field
This field always holds the same value. Therefore, the TV is 6, the This field always holds the same value. Therefore, in the rule, TV
MO is "equal" and the "CDA "not-sent". is set to 6, MO to "equal" and CDA to "not-sent".
7.2. IPv6 Traffic class field 9.2. IPv6 Traffic class field
If the DiffServ field identified by the rest of the rule does not If the DiffServ field does not vary and is known by both sides, the
vary and is known by both sides, the TV should contain this well- Field Descriptor in the rule SHOULD contain a TV with this well-known
known value, the MO should be "equal" and the CDA must be "not-sent. value, an "equal" MO and a "not-sent" CDA.
If the DiffServ field identified by the rest of the rule varies over Otherwise, two possibilities can be considered depending on the
time or is not known by both sides, then there are two possibilities variability of the value:
depending on the variability of the value: The first one is to do not
compressed the field and sends the original value. In the second,
where the values can be computed by sending only the LSB bits:
o TV is not set to any value, MO is set to "ignore" and CDA is set o One possibility is to not compress the field and send the original
to "value-sent" value. In the rule, TV is not set to any particular value, MO is
set to "ignore" and CDA is set to "value-sent".
o TV contains a stable value, MO is MSB(X) and CDA is set to LSB o If some upper bits in the field are constant and known, a better
option is to only send the LSBs. In the rule, TV is set to a
value with the stable known upper part, MO is set to MSB(x) and
CDA to LSB(y).
7.3. Flow label field 9.3. Flow label field
If the Flow Label field identified by the rest of the rule does not If the Flow Label field does not vary and is known by both sides, the
vary and is known by both sides, the TV should contain this well- Field Descriptor in the rule SHOULD contain a TV with this well-known
known value, the MO should be "equal" and the CDA should be "not- value, an "equal" MO and a "not-sent" CDA.
sent".
If the Flow Label field identified by the rest of the rule varies Otherwise, two possibilities can be considered:
during time or is not known by both sides, there are two
possibilities depending on the variability of the value: The first
one is without compression and then the value is sent. In the
second, only part of the value is sent and the decompressor needs to
compute the original value:
o TV is not set, MO is set to "ignore" and CDA is set to "value- o One possibility is to not compress the field and send the original
sent" value. In the rule, TV is not set to any particular value, MO is
set to "ignore" and CDA is set to "value-sent".
o TV contains a stable value, MO is MSB(X) and CDA is set to LSB o If some upper bits in the field are constant and known, a better
option is to only send the LSBs. In the rule, TV is set to a
value with the stable known upper part, MO is set to MSB(x) and
CDA to LSB(y).
7.4. Payload Length field 9.4. Payload Length field
If the LPWAN technology does not add padding, this field can be This field can be elided for the transmission on the LPWAN network.
elided for the transmission on the LPWAN network. The SCHC C/D The SCHC C/D recomputes the original payload length value. In the
recomputes the original payload length value. The TV is not set, the Field Descriptor, TV is not set, MO is set to "ignore" and CDA is
MO is set to "ignore" and the CDA is "compute-IPv6-length". "compute-IPv6-length".
If the payload length needs to be sent and does not need to be coded If the payload length needs to be sent and does not need to be coded
in 16 bits, the TV can be set to 0x0000, the MO set to "MSB (16-s)" in 16 bits, the TV can be set to 0x0000, the MO set to MSB(16-s)
and the CDA to "LSB". The 's' parameter depends on the expected where 's' is the number of bits to code the maximum length, and CDA
maximum packet length. is set to LSB(s).
In other cases, the payload length field must be sent and the CDA is
replaced by "value-sent".
7.5. Next Header field 9.5. Next Header field
If the Next Header field identified by the rest of the rule does not If the Next Header field does not vary and is known by both sides,
vary and is known by both sides, the TV should contain this Next the Field Descriptor in the rule SHOULD contain a TV with this Next
Header value, the MO should be "equal" and the CDA should be "not- Header value, the MO SHOULD be "equal" and the CDA SHOULD be "not-
sent". sent".
If the Next Header field identified by the rest of the rule varies Otherwise, TV is not set in the Field Descriptor, MO is set to
during time or is not known by both sides, then TV is not set, MO is "ignore" and CDA is set to "value-sent". Alternatively, a matching-
set to "ignore" and CDA is set to "value-sent". A matching-list may list MAY also be used.
also be used.
7.6. Hop Limit field 9.6. Hop Limit field
The End System is generally a device and does not forward packets. The field behavior for this field is different for Uplink and
Therefore, the Hop Limit value is constant. So, the TV is set with a Downlink. In Uplink, since there is no IP forwarding between the Dev
default value, the MO is set to "equal" and the CDA is set to "not- and the SCHC C/D, the value is relatively constant. On the other
sent". hand, the Downlink value depends of Internet routing and MAY change
more frequently. One neat way of processing this field is to use the
Direction Indicator (DI) to distinguish both directions:
Otherwise the value is sent on the LPWAN: TV is not set, MO is set to o in the Uplink, elide the field: the TV in the Field Descriptor is
ignore and CDA is set to "value-sent". set to the known constant value, the MO is set to "equal" and the
CDA is set to "not-sent".
Note that the field behavior differs in upstream and downstream. In o in the Downlink, send the value: TV is not set, MO is set to
upstream, since there is no IP forwarding between the Dev and the "ignore" and CDA is set to "value-sent".
SCHC C/D, the value is relatively constant. On the other hand, the
downstream value depends of Internet routing and may change more
frequently. One solution could be to use the Direction Indicator
(DI) to distinguish both directions to elide the field in the
upstream direction and send the value in the downstream direction.
7.7. IPv6 addresses fields 9.7. IPv6 addresses fields
As in 6LoWPAN [RFC4944], IPv6 addresses are splitted into two 64-bit As in 6LoWPAN [RFC4944], IPv6 addresses are split into two 64-bit
long fields; one for the prefix and one for the Interface Identifier long fields; one for the prefix and one for the Interface Identifier
(IID). These fields should be compressed. To allow a single rule, (IID). These fields SHOULD be compressed. To allow for a single
these values are identified by their role (DEV or APP) and not by rule being used for both directions, these values are identified by
their position in the frame (source or destination). The SCHC C/D their role (DEV or APP) and not by their position in the frame
must be aware of the traffic direction (upstream, downstream) to (source or destination).
select the appropriate field.
7.7.1. IPv6 source and destination prefixes 9.7.1. IPv6 source and destination prefixes
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".
In case the rule allows several prefixes, mapping-list must be used. If the rule is intended to compress packets with different prefix
The different prefixes are listed in the TV associated with a short values, match-mapping SHOULD be used. The different prefixes are
ID. The MO is set to "match-mapping" and the CDA is set to "mapping- listed in the TV, the MO is set to "match-mapping" and the CDA is set
sent". to "mapping-sent". See Figure 25
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".
7.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 is set to "DEViid" or "APPiid". Note that the LPWAN technology
generally carrying a single device identifier corresponding to the generally carries a single identifier corresponding to the DEV.
DEV. The SCHC C/D may also not be aware of these values. Therefore Appiid cannot be used.
If the DEV address has a static value that is not derived from an For privacy reasons or if the DEV address is changing over time, a
IEEE EUI-64, then TV contains the actual Dev address value, the MO static value that is not equal to the DEV address SHOULD be used. In
operator is set to "equal" and the CDA is set to "not-sent". that case, the TV contains the static value, the MO operator is set
to "equal" and the CDF is set to "not-sent". [RFC7217] provides some
methods that MAY be used to derive this static identifier.
If several IIDs are possible, then the TV contains the list of If several IIDs are possible, then the TV contains the list of
possible IIDs, the MO is set to "match-mapping" and the CDA is set to possible IIDs, the MO is set to "match-mapping" and the CDA is set to
"mapping-sent". "mapping-sent".
Otherwise the value variation of the IID may be reduced to few bytes. It MAY also happen that the IID variability only expresses itself on
In that case, the TV is set to the stable part of the IID, the MO is a few bytes. In that case, the TV is set to the stable part of the
set to "MSB" and the CDA is set to "LSB". IID, the MO is set to "MSB" and the CDA is set to "LSB".
Finally, the IID can be sent on the LPWAN. In that case, the TV is Finally, the IID can be sent in extenso on the LPWAN. In that case,
not set, the MO is set to "ignore" and the CDA is set to "value- the TV is not set, the MO is set to "ignore" and the CDA is set to
sent". "value-sent".
7.8. IPv6 extensions 9.8. IPv6 extensions
No extension rules are currently defined. They can be based on the No rule is currently defined that processes IPv6 extensions. If such
MOs and CDAs described above. extensions are needed, their compression/decompression rules can be
based on the MOs and CDAs described above.
7.9. UDP source and destination port 9.9. UDP source and destination port
To allow a single rule, the UDP port values are identified by their To allow for a single rule being used for both directions, the UDP
role (DEV or APP) and not by their position in the frame (source or port values are identified by their role (DEV or APP) and not by
destination). The SCHC C/D must be aware of the traffic direction their position in the frame (source or destination). The SCHC C/D
(upstream, downstream) to select the appropriate field. The MUST be aware of the traffic direction (Uplink, Downlink) to select
following rules apply for DEV and APP port numbers. the appropriate field. The following rules apply for DEV and APP
port numbers.
If both ends know the port number, it can be elided. The TV contains If both ends know the port number, it can be elided. The TV contains
the port number, the MO is set to "equal" and the CDA is set to "not- the port number, the MO is set to "equal" and the CDA is set to "not-
sent". sent".
If the port variation is on few bits, the TV contains the stable part If the port variation is on few bits, the TV contains the stable part
of the port number, the MO is set to "MSB" and the CDA is set to of the port number, the MO is set to "MSB" and the CDA is set to
"LSB". "LSB".
If some well-known values are used, the TV can contain the list of If some well-known values are used, the TV can contain the list of
these values, the MO is set to "match-mapping" and the CDA is set to these values, the MO is set to "match-mapping" and the CDA is set to
"mapping-sent". "mapping-sent".
Otherwise the port numbers are sent on the LPWAN. The TV is not set, Otherwise the port numbers are sent over the LPWAN. The TV is not
the MO is set to "ignore" and the CDA is set to "value-sent". set, the MO is set to "ignore" and the CDA is set to "value-sent".
7.10. UDP length field 9.10. UDP length field
If the LPWAN technology does not introduce padding, the UDP length The UDP length can be computed from the received data. In that case,
can be computed from the received data. In that case, the TV is not the TV is not set, the MO is set to "ignore" and the CDA is set to
set, the MO is set to "ignore" and the CDA is set to "compute-UDP- "compute-length".
length".
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".
On other cases, the length must 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".
7.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 fragmentation process (see over the L2 (such as in the LPWAN SCHC fragmentation process (see
Section 5)), 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-UDP-checksum". to "compute-checksum".
In other cases, the checksum must be explicitly sent. The TV is not In other cases, the checksum SHOULD be explicitly sent. The TV is
set, the MO is set to "ignore" and the CDF is set to "value-sent". not set, the MO is set to "ignore" and the CDF is set to "value-
sent".
8. Security considerations 10. Security considerations
8.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 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. Denial of Service may be produced but its integrity mechanisms. Header Compression does not add more security
arise other security problems that may be solved with or without problem than what is already needed in a transmission. For instance,
header compression. to avoid an attack, never re-construct a packet bigger than some
configured size (with 1500 bytes as generic default).
8.2. Security considerations for fragmentation 10.2. Security considerations for SCHC fragmentation
This subsection describes potential attacks to LPWAN fragmentation This subsection describes potential attacks to LPWAN SCHC
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
fragment to a target. Then, the receiver will reserve buffer space SCHC fragment to a target. Then, the receiver will reserve buffer
for the IPv6 packet. Other incoming fragmented packets will be space for the IPv6 packet. Other incoming SCHC fragmented packets
dropped while the reassembly buffer is occupied during the reassembly will be dropped while the reassembly buffer is occupied during the
timeout. Once that timeout expires, the attacker can repeat the same reassembly timeout. Once that timeout expires, the attacker can
procedure, and iterate, thus creating a denial of service attack. repeat the same procedure, and iterate, thus creating a denial of
The (low) cost to mount this attack is linear with the number of service attack. The (low) cost to mount this attack is linear with
buffers at the target node. However, the cost for an attacker can be the number of buffers at the target node. However, the cost for an
increased if individual fragments of multiple packets can be stored attacker can be increased if individual SCHC fragments of multiple
in the reassembly buffer. To further increase the attack cost, the packets can be stored in the reassembly buffer. To further increase
reassembly buffer can be splitted into fragment-sized buffer slots. the attack cost, the reassembly buffer can be splitted into SCHC
Once a packet is complete, it is processed normally. If buffer fragment-sized buffer slots. Once a packet is complete, it is
overload occurs, a receiver can discard packets based on the sender processed normally. If buffer overload occurs, a receiver can
behavior, which may help identify which fragments have been sent by discard packets based on the sender behavior, which MAY help identify
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 fragment, it overhearing capabilities. If an attacker can overhear a SCHC
can send a spoofed duplicate (e.g. with random payload) to the fragment, it can send a spoofed duplicate (e.g. with random payload)
destination. If the LPWAN technology does not support suitable to the destination. If the LPWAN technology does not support
protection (e.g. source authentication and frame counters to prevent suitable protection (e.g. source authentication and frame counters to
replay attacks), a receiver cannot distinguish legitimate from prevent replay attacks), a receiver cannot distinguish legitimate
spoofed fragments. Therefore, the original IPv6 packet will be from spoofed SCHC fragments. Therefore, the original IPv6 packet
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 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 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 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 fragment In Window mode - ACK on error, a malicious node MAY force a SCHC
sender to resend a fragment a number of times, with the aim to fragment sender to resend a SCHC fragment a number of times, with the
increase consumption of the fragment sender's resources. To this aim to increase consumption of the SCHC fragment sender's resources.
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
fragment sender, with a Bitmap that reports that one or more SCHC fragment sender, with a Bitmap that reports that one or more
fragments have been lost. In order to mitigate this possible attack, SCHC fragments have been lost. In order to mitigate this possible
MAX_FRAG_RETRIES may be set to a safe value which allows to limit the attack, MAX_ACK_RETRIES MAY be set to a safe value which allows to
maximum damage of the attack to an acceptable extent. However, note limit the maximum damage of the attack to an acceptable extent.
that a high setting for MAX_FRAG_RETRIES benefits fragment delivery However, note that a high setting for MAX_ACK_RETRIES benefits SCHC
reliability, therefore the trade-off needs to be carefully fragment reliability modes, therefore the trade-off needs to be
considered. carefully considered.
9. Acknowledgements 11. Acknowledgements
Thanks to Dominique Barthel, Carsten Bormann, Philippe Clavier, Thanks to Dominique Barthel, Carsten Bormann, Philippe Clavier,
Eduardo Ingles Sanchez, Arunprabhu Kandasamy, Sergio Lopez Bernal, Eduardo Ingles Sanchez, Arunprabhu Kandasamy, Rahul Jadhav, Sergio
Antony Markovski, Alexander Pelov, Pascal Thubert, Juan Carlos Zuniga Lopez Bernal, Antony Markovski, Alexander Pelov, Pascal Thubert, Juan
and Diego Dujovne for useful design consideration and comments. Carlos Zuniga, Diego Dujovne, Edgar Ramos, and Shoichi Sakane for
useful design consideration and comments.
10. References 12. References
10.1. Normative References 12.1. Normative References
[RFC2460] Deering, S. and R. Hinden, "Internet Protocol, Version 6 [RFC2460] Deering, S. and R. Hinden, "Internet Protocol, Version 6
(IPv6) Specification", RFC 2460, DOI 10.17487/RFC2460, (IPv6) Specification", RFC 2460, DOI 10.17487/RFC2460,
December 1998, <https://www.rfc-editor.org/info/rfc2460>. December 1998, <https://www.rfc-editor.org/info/rfc2460>.
[RFC3385] Sheinwald, D., Satran, J., Thaler, P., and V. Cavanna,
"Internet Protocol Small Computer System Interface (iSCSI)
Cyclic Redundancy Check (CRC)/Checksum Considerations",
RFC 3385, DOI 10.17487/RFC3385, September 2002,
<https://www.rfc-editor.org/info/rfc3385>.
[RFC4944] Montenegro, G., Kushalnagar, N., Hui, J., and D. Culler, [RFC4944] Montenegro, G., Kushalnagar, N., Hui, J., and D. Culler,
"Transmission of IPv6 Packets over IEEE 802.15.4 "Transmission of IPv6 Packets over IEEE 802.15.4
Networks", RFC 4944, DOI 10.17487/RFC4944, September 2007, Networks", RFC 4944, DOI 10.17487/RFC4944, September 2007,
<https://www.rfc-editor.org/info/rfc4944>. <https://www.rfc-editor.org/info/rfc4944>.
[RFC5795] Sandlund, K., Pelletier, G., and L-E. Jonsson, "The RObust [RFC5795] Sandlund, K., Pelletier, G., and L-E. Jonsson, "The RObust
Header Compression (ROHC) Framework", RFC 5795, Header Compression (ROHC) Framework", RFC 5795,
DOI 10.17487/RFC5795, March 2010, DOI 10.17487/RFC5795, March 2010,
<https://www.rfc-editor.org/info/rfc5795>. <https://www.rfc-editor.org/info/rfc5795>.
[RFC7136] Carpenter, B. and S. Jiang, "Significance of IPv6 [RFC7136] Carpenter, B. and S. Jiang, "Significance of IPv6
Interface Identifiers", RFC 7136, DOI 10.17487/RFC7136, Interface Identifiers", RFC 7136, DOI 10.17487/RFC7136,
February 2014, <https://www.rfc-editor.org/info/rfc7136>. February 2014, <https://www.rfc-editor.org/info/rfc7136>.
10.2. Informative References [RFC7217] Gont, F., "A Method for Generating Semantically Opaque
Interface Identifiers with IPv6 Stateless Address
Autoconfiguration (SLAAC)", RFC 7217,
DOI 10.17487/RFC7217, April 2014,
<https://www.rfc-editor.org/info/rfc7217>.
12.2. Informative References
[I-D.ietf-lpwan-overview] [I-D.ietf-lpwan-overview]
Farrell, S., "LPWAN Overview", draft-ietf-lpwan- Farrell, S., "LPWAN Overview", draft-ietf-lpwan-
overview-07 (work in progress), October 2017. overview-10 (work in progress), February 2018.
Appendix A. SCHC Compression Examples Appendix A. SCHC Compression Examples
This section gives some scenarios of the compression mechanism for This section gives some scenarios of the compression mechanism for
IPv6/UDP. The goal is to illustrate the SCHC behavior. IPv6/UDP. The goal is to illustrate the behavior of SCHC.
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 22 presents the protocol stack for this Device. IPv6 and UDP Figure 24 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 22: Simplified Protocol Stack for LP-WAN Figure 24: 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 define Therefore, when such technologies are used, it is necessary to
statically 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]|
+----------------+--+--+--+---------+---------------------++------+ +----------------+--+--+--+---------+---------------------++------+
|IPv6 version |4 |1 |Bi|6 | equal | not-sent || | |IPv6 version |4 |1 |Bi|6 | equal | not-sent || |
|IPv6 DiffServ |8 |1 |Bi|0 | equal | not-sent || | |IPv6 DiffServ |8 |1 |Bi|0 | equal | not-sent || |
|IPv6 Flow Label |20|1 |Bi|0 | equal | not-sent || | |IPv6 Flow Label |20|1 |Bi|0 | equal | not-sent || |
|IPv6 Length |16|1 |Bi| | ignore | comp-length|| | |IPv6 Length |16|1 |Bi| | ignore | comp-length|| |
skipping to change at page 41, line 29 skipping to change at page 46, line 29
|UDP DEVport |16|1 |Bi|5683 | equal | not-sent || | |UDP DEVport |16|1 |Bi|5683 | equal | not-sent || |
|UDP APPport |16|1 |Bi|5683 | equal | not-sent || | |UDP APPport |16|1 |Bi|5683 | equal | not-sent || |
|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 || |
+================+==+==+==+=========+========+============++======+ +================+==+==+==+=========+========+============++======+
Rule 2 Rule 2
+----------------+--+--+--+---------+--------+------------++------+ +----------------+--+--+--+---------+--------+------------++------+
| Field |FL|FP|DI| Value | Match | Action || Sent | | Field |FL|FP|DI| Value | Match | Action || Sent |
| | | | | | Opera. | Action ||[bits]| | | | | | | Opera. | Action ||[bits]|
+----------------+--+--+--+---------+--------+-------------++------+ +----------------+--+--+--+---------+--------+------------++------+
|IPv6 version |4 |1 |Bi|6 | equal | not-sent || | |IPv6 version |4 |1 |Bi|6 | equal | not-sent || |
|IPv6 DiffServ |8 |1 |Bi|0 | equal | not-sent || | |IPv6 DiffServ |8 |1 |Bi|0 | equal | not-sent || |
|IPv6 Flow Label |20|1 |Bi|0 | equal | not-sent || | |IPv6 Flow Label |20|1 |Bi|0 | equal | not-sent || |
|IPv6 Length |16|1 |Bi| | ignore | comp-length|| | |IPv6 Length |16|1 |Bi| | ignore | comp-length|| |
|IPv6 Next Header|8 |1 |Bi|17 | equal | not-sent || | |IPv6 Next Header|8 |1 |Bi|17 | equal | not-sent || |
|IPv6 Hop Limit |8 |1 |Up|255 | ignore | not-sent || | |IPv6 Hop Limit |8 |1 |Up|255 | ignore | not-sent || |
|IPv6 Hop Limit |8 |1 |Dw| | ignore | value-sent || [8] | |IPv6 Hop Limit |8 |1 |Dw| | ignore | value-sent || [8] |
|IPv6 DEVprefix |64|1 |Bi|alpha/64 | equal | not-sent || | |IPv6 DEVprefix |64|1 |Bi|alpha/64 | equal | not-sent || |
|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 23: Context rules Figure 25: Context rules
All the fields described in the three rules depicted on Figure 23 are All the fields described in the three rules depicted on Figure 25 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 of different fragment delivery This section provides examples for the different fragment reliability
reliability options possible on the basis of this specification. modes specified in this document.
Figure 24 illustrates the transmission of an IPv6 packet that needs Figure 26 illustrates the transmission in No-ACK mode of an IPv6
11 fragments in the No ACK option. Where FCN is always 1 bit. 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 checked => |-----FCN=1 + MIC --->|MIC checked: success =>
Figure 24: Transmission of an IPv6 packet carried by 11 fragments in Figure 26: Transmission in No-ACK mode of an IPv6 packet carried by
the No ACK option 11 fragments
Figure 25 illustrates the transmission of an IPv6 packet that needs In the following examples, N (i.e. the size if the FCN field) is 3
11 fragments in ACK-on-error, for N=3, without losses. bits. Therefore, the All-1 FCN value is 7.
Figure 27 illustrates the transmission in ACK-on-Error of an IPv6
packet that needs 11 fragments, with MAX_WIND_FCN=6 and no fragment
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 checked => |--W=1, FCN=7 + MIC-->|MIC checked: success =>
|<---- ACK, W=1 ------| |<---- ACK, W=1 ------|
Figure 25: Transmission of an IPv6 packet carried by 11 fragments in Figure 27: Transmission in ACK-on-Error mode of an IPv6 packet
ACK-on-error, for N=3 and MAX_WIND_FCN=6, without losses. carried by 11 fragments, with MAX_WIND_FCN=6 and no loss.
Figure 26 illustrates the transmission of an IPv6 packet that needs Figure 28 illustrates the transmission in ACK-on-Error mode of an
11 fragments ACK-on-error, for N=3, with three losses. IPv6 packet that needs 11 fragments, with MAX_WIND_FCN=6 and three
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----->| /
|-----W=0, FCN=0----->| 6543210 |-----W=0, FCN=0----->| 6543210
|<-----ACK, W=0-------|Bitmap:1101011 |<-----ACK, W=0-------|Bitmap:1101011
|-----W=0, FCN=4----->| |-----W=0, FCN=4----->|
|-----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 checked |- 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 => |-----W=1, FCN=4----->|MIC checked: success =>
|<---- ACK, W=1 ------| |<---- ACK, W=1 ------|C=1, no Bitmap
Figure 26: Transmission of an IPv6 packet carried by 11 fragments in Figure 28: Transmission in ACK-on-Error mode of an IPv6 packet
ACK-on-error, for N=3 and MAX_WIND_FCN=6, three losses. carried by 11 fragments, with MAX_WIND_FCN=6 and three lost
fragments.
Figure 27 illustrates the transmission of an IPv6 packet that needs Figure 29 illustrates the transmission in ACK-Always mode of an IPv6
11 fragments in ACK-Always, for N=3 and MAX_WIND_FCN=6, without packet that needs 11 fragments, with MAX_WIND_FCN=6 and no loss.
losses. Note: in Window mode, an additional bit will be needed to
number windows.
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 checked => |--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 27: Transmission of an IPv6 packet carried by 11 fragments in Figure 29: Transmission in ACK-Always mode of an IPv6 packet carried
ACK-Always, for N=3 and MAX_WIND_FCN=6, no losses. by 11 fragments, with MAX_WIND_FCN=6 and no lost fragment.
Figure 28 illustrates the transmission of an IPv6 packet that needs Figure 30 illustrates the transmission in ACK-Always mode of an IPv6
11 fragments in ACK-Always, for N=3 and MAX_WIND_FCN=6, with three packet that needs 11 fragments, with MAX_WIND_FCN=6 and three lost
losses. 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----->| /
|-----W=1, FCN=0----->| 6543210 |-----W=1, FCN=0----->| 6543210
|<-----ACK, W=1-------|Bitmap:1101011 |<-----ACK, W=1-------|Bitmap:1101011
|-----W=1, FCN=4----->| |-----W=1, FCN=4----->|
|-----W=1, FCN=2----->| |-----W=1, FCN=2----->|
|<-----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 checked |--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 => |-----W=0, FCN=4----->|MIC checked: success =>
|<-----ACK, W=0-------| C= 1 no Bitmap |<-----ACK, W=0-------| C= 1 no Bitmap
(End) (End)
Figure 28: Transmission of an IPv6 packet carried by 11 fragments in Figure 30: Transmission in ACK-Always mode of an IPv6 packet carried
ACK-Always, for N=3, and MAX_WIND_FCN=6, with three losses. by 11 fragments, with MAX_WIND_FCN=6 and three lost fragments.
Figure 29 illustrates the transmission of an IPv6 packet that needs 6 Figure 31 illustrates the transmission in ACK-Always mode of an IPv6
fragments in ACK-Always, for N=3 and MAX_WIND_FCN=6, with three packet that needs 6 fragments, with MAX_WIND_FCN=6, three lost
losses, and only one retry is needed for each lost fragment. Note fragments and only one retry needed to recover each lost fragment.
that, since a single window is needed for transmission of the IPv6
packet in this case, the example illustrates behavior when losses
happen in the last window.
Sender Receiver Sender Receiver
|-----W=0, CFN=6----->| |-----W=0, FCN=6----->|
|-----W=0, CFN=5----->| |-----W=0, FCN=5----->|
|-----W=0, CFN=4--X-->| |-----W=0, FCN=4--X-->|
|-----W=0, CFN=3--X-->| |-----W=0, FCN=3--X-->|
|-----W=0, CFN=2--X-->| |-----W=0, FCN=2--X-->|
|-----W=0, CFN=7----->|MIC checked |--W=0, FCN=7 + MIC-->|MIC checked: failed
|<-----ACK, W=0-------|C= 0 Bitmap:1100001 |<-----ACK, W=0-------|C= 0 Bitmap:1100001
|-----W=0, CFN=4----->|MIC checked: failed |-----W=0, FCN=4----->|MIC checked: failed
|-----W=0, CFN=3----->|MIC checked: failed |-----W=0, FCN=3----->|MIC checked: failed
|-----W=0, CFN=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 29: Transmission of an IPv6 packet carried by 11 fragments in Figure 31: Transmission in ACK-Always mode of an IPv6 packet carried
ACK-Always, for N=3, and MAX_WIND_FCN=6, with three losses, and only by 11 fragments, with MAX_WIND_FCN=6, three lost framents and only
one retry is needed for each lost fragment. one retry needed for each lost fragment.
Figure 30 illustrates the transmission of an IPv6 packet that needs 6 Figure 32 illustrates the transmission in ACK-Always mode of an IPv6
fragments in ACK-Always, for N=3 and MAX_WIND_FCN=6, with three packet that needs 6 fragments, with MAX_WIND_FCN=6, three lost
losses, and the second ACK is lost. Note that, since a single window fragments, and the second ACK lost.
is needed for transmission of the IPv6 packet in this case, the
example illustrates behavior when losses happen in the last window.
Sender Receiver Sender Receiver
|-----W=0, CFN=6----->| |-----W=0, FCN=6----->|
|-----W=0, CFN=5----->| |-----W=0, FCN=5----->|
|-----W=0, CFN=4--X-->| |-----W=0, FCN=4--X-->|
|-----W=0, CFN=3--X-->| |-----W=0, FCN=3--X-->|
|-----W=0, CFN=2--X-->| |-----W=0, FCN=2--X-->|
|-----W=0, CFN=7----->|MIC checked |--W=0, FCN=7 + MIC-->|MIC checked: failed
|<-----ACK, W=0-------|C=0 Bitmap:1100001 |<-----ACK, W=0-------|C=0 Bitmap:1100001
|-----W=0, CFN=4----->|MIC checked: wrong |-----W=0, FCN=4----->|MIC checked: failed
|-----W=0, CFN=3----->|MIC checked: wrong |-----W=0, FCN=3----->|MIC checked: failed
|-----W=0, CFN=2----->|MIC checked: right |-----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, CFN=7----->| |--W=0, FCN=7 + MIC-->|
|<-----ACK, W=0-------|C= 1 no Bitmap |<-----ACK, W=0-------|C= 1 no Bitmap
(End) (End)
Figure 30: Transmission of an IPv6 packet carried by 11 fragments in Figure 32: Transmission in ACK-Always mode of an IPv6 packet carried
ACK-Always, for N=3, and MAX_WIND_FCN=6, with three losses, and the by 11 fragments, with MAX_WIND_FCN=6, three lost fragments, and the
second ACK is lost. second ACK lost.
Figure 31 illustrates the transmission of an IPv6 packet that needs 6 Figure 33 illustrates the transmission in ACK-Always mode of an IPv6
fragments in ACK-Always, for N=3 and MAX_WIND_FCN=6, with three packet that needs 6 fragments, with MAX_WIND_FCN=6, with three lost
losses, and one retransmitted fragment is lost. Note that, since a fragments, and one retransmitted fragment lost again.
single window is needed for transmission of the IPv6 packet in this
case, the example illustrates behavior when losses happen in the last
window.
Sender Receiver Sender Receiver
|-----W=0, CFN=6----->| |-----W=0, FCN=6----->|
|-----W=0, CFN=5----->| |-----W=0, FCN=5----->|
|-----W=0, CFN=4--X-->| |-----W=0, FCN=4--X-->|
|-----W=0, CFN=3--X-->| |-----W=0, FCN=3--X-->|
|-----W=0, CFN=2--X-->| |-----W=0, FCN=2--X-->|
|-----W=0, CFN=7----->|MIC checked |--W=0, FCN=7 + MIC-->|MIC checked: failed
|<-----ACK, W=0-------|C=0 Bitmap:1100001 |<-----ACK, W=0-------|C=0 Bitmap:1100001
|-----W=0, CFN=4----->|MIC checked: wrong |-----W=0, FCN=4----->|MIC checked: failed
|-----W=0, CFN=3----->|MIC checked: wrong |-----W=0, FCN=3----->|MIC checked: failed
|-----W=0, CFN=2--X-->| |-----W=0, FCN=2--X-->|
timeout| | timeout| |
|-----W=0, CFN=7----->|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, CFN=2----->|MIC checked: right |-----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 of an IPv6 packet carried by 11 fragments in Figure 33: Transmission in ACK-Always mode of an IPv6 packet carried
ACK-Always, for N=3, and MAX_WIND_FCN=6, with three losses, and one by 11 fragments, with MAX_WIND_FCN=6, with three lost fragments, and
retransmitted fragment is lost. one retransmitted fragment lost again.
Appendix C illustrates the transmission of an IPv6 packet that needs Figure 34 illustrates the transmission in ACK-Always mode of an IPv6
28 fragments in ACK-Always, for N=5 and MAX_WIND_FCN=23, with two packet that needs 28 fragments, with N=5, MAX_WIND_FCN=23 and two
losses. Note that MAX_WIND_FCN=23 may be useful when the maximum lost fragments. Note that MAX_WIND_FCN=23 may be useful when the
possible Bitmap size, considering the maximum lower layer technology maximum possible Bitmap size, considering the maximum lower layer
payload size and the value of R, is 3 bytes. Note also that the FCN technology payload size and the value of R, is 3 bytes. Note also
of the last fragment of the packet is the one with FCN=31 (i.e. that the FCN of the last fragment of the packet is the one with
FCN=2^N-1 for N=5, or equivalently, all FCN bits set to 1). FCN=31 (i.e. FCN=2^N-1 for N=5, or equivalently, all FCN bits set to
1).
Sender Receiver Sender Receiver
|-----W=0, CFN=23----->| |-----W=0, FCN=23----->|
|-----W=0, CFN=22----->| |-----W=0, FCN=22----->|
|-----W=0, CFN=21--X-->| |-----W=0, FCN=21--X-->|
|-----W=0, CFN=20----->| |-----W=0, FCN=20----->|
|-----W=0, CFN=19----->| |-----W=0, FCN=19----->|
|-----W=0, CFN=18----->| |-----W=0, FCN=18----->|
|-----W=0, CFN=17----->| |-----W=0, FCN=17----->|
|-----W=0, CFN=16----->| |-----W=0, FCN=16----->|
|-----W=0, CFN=15----->| |-----W=0, FCN=15----->|
|-----W=0, CFN=14----->| |-----W=0, FCN=14----->|
|-----W=0, CFN=13----->| |-----W=0, FCN=13----->|
|-----W=0, CFN=12----->| |-----W=0, FCN=12----->|
|-----W=0, CFN=11----->| |-----W=0, FCN=11----->|
|-----W=0, CFN=10--X-->| |-----W=0, FCN=10--X-->|
|-----W=0, CFN=9 ----->| |-----W=0, FCN=9 ----->|
|-----W=0, CFN=8 ----->| |-----W=0, FCN=8 ----->|
|-----W=0, CFN=7 ----->| |-----W=0, FCN=7 ----->|
|-----W=0, CFN=6 ----->| |-----W=0, FCN=6 ----->|
|-----W=0, CFN=5 ----->| |-----W=0, FCN=5 ----->|
|-----W=0, CFN=4 ----->| |-----W=0, FCN=4 ----->|
|-----W=0, CFN=3 ----->| |-----W=0, FCN=3 ----->|
|-----W=0, CFN=2 ----->| |-----W=0, FCN=2 ----->|
|-----W=0, CFN=1 ----->| |-----W=0, FCN=1 ----->|
|-----W=0, CFN=0 ----->| |-----W=0, FCN=0 ----->|
| |lcl-Bitmap:110111111111101111111111 | |lcl-Bitmap:110111111111101111111111
|<------ACK, W=0-------| Bitmap:1101111111111011 |<------ACK, W=0-------|encoded Bitmap:1101111111111011
|-----W=0, CFN=21----->| |-----W=0, FCN=21----->|
|-----W=0, CFN=10----->| |-----W=0, FCN=10----->|
|<------ACK, W=0-------|no Bitmap |<------ACK, W=0-------|no Bitmap
|-----W=1, CFN=23----->| |-----W=1, FCN=23----->|
|-----W=1, CFN=22----->| |-----W=1, FCN=22----->|
|-----W=1, CFN=21----->| |-----W=1, FCN=21----->|
|-----W=1, CFN=31----->|MIC checked => |--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
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 in The fragmentation state machines of the sender and the receiver, one
the different reliability options are next in the following figures: for each of the different reliability modes, are described in the
following figures:
+===========+ +===========+
+------------+ Init | +------------+ Init |
| FCN=0 +===========+ | FCN=0 +===========+
| No Window | No Window
| No Bitmap | No Bitmap
| +-------+ | +-------+
| +========+==+ | More Fragments | +========+==+ | More Fragments
| | | <--+ ~~~~~~~~~~~~~~~~~~~~ | | | <--+ ~~~~~~~~~~~~~~~~~~~~
+--------> | 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 32: Sender State Machine for the No ACK Mode Figure 35: 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 33: Receiver State Machine for the No ACK Mode Figure 36: 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 |
| +==+=====+===+ | +==+===+=====+
| FCN==0 & more frags | | last frag | FCN==0 & more frags | | last frag
| ~~~~~~~~~~~~~~~~~~~~~ | | ~~~~~~~~~~~~~~~ | ~~~~~~~~~~~~~~~~~~~~~ | | ~~~~~~~~~~~~~~~
| set local-Bitmap | | set local-Bitmap | set local-Bitmap | | set local-Bitmap
| send wnd + frag(all-0) | | send wnd+frag(all-1)+MIC | send wnd + frag(all-0) | | send wnd+frag(all-1)+MIC
| set Retrans_Timer | | set Retrans_Timer | set Retrans_Timer | | set Retrans_Timer
| | | | | |
|Recv_wnd == wnd & | | |Recv_wnd == wnd & | |
|Lcl_Bitmap==recv_Bitmap& | | +------------------------+ |Lcl_Bitmap==recv_Bitmap& | | +----------------------+
|more frag | | |local-Bitmap!=rcv-Bitmap| |more frag | | |lcl-Bitmap!=rcv-Bitmap|
|~~~~~~~~~~~~~~~~~~~~~~ | | | ~~~~~~~~~ | |~~~~~~~~~~~~~~~~~~~~~~ | | | ~~~~~~~~~ |
|Stop Retrans_Timer | | | Attemp++ v |Stop Retrans_Timer | | | Attemp++ v
|clear local_Bitmap v v | +======++ |clear local_Bitmap v v | +=====+=+
|window=next_window +====+=====+==+==+ |Resend | |window=next_window +====+===+==+===+ |Resend |
+---------------------+ | |Missing| +---------------------+ | |Missing|
+----+ Wait | |Frag | +----+ Wait | |Frag |
not expected wnd | | Bitmap | +======++ not expected wnd | | Bitmap | +=======+
~~~~~~~~~~~~~~~~ +--->+ +-+Retrans_Timer Exp | ~~~~~~~~~~~~~~~~ +--->+ ++Retrans_Timer Exp |
discard frag +==+=+===+=+===+=+ |~~~~~~~~~~~~~~~~~ | discard frag +==+=+===+=+==+=+| ~~~~~~~~~~~~~~~~~ |
| | | ^ ^ |reSend(empty)All-* | | | | ^ ^ |reSend(empty)All-* |
| | | | | |Set Retrans_Timer | | | | | | |Set Retrans_Timer |
MIC_bit==1 & | | | | +---+Attemp++ | MIC_bit==1 & | | | | +--+Attemp++ |
Recv_window==window & | | | +---------------------------+ Recv_window==window & | | | +-------------------------+
Lcl_Bitmap==recv_Bitmap &| | | all missing frag sent Lcl_Bitmap==recv_Bitmap &| | | all missing frag sent
no more frag| | | ~~~~~~~~~~~~~~~~~~~~~~ no more frag| | | ~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~| | | 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 34: Sender State Machine for the ACK Always Mode Figure 37: 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
| | ~~~~~~~~~~~~~~~~~~ | |~~~~~~~~~~~~~~~~~~~~~ | | ~~~~~~~~~~~~~~~~~~ | |~~~~~~~~~~~~~~~~~~~~~
| | set lcl_Bitmap(FCN)| |expected = next window | | set lcl_Bitmap(FCN)| |expected = next window
| | send local_Bitmap | |Clear local_Bitmap | | send local_Bitmap | |Clear local_Bitmap
| | | | | | | |
| | w=expct & not-All | | | | w=expct & not-All | |
| | ~~~~~~~~~~~~~~~~~~ | | | | ~~~~~~~~~~~~~~~~~~ | |
| | set lcl_Bitmap(FCN)+-+ | | +--+ w=next & All-0 | | set lcl_Bitmap(FCN)+-+ | | +--+ w=next & All-0
| | if lcl_Bitmap full | | | | | | ~~~~~~~~~~~~~~~ | | if lcl_Bitmap full | | | | | | ~~~~~~~~~~~~~~~
| | send lcl_Bitmap | | | | | | expct = nxt wnd | | send lcl_Bitmap | | | | | | expct = nxt wnd
| | v | v v v | | | v | v | | | Clear lcl_Bitmap
| | w=expct & All-1 +=+=+=+==+=++ | Clear lcl_Bitmap | | w=expct & All-1 +=+=+=+==+=++ | set lcl_Bitmap(FCN)
| | ~~~~~~~~~~~ +->+ Wait +<+ set lcl_Bitmap(FCN) | | ~~~~~~~~~~~ +->+ Wait +<+ send lcl_Bitmap
| | discard +--| Next | send lcl_Bitmap | | discard +--| Next |
| | All-0 +---------+ Window +--->* ABORT | | All-0 +---------+ Window +--->* ABORT
| | ~~~~~ +-------->+========+=++ | | ~~~~~ +-------->+========+=++
| | snd lcl_bm All-1 & w=next| | All-1 & w=nxt | | snd lcl_bm All-1 & w=next| | All-1 & w=nxt
| | & MIC wrong| | & MIC right | | & MIC wrong| | & MIC right
| | ~~~~~~~~~~~~~~~~~| | ~~~~~~~~~~~~~~~~~~ | | ~~~~~~~~~~~~~~~~~| | ~~~~~~~~~~~~~~~~~~
| | set local_Bitmap(FCN)| |set lcl_Bitmap(FCN) | | set local_Bitmap(FCN)| |set lcl_Bitmap(FCN)
| | send local_Bitmap| |send local_Bitmap | | send local_Bitmap| |send local_Bitmap
| | | +----------------------+ | | | +----------------------+
| |All-1 & w=expct | | | |All-1 & w=expct | |
| |& MIC wrong v +---+ w=expctd & | | |& MIC wrong v +---+ w=expctd & |
| |~~~~~~~~~~~~~~~~~~~~ +====+=====+ | MIC wrong | | |~~~~~~~~~~~~~~~~~~~~ +====+=====+ | MIC wrong |
| |set local_Bitmap(FCN) | +<+ ~~~~~~~~~~~~~~ | | |set local_Bitmap(FCN) | +<+ ~~~~~~~~~~~~~~ |
| |send local_Bitmap | Wait End | set lcl_btmp(FCN)| | |send local_Bitmap | Wait End | set lcl_btmp(FCN)|
| +--------------------->+ +--->* ABORT | | +--------------------->+ +--->* ABORT |
| +===+====+=+-+ All-1&MIC wrong| | +===+====+=+-+ All-1&MIC wrong|
| | ^ | ~~~~~~~~~~~~~~~| | | ^ | ~~~~~~~~~~~~~~~|
| | +---+ send lcl_btmp | | w=expected & MIC right | +---+ send lcl_btmp |
| w=expected & MIC right| | | | ~~~~~~~~~~~~~~~~~~~~~~ | |
| ~~~~~~~~~~~~~~~~~~~~~~| +-+ Not All-1 | | set local_Bitmap(FCN) | +-+ Not All-1 |
| set local_Bitmap(FCN)| | | ~~~~~~~~~ | | send local_Bitmap | | | ~~~~~~~~~ |
| send local_Bitmap| | | discard | | | | | discard |
| | | | | |All-1 & w=expctd & MIC right | | | |
|All-1 & w=expctd & MIC right | | | +-+ All-1 | |~~~~~~~~~~~~~~~~~~~~~~~~~~~~ v | v +----+All-1 |
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~ v | v | v ~~~~~~~~~ | |set local_Bitmap(FCN) +=+=+=+=+==+ |~~~~~~~~~ |
|set local_Bitmap(FCN) +=+=+=+=+=++Send lcl_btmp | |send local_Bitmap | +<+Send lcl_btmp |
|send local_Bitmap | | | +-------------------------->+ END | |
+-------------------------->+ END +<---------------+ +==========+<---------------+
++==+======+
--->* 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 35: Receiver State Machine for the ACK Always Mode Figure 38: 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 | ++=============+
+> | | +> | |
| SEND | | SEND |
+-------------------------> | | +-------------------------> | |
| ++=====+=======+ | ++=====+=======+
| FCN==0 & more frags| |last frag | FCN==0 & more frags| |last frag
| ~~~~~~~~~~~~~~~~~~~~~~~| |~~~~~~~~~~~~~~~~~~~~~~~~ | ~~~~~~~~~~~~~~~~~~~~~~~| |~~~~~~~~~~~~~~~~~
| set local-Bitmap| |set local-Bitmap | set local-Bitmap| |set local-Bitmap
| send wnd + frag(all-0)| |send wnd+frag(all-1)+MIC | send wnd + frag(all-0)| |send wnd+frag(all-1)+MIC
| set Retrans_Timer| |set Retrans_Timer | set Retrans_Timer| |set Retrans_Timer
| | | | | |
|Retrans_Timer expires & | | local-Bitmap!=rcv-Bitmap |Retrans_Timer expires & | | lcl-Bitmap!=rcv-Bitmap
|more fragments | | +-----------------+ |more fragments | | ~~~~~~~~~~~~~~~~~~~~~~
|~~~~~~~~~~~~~~~~~~~~ | | | ~~~~~~~~~~~~~ | |~~~~~~~~~~~~~~~~~~~~ | | Attemp++
|stop Retrans_Timer | | | Attemp++ | |stop Retrans_Timer | | +-----------------+
|clear local-Bitmap v v | v |clear local-Bitmap v v | v
|window = next window +=====+=====+==+==+ +====+====+ |window = next window +=====+=====+==+==+ +====+====+
+----------------------+ + | Resend | +----------------------+ + | Resend |
+--------------------->+ Wait Bitmap | | Missing | +--------------------->+ Wait Bitmap | | Missing |
| +-- + | | Frag | | +-- + | | Frag |
| not expected wnd | ++=+===+===+===+==+ +======+==+ | not expected wnd | ++=+===+===+===+==+ +======+==+
| ~~~~~~~~~~~~~~~~ | ^ | | | ^ | | ~~~~~~~~~~~~~~~~ | ^ | | | ^ |
| discard frag +----+ | | | +-------------------+ | discard frag +----+ | | | +-------------------+
| | | | all missing frag sent | | | | all missing frag sent
|Retrans_Timer expires & | | | ~~~~~~~~~~~~~~~~~~~~~ |Retrans_Timer expires & | | | ~~~~~~~~~~~~~~~~~~~~~
skipping to change at page 53, line 51 skipping to change at page 58, 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 36: Sender State Machine for the ACK on error Mode Figure 39: 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
| | +===+===+======+ clear lcl_Bitmap | | All-0 empty +->+=+=+===+======+ clear lcl_Bitmap
| | | ^ | | ~~~~~~~~~~~ | | | ^
| | All-0 & w=expect| |w=expct & not-All & full | | send bitmap +----+ | |w=expct & not-All & full
| | & no_full Bitmap| |~~~~~~~~~~~~~~~~~~~~~~~~ | | | |~~~~~~~~~~~~~~~~~~~~~~~~
| | ~~~~~~~~~~~~~~~~~| |clear lcl_Bitmap; w =nxt | | | |set lcl_Bitmap; w =nxt
| | send local_Bitmap| | | | | |
| | | | +========+ | | All-0 & w=expect | | w=next
| | | | +---------->+ | | | & no_full Bitmap | | ~~~~~~~~ +========+
| | | | |w=next | Error/ | | | ~~~~~~~~~~~~~~~~~ | | Send abort| Error/ |
| | | | |~~~~~~~~ | Abort | | | send local_Bitmap | | +---------->+ Abort |
| | | | |Send abort ++=======+ | | | | | +-------->+========+
| | v | | ^ w=expct | | v | | | all-1 ^
| | All-0 +=+===+==+======+ | & all-1 | | All-0 empty +====+===+==+=+=+ ~~~~~~~ |
| | ~~~~~~~~~~~~~<---+ Wait +------+ ~~~~~~~ | | ~~~~~~~~~~~~~ +--+ Wait | Send abort |
| | send lcl_btmp | Next Window | Send abort | | send lcl_btmp +->| Missing Fragm.| |
| | +=======+===+==++ | | +==============++ |
| | All-1 & w=next & MIC wrong | | +---->* ABORT | | +--------------+
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~ | +----------------+ | | Uplink Only &
| | set local_Bitmap(FCN) | All-1 & w=next| | | Inactivity_Timer = expires
| | send local_Bitmap | & MIC right| | | ~~~~~~~~~~~~~~~~~~~~~~~~~~
| | | ~~~~~~~~~~~~~~~~~~| | | Send Abort
| | | set lcl_Bitmap(FCN)| | |All-1 & w=expect & MIC wrong
| |All-1 & w=expect & MIC wrong | | | |~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +-+ All-1
| |~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | +-+ All-1 | | |set local_Bitmap(FCN) | v ~~~~~~~~~~
| |set local_Bitmap(FCN) v | v ~~~~~~~~~~ | | |send local_Bitmap +===========+==+ snd lcl_btmp
| |send local_Bitmap +=======+==+===+ snd lcl_btmp| | +--------------------->+ Wait End +-+
| +--------------------->+ Wait End +-+ | | +=====+=+====+=+ | w=expct &
| +=====+=+===+=+ | w=expct & | | w=expected & MIC right | | ^ | MIC wrong
| w=expected & MIC right | | ^ | MIC wrong | | ~~~~~~~~~~~~~~~~~~~~~~ | | +---+ ~~~~~~~~~
| ~~~~~~~~~~~~~~~~~~~~~~ | | +---+ ~~~~~~~~~ | | set & send local_Bitmap(FCN) | | set lcl_Bitmap(FCN)
| set local_Bitmap(FCN) | | set lcl_Bitmap(FCN)| | | |
| | | | |All-1 & w=expected & MIC right | +-->* ABORT
|All-1 & w=expected & MIC right | +-->* ABORT | |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ v
|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ v | |set & send local_Bitmap(FCN) +=+==========+
|set local_Bitmap(FCN) +=+==========+ | +---------------------------->+ END |
+---------------------------->+ END +<----------+
+============+ +============+
--->* Only Uplink --->* ABORT
ABORT Only Uplink
~~~~~~~~
Inactivity_Timer = expires Inactivity_Timer = expires
~~~~~~~~~~~~~~~~~~~~~~~~~~
Send Abort
Figure 37: Receiver State Machine for the ACK on error Mode Figure 40: Receiver State Machine for the ACK-on-Error Mode
Appendix D. Allocation of Rule IDs for fragmentation
A set of Rule IDs are allocated to support different aspects of
fragmentation functionality as per this document. The allocation of
IDs is to be defined in other documents. The set MAY include:
o one ID or a subset of IDs to identify a fragment as well as its
reliability option and its window size, if multiple of these are
supported.
o one ID to identify the ACK message.
o one ID to identify the Abort message as per Section 9.8.
Appendix E. Note Appendix D. 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. 375 change blocks. 
1457 lines changed or deleted 1677 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/