draft-ietf-core-hop-limit-01.txt   draft-ietf-core-hop-limit-02.txt 
CORE M. Boucadair CORE M. Boucadair
Internet-Draft Orange Internet-Draft Orange
Intended status: Standards Track T. Reddy Intended status: Standards Track T. Reddy
Expires: May 10, 2019 McAfee Expires: June 15, 2019 McAfee
J. Shallow J. Shallow
NCC Group NCC Group
November 6, 2018 December 12, 2018
Constrained Application Protocol (CoAP) Hop Limit Option Constrained Application Protocol (CoAP) Hop Limit Option
draft-ietf-core-hop-limit-01 draft-ietf-core-hop-limit-02
Abstract Abstract
The presence of Constrained Application Protocol (CoAP) proxies may The presence of Constrained Application Protocol (CoAP) proxies may
lead to infinite forwarding loops, which is undesirable. To prevent lead to infinite forwarding loops, which is undesirable. To prevent
and detect such loops, this document specifies the Hop-Limit CoAP and detect such loops, this document specifies the Hop-Limit CoAP
option. option.
Status of This Memo Status of This Memo
skipping to change at page 1, line 36 skipping to change at page 1, line 36
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 May 10, 2019. This Internet-Draft will expire on June 15, 2019.
Copyright Notice Copyright Notice
Copyright (c) 2018 IETF Trust and the persons identified as the Copyright (c) 2018 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(https://trustee.ietf.org/license-info) in effect on the date of (https://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
skipping to change at page 3, line 20 skipping to change at page 3, line 20
Therefore, any message carrying multiple Hop-Limit option instances Therefore, any message carrying multiple Hop-Limit option instances
MUST be rejected using 4.00 (Bad Request) error message. MUST be rejected using 4.00 (Bad Request) error message.
The value of the Hop-Limit option is encoded as an 8-bit unsigned The value of the Hop-Limit option is encoded as an 8-bit unsigned
integer (see Section 3.2 of [RFC7252]). This value MUST be between 1 integer (see Section 3.2 of [RFC7252]). This value MUST be between 1
and 255 inclusive. CoAP messages received with a Hop-Limit option and 255 inclusive. CoAP messages received with a Hop-Limit option
set to '0' or greater than '255' MUST be rejected by a CoAP agent set to '0' or greater than '255' MUST be rejected by a CoAP agent
using 4.00 (Bad Request). using 4.00 (Bad Request).
The Hop-Limit option is safe to forward. That is, a CoAP proxy which The Hop-Limit option is safe to forward. That is, a CoAP proxy which
does not understand the Hop-Limit option should forward it on. does not understand the Hop-Limit option should forward it on. The
option is also part of the cache key. As such, a CoAP proxy which
does not understand the Hop-Limit option must follow the
recommendations in Section 5.7.1 of [RFC7252] for caching.
If a CoAP proxy receives a request which does not include a Hop-Limit If a CoAP proxy receives a request which does not include a Hop-Limit
option, it SHOULD insert a Hop-Limit option when relaying the request option, it SHOULD insert a Hop-Limit option when relaying the request
to a next hop (absent explicit policy/configuration otherwise). to a next hop (absent explicit policy/configuration otherwise).
The initial Hop-Limit value SHOULD be configurable. If no initial The initial Hop-Limit value SHOULD be configurable. If no initial
value is explicitly provided, the default initial Hop-Limit value of value is explicitly provided, the default initial Hop-Limit value of
16 MUST be used. This value is chosen to be sufficiently large to 16 MUST be used. This value is chosen to be sufficiently large to
guarantee that a CoAP request would not be dropped in networks when guarantee that a CoAP request would not be dropped in networks when
there were no loops, but not so large as to consume CoAP proxy there were no loops, but not so large as to consume CoAP proxy
skipping to change at page 3, line 43 skipping to change at page 3, line 46
agent inserting the Hop-Limit option. agent inserting the Hop-Limit option.
Because forwarding errors may occur if inadequate Hop-Limit values Because forwarding errors may occur if inadequate Hop-Limit values
are used, proxies at the boundaries of an administrative domain MAY are used, proxies at the boundaries of an administrative domain MAY
be instructed to remove or rewrite the value of Hop-Limit carried in be instructed to remove or rewrite the value of Hop-Limit carried in
received messages (i.e., ignore the value of Hop-Limit received in a received messages (i.e., ignore the value of Hop-Limit received in a
message). This modification should be done with caution in case message). This modification should be done with caution in case
proxy-forwarded traffic repeatedly crosses the administrative domain proxy-forwarded traffic repeatedly crosses the administrative domain
boundary in a loop and so Hop-Limit detection gets broken. boundary in a loop and so Hop-Limit detection gets broken.
Otherwise, each intermediate proxy, which understands the Hop-Limit Otherwise, a CoAP proxy which understands the Hop-Limit option MUST
option, involved in the handling of a CoAP message MUST decrement the decrement the value of the option by 1 prior to forwarding it. A
Hop-Limit option value by 1 prior to forwarding upstream if this CoAP proxy which understands the Hop-Limit option MUST NOT use a
parameter exists. stored response unless the value of the Hop-Limit option in the
presented request is less than or equal to the value of the Hop-Limit
option in the request used to obtain the stored response.
CoAP messages MUST NOT be forwarded if the Hop-Limit option is set to CoAP messages MUST NOT be forwarded if the Hop-Limit option is set to
'0' after decrement. Messages that cannot be forwarded because of '0' after decrement. Messages that cannot be forwarded because of
exhausted Hop-Limit SHOULD be logged with a TBA1 (Hop Limit Reached) exhausted Hop-Limit SHOULD be logged with a TBA1 (Hop Limit Reached)
error message sent back to the CoAP peer. It is RECOMMENDED that error message sent back to the CoAP peer. It is RECOMMENDED that
CoAP agents support means to alert administrators about loop errors CoAP agents support means to alert administrators about loop errors
so that appropriate actions are undertaken. so that appropriate actions are undertaken.
To ease debugging and troubleshooting, the CoAP proxy which detects a To ease debugging and troubleshooting, the CoAP proxy which detects a
loop SHOULD include its information (e.g., proxy name, proxy alias, loop SHOULD include its information (e.g., proxy name, proxy alias,
skipping to change at page 5, line 8 skipping to change at page 5, line 8
4.2. CoAP Option Number 4.2. CoAP Option Number
IANA is requested to add the following entry to the "CoAP Option IANA is requested to add the following entry to the "CoAP Option
Numbers" sub-registry available at https://www.iana.org/assignments/ Numbers" sub-registry available at https://www.iana.org/assignments/
core-parameters/core-parameters.xhtml#option-numbers: core-parameters/core-parameters.xhtml#option-numbers:
+--------+---+---+---+---+------------------+-----------+ +--------+---+---+---+---+------------------+-----------+
| Number | C | U | N | R | Name | Reference | | Number | C | U | N | R | Name | Reference |
+--------+---+---+---+---+------------------+-----------+ +--------+---+---+---+---+------------------+-----------+
| TBA2 | | | x | | Hop-Limit | [RFCXXXX] | | TBA2 | | | | | Hop-Limit | [RFCXXXX] |
+--------+---+---+---+---+------------------+-----------+ +--------+---+---+---+---+------------------+-----------+
C=Critical, U=Unsafe, N=NoCacheKey, R=Repeatable C=Critical, U=Unsafe, N=NoCacheKey, R=Repeatable
Table 2: CoAP Option Number Table 2: CoAP Option Number
5. Security Considerations 5. Security Considerations
Security considerations related to CoAP proxying are discussed in Security considerations related to CoAP proxying are discussed in
Section 11.2 of [RFC7252]. Section 11.2 of [RFC7252].
 End of changes. 7 change blocks. 
10 lines changed or deleted 15 lines changed or added

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