Presentation is loading. Please wait.

Presentation is loading. Please wait.

Stream Control Transmission Protocol Special thanks to Dr. Paul Amer Presented by – Viren Mahajan November 20, 2007.

Similar presentations


Presentation on theme: "Stream Control Transmission Protocol Special thanks to Dr. Paul Amer Presented by – Viren Mahajan November 20, 2007."— Presentation transcript:

1

2 Stream Control Transmission Protocol Special thanks to Dr. Paul Amer Presented by – Viren Mahajan November 20, 2007

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

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

5 Multistreaming

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

7 TCP multiple connections physical data link IP transport TCP buffers file transfer textvoicevideo file transfer textvoicevideo sender receiver 4 independent connections

8 SCTP multistreaming physical data link IP transport stream buffers 1 association w/4 streams file transfer textvoicevideo file transfer textvoicevideo sender receiver

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

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

11 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

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

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

14 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.

15 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

16 Message Boundaries

17 TCP does not preserve message boundaries Web server Web client TCP connection Message 3 Message 2 Message 1 bytes bytes bytes bytes 1 – 75 bytes 176 – 230 bytes 231 – 300 bytes 76 – 175

18 SCTP preserves message boundaries Web server Web client SCTP association Message 3 Message 2 Message 1 Message 2 Message 3 bytes bytes bytes bytes bytes bytes

19 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

20 Chunk Bundling

21 Without bundling end pt Aend pt B SCTP association SCTP-PDUs Application A-PDUs SCTP Association

22 With bundling end pt Aend pt B SCTP association SCTP-PDUs Application SCTP Association A-PDUs

23 Bundling of Chunks in SCTP Control chunks bundled before data chunks Chunk boundary cannot cross SCTP PDU boundary Source PortDestination Port Verification Tag Checksum Chunk 1 … Chunk N Common Header Bundling SCTP PDU

24 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

25 Data Transfer

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

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

28 SACK Chunk Type = 0x03Flags (none)Length (variable) Cumulative TSN ack Advertised receiver window Number of Gap ACK blocks = NNumber of duplicates = X Gap ACK blk #1 start TSN offsetGap ACK blk #1 end TSN offset... Gap ACK blk #N start TSN offsetGap ACK blk #N end TSN offset Duplicate TSN 1 … Duplicate TSN X highest cumulative TSN no. of Duplicate TSN reports included number of Gap Ack Blocks included end offset for a range of consecutive TSNs received start offset for a range of consecutive TSNs received TSN received more than once

29 Data transfer TSN: 1 SID: 1SSN: 1 TSN: 2 SID: 2SSN: 1 TSN: 3 SID: 1SSN: 2 TSN: 4 SID: 2SSN: 2 ACK 4 TSN: 1 SID: 1SSN: 1 ACK 1 end Aend B

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

31 Fragmentation / Reassembly

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

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

34 Fragmentation/Reassembly Flags UBEDescription *10(Begin) First Piece of fragmented A-PDU *00Middle piece of fragmented A-PDU *01(End) Last piece of fragmented A-PDU *11Non-fragmented A-PDU *U set to 1 specifies unordered message Note: Fragmentation requires sequential TSNs

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

36 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

37 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

38 TSN 5 TSN 6² TSN 2 TSN 4 TSN 3 TSN 5 TSN 6² TSN 2 TSN 3 TSN 4 TSN 1¹ TSN 1¹ TSN 6² TSN 5 TSN 4 TSN 3 TSN 2 TSN 1¹ A Large Message Transfer A2A2 A1A1 B2B2 B1B1 receive buffer (6) delivered to application TSN 1¹ TSN 3 TSN 2 sent from application TSN 4 TSN 5 TSN 6² data data to be sent 1 - B bit set to E bit set to 1 Path MTU = 512 octets (2760 octets)

39 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

40 THANKS !

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


Download ppt "Stream Control Transmission Protocol Special thanks to Dr. Paul Amer Presented by – Viren Mahajan November 20, 2007."

Similar presentations


Ads by Google