Stream Control Transmission Protocol

From Wikipedia, the free encyclopedia

Jump to: navigation, search

In computer networking, the Stream Control Transmission Protocol (SCTP) is a Transport Layer protocol, serving in a similar role as the popular protocols TCP and UDP. Indeed, it provides some of the same service features of both, ensuring reliable, in-sequence transport of messages with congestion control.

The protocol was defined by the IETF Signaling Transport (SIGTRAN) working group in 2000. RFC 4960 defines the protocol. RFC 3286 provides an introduction.

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]

Contents

[edit] Message-based multi-streaming

Whereas TCP is stream-oriented, i.e., transports byte streams, SCTP is transaction-oriented, meaning it transports data in one or more messages. A message is a group of bytes sent in one transaction (transmit operation). Although TCP correctly reorders data that arrives out of order, it is concerned only with bytes. It does not honor message boundaries, i.e., the structure of data in terms of their original transmission units at the sender. SCTP, in contrast, conserves message boundaries by operating on whole messages in a fashion similar to the User Datagram Protocol (UDP). This means that a group of bytes that is sent in one transmission operation (transaction) is read exactly as that group, called message, at the receiver.

The term "multi-streaming" refers to the capability of SCTP to transmit several independent streams of messages in parallel, for example transmitting Web page images together with the Web page text. You can think of multi-streaming as bundling several TCP connections into a single SCTP association, operating on messages rather than bytes.

TCP preserves byte order in the stream by assigning a sequence number to each byte. 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 they are received instead of the order they were sent.

[edit] Benefits

Benefits of SCTP include:

  • Multihoming support, where one (or both) endpoints of a connection can consist of more than one IP address, enabling transparent fail-over between redundant network paths.
  • Delivery of data in chunks within independent streams - this eliminates unnecessary head-of-line blocking, as opposed to TCP byte-stream delivery.
  • Path Selection and Monitoring - Selects a "primary" data transmission path and tests the connectivity of the transmission path.
  • Validation and Acknowledgment mechanisms - Protects against flooding attacks and provides notification of duplicated or missing data chunks.
  • Improved error detection suitable for jumbo Ethernet frames.

The designers of SCTP originally intended it for the transport of telephony (Signaling System 7) protocols over IP, 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 and Reliable server pooling ("RSerPool").

[edit] Motivations

Transmission Control Protocol (TCP) has provided the primary means to transfer data across the Internet in a reliable way.

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.

These limitations affect the performance of IP over public switched telephone networks.

[edit] Comparison between transport layers

Feature Name UDP TCP SCTP
Connection oriented No Yes Yes
Reliable transport No Yes Yes
Preserve message boundary Yes No Yes
Ordered delivery No Yes Yes
Unordered delivery Yes No Yes
Data checksum Yes Yes Yes
Checksum size (bits) 16 16 32
Path MTU No Yes Yes
Congestion control No Yes Yes
Multiple streams No No Yes
Multi-homing support No No Yes
Bundling / Nagle No Yes Yes

[edit] Implementations

The following operating systems implement SCTP:

Various third-party implementations of SCTP exist for other operating systems. FreeBSD contains the SCTP reference implementation.[3]

Userspace library:

[edit] Packet structure

Main article: SCTP packet structure
Bits 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 or UDP 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 has a type identifier that is one byte long yielding, at most, 255 different chunk types. RFC 4960 defines a list of chunk types and there are currently 15 types defined. The remainder of the chunk is a two byte length (maximum size of 65,535 bytes) and the data. If the chunk does not form a multiple of 4 bytes (i.e., the length is not a multiple of 4) then it is implicitly padded with zeros which are not included in the chunk length.

[edit] References

  1. ^ Ong, Lyndon; Randall R. Stewart; Qiaobing Xie. "Tunneling of SCTP over Single UDP Port".
  2. ^ Bickhar, Ryan; Paul D. Amer; Randall R. Stewart (2007). "Transparent TCP-to-SCTP Translation Shim Layer" (PDF). Retrieved on 2008-09-13.
  3. ^ a b "About FreeBSD's Technological Advances". The FreeBSD Project (2008-03-09). Retrieved on 2008-09-13. Excerpt: 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.
  4. ^ "Stream Control Transmission Protocol (SCTP)". Hewlett-Packard Development Company.
  5. ^ "TCP/IP Networking". QNX Developer Support. QNX Software Systems. Retrieved on 2008-09-13.
  6. ^ "Solaris 10 Operating System Networking - Extreme Network Performance". Sun Microsystems. Retrieved on 2008-09-13.

[edit] See also

[edit] RFC history

  • RFC 5062 Security Attacks Found Against the Stream Control Transmission Protocol (SCTP) and Current Countermeasures
  • RFC 5061 Stream Control Transmission Protocol (SCTP) Dynamic Address Reconfiguration
  • RFC 5043 Stream Control Transmission Protocol (SCTP) Direct Data Placement (DDP) Adaptation
  • RFC 4960 Stream Control Transmission Protocol
  • RFC 4895 Authenticated Chunks for the Stream Control Transmission Protocol (SCTP)
  • RFC 4820 Padding Chunk and Parameter for the Stream Control Transmission Protocol (SCTP)
  • RFC 4460 Stream Control Transmission Protocol (SCTP) Specification Errata and Issues
  • RFC 3873 Stream Control Transmission Protocol (SCTP) Management Information Base (MIB)
  • RFC 3758 Stream Control Transmission Protocol (SCTP) Partial Reliability Extension
  • RFC 3554 On the Use of Stream Control Transmission Protocol (SCTP) with IPsec
  • RFC 3436 Transport Layer Security over Stream Control Transmission Protocol
  • RFC 3309 Stream Control Transmission Protocol (SCTP) Checksum Change (Obsoleted by RFC 4960)
  • RFC 3286 An Introduction to the Stream Control Transmission Protocol
  • RFC 3257 Stream Control Transmission Protocol Applicability Statement
  • RFC 2960 Stream Control Transmission Protocol (Updated by RFC 3309 and obsoleted by RFC 4960)

[edit] External links

Personal tools