1 / 40

Stream Control Transmission Protocol

Stream Control Transmission Protocol. Presented by – Viren Mahajan mahajan@cis.udel.edu November 20, 2007. Special thanks to Dr. Paul Amer. What we have discussed !. Motivation PDU and Chunk format The ‘a’ word - ASSOCIATION Association setup & termination Multihoming.

mandujano
Télécharger la présentation

Stream Control Transmission Protocol

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 Presented by – Viren Mahajan mahajan@cis.udel.edu November 20, 2007 Special thanks to Dr. Paul Amer

  2. What we have discussed ! • Motivation • PDU and Chunk format • The ‘a’ word - ASSOCIATION • Association setup & termination • Multihoming

  3. Outline of today’s talk ! • Multistreaming • Framing • Chunk Bundling • Data Transfer • Fragmentation/Reassembly

  4. Multistreaming

  5. voice video file transfer text Yahoo! Instant Messenger Shall we talk SCTP?

  6. file transfer text voice video TCP multiple connections sender receiver file transfer text voice video TCP buffers TCP buffers transport IP data link physical 4 independent connections

  7. file transfer text voice video SCTP multistreaming sender receiver file transfer text voice video transport streambuffers streambuffers IP data link physical 1 association w/4 streams

  8. Init chunk Type: 1 Flag: 0 Length Initiation Tag Advertised receiver window credit Outbound Streams Maximum inbound streams Initial TSN Optional/Variable length parameters

  9. Init ack chunk Type: 2 Flag: 0 Length Initiation Tag Advertised receiver window credit Outbound Streams Maximum inbound streams Initial TSN Optional/Variable length parameters Parameter Length Parameter Type: 7 State Cookie

  10. Multistreaming (cont) TCP: 1 stream of data per connection SCTP: 1 or more streams of data per association # of streams negotiated during association establishment SCTP partial ordering: ordered delivery within each stream

  11. Data transfer using TCP delivered to application sent from application HOL blocking! objects in send buffer receive buffer retransmission loss persistent, pipelined TCP connection Web client Web server

  12. The multistreaming advantage sent from application delivered to application objects in send buffer receive buffer retransmission loss stream 1 stream 2 stream 3 SCTP association Web client Web server

  13. Streams • Streams by definition are ordered • Unordered data may be sent in a stream (U bit = 1) • Sequence number is ignored for U = 1 • Unordered messages should be processed first • Unordered messages may be used for “out-of-band” signaling, as in telnet.

  14. Application work-around to mitigate HOL blocking • How? • Multiple persistent TCP connections to transfer independent web objects • Problems • Aggressive (not TCP friendly) • Possible HOL blocking within one TCP connection • No shared sequence space => Less robust to loss detection and recovery • Increased load on web server • Increased connection establishment latency during SYN losses

  15. Message Boundaries

  16. TCP does not preserve message boundaries bytes 1 – 75 Message 3 bytes 201 - 300 bytes 76 – 175 Message 2 bytes 101 - 200 bytes 176 – 230 Message 1 bytes 1 - 100 bytes 231 – 300 TCP connection Web client Web server

  17. SCTP preserves message boundaries Message 3 bytes 201 - 300 Message 1 bytes 1 - 100 Message 2 Message 2 bytes 101 - 200 bytes 101 - 200 Message 1 Message 3 bytes 1 - 100 bytes 201 - 300 SCTP association Web client Web server

  18. Message Boundaries UDP honors message boundaries Each app message becomes a datagram TCP does not honor message boundaries App messages become part of a byte stream SCTP maintains message boundaries Each app message is maintained as one or more data chunks Data flags manage message boundaries Simpler coding of applications no need to do buffering, framing Example - DNS Response size <= 512, UDP is used If response size > 512, TCP is used Application must preface the header with message length

  19. Chunk Bundling

  20. Without bundling Application Application A-PDUs A-PDUs SCTP association SCTP-PDUs SCTP-PDUs SCTP Association end pt A end pt B

  21. With bundling Application Application A-PDUs A-PDUs SCTP association SCTP-PDUs SCTP-PDUs SCTP Association end pt A end pt B

  22. Bundling of Chunks in SCTP Control chunks bundled before data chunks Chunk boundary cannot cross SCTP PDU boundary Common Header SCTP PDU Bundling

  23. Chunk Bundling Multiple chunks in one SCTP PDU Gain in n/w bandwidth efficiency reduces ovhd of additional sctp and IP headers Path MTU is the constraint Control Chunks are always placed first Chunk boundaries do not cross SCTP PDU boundaries These chunks cannot be bundled init, init ack, shutdown complete

  24. Data Transfer

  25. SCTP Chunk Format • Type – Data, Init, SACK, … • Flags – bit meanings depend on type • Length – includes type, flags, length, and data/parameters

  26. Data Chunk used for ordering within a stream used for ordering, reassembly and retransmission 0 31 Type = 0x00 Flags = UBE Length Transmission Sequence Number (TSN) Stream Identifier (SID) Stream Seq Num (SSN) User supplied Payload Protocol Identifier Data used by the application and network monitoring equipment to understand the type of data being transmitted identifies the stream to which the data chunk belongs

  27. SACKChunk highest cumulative TSN no. of Duplicate TSN reports included number of Gap Ack Blocks included start offset for a range of consecutive TSNs received end offset for a range of consecutive TSNs received TSN received more than once

  28. Data transfer TSN: 1 SID: 1SSN: 1 TSN: 3 SID: 1SSN: 2 ACK 4 TSN: 2 SID: 2SSN: 1 TSN: 4 SID: 2SSN: 2 TSN: 1 SID: 1 SSN: 1 ACK 1 end A end B

  29. Data transfer TSN: 14 SID: 1SSN: 3 TSN: 13 SID: 1SSN: 4 TSN: 10 SID: 1SSN: 1 TSN: 15 SID: 2SSN: 3 TSN: 16 SID: 2SSN: 4 TSN: 11 SID: 2SSN: 1 TSN: 12 SID: 1SSN: 2 ACK 12 a_rwnd TSN: 13 SID: 2SSN: 2 TSN: 17 SID: 1SSN: 5 ACK 12 a_rwnd #Gaps: 1 #Dup: 0 Gap1_start: 2 Gap1_end: 3 ACK 12 a_rwnd #Gaps: 2 #Dup: 0 Gap1_start: 2 Gap1_end: 3 Gap2_start: 5 Gap2_end: 5 end A end B

  30. Fragmentation / Reassembly

  31. SCTP fragmentation/reassembly A-PDU A-PDU SCTP association SCTP-PDUs SCTP-PDUs Web client Web server

  32. Data Chunk 0 31 Type = 0x00 Reserved U B E Length Transmission Sequence Number (TSN) Stream Identifier (SID) Stream Seq Num (SSN) User supplied Payload Protocol Identifier Data

  33. Fragmentation/Reassembly Flags • U set to 1 specifies unordered message • Note: Fragmentation requires sequential TSNs

  34. A fragmentation example U=0, B=1, E=0 TSN=6 SID=2 SSN=1 First data fragment second fragment E.g. app A-PDU for Stream 2 exceeds Path-MTU Part of Data Chunk Header SID=2 SSN=1 U=0, B=0, E=0 TSN=7 TSN=8 U=0, B=0, E=1 SID=2 SSN=1

  35. SCTP - User Data Fragmentation Large A-PDU fragmented into DATA chunks To avoid intermediate routers having to deal with fragmentation Constrained by path MTU Unique TSN assigned to each DATA chunk Same SSN assigned to each DATA chunk B/E (Begin/End) bits identify fragments of user message U flag same as that in the original message

  36. Re-Assembly of Fragments Receiver checks B/E flags of DATA chunk User message reassembled using SSN, SID, B/E bits of DATA chunks. Number of fragments determined by the TSN of the first and the last fragments

  37. A Large Message Transfer data data (2760 octets) sent from application delivered to application data to be sent receive buffer (6) TSN 6² TSN 5 TSN 4 TSN 3 TSN 2 TSN 1¹ TSN 6² TSN 5 TSN 4 TSN 3 TSN 2 TSN 1¹ A1 B1 TSN 6² TSN 5 TSN 1¹ TSN 4 TSN 3 TSN 2 TSN 4 TSN 1¹ TSN 2 TSN 6² TSN 5 TSN 3 Path MTU = 512 octets A2 B2 1 - B bit set to 1 2 - E bit set to 1

  38. Summary Multistreaming multiple streams avoid HOL blocking Framing message boundaries are preserved Chunk Bundling better bandwidth usage Data Transfer data chunks Fragmentation/Reassembly B/E bits in data chunk

  39. THANKS !

  40. SCTP Vocabulary • Association • Chunk • PMTU – Path Maximum Transfer Unit • SSN – Stream Sequence Number • SID – Stream identifier • TSN - Transmission Sequence Number • TCB – Transmission Control Block

More Related