Re: [core] #394 (coap-tcp-tls): Ping/pong

"core issue tracker" <trac+core@zinfandel.tools.ietf.org> Tue, 26 April 2016 12:47 UTC

Return-Path: <trac+core@trac.tools.ietf.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 0D90812D0DD; Tue, 26 Apr 2016 05:47:41 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.896
X-Spam-Level:
X-Spam-Status: No, score=-7.896 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, RP_MATCHES_RCVD=-0.996] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uUL0DdeCJIEM; Tue, 26 Apr 2016 05:47:37 -0700 (PDT)
Received: from zinfandel.tools.ietf.org (zinfandel.tools.ietf.org [IPv6:2001:1890:123a::1:2a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 48F6E12D0A5; Tue, 26 Apr 2016 05:47:37 -0700 (PDT)
Received: from localhost ([::1]:51874 helo=zinfandel.tools.ietf.org) by zinfandel.tools.ietf.org with esmtp (Exim 4.82_1-5b7a7c0-XX) (envelope-from <trac+core@trac.tools.ietf.org>) id 1av2Ou-0007Ri-Ma; Tue, 26 Apr 2016 05:47:36 -0700
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
From: core issue tracker <trac+core@zinfandel.tools.ietf.org>
X-Trac-Version: 0.12.5
Precedence: bulk
Auto-Submitted: auto-generated
X-Mailer: Trac 0.12.5, by Edgewall Software
To: draft-ietf-core-coap-tcp-tls@ietf.org, Hannes.Tschofenig@gmx.net
X-Trac-Project: core
Date: Tue, 26 Apr 2016 12:47:36 -0000
X-URL: https://tools.ietf.org/core/
X-Trac-Ticket-URL: https://trac.tools.ietf.org/wg/core/trac/ticket/394#comment:1
Message-ID: <069.b9f53805061e8e72bfdeccc1ae6055ae@trac.tools.ietf.org>
References: <054.2c97c757dda98e52472c800c6ee42ad0@trac.tools.ietf.org>
X-Trac-Ticket-ID: 394
In-Reply-To: <054.2c97c757dda98e52472c800c6ee42ad0@trac.tools.ietf.org>
X-SA-Exim-Connect-IP: ::1
X-SA-Exim-Rcpt-To: draft-ietf-core-coap-tcp-tls@ietf.org, Hannes.Tschofenig@gmx.net, core@ietf.org
X-SA-Exim-Mail-From: trac+core@trac.tools.ietf.org
X-SA-Exim-Scanned: No (on zinfandel.tools.ietf.org); SAEximRunCond expanded to false
Resent-To: draft-ietf-core-coap-tcp-tls@ietf.org
Resent-Message-Id: <20160426124737.48F6E12D0A5@ietfa.amsl.com>
Resent-Date: Tue, 26 Apr 2016 05:47:37 -0700
Resent-From: trac+core@trac.tools.ietf.org
Archived-At: <http://mailarchive.ietf.org/arch/msg/core/1Sl7n823W4oYXYojPb71DiNrxFs>
Cc: core@ietf.org
Subject: Re: [core] #394 (coap-tcp-tls): Ping/pong
X-BeenThere: core@ietf.org
X-Mailman-Version: 2.1.17
Reply-To: trac+core@zinfandel.tools.ietf.org
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: <https://mailarchive.ietf.org/arch/browse/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: Tue, 26 Apr 2016 12:47:41 -0000

#394: Ping/pong


Comment (by Hannes.Tschofenig@gmx.net):

 Here is the story for adding keep-alive functionality to the CoAP over TCP
 document.

 After reaching out to folks measuring TCP usage I was told that the use of
 TCP keepalive messages is often unreliable since network operators deploy
 middleboxes, which suppress these messages.

 For this reason we are suggesting to add a ping/pong message to the CoAP
 over TCP document. Here is how this could look like.

 First, we define a new CoAP Method Codes (for the request) and CoAP
 Response Codes (for the responses). Let us give them new numbers, such as
 7.01 (for PING) and 7.02 (for PONG).

 Here is an example message exchange:
 {{{
                         Client              Server
                            |                  |
                            | <--- TCP --->    |
                            | Connection Setup |
                            |                  |
                            |   NON            |
                            | GET /temperature |
                            |   (Token 0x74)   |
                            +----------------->|
                            |                  |
                            |   NON [0x23bc]   |
                            |   2.05 Content   |
                            |   (Token 0x74)   |
                            |     "22.5 C"     |
                            |<-----------------+
                            |                  |
                            |      ......      |
                            |   time passes    |
                            |      ......      |
                            |                  |
                            |7.03 Ping         |
                            |(Token 0x7f)      |
                            +----------------->|
                            |                  |
                            |7.02 Pong         |
                            |(Token 0x7f)      |
                            |<-----------------+
                            |                  |
                            |  <--- TCP --->   |
                            |  Conn. Teadown   |
 }}}

 The PING packet would look as follows:

 {{{
     0                   1                   2
     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |      0x01     |      0xe1     |      0x7f     |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

     Len   =    0 ------>  0x01
     TKL   =    1 ___/
     Code  =  7.01     --> 0xe1
     Token =               0x7f

            Figure: PING Encoding Example.
 }}}

 The PONG packet has the following structure:

 {{{
     0                   1                   2
     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |      0x01     |      0xe2     |      0x7f     |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

     Len   =    0 ------>  0x01
     TKL   =    1 ___/
     Code  =  7.02     --> 0xe2
     Token =               0x7f

            Figure: PONG Encoding Example.
 }}}

-- 
-------------------------+-------------------------------------------------
 Reporter:               |       Owner:  draft-ietf-core-coap-tcp-
  hartke@tzi.org         |  tls@ietf.org
     Type:  protocol     |      Status:  new
  enhancement            |   Milestone:
 Priority:  minor        |     Version:
Component:  coap-tcp-    |  Resolution:
  tls                    |
 Severity:  Active WG    |
  Document               |
 Keywords:               |
-------------------------+-------------------------------------------------

Ticket URL: <https://trac.tools.ietf.org/wg/core/trac/ticket/394#comment:1>
core <https://tools.ietf.org/core/>