Stream Control Transmission Protocol (SCTP)



SCTP is designed to transport PSTN signaling messages over IP networks, but is capable of broader applications. SCTP is a reliable transport protocol operating on top of a connectionless packet network such as IP.
  It offers the following services to its users:
- Error Free, Non-duplicated transfer of user data.
- Data fragmentation.
- Optional bundling of multiple user message in one single SCTP packet.
- Fault tolerance using the multi-homing.
SCTP provide following features:
- it is transport layer protocol, like TCP and UDP.
- It is unicast protocol communication between 2 endpoint.
- It is session oriented protocol. it creates association between the endpoint. Endpoints are identified by the IP address and logical port number.
- It provide the multihoming - more than one IP address of one endpoint to provide the multi-path, endpoints are identified by the port number. Only one path (association) can be active at a given time. multi homing is provided for path failure (redundancy) not for load sharing.
- Provide the reliable transmission using SACK method. Retransmission take place time out in ACK has the gap in TSN.
- provide the path failure detection using the heartbeat mechanism.
- provide the security consideration  using the verification tag and cookies.
- It is message oriented protocol.
 SCTP Association initialization
                                                EndPoint-A                                                          EndPoint-B
      closed state                     ———INIT(veri tag, init tag, IP)————–> Cloesed State
    cookie wait state             <—–INIT ACK(init tag,IP,verification tag)—-
   cookie echoed                   ————–COOKIE_ECHO (cookie)————>
   Established state            <————-COOKIE ACK————————– Established
                                                 <—————–DATA——————————-
                                                  ——————–SACK—————————->
init and init ack must not be bundled with other chunk. if an error received at init/initAck, ABORT is sent.
Handle Stream: Endpoints sends (in init and initACK) the number of outbound stream (OS), and maximum inbound stream. if peer’s MIS is less than the endpoints OS, than the endpoint either use the MIS outbound stream, or abort the association.
Shutdown the association:
                                                  ENDPoint-A                         ENDPoint-B
                                                 ———-SHUTDOWN—————–> 
                                                   <——–SHUTDOWN ACK————
                                                    ———SHUTDOWN COMPLETE–>
Chunk: A unit of information within an SCTP packet, consisting of a chunk header and chunk-specific content.
Congestion Window (cwnd): An SCTP variable that limits the data,  in number of bytes, a sender can send to a particular destination transport address before receiving an acknowledgement.
Message Authentication Code (MAC):  An integrity check mechanism based on cryptographic hash functions using a secret key.
Receiver Window (rwnd): An SCTP variable a data sender uses to  store the most recently calculated receiver window of its peer, in number of bytes.  This gives the sender an indication of the space available in the receiver’s inbound buffer.
SCTP association: A protocol relationship between SCTP endpoints, composed of the two SCTP endpoints and protocol state information including Verification Tags and the currently active set of Transmission Sequence Numbers (TSNs), etc.  An association can be uniquely identified by the transport addresses used by the endpoints in the association.  Two SCTP endpoints MUST NOT have more than one SCTP association between them at any given time.
SCTP endpoint: The logical sender/receiver of SCTP packets.  On a  multi-homed host, an SCTP endpoint is represented to its peers as a combination of a set of eligible destination transport addresses to which SCTP packets can be sent and a set of eligible source transport addresses from which SCTP packets can be received.  All transport addresses used by an SCTP endpoint must use the same port number, but can use multiple IP addresses.  A transport address used by an SCTP endpoint must not be used by another SCTP endpoint.
Stream Sequence Number: A 16-bit sequence number used internally by SCTP to assure sequenced delivery of the user messages within a given stream.  One stream sequence number is attached to each user message.
Transmission Sequence Number (TSN): A 32-bit sequence number used internally by SCTP.  One TSN is attached to each chunk containing user data to permit the receiving SCTP endpoint toacknowledge its receipt and detect duplicate deliveries.
Transport Address: In the case of SCTP running over IP, a  transport address is defined by the combination of an IP address and an SCTP port number (where SCTP is the Transport protocol).
Verification Tag: A 32 bit unsigned integer that is randomly generated.  The Verification Tag provides a key that allows a receiver to verify that the SCTP packet belongs to the current association and is not an old or stale packet from a previous association.
SCTP Packet Format: SCTP provide the bundling of more than on chunk in one SCTP packet except for the INIT, INIT ACK, and SHUTDOWN COMPLETE chunks and segmentation if size if giver.
              — Common Header  —
                        |Checksum|Verification Tag| Destination Port Address| Source Port Address|
                                            – Source Port Number (16bit, Sender Port Number)
                                            – Destination Port Number (16bit, Receiver Port
                                           – Verification Tag (32bit, to validate the sender, it should same as initiate tag received in INIT during the starting the association.  in INIT, it should be zero and in SHUTDOWN COMPLETE, it should same as SHUTDOWN-ACK.
                                          - Checksum (CRC32bit, to check the error in packets)
            — CHUNK header —
                           |value|Length|Type| …………… |value|length|Type| SCTP Common Header|
                                               – Chunk Type (8bit, it can be init, initack, shutdown, heartbeat, etc…)
                                               - Chunk Flags (8bit, depend on chunk type, otherwise zero)
                                               - Chunk Length (16bit, provide the length of chunk including the headers)
                                              – Chunk Value (varaible length, actual data Payload)
INIT Chunk: |Type=1|Chunk Flags|Chunk Length|Initiate tag|a_rwnd|Number of OS|Number of IS|Initial TSN|optianal Param|


SCTP Features:


- Transport Layer Protocol - Alternative to TCP and UDP.
- Uni-cast Protocol - Communication between the 2 end points.
- Session Oriented - "associated" between 2 endpoints. 

  • End points are identified by the near and far end IP address and logical Address.
  • Supports Multi-homing (Association composed evenly of several paths). Only path active at a time(Unicast)
  • paths are monitored to defects failures uses Heartbeat Mechanism.
- Message Oriented - not byte-oriented like the TCP. Byte- oriented transport having the problem all messages are transferred in single stream so that if error occurs, TCP holds up delivery of all data. While SCTP supports message oriented data transfer in multi stream fashion which insures if errors occurs at one stream there would be no impact on transmission of other streams data.

       
  • Define structured frames of data
  • Allow to encapsulate upper layer within the SCTP message.
- Reliable Delivery: undelivered messages are re-transmitted.

  •  Using Sequenced acknowledges (SACK)
  • TSN (Transmission sequence numbers) are used to provide reliable delivery.
  • Retransmission takes places if: 1.Timeouts 2. Ack has gap in TSN.
  

         

Comments

Popular posts from this blog

Intelligent Networks (IN) and CAMEL

Diameter Messages

SCCP (Signalling Connection Control Part)