Wednesday, June 10, 2020

Sliding Window Protocol

Sliding window protocol is data link layer protocol for reliable and sequential delivery of data frame. The sliding window is also used in Transmission Control Protocol.

In this flow control method, the receiver allocate buffer space for n frames in advance and allows transmission of multiple frames. This method allows the sender to transmit n frames without an ACK. A k-bit sequence number is assigned to each frame. The range of sequence number uses Modulo-2 arithmetic. To keep track of the frames that'have been acknowledged, each ACK has a sequence number. The receiver acknowledges a frame by sending an ACK that includes the next expected frame. The sender sends the next n frames starting with the last received sequence number that has been transmitted by the receiver (ACK). Hence, a single ACK can acknowledge multiple frames.

In above figure, the receiver receives frames 1, 2 and 3. Once frame 3 arrives ACK4 is sent to the sender. This ACK4 acknowledge the receipt of frames 1, 2 and 3 and informs the sender that the next expected frame is frame 4. Therefore, the sender can send multiple back-to-back frames, making efficient use of the channel.

   

No comments:

Post a Comment