Stream Control Transmission Protocol

In computer networking, the Stream Control Transmission Protocol (SCTP) is a transport-layer protocol, serving in a similar role to the popular protocols TCP and UDP. It is standardized by IETF in RFC 4960.

SCTP provides some of the same service features of both: it is message-oriented like UDP and ensures reliable, in-sequence transport of messages with congestion control like TCP; it differs from these in providing multi-homing and redundant paths to increase resilience and reliability.

In the absence of native SCTP support in operating systems it is possible to tunnel SCTP over UDP,[1] as well as mapping TCP API calls to SCTP ones.[2] The reference implementation was released as part of FreeBSD version 7. It has subsequently been widely ported.

Formal oversight

The IETF Signaling Transport (SIGTRAN) working group defined the protocol (number 132[3])in 2000,[4] and the IETF Transport Area (TSVWG) working group maintains it. RFC 4960 defines the protocol. RFC 3286 provides an introduction.

Message-based multi-streaming

SCTP applications submit their data to be transmitted in messages (groups of bytes) to the SCTP transport layer. SCTP places messages and control information into separate chunks (data chunks and control chunks), each identified by a chunk header. The protocol can fragment a message into a number of data chunks, but each data chunk contains data from only one user message. SCTP bundles the chunks into SCTP packets. The SCTP packet, which is submitted to the Internet Protocol, consists of a packet header, SCTP control chunks (when necessary), followed by SCTP data chunks (when available).

One can characterize SCTP as message-oriented, meaning it transports a sequence of messages (each being a group of bytes), rather than transporting an unbroken stream of bytes as does TCP. As in UDP, in SCTP a sender sends a message in one operation, and that exact message is passed to the receiving application process in one operation. In contrast, TCP is a stream-oriented protocol, transporting streams of bytes reliably and in order. However TCP does not allow the receiver to know how many times the sender application called on the TCP transport passing it groups of bytes to be sent out. At the sender, TCP simply appends more bytes to a queue of bytes waiting to go out over the network, rather than having to keep a queue of individual separate outbound messages which must be preserved as such.

The term multi-streaming refers to the capability of SCTP to transmit several independent streams of chunks in parallel, for example transmitting web page images together with the web page text. In essence, it involves bundling several connections into a single SCTP association, operating on messages (or chunks) rather than bytes.

TCP preserves byte order in the stream by including a sequence number with each segment. SCTP, on the other hand, assigns a sequence number to each message sent in a stream. This allows independent ordering of messages in different streams. However, message ordering is optional in SCTP; a receiving application may choose to process messages in the order of receipt instead of in the order of sending.

Features

Features of SCTP include:

The designers of SCTP originally intended it for the transport of telephony (Signaling System 7) over Internet Protocol, with the goal of duplicating some of the reliability attributes of the SS7 signaling network in IP. This IETF effort is known as SIGTRAN. In the meantime, other uses have been proposed, for example, the Diameter protocol[5] and Reliable server pooling (RSerPool).[6]

Motivations

TCP has provided the primary means to transfer data reliably across the Internet. However, TCP has imposed limitations on several applications. From RFC 4960:

  • TCP provides both reliable data transfer and strict order-of-transmission delivery of data. Some applications need reliable transfer without sequence maintenance, while others would be satisfied with partial ordering of the data. In both of these cases, the head-of-line blocking offered by TCP causes unnecessary delay.
  • The stream-oriented nature of TCP is often an inconvenience. Applications must add their own record marking to delineate their messages, and must make explicit use of the push facility to ensure that a complete message is transferred in a reasonable time.
  • The limited scope of TCP sockets complicates the task of providing highly-available data transfer capability using multi-homed hosts.
  • TCP is relatively vulnerable to denial-of-service attacks, such as SYN attacks.

Multi homing

SCTP provides redundant paths to increase reliability.

SCTP Multihoming

Each SCTP end point needs to check reachability of the primary and redundant addresses of the remote end point using a heartbeat. Each SCTP end point needs to ack the heartbeats it receives from the remote end point.

When SCTP sends a message to a remote address, the source interface will only be decided by the routing table of the host (and not by SCTP).

Asymmetric multi homing

In asymmetric multi homing, one of the two end points does not support multi homing.

Local multi homing - Remote single homing

In Local multi homing and Remote single homing, if the remote primary address is not reachable, the SCTP association fails even if an alternate path is possible.

Asymmetric Multi homing : Local Multi homing - Remote Single homing

Local single homing - Remote multi homing

Asymmetric multi homing : Local Single homing - Remote multi homing

Packet structure

Main article: SCTP packet structure
Bits 0–7 8–15 16–23 24–31
+0 Source port Destination port
32 Verification tag
64 Checksum
96 Chunk 1 type Chunk 1 flags Chunk 1 length
128 Chunk 1 data
Chunk N type Chunk N flags Chunk N length
Chunk N data

