Block-Wise Transfers in the Constrained Application Protocol (CoAP)
RFC 7959

Document Type RFC - Proposed Standard (August 2016; No errata)
Updates RFC 7252
Last updated 2016-08-26
Replaces draft-bormann-core-coap-block
Stream IETF
Formats plain text pdf html bibtex
Reviews
Stream WG state Submitted to IESG for Publication Oct 2013
Document shepherd Matthias Kovatsch
Shepherd write-up Show (last changed 2015-11-02)
IESG IESG state RFC 7959 (Proposed Standard)
Consensus Boilerplate Yes
Telechat date
Responsible AD Alexey Melnikov
Send notices to (None)
IANA IANA review state Version Changed - Review Needed
IANA action state RFC-Ed-Ack
Internet Engineering Task Force (IETF)                        C. Bormann
Request for Comments: 7959                       Universitaet Bremen TZI
Updates: 7252                                             Z. Shelby, Ed.
Category: Standards Track                                            ARM
ISSN: 2070-1721                                              August 2016

  Block-Wise Transfers in the Constrained Application Protocol (CoAP)

Abstract

   The Constrained Application Protocol (CoAP) is a RESTful transfer
   protocol for constrained nodes and networks.  Basic CoAP messages
   work well for small payloads from sensors and actuators; however,
   applications will need to transfer larger payloads occasionally --
   for instance, for firmware updates.  In contrast to HTTP, where TCP
   does the grunt work of segmenting and resequencing, CoAP is based on
   datagram transports such as UDP or Datagram Transport Layer Security
   (DTLS).  These transports only offer fragmentation, which is even
   more problematic in constrained nodes and networks, limiting the
   maximum size of resource representations that can practically be
   transferred.

   Instead of relying on IP fragmentation, this specification extends
   basic CoAP with a pair of "Block" options for transferring multiple
   blocks of information from a resource representation in multiple
   request-response pairs.  In many important cases, the Block options
   enable a server to be truly stateless: the server can handle each
   block transfer separately, with no need for a connection setup or
   other server-side memory of previous block transfers.  Essentially,
   the Block options provide a minimal way to transfer larger
   representations in a block-wise fashion.

   A CoAP implementation that does not support these options generally
   is limited in the size of the representations that can be exchanged,
   so there is an expectation that the Block options will be widely used
   in CoAP implementations.  Therefore, this specification updates
   RFC 7252.

Bormann & Shelby             Standards Track                    [Page 1]
RFC 7959               Block-Wise Transfer in CoAP           August 2016

Status of This Memo

   This is an Internet Standards Track document.

   This document is a product of the Internet Engineering Task Force
   (IETF).  It represents the consensus of the IETF community.  It has
   received public review and has been approved for publication by the
   Internet Engineering Steering Group (IESG).  Further information on
   Internet Standards is available in Section 2 of RFC 7841.

   Information about the current status of this document, any errata,
   and how to provide feedback on it may be obtained at
   http://www.rfc-editor.org/info/rfc7959.

Copyright Notice

   Copyright (c) 2016 IETF Trust and the persons identified as the
   document authors.  All rights reserved.

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents
   (http://trustee.ietf.org/license-info) in effect on the date of
   publication of this document.  Please review these documents
   carefully, as they describe your rights and restrictions with respect
   to this document.  Code Components extracted from this document must
   include Simplified BSD License text as described in Section 4.e of
   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.

Bormann & Shelby             Standards Track                    [Page 2]
RFC 7959               Block-Wise Transfer in CoAP           August 2016

Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   4
   2.  Block-Wise Transfers  . . . . . . . . . . . . . . . . . . . .   6
     2.1.  The Block2 and Block1 Options . . . . . . . . . . . . . .   7
     2.2.  Structure of a Block Option . . . . . . . . . . . . . . .   8
     2.3.  Block Options in Requests and Responses . . . . . . . . .  10
     2.4.  Using the Block2 Option . . . . . . . . . . . . . . . . .  12
     2.5.  Using the Block1 Option . . . . . . . . . . . . . . . . .  14
     2.6.  Combining Block-Wise Transfers with the Observe Option  .  15
     2.7.  Combining Block1 and Block2 . . . . . . . . . . . . . . .  16
     2.8.  Combining Block2 with Multicast . . . . . . . . . . . . .  16
     2.9.  Response Codes  . . . . . . . . . . . . . . . . . . . . .  17
       2.9.1.  2.31 Continue . . . . . . . . . . . . . . . . . . . .  17
       2.9.2.  4.08 Request Entity Incomplete  . . . . . . . . . . .  17
       2.9.3.  4.13 Request Entity Too Large . . . . . . . . . . . .  17
     2.10. Caching Considerations  . . . . . . . . . . . . . . . . .  18
   3.  Examples  . . . . . . . . . . . . . . . . . . . . . . . . . .  18
Show full document text