Notes and Study Materials

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:

The receiver has one buffer (queue) and three variables. The queue holds the received data chunks that have not yet been read by the process. The first variable holds the last TSN received, cumTSN. The second variable holds the available buffer size; winsize. The third variable holds the last accumulative acknowledgment, lastACK. The following figure shows the queue and variables at the receiver site.

 

flow control in sctp_receiver site

 

1. When the site receives a data chunk, it stores it at the end of the buffer (queue) and subtracts the size of the chunk from winSize. The TSN number of the chunk is stored in the cumTSN variable.

 


2. When the process reads a chunk, it removes it from the queue and adds the size of the removed chunk to winSize (recycling).

3. When the receiver decides to send a SACK, it checks the value of lastAck; if it is less than cumTSN, it sends a SACK with a cumulative TSN number equal to the cumTSN. It also includes the value of winSize as the advertised window size.

Sender Site:

The sender has one buffer (queue) and three variables: curTSN, rwnd, and inTransit, as shown in the following figure. We assume each chunk is 100 bytes long.

 

The buffer holds the chunks produced by the process that either have been sent or are ready to be sent. The first variable, curTSN, refers to the next chunk to be sent. All chunks in the queue with a TSN less than this value have been sent, but not acknowledged; they are outstanding. The second variable, rwnd, holds the last value advertised by the receiver (in bytes). The third variable, inTransit, holds the number of bytes in transit, bytes sent but not yet acknowledged. The following is the procedure used by the sender.


1. A chunk pointed to by curTSN can be sent if the size of the data is less than or equal to the quantity rwnd - inTransit. After sending the chunk, the value of curTSN is incremented by 1 and now points to the next chunk to be sent. The value of inTransit is incremented by the size of the data in the transmitted chunk.

2. When a SACK is received, the chunks with a TSN less than or equal to the cumulative TSN in the SACK are removed from the queue and discarded. The sender does not have to worry about them anymore. The value of inTransit is reduced by the total size of the discarded chunks. The value of rwnd is updated with the value of the advertised window in the SACK.

 

flow control in sctp_Sender site

 

 

For Further Reading:  

Different Services of SCTP
SCTP Features
Packet Format in SCTP
SCTP Association
Error Control in SCTP
Back to DCN Questions and Answers