SCTP packets have a simpler basic structure than TCP packets. Each consists of two basic sections:

  1. The common header, which occupies the first 12 bytes and is highlighted in blue, and
  2. The data chunks, which occupy the remaining portion of the packet. The first chunk is highlighted in green, and the last of N chunks (Chunk N) is highlighted in red.

Each chunk starts with a one byte type identifier, with 15 chunk types currently defined by RFC 4960. Eight flag bits, a two byte length field and the data compose the remainder of the chunk. If the chunk does not form a multiple of 4 bytes (i.e., the length is not a multiple of 4) then it is padded with zeros which are not included in the chunk length. The two byte length field limits each chunk to a 65,535 byte length (including the type, flags and length fields).

Security

Although encryption was not part of the original SCTP design, SCTP was designed with features for improved security, such as 4-way handshake (compared to TCP 3-way handshake) to protect against SYN flooding attacks, and large "cookies" for association verification and authenticity.

Reliability was also a key part of the security design of SCTP. Multihoming enables an association to stay open even when some routes and interfaces are down. This is of particular importance for SIGTRAN as it carries SS7 over an IP network using SCTP, and requires strong resilience during link outages to maintain telecommunication service even when enduring network anomalies.

SCTP is sometimes a good fingerprinting candidate. Some operating systems ship with SCTP support enabled, and, as it is not as well known as TCP or UDP, it is sometimes overlooked in firewall and intrusion detection configurations, thus often permitting probing traffic.

Implementations

The SCTP reference implementation runs on FreeBSD, Mac OS X, Microsoft Windows, and Linux.[7]

The following operating systems implement SCTP:

Third-party drivers:

Userspace library:

The following applications implement SCTP:

RFC history

See also

References

  1. Tuexen, Michael; Randall R. Stewart (May 2013). UDP Encapsulation of Stream Control Transmission Protocol (SCTP) Packets for End-Host to End-Host Communication. IETF. RFC 6951. https://tools.ietf.org/html/rfc6951.
  2. Bickhart, Ryan; Paul D. Amer; Randall R. Stewart (2007). "Transparent TCP-to-SCTP Translation Shim Layer" (PDF). Retrieved 2008-09-13.
  3. "Protocol Numbers". iana.org. IANA. Retrieved 2014-09-09.
  4. Stream Control Transmission Protocol. IETF. October 2000. RFC 2960. https://tools.ietf.org/html/rfc2960.
  5. "Transport". Diameter Base Protocol. IETF. sec. 2.1. RFC 3588. https://tools.ietf.org/html/rfc3588#section-2.1. Retrieved 2012-05-18.
  6. "Example Scenario Using RSerPool Session Services". An Overview of Reliable Server Pooling Protocols. IETF. p. 10. sec. 4.2. RFC 5351. https://tools.ietf.org/html/rfc5351#section-4.2.
  7. "Reference Implementation for SCTP - RFC4960". Retrieved 2013-10-14. This is the reference implementation for SCTP. It is portable and runs on FreeBSD/MAC-OS/Windows and in User Space (including linux).
  8. "DragonFly Removes SCTP". Lists.dragonflybsd.org. Retrieved 2016-04-28.
  9. "About FreeBSD's Technological Advances". The FreeBSD Project. 2008-03-09. Retrieved 2008-09-13. SCTP: FreeBSD 7.0 is the reference implementation for the new IETF Stream Control Transmission Protocol (SCTP) protocol, intended to support VoIP, telecommunications, and other applications with strong reliability and variable quality transmission through features such as multi-path delivery, fail-over, and multi-streaming.
  10. "Stream Control Transmission Protocol (SCTP)". Hewlett-Packard Development Company.
  11. "TCP/IP Networking". QNX Developer Support. QNX Software Systems. Retrieved 2008-09-13."What's New in this Reference". QNX Library Reference. QNX Software Systems. Retrieved 2012-12-18.
  12. "Solaris 10 Operating System Networking — Extreme Network Performance". Sun Microsystems. Retrieved 2008-09-13.
  13. "SctpDrv: an SCTP driver for Microsoft Windows". Retrieved 2011-02-04.
  14. "SCTP Network Kernel Extension for Mac OS X".
  15. https://github.com/sctplab/usrsctp
  16. "SCTP Download Page". 2006-05-29. Retrieved 2011-02-04.
  17. "Windows SCTP library installer". Retrieved 2011-02-04.
  18. Seggelmann, R.; Tuxen, M.; Rathgeb, E.P. (18–20 July 2012). "SSH over SCTP — Optimizing a multi-channel protocol by adapting it to SCTP". Communication Systems, Networks & Digital Signal Processing (CSNDSP), 2012 8th International Symposium on: 1–6. doi:10.1109/CSNDSP.2012.6292659. ISBN 978-1-4577-1473-3.

External links

This article is issued from Wikipedia - version of the 11/11/2016. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.