Notes and Study Materials

Flow Control in TCP

 

 

TCP uses a sliding window to handle flow control. The sliding window protocol used by TCP, however, is something between the Go-Back-N and Selective Repeat sliding window.


There are two big differences between this sliding window and the one we used at the data link layer. First, the sliding window of TCP is byte-oriented but data link layer sliding window is frame-oriented. Second, the TCP's sliding window is of variable size and the data link layer was of fixed size.


Add a comment

Error Control in TCP 

 

 

TCP is a reliable transport layer protocol. This means that an application program that delivers a stream of data to TCP relies on TCP to deliver the entire stream to the application program on the other end in order, without error, and without any part lost or duplicated.

 

TCP provides reliability using error control. Error control includes mechanisms for detecting corrupted segments, lost segments, out-of-order segments, and duplicated segments. Error control also includes a mechanism for correcting errors after they are detected. Error detection and correction in TCP is achieved through the use of three simple tools: checksum, acknowledgment, and time-out.

 

Add a comment

SCTP Services:

 

 

The services offered by SCTP to the application layer processes are as follows

 

1. Process-to-Process Communication:

 

SCTP provides uses Process-to-Process Communication and also uses all well-known ports in the TCP space and also some extra port numbers.

2. Multiple Streams:

 

TCP is a stream-oriented protocol. Each connection between a TCP client and a TCP server involves one single stream. The problem with this approach is that a loss at any point in the stream blocks the delivery of the rest of the data. This can be acceptable when we are transferring text; it is not when we are sending real-time data such as audio or video. SCTP allows multi stream service in each connection, which is called association in SCTP terminology. If one of the streams is blocked, the other streams can still deliver their data.

Add a comment

SCTP Features

 

 

The general features of SCTP are as follows:

Transmission Sequence Number (TSN):

 

The unit of data in TCP is a byte. Data transfer in TCP is controlled by numbering bytes by using a sequence number. On the other hand, the unit of data in SCTP is a DATA chunk which may or may not have a one-to-one relationship with the message coming from the process because of fragmentation, Data transfer in SCTP is controlled by numbering the data chunks. SCTP uses a transmission sequence number (TSN) to number the data chunks. TSNs are 32 bits long and randomly initialized between 0 and 232 - 1. Each data chunk must carry the corresponding TSN in its header.

Stream Identifier (SI):

Add a comment

Packet Format in SCTP 

 

 

An SCTP packet has a mandatory general header and a set of blocks called chunks. There are two types of chunks: control chunks and data chunks. A control chunk controls and maintains the association. A data chunk carries user data. In a packet, the control chunks come before the data chunks. The following figure shows the general format of an SCTP packet.

 

Add a comment

SCTP Association:

 

 

SCTP, like TCP, is a connection-oriented protocol. Association establishment in SCTP requires a four-way handshake. In this procedure, a process, normally a client, wants to establish an association with another process, normally a server, using SCTP as the transport layer protocol.

Similar to TCP, the SCTP server needs to be prepared to receive any association (passive open). Association establishment, however, is initiated by the client (active open). SCTP association establishment is shown in the following figure.

 

Add a comment

Flow Control in SCTP

 

 

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 values of rwnd and cwnd are expressed in bytes; the values of TSN and acknowledgments are expressed in chunks. Current SCTP implementations still use a byte-oriented window for flow control.

Receiver Site:

Add a comment

Error Control in SCTP 

 

 

SCTP, like TCP, is a reliable transport layer protocol. It 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.

Receiver Site

The receiver stores all chunks that have arrived in its queue including the out-of-order ones. However, it leaves spaces for any missing chunks. It discards duplicate messages, but keeps track of them for reports to the sender. The following figure shows a typical design for the receiver site and the state of the receiving queue at a particular point in time.

 

Add a comment