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

Carsten Bormann <cabo@tzi.org> Fri, 21 December 2012 07:36 UTC

Return-Path: <cabo@tzi.org>
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 F25F121F8971 for <core@ietfa.amsl.com>; Thu, 20 Dec 2012 23:36:41 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.249
X-Spam-Level:
X-Spam-Status: No, score=-106.249 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, HELO_EQ_DE=0.35, RCVD_IN_DNSWL_MED=-4, USER_IN_WHITELIST=-100]
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 W-9dnvM95ex1 for <core@ietfa.amsl.com>; Thu, 20 Dec 2012 23:36:41 -0800 (PST)
Received: from informatik.uni-bremen.de (mailhost.informatik.uni-bremen.de [IPv6:2001:638:708:30c9::12]) by ietfa.amsl.com (Postfix) with ESMTP id 9FA7321F857A for <core@ietf.org>; Thu, 20 Dec 2012 23:36:40 -0800 (PST)
X-Virus-Scanned: amavisd-new at informatik.uni-bremen.de
Received: from smtp-fb3.informatik.uni-bremen.de (smtp-fb3.informatik.uni-bremen.de [134.102.224.120]) by informatik.uni-bremen.de (8.14.3/8.14.3) with ESMTP id qBL7aUaG011130; Fri, 21 Dec 2012 08:36:30 +0100 (CET)
Received: from [192.168.217.105] (p54893288.dip.t-dialin.net [84.137.50.136]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by smtp-fb3.informatik.uni-bremen.de (Postfix) with ESMTPSA id 65420CCD; Fri, 21 Dec 2012 08:36:30 +0100 (CET)
Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\))
Content-Type: text/plain; charset="iso-8859-1"
From: Carsten Bormann <cabo@tzi.org>
In-Reply-To: <46A1DF3F04371240B504290A071B4DB63CB1D314@szxeml509-mbx>
Date: Fri, 21 Dec 2012 08:36:29 +0100
Content-Transfer-Encoding: quoted-printable
Message-Id: <42115B7C-3C57-4A42-9325-B89A6FE5CABB@tzi.org>
References: <46A1DF3F04371240B504290A071B4DB63CB1D314@szxeml509-mbx>
To: Bert Greevenbosch <Bert.Greevenbosch@huawei.com>
X-Mailer: Apple Mail (2.1499)
Cc: "core@ietf.org WG" <core@ietf.org>
Subject: [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, 21 Dec 2012 07:36:42 -0000

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