Re: [core] BG1 -- CoAP Ping (Re: draft-ietf-core-coap-13 WGLC - my comments)

Zach Shelby <zach@sensinode.com> Fri, 04 January 2013 09:00 UTC

Return-Path: <zach@sensinode.com>
X-Original-To: core@ietfa.amsl.com
Delivered-To: core@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 155DA21F8ECB for <core@ietfa.amsl.com>; Fri, 4 Jan 2013 01:00:45 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.599
X-Spam-Level:
X-Spam-Status: No, score=-3.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1]
Received: from mail.ietf.org ([64.170.98.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id R0+tm0GBJ9Kf for <core@ietfa.amsl.com>; Fri, 4 Jan 2013 01:00:44 -0800 (PST)
Received: from auth-smtp.nebula.fi (auth-smtp.nebula.fi [217.30.180.105]) by ietfa.amsl.com (Postfix) with ESMTP id 027F521F8EBA for <core@ietf.org>; Fri, 4 Jan 2013 01:00:43 -0800 (PST)
Received: from [10.128.8.206] (line-21396.dyn.kponet.fi [213.145.192.6]) (authenticated bits=0) by auth-smtp.nebula.fi (8.13.8/8.13.4) with ESMTP id r0490YMq022948 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Fri, 4 Jan 2013 11:00:35 +0200
Content-Type: text/plain; charset="iso-8859-1"
Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\))
From: Zach Shelby <zach@sensinode.com>
In-Reply-To: <1F479A1A-4671-4883-9022-9DA647ED73DE@gmail.com>
Date: Fri, 04 Jan 2013 11:01:12 +0200
Content-Transfer-Encoding: quoted-printable
Message-Id: <95879247-97BE-454B-A325-A34FFAB36F68@sensinode.com>
References: <46A1DF3F04371240B504290A071B4DB63CB1D314@szxeml509-mbx> <42115B7C-3C57-4A42-9325-B89A6FE5CABB@tzi.org> <46A1DF3F04371240B504290A071B4DB63CB1EADB@szxeml509-mbx> <1F479A1A-4671-4883-9022-9DA647ED73DE@gmail.com>
To: Andrew McGregor <andrewmcgr@gmail.com>
X-Mailer: Apple Mail (2.1499)
Cc: "core@ietf.org WG" <core@ietf.org>
Subject: Re: [core] BG1 -- CoAP Ping (Re: draft-ietf-core-coap-13 WGLC - my comments)
X-BeenThere: core@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: "Constrained RESTful Environments \(CoRE\) Working Group list" <core.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/core>, <mailto:core-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/core>
List-Post: <mailto:core@ietf.org>
List-Help: <mailto:core-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/core>, <mailto:core-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 04 Jan 2013 09:00:45 -0000

Andrew,

That would be a reasonable solution. I would suggest we create a ticket to solve Bert's comment in this way.

Zach

On Jan 4, 2013, at 5:45 AM, Andrew McGregor <andrewmcgr@gmail.com> wrote:

> Simply deleting the "and MUST NOT be empty" from the first sentence you quote would make it unambiguous that an empty message is allowed, and must be rejected.
> 
> Andrew
> 
> On 4/01/2013, at 4:17 PM, Bert Greevenbosch <Bert.Greevenbosch@huawei.com> wrote:
> 
>> Hi Carsten,
>> 
>> I agree that we should not define a separate NOOP method just for verification if the server is running.
>> 
>> I guess the following text is what makes the suggested method work:
>> 
>>  A Confirmable message
>>  always carries either a request or response and MUST NOT be empty.  A
>>  recipient MUST acknowledge such a message with an Acknowledgement
>>  message or, if it lacks context to process the message properly
>>  (including the case where the message is empty or has a message
>>  format error), MUST reject it; rejecting a Confirmable message is
>>  effected by sending a matching Reset message and otherwise ignoring
>>  it.
>> 
>> I don't feel too strong about this. It is just that the spec seems to endorse violating its own MUST NOTs. But that discussion might be more philosophical than it is technical...
>> 
>> Happy new year!
>> Bert
>> 
>> 
>> -----Original Message-----
>> From: Carsten Bormann [mailto:cabo@tzi.org] 
>> Sent: 21 December 2012 15:36
>> To: Bert Greevenbosch
>> Cc: core@ietf.org WG
>> Subject: BG1 -- CoAP Ping (Re: [core] draft-ietf-core-coap-13 WGLC - my comments)
>> 
>> Hi Bert,
>> 
>> I'll pick some of your comments and reply with my personal view.
>> I'll construct a separate subject for each so we have some threading if the discussion continues.
>> 
>> On Dec 21, 2012, at 03:42, Bert Greevenbosch <Bert.Greevenbosch@huawei.com> wrote:
>> 
>>> 1,E) p.9: "Provoking a Reset message (e.g., by sending an empty Confirmable message) is also useful as an inexpensive check of the liveness of an endpoint ("CoAP ping")."
>>> I am not sure if we should endorse provoking RST messages by sending empty CON messages.
>> 
>> We have found that it is very useful to have some lightweight "are you there" mechanism.
>> This is both for diagnostics, and for address selection ahead of a heavy-weight non-idempotent operation.
>> 
>> Now we could define a NOOP method that does nothing.  In a Confirmable message, this would elicit an empty ACK.
>> In total, this would look a lot like the mechanism described above, but with a "positive" ACK.
>> 4-byte request, 4-byte ACK.
>> 
>> However, the empty/RST exchange has essentially the same properties, with the simple advantage that you already (should) have implemented it.
>> One method less, requires no additional code.
>> Calling it out here was motivated by noticing that not every implementation before ETSI CoAP2 caught the MUSTs that make it work.
>> 
>> One could argue that a ping that "works" should not end in an "error" message like RST.
>> However, there are other cases where a RST is somewhat "normal", so seeing a RST should not be raising red alarms anyway.
>> 
>> So I agree a bit with the sentiment you are expressing, but I think it is not sufficient reason to add a NOOP method.
>> (I also briefly thought about instead adding an ECHO method (sends back the payload) so you can run diagnostics with different packet sizes.
>> With a payload of 0 bytes, this becomes similar to NOOP, except that the ACK would carry a response code.
>> Also sounds somewhat useful, but do we really need it?  
>> We most likely don't want an equivalent of CHARGEN, as this would be inviting amplification attacks.)
>> 
>> Grüße, Carsten
>> 
>> _______________________________________________
>> core mailing list
>> core@ietf.org
>> https://www.ietf.org/mailman/listinfo/core
> 
> _______________________________________________
> core mailing list
> core@ietf.org
> https://www.ietf.org/mailman/listinfo/core

-- 
Zach Shelby, Chief Nerd, Sensinode Ltd.
http://www.sensinode.com @SensinodeIoT
Mobile: +358 40 7796297
Twitter: @zach_shelby
LinkedIn: http://fi.linkedin.com/in/zachshelby
6LoWPAN Book: http://6lowpan.net