Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SCTP and webrtc

Tags:

webrtc

sctp

I saw that SCTP is going to be used for Data Channels starting in Chrome 31, and officially RTP based channels are going to be deprecated sometimes in February 2014 according to this google group thread:

https://groups.google.com/forum/#!topic/discuss-webrtc/y2A97iCByTU

Does this also mean that webrtc audio and video channels are also going to be transported over SCTP eventually(if not already in the works)?

How does RTP fit in the whole SCTP transport effort? Does that mean SRTP packets will flow over SCTP data channel? Or perhaps just the payload will be sent over SCTP transport protocol.

If I am reading info on SCTP, it combines best of TCP and UDP protocols; but it does not include encryption by default; so in mind the traffic flowing over should still be encrypted.

Any additional info would be helpful. Thanks!

like image 484
Aki Avatar asked Nov 19 '13 16:11

Aki


People also ask

Does WebRTC use Sctp?

WebRTC uses the Stream Control Transmission Protocol (SCTP), defined in RFC 4960. SCTP is a transport layer protocol that was intended as an alternative to TCP or UDP. For WebRTC we use it as an application layer protocol which runs over our DTLS connection.

What is data channel in WebRTC?

What is a data channel? A WebRTC data channel lets you send text or binary data over an active connection to a peer. In the context of a game, this lets players send data to each other, whether text chat or game status information.


2 Answers

The audio and video will keep going over RTP (actually SRTP which is the secure version or RTP) but the data channel will uses SCTP over DTLS over UDP. Both Firefox and Chrome are implementing this and you can find it described in the IETF draft specifications. For some types of NAT / Firewall traversal, the UDP packets may get tunneled in TURN over TCP.

Glad to provide you pointers to the draft specifications if that helps.

like image 70
Cullen Fluffy Jennings Avatar answered Sep 19 '22 00:09

Cullen Fluffy Jennings


SCTP stands for Stream Control Transmission Protocol.

SCTP as a protocol can be seen as a hybrid of UDP and TCP.

At its core, SCTP holds the following characteristics:

Connection oriented. Similar to TCP, SCTP is connection oriented. It also offers a multi-homing capability that isn’t used by WebRTC Optional reliability. Reliability is optional in SCTP and is up to the implementer using SCTP to decide if he needs this capability or not Optional ordering. Ordering of packets sent via SCTP is optional and is left for the implementer to decide if this is necessary for him or not Message oriented. SCTP makes sure that each message sent is properly parsed on the receiver end in the same manner in which it was sent Flow control. Similar to TCP, SCTP provides a flow control mechanism that makes sure the network doesn’t get congested SCTP is not implemented by all operating systems. In such cases, an application level implementation of SCTP will usually be used.

SCTP is used in WebRTC for the implementation and delivery of the Data Channel.

Google is experimenting with the QUIC protocol as a future replacement to SCTP

like image 20
Ahmet Karakaya Avatar answered Sep 20 '22 00:09

Ahmet Karakaya