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

Bert Greevenbosch <Bert.Greevenbosch@huawei.com> Fri, 04 January 2013 03:37 UTC

Return-Path: <Bert.Greevenbosch@huawei.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 0F4DB21F8EA5 for <core@ietfa.amsl.com>; Thu, 3 Jan 2013 19:37:55 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.599
X-Spam-Level:
X-Spam-Status: No, score=-6.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, RCVD_IN_DNSWL_MED=-4]
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 xHzJxwGdyJeF for <core@ietfa.amsl.com>; Thu, 3 Jan 2013 19:37:54 -0800 (PST)
Received: from lhrrgout.huawei.com (lhrrgout.huawei.com [194.213.3.17]) by ietfa.amsl.com (Postfix) with ESMTP id 909C221F8DF0 for <core@ietf.org>; Thu, 3 Jan 2013 19:37:53 -0800 (PST)
Received: from 172.18.7.190 (EHLO lhreml204-edg.china.huawei.com) ([172.18.7.190]) by lhrrg02-dlp.huawei.com (MOS 4.3.5-GA FastPath queued) with ESMTP id ANE49510; Fri, 04 Jan 2013 03:37:52 +0000 (GMT)
Received: from LHREML406-HUB.china.huawei.com (10.201.5.243) by lhreml204-edg.china.huawei.com (172.18.7.223) with Microsoft SMTP Server (TLS) id 14.1.323.3; Fri, 4 Jan 2013 03:37:04 +0000
Received: from SZXEML448-HUB.china.huawei.com (10.82.67.191) by lhreml406-hub.china.huawei.com (10.201.5.243) with Microsoft SMTP Server (TLS) id 14.1.323.3; Fri, 4 Jan 2013 03:17:46 +0000
Received: from SZXEML509-MBX.china.huawei.com ([10.82.67.37]) by szxeml448-hub.china.huawei.com ([10.82.67.191]) with mapi id 14.01.0323.003; Fri, 4 Jan 2013 11:17:39 +0800
From: Bert Greevenbosch <Bert.Greevenbosch@huawei.com>
To: Carsten Bormann <cabo@tzi.org>
Thread-Topic: BG1 -- CoAP Ping (Re: [core] draft-ietf-core-coap-13 WGLC - my comments)
Thread-Index: AQHN303s7EWIo3+TIEmZTHPst/2V9Jg4kA1A
Date: Fri, 04 Jan 2013 03:17:39 +0000
Message-ID: <46A1DF3F04371240B504290A071B4DB63CB1EADB@szxeml509-mbx>
References: <46A1DF3F04371240B504290A071B4DB63CB1D314@szxeml509-mbx> <42115B7C-3C57-4A42-9325-B89A6FE5CABB@tzi.org>
In-Reply-To: <42115B7C-3C57-4A42-9325-B89A6FE5CABB@tzi.org>
Accept-Language: en-GB, zh-CN, en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [10.70.110.143]
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-CFilter-Loop: Reflected
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:37:55 -0000

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