Sliding Window Protocol

The sliding window protocol is a flow control protocol used in the data link layer of the OSI model. It is used to manage the flow of data between two network nodes to ensure that the receiver can handle the incoming data.

In the sliding window protocol, the sender is allowed to transmit a certain number of frames to the receiver before waiting for an acknowledgment. The sender keeps track of the frames that have been sent but not yet acknowledged by the receiver. The size of the window determines the number of frames that can be sent before an acknowledgment is received. When the receiver receives a frame, it sends an acknowledgment back to the sender. The acknowledgment tells the sender that the frame has been received successfully, and the sender can then send the next frame.

Suppose that the sender window and receiver window are both of size 4. So, we have a sequence numbering of 0,1,2,3,0,1,2 and so on. The following diagram shows the positions of windows after sending frames and receiving acknowledgments.

Throughout this process, the sender and receiver maintain a sliding window of size 4. Sender can only send up to 4 packets at a time without receiving acknowledgments, and receiver can only receive up to 4 packets at a time before sending acknowledgments. This allows for efficient use of the network bandwidth while ensuring that packets are transmitted and received successfully.

There are two types of sliding window protocols: The Go-Back-N protocol and the Selective Repeat protocol. In the Go-Back-N protocol, if a frame is lost, the sender resends all the frames after that frame. In the Selective Repeat protocol, the sender only resends the lost frame.

Overall, the sliding window protocol helps to ensure that the receiver is not overwhelmed with data and can handle the incoming data in an organized and efficient manner.

Leave a Comment

Your email address will not be published. Required fields are marked *