Network Working Group | R. Jesup |
Internet-Draft | Mozilla |
Intended status: Standards Track | S. Loreto |
Expires: October 13, 2013 | Ericsson |
M. Tuexen | |
Muenster Univ. of Appl. Sciences | |
April 11, 2013 |
RTCWeb Data Channels
draft-ietf-rtcweb-data-channel-04.txt
The Web Real-Time Communication (WebRTC) working group is charged to provide protocol support for direct interactive rich communication using audio, video, and data between two peers' web-browsers. This document specifies the non-media data transport aspects of the WebRTC framework. It provides an architectural overview of how the Stream Control Transmission Protocol (SCTP) is used in the WebRTC context as a generic transport service allowing Web Browser to exchange generic data from peer to peer.
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."
This Internet-Draft will expire on October 13, 2013.
Copyright (c) 2013 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.
Non-media data types in the context of RTCWeb are handled by using SCTP [RFC4960] encapsulated in DTLS [RFC6347].
+----------+ | SCTP | +----------+ | DTLS | +----------+ | ICE/UDP | +----------+
Figure 1: Basic stack diagram
The encapsulation of SCTP over DTLS (see [I-D.ietf-tsvwg-sctp-dtls-encaps]) over ICE/UDP (see [RFC5245]) provides a NAT traversal solution together with confidentiality, source authentication, and integrity protected transfers. This data transport service operates in parallel to the media transports, and all of them can eventually share a single transport-layer port number.
SCTP as specified in [RFC4960] with the partial reliability extension defined in [RFC3758] provides multiple streams natively with reliable, and partially-reliable delivery modes.
The remainder of this document is organized as follows: Section 4 and Section 3 provide requirements and use cases for both unreliable and reliable peer to peer datagram base channel; Section 5 arguments SCTP over DTLS over UDP; Section 6 provides an specification of how SCTP should be used by the RTCWeb protocol framework for transporting non-media data between browsers.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119].
This section defined use cases specific to data channels. For general use cases see [I-D.ietf-rtcweb-use-cases-and-requirements].
This section lists the requirements for P2P data channels between two browsers.
The important features of SCTP in the RTCWeb context are:
SCTP multihoming will not be used in RTCWeb. The SCTP layer will simply act as if it were running on a single-homed host, since that is the abstraction that the lower layer (a connection oriented, unreliable datagram service) exposes.
The encapsulation of SCTP over DTLS defined in [I-D.ietf-tsvwg-sctp-dtls-encaps] provides confidentiality, source authenticated, and integrity protected transfers. Using DTLS over UDP in combination with ICE enables NAT traversal in IPv4 based networks. SCTP as specified in [RFC4960] MUST be used in combination with the extension defined in [RFC3758] and provides the following interesting features for transporting non-media data between browsers:
Each SCTP user message contains a so called Payload Protocol Identifier (PPID) that is passed to SCTP by its upper layer and sent to its peer. This value can be used to multiplex multiple protocols over a single SCTP association. The sender provides for each protocol a specific PPID and the receiver can demultiplex the messages based on the received PPID.
The encapsulation of SCTP over DTLS, together with the SCTP features listed above satisfies all the requirements listed in Section 4.
The layering of protocols for WebRTC is shown in the following Figure 2.
+------+ |RTCWEB| | DATA | +------+ | SCTP | +--------------------+ | STUN | SRTP | DTLS | +--------------------+ | ICE | +--------------------+ | UDP1 | UDP2 | ... | +--------------------+
Figure 2: WebRTC protocol layers
This stack (especially in contrast to DTLS over SCTP [RFC6083] in combination with SCTP over UDP [I-D.ietf-tsvwg-sctp-udp-encaps]) has been chosen because it
Considering the protocol stack of Figure 2 the usage of DTLS over UDP is specified in [RFC6347], while the usage of SCTP on top of DTLS is specified in [I-D.ietf-tsvwg-sctp-dtls-encaps].
Since DTLS is typically implemented in user-land, the SCTP stack also needs to be a user-land stack.
When using DTLS as the lower layer, only single homed SCTP associations MUST be used, since DTLS does not expose any address management to its upper layer. The ICE/UDP layer can handle IP address changes during a session without needing to notify the DTLS and SCTP layers, though it would be advantageous to retest path MTU on an IP address change.
DTLS implementations used for this stack SHOULD support controlling fields of the IP layer like the Don't fragment (DF)-bit in case of IPv4 and the Differentiated Services Code Point (DSCP) field required for supporting [I-D.ietf-rtcweb-qos]. Being able to set the (DF)-bit in case of IPv4 is required for performing path MTU discovery. The DTLS implementation SHOULD also support sending user messages exceeding the path MTU.
Incoming ICMP or ICMPv6 messages can't be processed by the SCTP layer, since there is no way to identify the corresponding association. Therefore SCTP MUST support performing Path MTU discovery without relying on ICMP or ICMPv6 as specified in [RFC4821] using probing messages specified in [RFC4820]. The initial Path MTU MUST NOT exceed 1280 [ *** need justification ***] bytes until measured otherwise.
In general, the lower layer interface of an SCTP implementation SHOULD be adapted to address the differences between IPv4 or IPv6 (being connection-less) or DTLS (being connection-oriented).
When protocol stack of Figure 2 is used, DTLS protects the complete SCTP packet, so it provides confidentiality, integrity and source authentication of the complete SCTP packet.
This protocol stack MUST support the usage of multiple SCTP streams. A user message can be sent ordered or unordered and with partial or full reliability. The partial reliability extension MUST support policies to limit
Limiting the number of retransmissions to zero combined with unordered delivery provides a UDP-like service where each user message is sent exactly once and delivered in the order received.
SCTP provides congestion control on a per-association base. This means that all SCTP streams within a single SCTP association share the same congestion window. Traffic not being sent over SCTP is not covered by the SCTP congestion control. Due to the typical parallel SRTP media streams, a delay-sensitive congestion control algorithm MUST be supported and the congestion control MAY be coordinated between the data channels and the media streams to avoid a data channel transfer ending up with most or all the channel bandwidth.
Since SCTP does not support the negotiation of a congestion control algorithm, the algorithm either MUST be negotiated before establishment of the SCTP association or MUST NOT require any negotiation because it only requires sender side behavior using existing information carried in the association.
The SCTP association will be set up when the two endpoints of the WebRTC PeerConnection agree on opening it, as negotiated by JSEP (typically an exchange of SDP) [I-D.ietf-rtcweb-jsep]. Additionally, the negotiation SHOULD include some type of congestion control selection. It will use the DTLS connection selected via SDP; typically this will be shared via BUNDLE or equivalent with DTLS connections used to key the DTLS-SRTP media streams.
The application SHOULD indicate the initial number of streams required when opening the association, and if no value is supplied, the implementation SHOULD provide an appropriate default. If more simultaneous streams are needed, [RFC6525] allows adding additional (but not removing) streams to an existing association. Note there can be up to 65536 SCTP streams per SCTP association in each direction.
SCTP defines a stream as an unidirectional logical channel existing within an SCTP association one to another SCTP endpoint. The streams are used to provide the notion of in-sequence delivery and for multiplexing. Each user message is sent on a particular stream, either order or unordered. Ordering is preserved only for ordered messages sent on the same stream.
The W3C has consensus on defining the application API for WebRTC dataChannels to be bidirectional. They also consider the notions of in-sequence, out-of-sequence, reliable and un-reliable as properties of Channels. One strong wish is for the application-level API to be close to the API for WebSockets, which implies bidirectional streams of data and waiting for onopen to fire before sending, a textual label used to identify the meaning of the stream, among other things.
The realization of a bidirectional Data Channel is a pair of one incoming stream and one outgoing SCTP stream.
The simple protocol specified in [I-D.jesup-rtcweb-data-protocol] MUST be used to set up and manage the bidirectional data channels.
Note that there's no requirement for the SCTP streams used to create a bidirectional channel have the same number in each direction. How stream values are selected is protocol and implementation dependent.
Closing of a Data Channel MUST be signaled by resetting the corresponding streams [RFC6525]. Resetting a stream set the Stream Sequence Numbers (SSNs) of the stream back to 'zero' with a corresponding notification to the application layer that the reset has been performed. Streams are available to reuse after a reset has been performed.
[RFC6525] also guarantees that all the messages are delivered (or expired) before resetting the stream.
The SCTP Payload Protocol Identifiers (PPIDs) can be used to signal the interpretation of the "Payload data", like the protocol specified in [I-D.jesup-rtcweb-data-protocol] uses them to identify a Javascript string, a Javascript binary data (ArrayBuffer or Blob) and to provide fragmentation support for large messages that may cause the message to monopolize the SCTP association.
This document does not add any additional considerations to the ones given in [I-D.ietf-rtcweb-security] and [I-D.ietf-rtcweb-security-arch].
This document does not require any actions by the IANA.
Many thanks for comments, ideas, and text from Harald Alvestrand, Adam Bergkvist, Cullen Jennings, Eric Rescorla, Randall Stewart, Justin Uberti, and Magnus Westerlund.
[RFC6083] | Tuexen, M., Seggelmann, R. and E. Rescorla, "Datagram Transport Layer Security (DTLS) for Stream Control Transmission Protocol (SCTP)", RFC 6083, January 2011. |
[I-D.ietf-rtcweb-use-cases-and-requirements] | Holmberg, C., Hakansson, S. and G. Eriksson, "Web Real-Time Communication Use-cases and Requirements", Internet-Draft draft-ietf-rtcweb-use-cases-and-requirements-10, December 2012. |
[I-D.ietf-tsvwg-sctp-udp-encaps] | Tuexen, M. and R. Stewart, "UDP Encapsulation of SCTP Packets for End-Host to End-Host Communication", Internet-Draft draft-ietf-tsvwg-sctp-udp-encaps-10, February 2013. |