Sliding windows protocol works as follows:
- Sender sends a fixed number of frames without acknowledgments.
- Each frame is labelled with a sequence number.
- On getting acknowledgments from the receiver.
- Sender sends more frames.
- Each acknowledgement is labelled with a respective frames sequence number.
There should not be duplicate sequence numbers.
Example of Sliding window protocol;
Window size is 7.
Sender can transmit 7 frames without acknowledgement.
Frame no. 1,2,3,4,5,6,7.
Now sender transmit 4 frames and received an acknowledgment that thefirst 3 frames are successfully received.
The window will slide forward by three frames.
Now sender will cover next 7 frames.
Frame no. 4,5,6,7,8,9,10.
Which looks like windows is sliding from left to right.