views:

781

answers:

5

I recently checked out the book "UNIX Network Programming, Vol. 1" by Richards Stevens and I found that there is a third transport layer standard besides TCP and UDP: SCTP.

Summary: SCTP is a transport-level protocal that is is message driven like UDP, but reliable like TCP. Here is a short introduction from IBM DeveloperWorks.

Honestly, I have never heard of SCTP before. I can't remember reading about it in any networking books or headed about it in classes I had taken. Reading other stackoverflow questions that mentions SCTP suggests that I'm not alone with this lack of knowledge.

Why is SCTP so unknown? Why is it not much used?

+4  A: 

Reading the SCTP Wikipedia page I'd say that the main reason is that SCTP is a very young protocol (proposed in 2000) that is currently unsupported by the mainstream OSs (Windows, OS X, Linux).

If "very young" seems inappropriate to you, think about IPV6: "in December 2008, despite marking its 10th anniversary as a Standards Track protocol, IPv6 was only in its infancy in terms of general worldwide deployment."

IlDan
According to the Wikipedia article you linked to, SCTP is implemented in Linux, Solaris, FreeBSD, HP-UX and others.
spatz
A: 

It might not be well known, but it's not unused. Quite recently there was a draft published at the IETF about Using SCTP as a Transport Layer Protocol for HTTP.

mkoeller
A: 

Sctp is born too late, and for many situation TCP is enough.

Also, as I know most of its usage is on telecommunication area.

arsane
+6  A: 

Indeed SCTP is used mostly in telecom area. Traditionally telecom switches using SS7 (Singling System num 7) to interconnect different entities in telecom network. For example - telecom provider's subscriber data base(HLR), with switch (MSC), the subscriber is connected too. (MSC).

The telecom area is moving to a higher speeds and more reachable environment. Part of these changes is to replace SS7 protocol by some more elegant, fast and flexible IP based protocol.

Telecom area is very conservative. SS7 network is used here for decades. It is very reliable and closed network. This means a regular user has no any access to it.

IP network in contrast is open and not relyible and telecom will not drop it if it won't receive at least what SS7 gives. Here come an invention of SCTP. It tries

  • to mimic all advantages of SS7 network accumulated over the decades.
  • create a connection oriented protocol better then TCP in speed, security, redundancy

Latest releases of Linux already have a support of SCTP.

dimba
specifically you should look at the output from the IETF's "SIGTRAN" working group which wrote up the mapping between SS7 and SCTP.
Alnitak
+5  A: 

SCTP requires more design within the application to get the best use of it. There are more options than TCP, the Sockets-like API came later, and it is young. However I think most people that take the time to understand it (and who know the shortcomings of TCP) appreciate it -- it is a well designed protocol that builds on our ~30 years of knowledge of TCP and UDP.

One of the aspects that requires some thought is that of streams. Streams provide (usually, I think you can turn it off) an order guarantee within them (much like a TCP connection) but there can be multiple streams per SCTP connection. If your application's data can be sent over multiple streams then you avoid head-of-line blocking where the receiver starves due to one mislaid packet. Effectively different conversations can be had over the same connection without impacting each other.

Another useful addition is that of multi-homing support -- one connection can be across multiple interfaces on both ends and it copes with failures. You can emulate this in TCP, but at the application layer.

Proper link heartbeating, which is the first thing any application using TCP for non-transient connections implements, is there for free.

My personal summary of SCTP is that it doesn't do anything you couldn't do another way (in TCP or UDP) with substantial application support. The thing it provides is the ability to not have to implement that code (badly) yourself.

FYI, SCTP is mandated as supported for Diameter (cf RADIUS next gen). see RFC 3588

   Diameter clients MUST support either TCP or SCTP, while agents and
   servers MUST support both.  Future versions of this specification MAY
   mandate that clients support SCTP.
Bwooce