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

Andrew McGregor <andrewmcgr@gmail.com> Fri, 04 January 2013 03:45 UTC

Return-Path: <andrewmcgr@gmail.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 4EFE921F8EB8 for <core@ietfa.amsl.com>; Thu, 3 Jan 2013 19:45:56 -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 Eh+0FvmpQbEZ for <core@ietfa.amsl.com>; Thu, 3 Jan 2013 19:45:55 -0800 (PST)
Received: from mail-pa0-f42.google.com (mail-pa0-f42.google.com [209.85.220.42]) by ietfa.amsl.com (Postfix) with ESMTP id 84B2021F8AF8 for <core@ietf.org>; Thu, 3 Jan 2013 19:45:55 -0800 (PST)
Received: by mail-pa0-f42.google.com with SMTP id rl6so9073851pac.1 for <core@ietf.org>; Thu, 03 Jan 2013 19:45:55 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:content-type:mime-version:subject:from:in-reply-to:date :cc:message-id:references:to:x-mailer; bh=v0dzkcRWZTHE8nG6WDfTzBgx+tSUvCF/L+jlTcfLXOw=; b=UMHrT3cdah9bSGlisQPHyLP2vpjeAUoMeC2cN2hyQqERuQKIQ4PVkKFX90bfaffnpu 4lAlLyHoc3kVnuFtaaoecfTsYBRtbJgm++11cddQkY4meAfMa0CxLrH4NRxySnuv1rbL NZcWTmRmJXkmt//eVp0p2OdBoC2n0rzGCvFbW6u21147up043tXeNlwsxaVPhgHvTd+7 +SoF0SxGjCSXxWa95G6T2ph/aFb7Gij6m0Slv1A5yte7Nlnda+4GvDJ/KIFOq+rpbXrs ywmBnOxo2UbO1i76Y0b70D4WqeuOJ37j/5XGLpZam59VH6xp0VoADo6fs4dHYb5QUkTd aBzg==
X-Received: by 10.68.241.232 with SMTP id wl8mr158048412pbc.144.1357271155272; Thu, 03 Jan 2013 19:45:55 -0800 (PST)
Received: from ?IPv6:2406:e000:63ad:1:7405:e356:77b7:e0bd? ([2406:e000:63ad:1:7405:e356:77b7:e0bd]) by mx.google.com with ESMTPS id jv1sm26133699pbc.36.2013.01.03.19.45.52 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 03 Jan 2013 19:45:54 -0800 (PST)
Content-Type: multipart/signed; boundary="Apple-Mail=_2ECA80C9-D049-41A9-89F9-E719C684B36B"; protocol="application/pkcs7-signature"; micalg="sha1"
Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\))
From: Andrew McGregor <andrewmcgr@gmail.com>
In-Reply-To: <46A1DF3F04371240B504290A071B4DB63CB1EADB@szxeml509-mbx>
Date: Fri, 04 Jan 2013 16:45:45 +1300
Message-Id: <1F479A1A-4671-4883-9022-9DA647ED73DE@gmail.com>
References: <46A1DF3F04371240B504290A071B4DB63CB1D314@szxeml509-mbx> <42115B7C-3C57-4A42-9325-B89A6FE5CABB@tzi.org> <46A1DF3F04371240B504290A071B4DB63CB1EADB@szxeml509-mbx>
To: Bert Greevenbosch <Bert.Greevenbosch@huawei.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 03:45:56 -0000

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