idnits 2.17.1 draft-toutain-core-time-scale-00.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The document seems to lack an Introduction section. (A line matching the expected section header was found, but with an unexpected indentation: ' overview-07 (work in progress), October 2017.' ) ** The document seems to lack a Security Considerations section. ** The document seems to lack an IANA Considerations section. (See Section 2.2 of https://www.ietf.org/id-info/checklist for how to handle the case when there are no actions for IANA.) Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (October 26, 2017) is 2345 days in the past. Is this intentional? Checking references for intended status: Informational ---------------------------------------------------------------------------- -- Missing reference section? 'RFC7252' on line 217 looks like a reference -- Missing reference section? 'I-D.ietf-lpwan-overview' on line 213 looks like a reference Summary: 3 errors (**), 0 flaws (~~), 1 warning (==), 3 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group A. Minaburo 3 Internet-Draft Acklio 4 Intended status: Informational L. Toutain 5 Expires: April 29, 2018 Institut Mines Telecom Atlantique 6 October 26, 2017 8 CoAP Time Scale Option 9 draft-toutain-core-time-scale-00 11 Abstract 13 SCHC compression mechanism for LPWAN network enables IPv6 on devices 14 connected to a constrained network (LPWAN). They can communicate 15 with a CoAP server located anywhere in the Internet. LPWAN network 16 characteristics limits the number of exchanges and may impose a long 17 RTT. The CoAP server must be aware of these properties to manage 18 correctly requests. The Time Scale option allows a device to inform 19 a CoAP server of the duration the message ID value should be kept in 20 memory to manage correctly message duplication. 22 Status of This Memo 24 This Internet-Draft is submitted in full conformance with the 25 provisions of BCP 78 and BCP 79. 27 Internet-Drafts are working documents of the Internet Engineering 28 Task Force (IETF). Note that other groups may also distribute 29 working documents as Internet-Drafts. The list of current Internet- 30 Drafts is at https://datatracker.ietf.org/drafts/current/. 32 Internet-Drafts are draft documents valid for a maximum of six months 33 and may be updated, replaced, or obsoleted by other documents at any 34 time. It is inappropriate to use Internet-Drafts as reference 35 material or to cite them other than as "work in progress." 37 This Internet-Draft will expire on April 29, 2018. 39 Copyright Notice 41 Copyright (c) 2017 IETF Trust and the persons identified as the 42 document authors. All rights reserved. 44 This document is subject to BCP 78 and the IETF Trust's Legal 45 Provisions Relating to IETF Documents 46 (https://trustee.ietf.org/license-info) in effect on the date of 47 publication of this document. Please review these documents 48 carefully, as they describe your rights and restrictions with respect 49 to this document. Code Components extracted from this document must 50 include Simplified BSD License text as described in Section 4.e of 51 the Trust Legal Provisions and are provided without warranty as 52 described in the Simplified BSD License. 54 1. CoAP Message ID 56 Constraint Application Protocol (CoAP) [RFC7252] implements a simple 57 reliable transport mechanism based on ARQ. Each CoAP message 58 contains a 16 bit Message ID (noted afterward MID). A client selects 59 a MID in a CON message and expects an ACK message containing the same 60 MID value. A timer makes the client resend the request if no ACK is 61 received during a pre-defined period. 63 To avoid a second process of duplicated requests by the server, a 64 list of messages ID already acknowledged must be maintained for a 65 period of time. If the message ID is already in the list, the 66 message is just acknowledged and not processed by upper layer. 67 Therefore, the client cannot use this MID value in another request 68 during the same period of time. 70 client server 71 | CON MID = XXXX | 72 |---------------------------------->|=> process 73 EXCHANGE ^ | ACK MID = XXXX | ^ 74 LIFETIME | | <----------------| | EXCHANGE 75 | | | | LIFETIME 76 XXXX | | CON MID = XXXX | | 77 cannot | |---------------------------------->| | XXXX in 78 be reused | | ACK MID = XXXX | | memory 79 | |<----------------------------------| | 80 | | | | 81 v | | v 82 XXXX can be . . 83 reused . . 84 . . 85 | CON MID = XXXX | 86 |---------------------------------->|=> process 87 ^ | ACK MID = XXXX | ^ 88 | |<----------------------------------| | 89 . . 91 Figure 1: Delayed transmission. 93 [RFC7252] calls the period a MID is assigned to a request the 94 EXCHANGE_LIFETIME. The value is based on the worst case scenario 95 taking into account the propagation time, the number of 96 retransmissions and the processing time. The default value for 97 EXCHANGE_LIFETIME is set to 247 seconds for MAX_RTT of 202 seconds. 99 2. LPWAN networks 101 Low Power Wide Area Network (LPWAN) family regroups networks 102 dedicated to the Internet of Things. They provide a large coverage 103 with a limited energy consumption. They mostly use the license-free 104 ISM band. The [I-D.ietf-lpwan-overview] gives an overview of the 105 technology and the star oriented topology architecture. A Network 106 Gateway (NGW) is at the interconnection between the LPWAN and the 107 Internet network. 109 To ensure fairness among nodes, regulation imposes a duty cycle. In 110 practice, with a 1% duty cycle, a node sending a message of s seconds 111 must wait 99 x s seconds before sending another message. For 112 instance, in some technologies sending a 50 bytes message takes 2 113 seconds, forcing a silence of 198 seconds. 115 The device sleeps most of the time to preserve energy. If a device 116 can use the uplink channel at any time, downlink channel is generally 117 available during a short receiving window following the message 118 emission. Therefore a message sent to a device out of this receiving 119 window will be lost. Network Gateways are aware of this restriction 120 and buffers downlink messages until an uplink message is received 121 which opens the receiving window. 123 Figure 2 illustrates this. A CoAP client sends a request every hour. 124 Even if the server replies immediately, the answer may be buffered by 125 the Network GW until an new uplink message is sent. In that case, 126 the client will only receive the answer after one hour when the next 127 request is sent. The RTT is influenced by the message periodicity 128 and the EXCHANGE_LIFTEIME value can be computed locally by client to 129 dimension its timers. 131 client on LPWAN NGW server 132 | | | 133 ^ |---------------------------------->| CON MID = 1 134 | | | | 135 1 hour | | delayed H<----------------| ACK MID = 1 136 | | H | 137 | | H | 138 | | H | 139 v |---------------------------------->| CON MID = 2 140 ACK MID = 1 |<----------------| | 141 | | | 142 v v v 144 Figure 2: Delayed transmission. 146 The server should remain as generic as possible and EXCHANGE_LIFETIME 147 parameter has to be adapted to the client behavior. If the period is 148 too large, the server will have to memorize a longer list of MID for 149 fast responding client. On the other hand, if the EXCHANGE_LIFETIME 150 is too short, this leads to misbehaviors as shown in Figure 3, a 151 retransmission will be viewed as a new request. 153 client on LPWAN NGW server 154 | CON MID = 1 | | 155 Timer - |---------------------------------->| => process 156 | | delayed H<----------------| ^ 157 | | H ACK MID = 1 | | EXCHANGE 158 | | H | v LIFETIME 159 | | CON MID = 2 H | 160 | |---------------------------------->| 161 | | X---------| | 162 | | | | 163 | | CON MID = 1 | | 164 Expire O |---------------------------------->| => process 165 | |<----------------| 166 . . ACK MID = 1 . 167 . . . 169 Figure 3: Retransmission. 171 The Time Scale option, added into all the CoAP requests, informs the 172 server of the duration a message ID should be memorized into the 173 server and therefore the duration during which a client should not 174 reuse the same message ID for a new request. This way, the server 175 can adapt its behavior to different environments. 177 It is important to notice that this option will not contribute to an 178 DoS attack. This option does not increase the number of message ID 179 memorized by the server. In fact, the Time Scale option can be 180 viewed as a contract between the client and the server, which means 181 that the client will send a reasonable number of request during that 182 period. The number of memorized message ID is independent of the 183 duration of the exchange but linked to the number a simultaneous 184 request a client can send. If a client is sending a number of 185 request larger than expected, they can be easily discarded by the 186 server. 188 3. Timescale Option 190 Timescale is a new CoAP option that tells the server how many seconds 191 the MID should be memorized by the server. This option must be 192 included in all the exchanges coming from a high latency device. 194 +--------+---+---+---+---+-------------+--------+--------+---------+ 195 | Number | C | U | N | R | Name | Format | Length | Default | 196 +--------+---+---+---+---+-------------+--------+--------+---------+ 197 | 259 | X | | | | Time Scale | uint | 1-4 | 3600 | 198 +--------+---+---+---+---+-------------+--------+--------+---------+ 200 Figure 4: Time Scale Option. 202 This option is critical, if a server does not recognize it, it must 203 inform the client that EXCHANGE_LIFETIME cannot be modified. The 204 option is Safe-to-forward so a proxy does not have to understand this 205 option, since only the server is concerned with the MID management. 206 The value (in seconds) contains the new EXCHANGE_LIFETIME set by the 207 server for this request. If the value is smaller than the default 208 value, this option is discarded and the client receives an error 209 message. 211 4. Normative References 213 [I-D.ietf-lpwan-overview] 214 Farrell, S., "LPWAN Overview", draft-ietf-lpwan- 215 overview-07 (work in progress), October 2017. 217 [RFC7252] Shelby, Z., Hartke, K., and C. Bormann, "The Constrained 218 Application Protocol (CoAP)", RFC 7252, 219 DOI 10.17487/RFC7252, June 2014, 220 . 222 Authors' Addresses 224 Ana Minaburo 225 Acklio 226 2bis rue de la Chataigneraie 227 35510 Cesson-Sevigne Cedex 228 France 230 Email: ana@ackl.io 232 Laurent Toutain 233 Institut Mines Telecom Atlantique 234 2 rue de la Chataigneraie 235 CS 17607 236 35576 Cesson-Sevigne Cedex 237 France 239 Email: Laurent.Toutain@imt-atlantique.fr