1 / 27

Stream Control Transmission Protocol (SCTP)

Stream Control Transmission Protocol (SCTP). Chia-Tai Tsai 2003.06.26. Motivation. Many applications need reliable message delivery – they do so by delineating a TCP stream TCP provides both strict-ordering and reliability – many applications may not need both. RDM. Framing. SCTP.

lavina
Télécharger la présentation

Stream Control Transmission Protocol (SCTP)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Stream Control Transmission Protocol (SCTP) Chia-Tai Tsai 2003.06.26

  2. Motivation • Many applications need reliable message delivery – they do so by delineating a TCP stream • TCP provides both strict-orderingand reliability – many applications may not need both

  3. RDM Framing SCTP TCP IP Data Link Layer What is SCTP? • Originally designed to support PSTN signaling messages over IP Networks • It is a reliable transport protocol operating on top of a connectionless packet network such as IP (same level as TCP)

  4. Comparisons With TCP • SCTP has a lot of similarities with TCP • Both are uni-cast • Both are connection-orientated– maintain a state • Both are reliable (will retransmit lost data) • Both implement flow control

  5. Major Differences from TCP • SCTP is message oriented as opposed to being byte stream oriented • SCTP has the concept of an association instead of a connection • Each association can have multiple streams • SCTP supports multi-homing • Connection Setup

  6. Multi-streaming App 1 App 2 App 3 App 4 App 4 App 3 App 2 App 1 Stream Buffers SCTP IP PHY Stream Association

  7. Multi-homing Support TCP single-homed session Internet A1 B1 Host A Host B X SCTP multi-homing session Internet B1 A1 X SCTP Endpoint A SCTP Endpoint B A2 B2 A3 B3

  8. Packet Format

  9. INIT chunk INIT-ACK chunk COOKIE-ECHO chunk COOKIE-ACK chunk DATA chunk SACK chunk HEARTBEAT chunk HEARTBEAT-ACK chunk SHUTDOWN chunk SHUTDOWN-ACK chunk SHUTDOWN-COMPLETE chunk ERROR chunk ABORT chunk Basic Chunk

  10. Similarities to TCP • Slow Start and Congestion Avoidance phases • Selective Acknowledgement • Fast Retransmit

  11. Flow Control in TCP & SCTP • Data received is acknowledged • If not acknowledged, it is re-send • Both endpoints maintain a ‘window’ • The receiver window (rwnd) indicates how much the buffer can receive • The sender keeps a congestion window (cwnd) • Starts small and increases expontially (slow start) • Then increases slowly – congestion avoidance • Use fast retransmit and recovery techniques

  12. SCTP Initiation - Four Way Handshake • TCP: 3 way handshake-DoS Attack • SCTP: 4 way handshake + Cookie more mitigate to DoS SCTP Initiation TCP Initiation INIT INIT-ACK: Cookie included INIT Cookie-Echo INIT-ACK Cookie-ACK ACK

  13. SCTP Data Transfer - Packet Format Common Header of Packet Common Header of Chunk Elements of Data Chunk • Chunk: control chunk and data chunk • Packet: one common header+one/more chunks • Support of bundling : Multiple Data and Control chunks in a single message, to improve transport efficiency.

  14. SCTP Data Transfer(Continued) • How to achieve Reliable and ordered delivery • TCP: through Packet Sequence Number • SCTP achieve reliable and ordered or partial ordered delivery independently through TSN and SSN

  15. SCTP Data TransferSCTP Message Exchange SCTP-B SCTP-A Data • An SCTP host sends Selective Acknowledgment to every other SCTP packets carrying DATA Chunks. • 2. SACK fully describes the receiver’s state, so that the sender can make retransmission decisions based on what has been received. Data SACK Data SACK & Data Data SACK

  16. SCTP Shutdown Data • Three Steps for SCTP Shutdown: • Shutdown_Pending State • ( Sender side) • 3. Shutdown_Sent State • (Sender side) • Shutdown_received State • (Receiver side) • Important Feature: • No Half-Close: both sides are prohibited from sending new data by their upper layer once a graceful showdown sequence is initiated. Data SACK Shutdown Data Shutdown Shutdown --ACK Shutdown --CMPL

  17. 結束連線

  18. Client Server Request file 0 Fork child Send file 0 Request file 1..N Send file 1,2,…N Multiple File Transfer (Embedded files) - TCP Child process

  19. SCTP Packet Format streams

  20. Client Server Request file 0 Fork child Send file 0 – stream 0 Request files 1..N Send file 1 – stream 1 Send file N – stream N Multiple Files Transfer (Embedded Files) - SCTP Child process

  21. Retransmit (TCP) • Packet Arrives out of sequence • A duplicate ACK is send • After the sender receives a 2(+) Duplicates, it retransmits the packet • CWND is decreased (fast recovery) • Hopefully an ACK should arrive, and this is the transmission can continue, not resending any more • If the ACK times out, then slow start is used

  22. SCTP Retransmits • SCTP makes more use of Selective Acknowledgements (SACK’s) • These contain more information about the packets that were received successfully • Generally, this improves performance • SCTP can transmit on a lost packet using a different IP address • This provides redundancy • It reduces congestion

  23. snd_una=26 26 26 rcv_ntx=27 26 27 26 27 28 26 28 snd_una=27 27 28 29 26 28 29 27 28 29 30 27 28 29 30 31 27 28 29 30 31 32 26 28 29 31 27 28 29 30 31 32 33 26 28 29 31 32 27 28 29 30 31 32 33 26 28 29 31 32 33 27 28 29 30 31 32 33 26 27 28 29 31 32 33 rcv_ntx=30 27 28 29 30 31 32 33 26 27 28 29 30 31 32 33 rcv_ntx=34 30 31 32 33 snd_una=30 SACK Sender’s Retransmission Buffer Receiver Buffer 26 27 ACK=27 28 29 30 ACK=27,(28,29) ACK=27,(28,30) 31 32 ACK=27,(31,32),(28,30) 33 ACK=27,(31,33),(28,30) 27 ACK=27,(31,34),(28,30) 30 ACK=30,(31,34)) ACK=34

  24. Server Client 3 2 1 3 2 3 2 1 3 2 1 1 File 3 File 2 TCP Send buffer in kernel TCP Receive buffer in kernel

  25. Server Client 3 3 2 2 3 2 1 3 2 1 1 1 File 3 File 2 SCTP Receive buffer in kernel SCTP Receive buffer in kernel

  26. Comparison: UDP .TCP . SCTP

  27. SCTP Summary • Important features of SCTP • Message- Oriented (Message boundarypreservation) • Multi-homing • Multi-stream • Partial ordering • Security Mechanism (Cookie)

More Related