<?xmlversion='1.0'?> <?rfc symrefs='yes'?>version='1.0' encoding='utf-8'?> <!DOCTYPE rfc SYSTEM'rfc2629.dtd'> <?rfc toc='yes' ?> <?rfc compact='yes' ?> <?rfc subcompact='no' ?> <?rfc sortrefs='no' ?> <?rfc strict='yes' ?>"rfc2629-xhtml.ent"> <rfccategory='std' ipr='trust200902' docName='draft-ietf-rtcweb-data-channel-13.txt'>xmlns:xi="http://www.w3.org/2001/XInclude" number="8831" docName="draft-ietf-rtcweb-data-channel-13" category="std" ipr="trust200902" submissionType="IETF" consensus="yes" obsoletes="" updates="" xml:lang="en" symRefs="true" tocInclude="true" sortRefs="true" version="3"> <!-- xml2rfc v2v3 conversion 2.44.0 --> <front> <title>WebRTC Data Channels</title> <seriesInfo name="RFC" value="8831"/> <authorinitials='R.' surname='Jesup' fullname='Randell Jesup'>initials="R." surname="Jesup" fullname="Randell Jesup"> <organization>Mozilla</organization> <address> <postal><street></street> <code></code> <city></city> <country>US</country><street/> <code/> <city/> <country>United States of America</country> </postal> <email>randell-ietf@jesup.org</email> </address> </author> <authorinitials='S.' surname='Loreto' fullname='Salvatore Loreto'>initials="S." surname="Loreto" fullname="Salvatore Loreto"> <organization>Ericsson</organization> <address> <postal> <street>Hirsalantie 11</street> <code>02420</code> <city>Jorvas</city><country>FI</country><country>Finland</country> </postal> <email>salvatore.loreto@ericsson.com</email> </address> </author> <authorinitials='M.' surname='Tuexen' fullname='Michael Tuexen'>initials="M." surname="Tüxen" fullname="Michael Tüxen"> <organizationabbrev='Muensterabbrev="Münster Univ. of Appl.Sciences'> MuensterSciences"> Münster University of Applied Sciences</organization> <address> <postal> <street>Stegerwaldstrasse 39</street> <code>48565</code> <city> Steinfurt</city><country>DE</country><country>Germany</country> </postal> <email>tuexen@fh-muenster.de</email> </address> </author> <date/>month="October" year="2020"/> <area>RAI</area> <abstract> <t>The WebRTC framework specifies protocol support fordirect interactivedirect, interactive, rich communication using audio, video, and data between two peers'web-browsers.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 serviceallowing WEB-browsersthat allows web browsers to exchange generic data from peer to peer.</t> </abstract> </front> <middle> <sectiontitle='Introduction'>numbered="true" toc="default"> <name>Introduction</name> <t>In the WebRTC framework, communication between the parties consists of media (forexampleexample, audio and video) and non-media data. Media is sent usingSRTP,the Secure Real-time Transport Protocol (SRTP) and is not specified further here. Non-media data is handled by usingSCTPthe Stream Control Transmission Protocol (SCTP) <xreftarget='RFC4960'/>target="RFC4960" format="default"/> encapsulated in DTLS. DTLS 1.0 is defined in <xreftarget='RFC4347'/>target="RFC4347" format="default"/>, and the present latest version, DTLS 1.2, is defined in <xreftarget='RFC6347'/>.</t>target="RFC6347" format="default"/>.</t> <figuretitle='Basic stack diagram' anchor='fig-stack'>anchor="fig-stack"> <name>Basic Stack Diagram</name> <artworkalign='center'>align="center" name="" type="" alt=""><![CDATA[ +----------+ | SCTP | +----------+ | DTLS | +----------+ | ICE/UDP | +----------+</artwork>]]></artwork> </figure> <t>The encapsulation of SCTP over DTLS (see <xreftarget='I-D.ietf-tsvwg-sctp-dtls-encaps'/>)target="RFC8261" format="default"/>) over ICE/UDP (see <xreftarget='RFC5245'/>)target="RFC8445" format="default"/>) provides a NAT traversal solution together with confidentiality, source authentication, andintegrity protectedintegrity-protected transfers. This data transport service operates in parallel to the SRTP media transports, and all of them can eventually share a single UDP port number.</t><t>SCTP<t>SCTP, as specified in <xreftarget='RFC4960'/>target="RFC4960" format="default"/> with the partial reliability extension (PR-SCTP) defined in <xreftarget='RFC3758'/>target="RFC3758" format="default"/> and the additional policies defined in <xreftarget='I-D.ietf-tsvwg-sctp-prpolicies'/>target="RFC7496" format="default"/>, provides multiple streams natively with reliable, and the relevantpartially-reliablepartially reliable, delivery modes for user messages. Using the reconfiguration extension defined in <xreftarget='RFC6525'/>target="RFC6525" format="default"/> allowstoan increase in the number of streams during the lifetime of an SCTP association andto resetallows individual SCTPstreams.streams to be reset. Using <xreftarget='I-D.ietf-tsvwg-sctp-ndata'/>target="RFC8260" format="default"/> allowstothe interleave of large messages to avoidthemonopolization and addsthesupportoffor prioritizingofSCTP streams.</t> <t>The remainder of this document is organized as follows: Sections <xreftarget='sec-use-cases'/>target="sec-use-cases" format="counter"/> and <xreftarget='sec-req'/>target="sec-req" format="counter"/> provide use cases and requirements for both unreliable and reliablepeer to peerpeer-to-peer data channels; <xreftarget='sec-p-a-2'/>target="sec-p-a-2" format="default"/> discusses SCTP over DTLS over UDP; and <xreftarget='sec-sctp-usage'/> provides the specification oftarget="sec-sctp-usage" format="default"/> specifies how SCTP should be used by the WebRTC protocol framework for transporting non-media data betweenWEB-browsers.</t>web browsers.</t> </section> <sectiontitle='Conventions'>numbered="true" toc="default"> <name>Conventions</name> <t>The key words"MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY","<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>", "<bcp14>MAY</bcp14>", and"OPTIONAL""<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as described in BCP 14 <xref target="RFC2119"/> <xreftarget='RFC2119'/>.</t>target="RFC8174"/> when, and only when, they appear in all capitals, as shown here.</t> </section> <sectiontitle='Use Cases' anchor='sec-use-cases'>anchor="sec-use-cases" numbered="true" toc="default"> <name>Use Cases</name> <t>This section defines use cases specific to data channels. Please note that this section is informational only.</t> <sectiontitle='Useanchor="sec-use-cases-unreliable" numbered="true" toc="default"> <name>Use Cases for Unreliable DataChannels' anchor='sec-use-cases-unreliable'> <t><list style='format U-C %d:' counter='UseCases'> <t>AChannels</name> <ol group="UseCases" spacing="normal" type="U-C %d:" indent="8"> <li>A real-time game where position and object state informationisare sent via one or more unreliable data channels. Note that at anytimetime, there may not benoany SRTP mediachannels,channels or all SRTP media channels may be inactive, andthatthere may also be reliable data channels inuse.</t> <t>Providinguse.</li> <li>Providing non-critical information to a user about the reason for a state update in a video chat or conference, such as mutestate.</t> </list></t>state.</li> </ol> </section> <sectiontitle='Useanchor="sec-use-cases-reliable" numbered="true" toc="default"> <name>Use Cases for Reliable DataChannels' anchor='sec-use-cases-reliable'> <t><list style='format U-C %d:' counter='UseCases'> <t>Channels</name> <ol group="UseCases" spacing="normal" type="U-C %d:" indent="8"> <li> A real-time game where critical state information needs to be transferred, such as control information. Such a game may have no SRTP media channels, or they may be inactive at any giventime,time or may only be added due to in-gameactions.</t> <t>Non-realtimeactions.</li> <li>Non-real-time file transfers between people chatting. Note that this may involve a large number of files to transfer sequentially or in parallel, such as when sharing a folder of images or a directory offiles.</t> <t>Realtimefiles.</li> <li>Real-time text chat during an audio and/or video call with an individual or with multiple people in aconference.</t> <t>Renegotiationconference.</li> <li>Renegotiation of the configuration of thePeerConnection.</t> <t>ProxyPeerConnection.</li> <li>Proxy browsing, where a browser uses data channels of a PeerConnection to send and receive HTTP/HTTPS requests and data, forexampleexample, to avoid local Internet filtering ormonitoring.</t> </list></t>monitoring.</li> </ol> </section> </section> <sectiontitle='Requirements' anchor='sec-req'>anchor="sec-req" numbered="true" toc="default"> <name>Requirements</name> <t>This section lists the requirements forP2PPeer-to-Peer (P2P) data channels between two browsers. Please note that this section is informational only.</t><t><list style='format Req. %d:'> <t>Multiple<ol spacing="normal" type="Req. %d:" indent="10"> <li>Multiple simultaneous data channels must be supported. Note that there may be0zero or more SRTP media streams in parallel with the data channels in the same PeerConnection, and the number and state (active/inactive) of these SRTP media streams may change at anytime.</t> <t>Bothtime.</li> <li>Both reliable and unreliable data channels must besupported.</t> <t>Datasupported.</li> <li>Data channels of a PeerConnection must be congestioncontrolled;controlled either individually, as a class, or in conjunction with the SRTP media streams of thePeerConnection, to ensurePeerConnection. This ensures that data channels don't cause congestion problems for these SRTP media streams, and that the WebRTC PeerConnection does not cause excessive problems when run in parallel with TCPconnections.</t> <t>Theconnections.</li> <li>The application should be able to provide guidance as to the relative priority of each data channel relative to eachother,other and relative to the SRTP media streams. This will interact with the congestion controlalgorithms.</t> <t>Dataalgorithms.</li> <li>Data channels must besecured; allowingsecured, which allows for confidentiality,integrityintegrity, and source authentication. See <xreftarget='I-D.ietf-rtcweb-security'/>target="RFC8826" format="default"/> and <xreftarget='I-D.ietf-rtcweb-security-arch'/>target="RFC8827" format="default"/> for detailedinfo.</t>information.</li> <!--<t>Consent and NAT traversal mechanism: These are handled by the PeerConnection's ICE <xref target='RFC5245'/> connectivity checks and optional TURN servers.</t>--><t>Data<li>Data channels must provide message fragmentation support such that IP-layer fragmentation can be avoided no matter how large a message the JavaScript application passes to be sent. It also must ensure that large data channel transfers don't unduly delay traffic on other datachannels.</t> <t>Thechannels.</li> <li>The data channel transport protocol must not encode local IP addresses inside its protocol fields; doing so reveals potentially privateinformation,information and leads to failure if the address is dependedupon.</t> <t>Theupon.</li> <li>The data channel transport protocol should support unbounded-length "messages" (i.e., a virtual socket stream) at the applicationlayer,layer for such things as image-file-transfer;Implementationsimplementations might enforce a reasonable message sizelimit.</t> <t>Thelimit.</li> <li>The data channel transport protocol should avoid IP fragmentation. It must supportPMTU (Path MTU)Path MTU (PMTU) discovery and must not rely on ICMP or ICMPv6 being generated or being passed back, especially for PMTUdiscovery.</t> <t>Itdiscovery.</li> <li>It must be possible to implement the protocol stack in the user applicationspace.</t> </list></t>space.</li> </ol> </section> <sectiontitle='SCTPanchor="sec-p-a-2" numbered="true" toc="default"> <name>SCTP over DTLS over UDPConsiderations' anchor='sec-p-a-2'>Considerations</name> <t>The important features of SCTP in the WebRTC contextare: <list style='symbols'> <t>Usageare the following: </t> <ul spacing="normal"> <li>Usage ofaTCP-friendly congestioncontrol.</t> <t>Thecontrol.</li> <li>modifiable congestion controlis modifiablefor integration with the SRTP media stream congestioncontrol.</t> <t>Supportcontrol.</li> <li>Support of multiple unidirectional streams, each providing its own notion of ordered messagedelivery.</t> <t>Supportdelivery.</li> <li>Support of ordered and out-of-order messagedelivery.</t> <t>Supporting arbitrarydelivery.</li> <li>Support of arbitrarily large user messages by providing fragmentation andreassembly.</t> <t>Supportreassembly.</li> <li>Support ofPMTU-discovery.</t> <t>SupportPMTU discovery.</li> <li>Support of reliable or partially reliable messagetransport.</t> </list></t>transport.</li> </ul> <t>The WebRTCData Channeldata channel mechanism does not support SCTP multihoming. The SCTP layer will simply act as if it were running on a single-homed host, since that is the abstraction that the DTLS layer (aconnection oriented,connection-oriented, unreliable datagram service) exposes.</t> <t>The encapsulation of SCTP over DTLS defined in <xreftarget='I-D.ietf-tsvwg-sctp-dtls-encaps'/>target="RFC8261" format="default"/> provides confidentiality, sourceauthenticated,authentication, andintegrity protectedintegrity-protected transfers. Using DTLS over UDP in combination withICEInteractive Connectivity Establishment (ICE) <xref target="RFC8445"/> enables middlebox traversal inIPv4IPv4- andIPv6 basedIPv6-based networks. SCTP as specified in <xreftarget='RFC4960'/> MUSTtarget="RFC4960" format="default"/> <bcp14>MUST</bcp14> be used in combination with the extension defined in <xreftarget='RFC3758'/>target="RFC3758" format="default"/> and provides the following features for transporting non-media data between browsers:<list style='symbols'> <t>Support</t> <ul spacing="normal"> <li>Support of multiple unidirectionalstreams.</t> <t>Orderedstreams.</li> <li>Ordered and unordered delivery of usermessages.</t> <t>Reliablemessages.</li> <li>Reliable andpartial-reliablepartially reliable transport of usermessages.</t> </list></t>messages.</li> </ul> <t>Each SCTP user message contains a Payload Protocol Identifier (PPID) that is passed to SCTP by its upper layer on the sending side and provided to its upper layer on the receiving side. The PPID can be used to multiplex/demultiplex multiple upper layers over a single SCTP association. In the WebRTC context, the PPID is used to distinguish between UTF-8 encoded user data,binary encoded userdatabinary-encoded user data, and the Data Channel Establishment Protocol (DCEP) defined in <xreftarget='I-D.ietf-rtcweb-data-protocol'/>.target="RFC8832" format="default"/>. Please note that the PPID is not accessible via the Javascript API.</t> <!-- <t>Moreover SCTP provides the possibility to transport different "protocols" over multiple streams and associations using the PPID (Payload Protocol Identifier). An application can set a different PPID with each send call. This allows the receiving application to look at this information (as well as the stream id/seq) on receiving to know what type of protocol the data payload has.</t> --> <t>The encapsulation of SCTP over DTLS, together with the SCTP features listedaboveabove, satisfies all the requirements listed in <xreftarget='sec-req'/>.</t>target="sec-req" format="default"/>.</t> <!-- <t>There are SCTP implementations for most Operating Systems in wide use:</t> <t> <list style='empty'> <t>Linux (mainline kernel 2.6.36)</t> <t>FreeBSD (release kernel 8.2)</t> <t>Mac OS X</t> <t>Windows (SctpDrv4)</t> <t>Solaris (OpenSolaris 2009.06)</t> <t>and a user-land SCTP implementation (based on the FreeBSD implementation).</t> </list> </t> <section title='User Space versus Kernel Implementation' anchor='sec-sctp-1'> <t>Even though kernel implementations of SCTP are already available for most platforms (see <xref target='sec-p-a-2'/> ), there are compelling reasons for using an SCTP stack that works well in user land.</t> <t>The main reason is deployability.</t> <t>Web browsers supporting WebRTC are expected to run on a wide range of old and new operating systems. They support operating systems 10 years old or more, they run on mobile and desktop operating systems, and they are highly portable to new operating systems. This is achieved by having a fairly narrow portability layer to minimize what needs to be supported on old operating systems and ported to new ones. This creates a need to implement as much functionality as possible inside the application instead of relying on the operating system.</t> <t>As a user-land implementation of SCTP is available, this meets requirement 12.</t> </section> --> <t>The layering of protocols for WebRTC is shown inthe following<xreftarget='fig-sctp-layering'/>.</t>target="fig-sctp-layering" format="default"/>.</t> <figuretitle='WebRTC protocol layers' anchor='fig-sctp-layering'>anchor="fig-sctp-layering"> <name>WebRTC Protocol Layers</name> <artworkalign='center'>align="center" name="" type="" alt=""><![CDATA[ +------+------+------+ | DCEP | UTF-8|Binary| | |dataData |dataData | +------+------+------+ | SCTP | +----------------------------------+ | STUN | SRTP | DTLS | +----------------------------------+ | ICE | +----------------------------------+ | UDP1 | UDP2 | UDP3 | ... | +----------------------------------+</artwork>]]></artwork> </figure> <t>This stack (especially in contrast to DTLS over SCTP <xreftarget='RFC6083'/>target="RFC6083" format="default"/> and in combination with SCTP over UDP <xreftarget='RFC6951'/>)target="RFC6951" format="default"/>) has been chosenbecause it <list style='symbols'> <t>supportsfor the following reasons: </t> <ul spacing="normal"> <li>supports the transmission ofarbitraryarbitrarily large usermessages.</t> <t>sharesmessages;</li> <li>shares the DTLS connection with the SRTP media channels of thePeerConnection.</t> <t>providesPeerConnection; and</li> <li>provides privacy for the SCTP controlinformation.</t> </list></t> <t>Consideringinformation.</li> </ul> <t>In the protocol stack of <xreftarget='fig-sctp-layering'/>target="fig-sctp-layering" format="default"/>, the usage of DTLS 1.0 over UDP is specified in <xreftarget='RFC4347'/>target="RFC4347" format="default"/> and the usage of DTLS 1.2 over UDP in specified in <xreftarget='RFC6347'/>,target="RFC6347" format="default"/>, while the usage of SCTP on top of DTLS is specified in <xreftarget='I-D.ietf-tsvwg-sctp-dtls-encaps'/>.target="RFC8261" format="default"/>. Please note that the demultiplexingSTUNSession Traversal Utilities for NAT (STUN) <xref target="RFC5389"/> vs. SRTP vs. DTLS is done as described inSection 5.1.2 of<xreftarget='RFC5764'/>target="RFC5764" sectionFormat="of" section="5.1.2"/>, and SCTP is the only payload of DTLS.</t> <t>Since DTLS is typically implemented in user application space, the SCTP stack also needs to be a user application space stack.</t> <t>The ICE/UDP layer can handle IP address changes during a session without needing interaction with the DTLS and SCTP layers. However, SCTPSHOULD<bcp14>SHOULD</bcp14> be notified when an addresschangeschange has happened. In thiscasecase, SCTPSHOULD<bcp14>SHOULD</bcp14> retest the Path MTU and reset the congestion state to the initial state. In the case ofa window basedwindow-based congestion control like the one specified in <xreftarget='RFC4960'/>,target="RFC4960" format="default"/>, this means setting the congestion window andslow startslow-start threshold to its initial values.</t> <t>Incoming ICMP or ICMPv6 messages can't be processed by the SCTP layer, since there is no way to identify the corresponding association.ThereforeTherefore, SCTPMUST<bcp14>MUST</bcp14> support performing Path MTU discovery without relying on ICMP or ICMPv6 as specified in <xreftarget='RFC4821'/>target="RFC4821" format="default"/> by using probing messages specified in <xreftarget='RFC4820'/>.target="RFC4820" format="default"/>. The initial Path MTU at the IP layerSHOULD NOT<bcp14>SHOULD NOT</bcp14> exceed 1200 bytes for IPv4 and 1280 bytes for IPv6.</t> <t>In general, thelower layerlower-layer interface of an SCTP implementation should be adapted to address the differences between IPv4 and IPv6 (beingconnection-less)connectionless) or DTLS (beingconnection-oriented).</t>connection oriented).</t> <t>When the protocol stack of <xreftarget='fig-sctp-layering'/>target="fig-sctp-layering" format="default"/> is used, DTLS protects the complete SCTP packet, so it provides confidentiality,integrityintegrity, and source authentication of the complete SCTP packet.</t> <t>SCTP provides congestion control on a per-associationbase.basis. 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 bytheSCTP congestion control. Using a congestion control different fromthanthe standard one might improve the impact on the parallel SRTP media streams.</t> <t>SCTP uses the same port number concept as TCP andUDP do. ThereforeUDP. Therefore, an SCTP association uses two port numbers, one at each SCTPend-point.</t>endpoint.</t> </section> <sectiontitle='Theanchor="sec-sctp-usage" numbered="true" toc="default"> <name>The Usage of SCTP for DataChannels' anchor='sec-sctp-usage'>Channels</name> <sectiontitle='SCTPnumbered="true" toc="default"> <name>SCTP ProtocolConsiderations'>Considerations</name> <t>The DTLS encapsulation of SCTP packets as described in <xreftarget='I-D.ietf-tsvwg-sctp-dtls-encaps'/> MUSTtarget="RFC8261" format="default"/> <bcp14>MUST</bcp14> be used.</t> <t>This SCTP stack and its upper layerMUST<bcp14>MUST</bcp14> support the usage of multiple SCTP streams. A user message can be sent ordered or unordered and with partial or full reliability.</t> <t>The following SCTP protocol extensions are required:<list style='symbols'> <t>The</t> <ul spacing="normal"> <li>The stream reconfiguration extension defined in <xreftarget='RFC6525'/> MUSTtarget="RFC6525" format="default"/> <bcp14>MUST</bcp14> be supported. It is used for closingchannels.</t> <t>Thechannels.</li> <li>The dynamic address reconfiguration extension defined in <xreftarget='RFC5061'/> MUSTtarget="RFC5061" format="default"/> <bcp14>MUST</bcp14> be used to signal the support of the stream reset extension defined in <xreftarget='RFC6525'/>.target="RFC6525" format="default"/>. Other features of <xreftarget='RFC5061'/>target="RFC5061" format="default"/> areOPTIONAL.</t> <t>The<bcp14>OPTIONAL</bcp14>.</li> <li>The partial reliability extension defined in <xreftarget='RFC3758'/> MUSTtarget="RFC3758" format="default"/> <bcp14>MUST</bcp14> be supported. In addition to the timed reliability PR-SCTP policy defined in <xreftarget='RFC3758'/>,target="RFC3758" format="default"/>, the limited retransmission policy defined in <xreftarget='I-D.ietf-tsvwg-sctp-prpolicies'/> MUSTtarget="RFC7496" format="default"/> <bcp14>MUST</bcp14> be supported. Limiting the number of retransmissions tozerozero, combined with unordereddeliverydelivery, provides a UDP-like service where each user message is sent exactly once and delivered in the orderreceived.</t> </list></t>received.</li> </ul> <t>The support for message interleaving as defined in <xreftarget='I-D.ietf-tsvwg-sctp-ndata'/> SHOULDtarget="RFC8260" format="default"/> <bcp14>SHOULD</bcp14> be used.</t> </section> <sectiontitle='SCTPanchor="sec-sctp-management" numbered="true" toc="default"> <name>SCTP AssociationManagement' anchor='sec-sctp-management'>Management</name> <t>In the WebRTC context, the SCTP association will be set up when the two endpoints of the WebRTC PeerConnection agree on opening it, as negotiated byJSEP (typicallythe JavaScript Session Establishment Protocol (JSEP), which is typically an exchange ofSDP)the Session Description Protocol (SDP) <xreftarget='I-D.ietf-rtcweb-jsep'/>.target="RFC8829" format="default"/>. It will use the DTLS connection selected viaICE;ICE, and typically this will be shared via BUNDLE or equivalent with DTLS connections used to key the SRTP media streams.</t> <!-- FIXME: Bundle Issue. --> <t>The number of streams negotiated during SCTP association setupSHOULD<bcp14>SHOULD</bcp14> be 65535, which is the maximum number of streams that can be negotiated during the association setup.</t> <t>SCTP supports two ways of terminating an SCTP association.AThe first method is a graceful one,usingwhere a procedurewhich ensuresthat ensures no messages are lost during the shutdown of theassociation.association is used. The second method is a non-graceful one, where one side can just abort the association.</t> <t>Each SCTPend-point supervisesendpoint continuously supervises the reachability of its peer by monitoring the number of retransmissions of user messages and test messages. In case of excessive retransmissions, the association is terminated in a non-graceful way.</t> <t>If an SCTP association is closed in a graceful way, all of its data channels are closed. In case of a non-graceful teardown, all data channels are also closed, but an error indicationSHOULD<bcp14>SHOULD</bcp14> be provided if possible.</t> </section> <sectiontitle='SCTP Streams'>numbered="true" toc="default"> <name>SCTP Streams</name> <t>SCTP defines a stream as a unidirectional logical channel existing within an SCTP association 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 ordered or unordered. Ordering is preserved only for ordered messages sent on the same stream.</t> </section> <sectiontitle='Datanumbered="true" toc="default"> <name>Data ChannelDefinition'>Definition</name> <t>Data channels are defined such that their accompanying application-level API can closely mirror the API for WebSockets, which implies bidirectional streams of data and a textual field called 'label' used to identify the meaning of the data channel.</t> <t>The realization of a data channel is a pair of one incoming stream and one outgoing SCTP stream having the same SCTP stream identifier. How these SCTP stream identifiers are selected is protocol and implementation dependent. This allows a bidirectional communication.</t> <t>Additionally, each data channel has the following properties in each direction:<list style='symbols'> <t>reliable</t> <ul spacing="normal"> <li>reliable or unreliable messagetransmission.transmission: In case of unreliable transmissions, the same level of unreliability is used.Please note thatNote that, inSCTPSCTP, this is a property of an SCTP user message and not of an SCTPstream.</t> <t>in-orderstream.</li> <li>in-order or out-of-order message delivery for messagesent. Please note thatsent: Note that, inSCTPSCTP, this is a property of an SCTP user message and not of an SCTPstream.</t> <t>Astream.</li> <li>a priority, which is a2 byte2-byte unsignedinteger.integer: These prioritiesMUST<bcp14>MUST</bcp14> be interpreted as weighted-fair-queuing scheduling priorities per the definition of the corresponding stream scheduler supporting interleaving in <xreftarget='I-D.ietf-tsvwg-sctp-ndata'/>.target="RFC8260" format="default"/>. For use in WebRTC, the values usedSHOULD<bcp14>SHOULD</bcp14> be one of 128 ("below normal"), 256 ("normal"), 512("high")("high"), or 1024 ("extrahigh").</t> <t>anhigh").</li> <li>an optionallabel.</t> <t>anlabel.</li> <li>an optionalprotocol.</t> </list></t> <t>Please noteprotocol.</li> </ul> <t>Note that for a data channel being negotiated with the protocol specified in <xreftarget='I-D.ietf-rtcweb-data-protocol'/>target="RFC8832" format="default"/>, all of the above properties are the same in both directions.</t> </section> <sectiontitle='Openingnumbered="true" toc="default"> <name>Opening a DataChannel'>Channel</name> <t>Data channels can be opened by using negotiation within the SCTPassociation, calledassociation (called in-bandnegotiation,negotiation) or out-of-band negotiation. Out-of-band negotiation is defined as any methodwhichthat results in an agreement as to the parameters of a channel and the creation thereof. The details are out of scope of this document. Applications using data channels need to use the negotiation methods consistently on bothend-points.</t>endpoints.</t> <t>A simple protocol for in-band negotiation is specified in <xreftarget='I-D.ietf-rtcweb-data-protocol'/>.</t>target="RFC8832" format="default"/>.</t> <t>When one side wants to open a channel using out-of-band negotiation, it picks a stream. Unless otherwise defined or negotiated, the streams are picked based on the DTLS role (the client picks even stream identifiers, and the server picks odd stream identifiers). However, the application is responsible for avoiding collisions with existing streams. If it attempts tore-usereuse a streamwhichthat is part of an existing data channel, the additionMUST<bcp14>MUST</bcp14> fail. In addition to choosing a stream, the applicationSHOULD<bcp14>SHOULD</bcp14> also determine the options tousebe used for sending messages. The applicationMUST<bcp14>MUST</bcp14> ensure in an application-specific manner that the application at the peer will also know the selected stream to be used,andas well as the options for sending data from that side.</t> </section> <sectiontitle='Transferringnumbered="true" toc="default"> <name>Transferring User Data on a DataChannel'>Channel</name> <t>All data sent on a data channel in both directionsMUST<bcp14>MUST</bcp14> be sent over the underlying stream using the reliability defined when the data channel wasopenedopened, unless the options arechanged,changed or per-message options are specified by a higher level.</t> <t>Themessage-orientationmessage orientation of SCTP is used to preserve the message boundaries of user messages. Therefore, sendersMUST NOT<bcp14>MUST NOT</bcp14> put more than one application message into an SCTP user message. Unless the deprecated PPID-based fragmentation and reassembly is used, the senderMUST<bcp14>MUST</bcp14> include exactly one application message in each SCTP user message.</t> <t>The SCTP Payload Protocol Identifiers (PPIDs) are used to signal the interpretation of the"Payload"payload data". The following PPIDsMUST<bcp14>MUST</bcp14> be used (see <xreftarget='sec-IANA'/>): <list style="hanging"> <t hangText='WebRTC String:'>target="sec-IANA" format="default"/>): </t> <dl newline="false" spacing="normal"> <dt>WebRTC String:</dt> <dd> to identify a non-empty JavaScript string encoded inUTF-8.</t> <t hangText='WebRTCUTF-8.</dd> <dt>WebRTC StringEmpty:'>Empty:</dt> <dd> to identify an empty JavaScript string encoded inUTF-8.</t> <t hangText='WebRTC Binary:'>UTF-8.</dd> <dt>WebRTC Binary:</dt> <dd> to identifyanon-empty JavaScript binary data (ArrayBuffer,ArrayBufferViewArrayBufferView, orBlob).</t> <t hangText='WebRTCBlob).</dd> <dt>WebRTC BinaryEmpty:'>Empty:</dt> <dd> to identifyanempty JavaScript binary data (ArrayBuffer,ArrayBufferViewArrayBufferView, orBlob).</t> </list></t>Blob).</dd> </dl> <t>SCTP does not support the sending of empty user messages. Therefore, if an empty message has to be sent, the appropriate PPID (WebRTC String Empty or WebRTC Binary Empty) isusedused, and the SCTP user message of one zero byte is sent. When receiving an SCTP user message with one of these PPIDs, the receiverMUST<bcp14>MUST</bcp14> ignore the SCTP user message and process it as an empty message.</t> <t>The usage of the PPIDs "WebRTC String Partial" and "WebRTC Binary Partial" is deprecated. They were used for a PPID-based fragmentation and reassembly of user messages belonging to reliable and ordered data channels.</t> <t>If a message with an unsupported PPID is received or some error condition related to the received message is detected by the receiver (for example, illegal ordering), the receiverSHOULD<bcp14>SHOULD</bcp14> close the corresponding data channel. This implies in particular that extensions using additional PPIDs can't be used without prior negotiation.</t> <t>The SCTP base protocol specified in <xreftarget='RFC4960'/>target="RFC4960" format="default"/> does not support the interleaving of user messages.ThereforeTherefore, sending a large user message can monopolize the SCTP association. To overcome this limitation, <xreftarget='I-D.ietf-tsvwg-sctp-ndata'/>target="RFC8260" format="default"/> defines an extension to support message interleaving, whichSHOULD<bcp14>SHOULD</bcp14> be used. As long as message interleaving is not supported, the senderSHOULD<bcp14>SHOULD</bcp14> limit the maximum message size to 16 KB to avoid monopolization.</t> <t>It is recommended that the message size be kept within certain sizeboundsbounds, as applications will not be able to supportarbitrarily-largearbitrarily large single messages. This limit has to be negotiated, forexampleexample, by using <xreftarget='I-D.ietf-mmusic-sctp-sdp'/>.</t>target="RFC8841" format="default"/>.</t> <t>The senderSHOULD<bcp14>SHOULD</bcp14> disable the Nagle algorithm (see <xreftarget='RFC1122'/>)target="RFC1122" format="default"/>) to minimize the latency.</t> </section> <sectiontitle='Closingnumbered="true" toc="default"> <name>Closing a DataChannel'>Channel</name> <t>Closing of a data channelMUST<bcp14>MUST</bcp14> be signaled by resetting the corresponding outgoing streams <xreftarget='RFC6525'/>.target="RFC6525" format="default"/>. This means that if one side decides to close the data channel, it resets the corresponding outgoing stream. When the peer sees that an incoming stream was reset, it also resets its corresponding outgoing stream. Once this is completed, the data channel is closed. Resetting a stream sets 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 for reuse after a reset has been performed.</t> <t><xreftarget='RFC6525'/>target="RFC6525" format="default"/> also guarantees that all the messages are delivered (or abandoned) before the stream is reset.</t> </section> </section> <sectiontitle='Security Considerations' anchor='sec-security'>anchor="sec-security" numbered="true" toc="default"> <name>Security Considerations</name> <t>This document does not add any additional considerations to the ones given in <xreftarget='I-D.ietf-rtcweb-security'/>target="RFC8826" format="default"/> and <xreftarget='I-D.ietf-rtcweb-security-arch'/>.</t>target="RFC8827" format="default"/>.</t> <t>It should be noted that a receiver must be preparedthat thefor a sender that tries to sendarbitraryarbitrarily large messages.</t> </section> <sectiontitle='IANA Considerations' anchor='sec-IANA'> <t>[NOTE to RFC-Editor: <list> <t>"RFCXXXX" is to be replaced by the RFC number you assign this document.</t> </list> ]</t>anchor="sec-IANA" numbered="true" toc="default"> <name>IANA Considerations</name> <t>This document uses six already registered SCTP Payload Protocol Identifiers (PPIDs): "DOMString Last", "Binary Data Partial", "Binary Data Last", "DOMString Partial", "WebRTC String Empty", and "WebRTC Binary Empty". <xreftarget='RFC4960'/>target="RFC4960" format="default"/> creates theregistry"SCTP Payload Protocol Identifiers" registry from which these identifiers were assigned. IANAis requested to updatehas updated the reference of these six assignments to point to this document andchangechanged the names of the first four PPIDs. The corresponding datesshould be kept.</t> <t>Therefore theseremain unchanged.</t> <t>The six assignmentsshould behave been updated to read:</t><texttable> <ttcol align='left'>Value</ttcol> <ttcol align='left'>SCTP PPID</ttcol> <ttcol align='left'>Reference</ttcol> <ttcol align='left'>Date</ttcol> <c>WebRTC String</c> <c>51</c> <c>[RFCXXXX]</c> <c>2013-09-20</c> <c>WebRTC<table align="center"> <thead> <tr> <th align="left">Value</th> <th align="left">SCTP PPID</th> <th align="left">Reference</th> <th align="left">Date</th> </tr> </thead> <tbody> <tr> <td align="left">WebRTC String</td> <td align="left">51</td> <td align="left">RFC 8831</td> <td align="left">2013-09-20</td> </tr> <tr> <td align="left">WebRTC Binary Partial(Deprecated)</c> <c>52</c> <c>[RFCXXXX]</c> <c>2013-09-20</c> <c>WebRTC Binary</c> <c>53</c> <c>[RFCXXXX]</c> <c>2013-09-20</c> <c>WebRTC(deprecated)</td> <td align="left">52</td> <td align="left">RFC 8831</td> <td align="left">2013-09-20</td> </tr> <tr> <td align="left">WebRTC Binary</td> <td align="left">53</td> <td align="left">RFC 8831</td> <td align="left">2013-09-20</td> </tr> <tr> <td align="left">WebRTC String Partial(Deprecated)</c> <c>54</c> <c>[RFCXXXX]</c> <c>2013-09-20</c> <c>WebRTC(deprecated)</td> <td align="left">54</td> <td align="left">RFC 8831</td> <td align="left">2013-09-20</td> </tr> <tr> <td align="left">WebRTC StringEmpty</c> <c>56</c> <c>[RFCXXXX]</c> <c>2014-08-22</c> <c>WebRTCEmpty</td> <td align="left">56</td> <td align="left">RFC 8831</td> <td align="left">2014-08-22</td> </tr> <tr> <td align="left">WebRTC BinaryEmpty</c> <c>57</c> <c>[RFCXXXX]</c> <c>2014-08-22</c> </texttable>Empty</td> <td align="left">57</td> <td align="left">RFC 8831</td> <td align="left">2014-08-22</td> </tr> </tbody> </table> </section> </middle> <back> <references> <name>References</name> <references> <name>Normative References</name> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.3758.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4347.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4820.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4821.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.4960.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5061.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8445.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6347.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6525.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8260.xml"/> <!--draft-ietf-rtcweb-data-protocol: 8832 --> <reference anchor="RFC8832" target="https://www.rfc-editor.org/info/rfc8832"> <front> <title>WebRTC Data Channel Establishment Protocol</title> <author initials='R.' surname='Jesup' fullname='Randell Jesup'> <organization/> </author> <author initials='S.' surname='Loreto' fullname='Salvatore Loreto'> <organization/> </author> <author initials='M' surname='Tüxen' fullname='Michael Tüxen'> <organization/> </author> <date month='October' year='2020'/> </front> <seriesInfo name="RFC" value="8832"/> <seriesInfo name="DOI" value="10.17487/RFC8832"/> </reference> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.8261.xml"/> <!--draft-ietf-rtcweb-security: RFC 8826 --> <reference anchor="RFC8826" target="https://www.rfc-editor.org/info/rfc8826"> <front> <title>Security Considerations for WebRTC</title> <author initials='E.' surname='Rescorla' fullname='Eric Rescorla'> <organization/> </author> <date month='October' year='2020'/> </front> <seriesInfo name="RFC" value="8826"/> <seriesInfo name="DOI" value="10.17487/RFC8826"/> </reference> <!--draft-ietf-rtcweb-security-arch: 8827 --> <reference anchor="RFC8827" target="https://www.rfc-editor.org/info/rfc8827"> <front> <title>WebRTC Security Architecture</title> <author initials='E.' surname='Rescorla' fullname='Eric Rescorla'> <organization/> </author> <date month='October' year='2020'/> </front> <seriesInfo name="RFC" value="8827"/> <seriesInfo name="DOI" value="10.17487/RFC8827"/> </reference> <!--draft-ietf-rtcweb-jsep: 8829 --> <reference anchor="RFC8829" target="https://www.rfc-editor.org/info/rfc8829"> <front> <title>JavaScript Session Establishment Protocol (JSEP)</title> <author initials='J.' surname='Uberti' fullname='Justin Uberti'> <organization/> </author> <author initials="C." surname="Jennings" fullname="Cullen Jennings"> <organization/> </author> <author initials="E." surname="Rescorla" fullname="Eric Rescorla" role="editor"> <organization/> </author> <date month='October' year='2020'/> </front> <seriesInfo name="RFC" value="8829"/> <seriesInfo name="DOI" value="10.17487/RFC8829"/> </reference> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7496.xml"/> <!-- draft-ietf-mmusic-sctp-sdp: 8841 --> <reference anchor="RFC8841" target="https://www.rfc-editor.org/info/rfc8841"> <front> <title>Session Description Protocol (SDP) Offer/Answer Procedures for Stream Control Transmission Protocol (SCTP) over Datagram Transport Layer Security (DTLS) Transport</title> <author initials="C." surname="Holmberg" fullname="Christer Holmberg"> <organization /> </author> <author initials="R." surname="Shpount" fullname="Roman Shpount"> <organization /> </author> <author initials="S." surname="Loreto" fullname="Salvatore Loreto"> <organization /> </author> <author initials="G." surname="Camarillo" fullname="Gonzalo Camarillo"> <organization /> </author> <date month="October" year="2020" /> </front> <seriesInfo name="RFC" value="8841" /> <seriesInfo name="DOI" value="10.17487/RFC8841"/> </reference> </references> <references> <name>Informative References</name> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.1122.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5389.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.5764.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6083.xml"/> <xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.6951.xml"/> </references> </references> <sectiontitle='Acknowledgments'>numbered="false" toc="default"> <name>Acknowledgements</name> <t>Many thanks for comments, ideas, and text fromHarald Alvestrand, Richard Barnes, Adam Bergkvist, Alissa Cooper, Benoit Claise, Spencer Dawkins, Gunnar Hellstrom, Christer Holmberg, Cullen Jennings, Paul Kyzivat, Eric Rescorla, Adam Roach, Irene Ruengeler, Randall Stewart, Martin Stiemerling, Justin Uberti, and Magnus Westerlund.</t><contact fullname="Harald Alvestrand"/>, <contact fullname="Richard Barnes"/>, <contact fullname="Adam Bergkvist"/>, <contact fullname="Alissa Cooper"/>, <contact fullname="Benoit Claise"/>, <contact fullname="Spencer Dawkins"/>, <contact fullname="Gunnar Hellström"/>, <contact fullname="Christer Holmberg"/>, <contact fullname="Cullen Jennings"/>, <contact fullname="Paul Kyzivat"/>, <contact fullname="Eric Rescorla"/>, <contact fullname="Adam Roach"/>, <contact fullname="Irene Rüngeler"/>, <contact fullname="Randall Stewart"/>, <contact fullname="Martin Stiemerling"/>, <contact fullname="Justin Uberti"/>, and <contact fullname="Magnus Westerlund"/>.</t> </section></middle> <back> <references title='Normative References'> <?rfc include='reference.RFC.2119' ?> <?rfc include='reference.RFC.3758'?> <?rfc include='reference.RFC.4347'?> <?rfc include='reference.RFC.4820'?> <?rfc include='reference.RFC.4821'?> <?rfc include='reference.RFC.4960'?> <?rfc include='reference.RFC.5061'?> <?rfc include='reference.RFC.5245'?> <?rfc include='reference.RFC.6347'?> <?rfc include='reference.RFC.6525'?> <?rfc include='reference.I-D.ietf-tsvwg-sctp-ndata'?> <?rfc include='reference.I-D.ietf-rtcweb-data-protocol'?> <?rfc include='reference.I-D.ietf-tsvwg-sctp-dtls-encaps'?> <?rfc include='reference.I-D.ietf-rtcweb-security'?> <?rfc include='reference.I-D.ietf-rtcweb-security-arch'?> <?rfc include='reference.I-D.ietf-rtcweb-jsep'?> <?rfc include='reference.I-D.ietf-tsvwg-sctp-prpolicies'?> <?rfc include='reference.I-D.ietf-mmusic-sctp-sdp'?> </references> <references title='Informative References'> <?rfc include='reference.RFC.1122'?> <?rfc include='reference.RFC.5764'?> <?rfc include='reference.RFC.6083'?> <?rfc include='reference.RFC.6951'?> </references></back> </rfc>