TCP/IP Protocol Suite 1 Chapter 13 Upon completion you will be able to: Stream Control Transmission Protocol Be able to name and understand the services offered by SCTP Understand SCTP’s flow and error control and congestion control Be familiar with the fields in a SCTP segment Understand the phases in an SCTP association Understand the SCTP state transition diagram Objectives
TCP/IP Protocol Suite 2 Figure 13.1 TCP/IP protocol suite
TCP/IP Protocol Suite 3 Table 13.1 Some SCTP applications SCTP combines the better features of UDP and TCP SCTP is reliable, message-oriented (messages are not broken up indiscriminately into segments as TCP does)
TCP/IP Protocol Suite 4 Figure 13.2 Multiple-stream concept In TCP, each connection between a client and a server involves a single stream and is called an association. SCTP allows multiple streams. If one stream is blocked, the other streams can still deliver data. Very useful for real-time applications.
TCP/IP Protocol Suite 5 Figure 13.3 Multihoming concept Multiple sources and multiple receivers – allows for a fault-tolerant approach
TCP/IP Protocol Suite 6 Data chunks are identified by three identifiers: TSN, SI, and SSN. TSN is a cumulative number identifying the association; SI defines the stream; SSN defines the chunk in a stream. Note:
TCP/IP Protocol Suite 7 In SCTP, acknowledgment numbers are used to acknowledge only data chunks; control chunks are acknowledged by other control chunks if necessary. Note:
TCP/IP Protocol Suite 8 Figure 13.4 Comparison between a TCP segment and an SCTP packet SCTP uses a transmission sequence number (TSN) to number the data chunks. Each stream in an SCTP connection needs a stream identifier (SI). Bytes within a stream are numbered using the stream sequence number (SSN). Segments / packets are formatted differently too:
TCP/IP Protocol Suite 9 Figure 13.4 Comparison between a TCP segment and an SCTP packet An association may send many packets, a packet may contain several chunks, and chunks may belong to different streams. SCTP control info is in the Control chunk. Data chunks can carry data from multiple streams! Since multiple streams possible, each stream is identified by TSNs, SIs, and SSNs. No options section. SCTP header is smaller – only 12 bytes SCTP uses a 32-bit cyclic checksum
TCP/IP Protocol Suite 10 Figure 13.5 Packet, data chunks, and streams
TCP/IP Protocol Suite 11 Figure 13.7 General header General header always comes first.
TCP/IP Protocol Suite 12 Figure 13.8 Common layout of a chunk Control chunks come before data chunks.
TCP/IP Protocol Suite 13 Table 13.2 Different type of Chunks
TCP/IP Protocol Suite 14 A DATA chunk cannot carry data belonging to more than one message, but a message can be split into several chunks. The data field of the DATA chunk must carry at least one byte of data, which means the value of length field cannot be less than 17. Note:
TCP/IP Protocol Suite 15 Figure 13.9 DATA chunk U bit: a 1 signals unordered data; 0 is ordered data B=1 and E=1? No fragmentation, whole msg in one chunk B=1 and E=0? First fragment B=0 and E=1? Last fragment B=0 and E=0? Middle fragment
TCP/IP Protocol Suite 16 Figure INIT chunk
TCP/IP Protocol Suite 17 Figure INIT ACK chunk Several more chunks (cookie echo, cookie ack, sack,…)
TCP/IP Protocol Suite 18 Figure Four-way handshaking VT-verification tag; Init tag-used for packets from the other direction (and to prevent a blind attacker from disrupting a connection, as can happen in TCP) Notice – INIT ACK packet contains a cookie. If the sender of the first packet is an attacker, the server never receives the third packet, the cookie is lost, and no resources allocated.
TCP/IP Protocol Suite 19 Figure Simple data transfer Note: cumTSN does not point to next TSN expected!
TCP/IP Protocol Suite 20 Figure Association termination
TCP/IP Protocol Suite STATE TRANSITION DIAGRAM To keep track of all the different events happening during association establishment, association termination, and data transfer, the SCTP software, like TCP, is implemented as a finite state machine. The topics discussed in this section include: Scenarios Simultaneous Close
TCP/IP Protocol Suite 22 Figure State transition diagram
TCP/IP Protocol Suite 23 Table 13.4 States for SCTP
TCP/IP Protocol Suite 24 Figure A common scenario of states
TCP/IP Protocol Suite 25 Figure Simultaneous open
TCP/IP Protocol Suite 26 Figure Simultaneous close
TCP/IP Protocol Suite FLOW CONTROL Flow control in SCTP is similar to that in TCP. In SCTP, we need to handle two units of data, the byte and the chunk. The topics discussed in this section include: Receiver Site Sender Site A Scenario
TCP/IP Protocol Suite 28 Figure Flow control, receiver site
TCP/IP Protocol Suite 29 Figure Flow control, sender site
TCP/IP Protocol Suite 30 Figure Flow control scenario rwnd and winSize agreed upon during init phase to be 2000 For some reason, rwnd set to 0
TCP/IP Protocol Suite ERROR CONTROL SCTP uses a SACK chunk to report the state of the receiver buffer to the sender. Each implementation uses a different set of entities and timers for the receiver and sender sites. The topics discussed in this section include: Receiver Site Sender Site Sending Data Chunks Generating SACK Chunks
TCP/IP Protocol Suite 32 Figure Error control, receiver site
TCP/IP Protocol Suite 33 Figure Error control, sender site
TCP/IP Protocol Suite 34 Figure New state at the sender site after receiving a SACK chunk
TCP/IP Protocol Suite CONGESTION CONTROL SCTP uses the same strategies for congestion control as TCP. SCTP uses slow start, congestion avoidance, and congestion detection phases. SCTP also uses fast retransmission and fast recovery. The topics discussed in this section include: Congestion Control and Multihoming Explicit Congestion Notification