| < draft-ietf-lpwan-coap-static-context-hc-10.txt | draft-ietf-lpwan-coap-static-context-hc-11.txt > | |||
|---|---|---|---|---|
| lpwan Working Group A. Minaburo | lpwan Working Group A. Minaburo | |||
| Internet-Draft Acklio | Internet-Draft Acklio | |||
| Intended status: Standards Track L. Toutain | Intended status: Standards Track L. Toutain | |||
| Expires: April 10, 2020 Institut MINES TELECOM; IMT Atlantique | Expires: April 11, 2020 Institut MINES TELECOM; IMT Atlantique | |||
| R. Andreasen | R. Andreasen | |||
| Universidad de Buenos Aires | Universidad de Buenos Aires | |||
| October 08, 2019 | October 09, 2019 | |||
| LPWAN Static Context Header Compression (SCHC) for CoAP | LPWAN Static Context Header Compression (SCHC) for CoAP | |||
| draft-ietf-lpwan-coap-static-context-hc-10 | draft-ietf-lpwan-coap-static-context-hc-11 | |||
| Abstract | Abstract | |||
| This draft defines the way SCHC header compression can be applied to | This draft defines the way SCHC header compression can be applied to | |||
| CoAP headers. The CoAP header structure differs from IPv6 and UDP | CoAP headers. The CoAP header structure differs from IPv6 and UDP | |||
| protocols since CoAP uses a flexible header with a variable number of | protocols since CoAP uses a flexible header with a variable number of | |||
| options, themselves of variable length. The CoAP protocol messages | options, themselves of variable length. The CoAP protocol messages | |||
| format is asymmetric: the request messages have a header format | format is asymmetric: the request messages have a header format | |||
| different from the one in the response messages. This document | different from the one in the response messages. This document | |||
| explains how to use the SCHC compression mechanism described in | explains how to use the SCHC compression mechanism for CoAP. | |||
| [I-D.ietf-lpwan-ipv6-static-context-hc] for CoAP. | ||||
| 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 April 10, 2020. | This Internet-Draft will expire on April 11, 2020. | |||
| Copyright Notice | Copyright Notice | |||
| Copyright (c) 2019 IETF Trust and the persons identified as the | Copyright (c) 2019 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 . . . . . . . . . . . . . . . . . . . . . . . . 2 | 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 | |||
| 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3 | ||||
| 2. SCHC Compression Process . . . . . . . . . . . . . . . . . . 3 | 2. SCHC Compression Process . . . . . . . . . . . . . . . . . . 3 | |||
| 3. CoAP Compression with SCHC . . . . . . . . . . . . . . . . . 4 | 3. CoAP Compression with SCHC . . . . . . . . . . . . . . . . . 4 | |||
| 4. Compression of CoAP header fields . . . . . . . . . . . . . . 6 | 4. Compression of CoAP header fields . . . . . . . . . . . . . . 6 | |||
| 4.1. CoAP version field . . . . . . . . . . . . . . . . . . . 6 | 4.1. CoAP version field . . . . . . . . . . . . . . . . . . . 6 | |||
| 4.2. CoAP type field . . . . . . . . . . . . . . . . . . . . . 6 | 4.2. CoAP type field . . . . . . . . . . . . . . . . . . . . . 6 | |||
| 4.3. CoAP code field . . . . . . . . . . . . . . . . . . . . . 6 | 4.3. CoAP code field . . . . . . . . . . . . . . . . . . . . . 6 | |||
| 4.4. CoAP Message ID field . . . . . . . . . . . . . . . . . . 6 | 4.4. CoAP Message ID field . . . . . . . . . . . . . . . . . . 6 | |||
| 4.5. CoAP Token fields . . . . . . . . . . . . . . . . . . . . 7 | 4.5. CoAP Token fields . . . . . . . . . . . . . . . . . . . . 7 | |||
| 5. CoAP options . . . . . . . . . . . . . . . . . . . . . . . . 7 | 5. CoAP options . . . . . . . . . . . . . . . . . . . . . . . . 7 | |||
| 5.1. CoAP Content and Accept options. . . . . . . . . . . . . 7 | 5.1. CoAP Content and Accept options. . . . . . . . . . . . . 7 | |||
| 5.2. CoAP option Max-Age, Uri-Host and Uri-Port fields . . . . 8 | 5.2. CoAP option Max-Age, Uri-Host and Uri-Port fields . . . . 8 | |||
| 5.3. CoAP option Uri-Path and Uri-Query fields . . . . . . . . 8 | 5.3. CoAP option Uri-Path and Uri-Query fields . . . . . . . . 8 | |||
| 5.3.1. Variable length Uri-Path and Uri-Query . . . . . . . 8 | 5.3.1. Variable length Uri-Path and Uri-Query . . . . . . . 9 | |||
| 5.3.2. Variable number of path or query elements . . . . . . 9 | 5.3.2. Variable number of path or query elements . . . . . . 9 | |||
| 5.4. CoAP option Size1, Size2, Proxy-URI and Proxy-Scheme | 5.4. CoAP option Size1, Size2, Proxy-URI and Proxy-Scheme | |||
| fields . . . . . . . . . . . . . . . . . . . . . . . . . 9 | fields . . . . . . . . . . . . . . . . . . . . . . . . . 9 | |||
| 5.5. CoAP option ETag, If-Match, If-None-Match, Location-Path | 5.5. CoAP option ETag, If-Match, If-None-Match, Location-Path | |||
| and Location-Query fields . . . . . . . . . . . . . . . . 9 | and Location-Query fields . . . . . . . . . . . . . . . . 10 | |||
| 6. Other RFCs . . . . . . . . . . . . . . . . . . . . . . . . . 10 | 6. Other RFCs . . . . . . . . . . . . . . . . . . . . . . . . . 10 | |||
| 6.1. Block . . . . . . . . . . . . . . . . . . . . . . . . . . 10 | 6.1. Block . . . . . . . . . . . . . . . . . . . . . . . . . . 10 | |||
| 6.2. Observe . . . . . . . . . . . . . . . . . . . . . . . . . 10 | 6.2. Observe . . . . . . . . . . . . . . . . . . . . . . . . . 10 | |||
| 6.3. No-Response . . . . . . . . . . . . . . . . . . . . . . . 10 | 6.3. No-Response . . . . . . . . . . . . . . . . . . . . . . . 10 | |||
| 6.4. OSCORE . . . . . . . . . . . . . . . . . . . . . . . . . 10 | 6.4. OSCORE . . . . . . . . . . . . . . . . . . . . . . . . . 10 | |||
| 7. Examples of CoAP header compression . . . . . . . . . . . . . 12 | 7. Examples of CoAP header compression . . . . . . . . . . . . . 12 | |||
| 7.1. Mandatory header with CON message . . . . . . . . . . . . 12 | 7.1. Mandatory header with CON message . . . . . . . . . . . . 12 | |||
| 7.2. OSCORE Compression . . . . . . . . . . . . . . . . . . . 13 | 7.2. OSCORE Compression . . . . . . . . . . . . . . . . . . . 13 | |||
| 7.3. Example OSCORE Compression . . . . . . . . . . . . . . . 16 | 7.3. Example OSCORE Compression . . . . . . . . . . . . . . . 16 | |||
| 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 26 | 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 26 | |||
| skipping to change at page 3, line 37 ¶ | skipping to change at page 3, line 37 ¶ | |||
| compression there may be some bits to be sent, these values are | compression there may be some bits to be sent, these values are | |||
| called Compression Residues and are transmitted after the Rule ID in | called Compression Residues and are transmitted after the Rule ID in | |||
| the compressed messages. | the compressed messages. | |||
| The compression rules define a generic way to compress and decompress | The compression rules define a generic way to compress and decompress | |||
| the fields. If the device is modified, for example, to introduce new | the fields. If the device is modified, for example, to introduce new | |||
| functionalities or new CoAP options, the rules must be updated to | functionalities or new CoAP options, the rules must be updated to | |||
| reflect the evolution. There is no risk to lock a device in a | reflect the evolution. There is no risk to lock a device in a | |||
| particular version of CoAP. | particular version of CoAP. | |||
| 1.1. Terminology | ||||
| The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", | ||||
| "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and | ||||
| "OPTIONAL" in this document are to be interpreted as described in BCP | ||||
| 14 [rfc2119][rfc8174] when, and only when, they appear in all | ||||
| capitals, as shown here. | ||||
| 2. SCHC Compression Process | 2. SCHC Compression Process | |||
| The SCHC Compression rules can be applied to CoAP flows. SCHC | The SCHC Compression rules can be applied to CoAP flows. SCHC | |||
| Compression of the CoAP header MAY be done in conjunction with the | Compression of the CoAP header MAY be done in conjunction with the | |||
| lower layers (IPv6/UDP) or independently. The SCHC adaptation layers | lower layers (IPv6/UDP) or independently. The SCHC adaptation layers | |||
| as described in [I-D.ietf-lpwan-ipv6-static-context-hc] may be used | as described in [I-D.ietf-lpwan-ipv6-static-context-hc] may be used | |||
| as shown in Figure 1. | as shown in Figure 1. | |||
| ^ +------------+ ^ +------------+ ^ +------------+ | ^ +------------+ ^ +------------+ ^ +------------+ | |||
| | | CoAP | | | CoAP | inner | | CoAP | | | | CoAP | | | CoAP | inner | | CoAP | | |||
| skipping to change at page 8, line 33 ¶ | skipping to change at page 8, line 33 ¶ | |||
| specific resource and are never found in server responses. | specific resource and are never found in server responses. | |||
| Uri-Path and Uri-Query elements are a repeatable options, the Field | Uri-Path and Uri-Query elements are a repeatable options, the Field | |||
| Position (FP) gives the position in the path. | Position (FP) gives the position in the path. | |||
| A Mapping list can be used to reduce the size of variable Paths or | A Mapping list can be used to reduce the size of variable Paths or | |||
| Queries. In that case, to optimize the compression, several elements | Queries. In that case, to optimize the compression, several elements | |||
| can be regrouped into a single entry. Numbering of elements do not | can be regrouped into a single entry. Numbering of elements do not | |||
| change, MO comparison is set with the first element of the matching. | change, MO comparison is set with the first element of the matching. | |||
| FID FL FP DI TV MO CDA | +-------------+--+--+--+--------+---------+-------------+ | |||
| URI-Path 1 up ["/a/b", equal not-sent | | Field |FL|FP|DI| Target | Match | CDA | | |||
| "/c/d"] | | | | | | Value | Opera. | | | |||
| URI-Path 3 up ignore value-sent | +-------------+--+--+--+--------+---------+-------------+ | |||
| |URI-Path | | 1|up|["/a/b",|equal |not-sent | | ||||
| | | | | |"/c/d"] | | | | ||||
| |URI-Path | | 3|up| |ignore |value-sent | | ||||
| +-------------+--+--+--+--------+---------+-------------+ | ||||
| Figure 2: complex path example | Figure 2: complex path example | |||
| In Figure 2 a single bit residue can be used to code one of the 2 | In Figure 2 a single bit residue can be used to code one of the 2 | |||
| paths. If regrouping were not allowed, a 2 bits residue would be | paths. If regrouping were not allowed, a 2 bits residue would be | |||
| needed. | needed. | |||
| 5.3.1. Variable length Uri-Path and Uri-Query | 5.3.1. Variable length Uri-Path and Uri-Query | |||
| When the length is not known at the rule creation, the Field Length | When the length is not known at the rule creation, the Field Length | |||
| skipping to change at page 9, line 11 ¶ | skipping to change at page 9, line 20 ¶ | |||
| The MSB MO can be applied to a Uri-Path or Uri-Query element. Since | The MSB MO can be applied to a Uri-Path or Uri-Query element. Since | |||
| MSB value is given in bit, the size MUST always be a multiple of 8 | MSB value is given in bit, the size MUST always be a multiple of 8 | |||
| bits. | bits. | |||
| The length sent at the beginning of a variable length residue | The length sent at the beginning of a variable length residue | |||
| indicates the size of the LSB in bytes. | indicates the size of the LSB in bytes. | |||
| For instance for a CORECONF path /c/X6?k="eth0" the rule can be set | For instance for a CORECONF path /c/X6?k="eth0" the rule can be set | |||
| to: | to: | |||
| FID FL FP DI TV MO CDA | +-------------+---+--+--+--------+---------+-------------+ | |||
| URI-Path 1 up "c" equal not-sent | | Field |FL |FP|DI| Target | Match | CDA | | |||
| URI-Path 2 up ignore value-sent | | | | | | Value | Opera. | | | |||
| URI-Query 1 up "k=" MSB (16) LSB | +-------------+---+--+--+--------+---------+-------------+ | |||
| |URI-Path | 8| 1|up|"c" |equal |not-sent | | ||||
| |URI-Path |var| 2|up| |ignore |value-sent | | ||||
| |URI-Query |var| 1|up|"k=" |MSB(16) |LSB | | ||||
| +-------------+---+--+--+--------+---------+-------------+ | ||||
| Figure 3: CORECONF URI compression | Figure 3: CORECONF URI compression | |||
| Figure 3 shows the parsing and the compression of the URI, where c is | Figure 3 shows the parsing and the compression of the URI, where c is | |||
| not sent. The second element is sent with the length (i.e. 0x2 X 6) | not sent. The second element is sent with the length (i.e. 0x2 X 6) | |||
| followed by the query option (i.e. 0x05 "eth0"). | followed by the query option (i.e. 0x05 "eth0"). | |||
| 5.3.2. Variable number of path or query elements | 5.3.2. Variable number of path or query elements | |||
| The number of Uri-path or Uri-Query elements in a rule is fixed at | The number of Uri-path or Uri-Query elements in a rule is fixed at | |||
| skipping to change at page 26, line 47 ¶ | skipping to change at page 26, line 47 ¶ | |||
| 11. Normative References | 11. Normative References | |||
| [I-D.ietf-lpwan-ipv6-static-context-hc] | [I-D.ietf-lpwan-ipv6-static-context-hc] | |||
| Minaburo, A., Toutain, L., Gomez, C., Barthel, D., and J. | Minaburo, A., Toutain, L., Gomez, C., Barthel, D., and J. | |||
| Zuniga, "Static Context Header Compression (SCHC) and | Zuniga, "Static Context Header Compression (SCHC) and | |||
| fragmentation for LPWAN, application to UDP/IPv6", draft- | fragmentation for LPWAN, application to UDP/IPv6", draft- | |||
| ietf-lpwan-ipv6-static-context-hc-21 (work in progress), | ietf-lpwan-ipv6-static-context-hc-21 (work in progress), | |||
| July 2019. | July 2019. | |||
| [rfc2119] Bradner, S., "Key words for use in RFCs to Indicate | ||||
| Requirement Levels", BCP 14, RFC 2119, | ||||
| DOI 10.17487/RFC2119, March 1997, | ||||
| <https://www.rfc-editor.org/info/rfc2119>. | ||||
| [rfc7252] Shelby, Z., Hartke, K., and C. Bormann, "The Constrained | [rfc7252] Shelby, Z., Hartke, K., and C. Bormann, "The Constrained | |||
| Application Protocol (CoAP)", RFC 7252, | Application Protocol (CoAP)", RFC 7252, | |||
| DOI 10.17487/RFC7252, June 2014, | DOI 10.17487/RFC7252, June 2014, | |||
| <https://www.rfc-editor.org/info/rfc7252>. | <https://www.rfc-editor.org/info/rfc7252>. | |||
| [rfc7641] Hartke, K., "Observing Resources in the Constrained | [rfc7641] Hartke, K., "Observing Resources in the Constrained | |||
| Application Protocol (CoAP)", RFC 7641, | Application Protocol (CoAP)", RFC 7641, | |||
| DOI 10.17487/RFC7641, September 2015, | DOI 10.17487/RFC7641, September 2015, | |||
| <https://www.rfc-editor.org/info/rfc7641>. | <https://www.rfc-editor.org/info/rfc7641>. | |||
| [rfc7959] Bormann, C. and Z. Shelby, Ed., "Block-Wise Transfers in | [rfc7959] Bormann, C. and Z. Shelby, Ed., "Block-Wise Transfers in | |||
| the Constrained Application Protocol (CoAP)", RFC 7959, | the Constrained Application Protocol (CoAP)", RFC 7959, | |||
| DOI 10.17487/RFC7959, August 2016, | DOI 10.17487/RFC7959, August 2016, | |||
| <https://www.rfc-editor.org/info/rfc7959>. | <https://www.rfc-editor.org/info/rfc7959>. | |||
| [rfc7967] Bhattacharyya, A., Bandyopadhyay, S., Pal, A., and T. | [rfc7967] Bhattacharyya, A., Bandyopadhyay, S., Pal, A., and T. | |||
| Bose, "Constrained Application Protocol (CoAP) Option for | Bose, "Constrained Application Protocol (CoAP) Option for | |||
| No Server Response", RFC 7967, DOI 10.17487/RFC7967, | No Server Response", RFC 7967, DOI 10.17487/RFC7967, | |||
| August 2016, <https://www.rfc-editor.org/info/rfc7967>. | August 2016, <https://www.rfc-editor.org/info/rfc7967>. | |||
| [rfc8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC | ||||
| 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, | ||||
| May 2017, <https://www.rfc-editor.org/info/rfc8174>. | ||||
| [rfc8613] Selander, G., Mattsson, J., Palombini, F., and L. Seitz, | [rfc8613] Selander, G., Mattsson, J., Palombini, F., and L. Seitz, | |||
| "Object Security for Constrained RESTful Environments | "Object Security for Constrained RESTful Environments | |||
| (OSCORE)", RFC 8613, DOI 10.17487/RFC8613, July 2019, | (OSCORE)", RFC 8613, DOI 10.17487/RFC8613, July 2019, | |||
| <https://www.rfc-editor.org/info/rfc8613>. | <https://www.rfc-editor.org/info/rfc8613>. | |||
| Authors' Addresses | Authors' Addresses | |||
| Ana Minaburo | Ana Minaburo | |||
| Acklio | Acklio | |||
| 1137A avenue des Champs Blancs | 1137A avenue des Champs Blancs | |||
| End of changes. 13 change blocks. | ||||
| 16 lines changed or deleted | 41 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/ | ||||