idnits 2.17.1 draft-ietf-core-hop-limit-02.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 : ---------------------------------------------------------------------------- ** There are 5 instances of too long lines in the document, the longest one being 3 characters in excess of 72. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (December 12, 2018) is 1960 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Missing Reference: 'RFCXXXX' is mentioned on line 196, but not defined == Outdated reference: A later version (-41) exists of draft-ietf-dots-signal-channel-25 Summary: 1 error (**), 0 flaws (~~), 3 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 CORE M. Boucadair 3 Internet-Draft Orange 4 Intended status: Standards Track T. Reddy 5 Expires: June 15, 2019 McAfee 6 J. Shallow 7 NCC Group 8 December 12, 2018 10 Constrained Application Protocol (CoAP) Hop Limit Option 11 draft-ietf-core-hop-limit-02 13 Abstract 15 The presence of Constrained Application Protocol (CoAP) proxies may 16 lead to infinite forwarding loops, which is undesirable. To prevent 17 and detect such loops, this document specifies the Hop-Limit CoAP 18 option. 20 Status of This Memo 22 This Internet-Draft is submitted in full conformance with the 23 provisions of BCP 78 and BCP 79. 25 Internet-Drafts are working documents of the Internet Engineering 26 Task Force (IETF). Note that other groups may also distribute 27 working documents as Internet-Drafts. The list of current Internet- 28 Drafts is at https://datatracker.ietf.org/drafts/current/. 30 Internet-Drafts are draft documents valid for a maximum of six months 31 and may be updated, replaced, or obsoleted by other documents at any 32 time. It is inappropriate to use Internet-Drafts as reference 33 material or to cite them other than as "work in progress." 35 This Internet-Draft will expire on June 15, 2019. 37 Copyright Notice 39 Copyright (c) 2018 IETF Trust and the persons identified as the 40 document authors. All rights reserved. 42 This document is subject to BCP 78 and the IETF Trust's Legal 43 Provisions Relating to IETF Documents 44 (https://trustee.ietf.org/license-info) in effect on the date of 45 publication of this document. Please review these documents 46 carefully, as they describe your rights and restrictions with respect 47 to this document. Code Components extracted from this document must 48 include Simplified BSD License text as described in Section 4.e of 49 the Trust Legal Provisions and are provided without warranty as 50 described in the Simplified BSD License. 52 Table of Contents 54 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 55 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 2 56 3. Hop-Limit Option . . . . . . . . . . . . . . . . . . . . . . 3 57 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 4 58 4.1. CoAP Response Code . . . . . . . . . . . . . . . . . . . 4 59 4.2. CoAP Option Number . . . . . . . . . . . . . . . . . . . 4 60 5. Security Considerations . . . . . . . . . . . . . . . . . . . 5 61 6. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 5 62 7. References . . . . . . . . . . . . . . . . . . . . . . . . . 5 63 7.1. Normative References . . . . . . . . . . . . . . . . . . 5 64 7.2. Informative References . . . . . . . . . . . . . . . . . 6 65 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 6 67 1. Introduction 69 More and more applications are using Constrained Application Protocol 70 (CoAP) [RFC7252] as a communication protocol between involved 71 application agents. For example, [I-D.ietf-dots-signal-channel] 72 specifies how CoAP is used as a distributed denial-of-service (DDoS) 73 attack signaling protocol seeking for help from DDoS mitigation 74 providers. In such contexts, a CoAP client can communicate directly 75 with a server or indirectly via proxies. 77 When multiple proxies are involved, infinite forwarding loops may be 78 experienced. To prevent such loops, this document defines a new CoAP 79 option, called Hop-Limit (Section 3), which is inserted in particular 80 by on-path proxies. Also, the document defines a new CoAP Response 81 Code (Section 4.1) to report loops together with relevant diagnostic 82 information to ease troubleshooting. 84 2. Terminology 86 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 87 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 88 "OPTIONAL" in this document are to be interpreted as described in BCP 89 14 [RFC2119][RFC8174] when, and only when, they appear in all 90 capitals, as shown here. 92 Readers should be familiar with the terms and concepts defined in 93 [RFC7252]. 95 Within this document, CoAP agent refers to both CoAP client and CoAP 96 proxy. 98 3. Hop-Limit Option 100 Hop-Limit option (see Section 4.2) is an elective option used to 101 detect and prevent infinite loops when proxies are involved. Only 102 one single instance of the option is allowed in a message. 103 Therefore, any message carrying multiple Hop-Limit option instances 104 MUST be rejected using 4.00 (Bad Request) error message. 106 The value of the Hop-Limit option is encoded as an 8-bit unsigned 107 integer (see Section 3.2 of [RFC7252]). This value MUST be between 1 108 and 255 inclusive. CoAP messages received with a Hop-Limit option 109 set to '0' or greater than '255' MUST be rejected by a CoAP agent 110 using 4.00 (Bad Request). 112 The Hop-Limit option is safe to forward. That is, a CoAP proxy which 113 does not understand the Hop-Limit option should forward it on. The 114 option is also part of the cache key. As such, a CoAP proxy which 115 does not understand the Hop-Limit option must follow the 116 recommendations in Section 5.7.1 of [RFC7252] for caching. 118 If a CoAP proxy receives a request which does not include a Hop-Limit 119 option, it SHOULD insert a Hop-Limit option when relaying the request 120 to a next hop (absent explicit policy/configuration otherwise). 122 The initial Hop-Limit value SHOULD be configurable. If no initial 123 value is explicitly provided, the default initial Hop-Limit value of 124 16 MUST be used. This value is chosen to be sufficiently large to 125 guarantee that a CoAP request would not be dropped in networks when 126 there were no loops, but not so large as to consume CoAP proxy 127 resources when a loop does occur. Lower values should be used with 128 caution and only in networks where topologies are known by the CoAP 129 agent inserting the Hop-Limit option. 131 Because forwarding errors may occur if inadequate Hop-Limit values 132 are used, proxies at the boundaries of an administrative domain MAY 133 be instructed to remove or rewrite the value of Hop-Limit carried in 134 received messages (i.e., ignore the value of Hop-Limit received in a 135 message). This modification should be done with caution in case 136 proxy-forwarded traffic repeatedly crosses the administrative domain 137 boundary in a loop and so Hop-Limit detection gets broken. 139 Otherwise, a CoAP proxy which understands the Hop-Limit option MUST 140 decrement the value of the option by 1 prior to forwarding it. A 141 CoAP proxy which understands the Hop-Limit option MUST NOT use a 142 stored response unless the value of the Hop-Limit option in the 143 presented request is less than or equal to the value of the Hop-Limit 144 option in the request used to obtain the stored response. 146 CoAP messages MUST NOT be forwarded if the Hop-Limit option is set to 147 '0' after decrement. Messages that cannot be forwarded because of 148 exhausted Hop-Limit SHOULD be logged with a TBA1 (Hop Limit Reached) 149 error message sent back to the CoAP peer. It is RECOMMENDED that 150 CoAP agents support means to alert administrators about loop errors 151 so that appropriate actions are undertaken. 153 To ease debugging and troubleshooting, the CoAP proxy which detects a 154 loop SHOULD include its information (e.g., proxy name, proxy alias, 155 IP address) in the diagnostic payload under the conditions detailed 156 in Section 5.5.2 of [RFC7252]. 158 Each intermediate proxy involved in relaying a TBA1 (Hop Limit 159 Reached) error message SHOULD prepend its own information in the 160 diagnostic payload with a space character used as separator. Only 161 one information per proxy SHOULD appear in the diagnostic payload. 162 Doing so allows to limit the size of the TBA1 (Hop Limit Reached) 163 error message, and to ease correlation with hops count. 165 4. IANA Considerations 167 4.1. CoAP Response Code 169 IANA is requested to add the following entry to the "CoAP Response 170 Codes" sub-registry available at https://www.iana.org/assignments/ 171 core-parameters/core-parameters.xhtml#response-codes: 173 +------+------------------+-----------+ 174 | Code | Description | Reference | 175 +------+------------------+-----------+ 176 | TBA1 | Hop Limit Reached| [RFCXXXX] | 177 +------+------------------+-----------+ 179 Table 1: CoAP Response Codes 181 This document suggests 5.06 as a code to be assigned for the new 182 response code. 184 Editorial Note: Please update TBA1 statements within the document 185 with the assigned code. 187 4.2. CoAP Option Number 189 IANA is requested to add the following entry to the "CoAP Option 190 Numbers" sub-registry available at https://www.iana.org/assignments/ 191 core-parameters/core-parameters.xhtml#option-numbers: 193 +--------+---+---+---+---+------------------+-----------+ 194 | Number | C | U | N | R | Name | Reference | 195 +--------+---+---+---+---+------------------+-----------+ 196 | TBA2 | | | | | Hop-Limit | [RFCXXXX] | 197 +--------+---+---+---+---+------------------+-----------+ 198 C=Critical, U=Unsafe, N=NoCacheKey, R=Repeatable 200 Table 2: CoAP Option Number 202 5. Security Considerations 204 Security considerations related to CoAP proxying are discussed in 205 Section 11.2 of [RFC7252]. 207 The diagnostic payload of a TBA1 (Hop Limit Reached) error message 208 may leak sensitive information revealing the topology of an 209 administrative domain. To prevent that, a CoAP proxy which is 210 located at the boundary of an administrative domain MAY be instructed 211 to strip the diagnostic payload or part of it before forwarding on 212 the TBA1 response. 214 6. Acknowledgements 216 This specification was part of [I-D.ietf-dots-signal-channel]. Many 217 thanks to those who reviewed DOTS specifications. 219 Thanks to Klaus Hartke, Carsten Bormann, Peter van der Stok, and Jim 220 Schaad for the review. 222 7. References 224 7.1. Normative References 226 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 227 Requirement Levels", BCP 14, RFC 2119, 228 DOI 10.17487/RFC2119, March 1997, 229 . 231 [RFC7252] Shelby, Z., Hartke, K., and C. Bormann, "The Constrained 232 Application Protocol (CoAP)", RFC 7252, 233 DOI 10.17487/RFC7252, June 2014, 234 . 236 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 237 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 238 May 2017, . 240 7.2. Informative References 242 [I-D.ietf-dots-signal-channel] 243 K, R., Boucadair, M., Patil, P., Mortensen, A., and N. 244 Teague, "Distributed Denial-of-Service Open Threat 245 Signaling (DOTS) Signal Channel Specification", draft- 246 ietf-dots-signal-channel-25 (work in progress), September 247 2018. 249 Authors' Addresses 251 Mohamed Boucadair 252 Orange 253 Rennes 35000 254 France 256 Email: mohamed.boucadair@orange.com 258 Tirumaleswar Reddy 259 McAfee, Inc. 260 Embassy Golf Link Business Park 261 Bangalore, Karnataka 560071 262 India 264 Email: kondtir@gmail.com 266 Jon Shallow 267 NCC Group 268 United Kingdom 270 Email: jon.shallow@nccgroup.com