[go: up one dir, main page]

0% found this document useful (0 votes)
3 views3 pages

sliding1

Download as doc, pdf, or txt
Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1/ 3

Sliding Window Protocol

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

In this protocol, multiple frames can be sent by a sender at a time before receiving an acknowledgment
from the receiver. In this technique, each frame has sent from the sequence number. The sequence
numbers are used to find the missing data in the receiver end. The purpose of the sliding window technique
is to avoid duplicate data, so it uses the sequence number.

The sequence numbers are numbered as modulo-n. For example, if the sending window size is 4, then the
sequence numbers will be 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, and so on. The number of bits in the sequence number is
2 to generate the binary sequence 00, 01, 10, 11.

The size of the receiving window is the maximum number of frames that the receiver can accept at a time. It
determines the maximum number of frames that the sender can send before receiving acknowledgment.

Example

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

Types of Sliding Window Protocols


The Sliding Window ARQ (Automatic Repeat reQuest) protocols are of two categories −
1. Go Back-n Protocol

Go-Back-N Automatic Repeat Query (ARQ) protocol is also referred to as Go-Back-N Automatic Repeat
Request. It is a data link layer protocol that helps a sliding window method. In this, if any frame is
manipulated or lost, all subsequent frames have to be sent again.

For example, in GO- Back –N, the N is the sender’s window size; if it is GO-Back-5, the sender will send
frame 1 to 5 before receiving the knowledge of frame 1.

All the frames are numbers to deal with the most and duplicate frames. If the sender does not receive the
receiver’s acknowledgement, then all the frames available in the current window will be retransmitted.

The design of the Go-Back-N protocol is shown below −

2. Selective Repetitive ARQ

Selective Repeat ARQ is also referred to as the Selective Repeat Automatic Repeat Request. It is a data link
layer protocol that facilitates a sliding window method. The Goback-N ARQ protocol operates well if it has
fewer errors.

In this protocol, the sender window size is always similar to the size of the receiver window. The size of the
sliding window is continually greater than 1.

If the receiver obtains a corrupt frame, it does not directly remove it. It sends a negative acknowledgement
to the sender. The sender sends that frame again immediately, receiving a negative acknowledgement.
There is no waiting for any time-out to share that frame.
The structure of the Selective Repeat ARQ protocol is demonstrated below −

3. A One-Bit Sliding Window Protocol

In one – bit sliding window protocol, the size of the window is 1. So the sender transmits a frame, waits for
its acknowledgment, and then transmits the next frame. Thus it uses the concept of stop and waits for the
protocol. This protocol provides for full – duplex communications. Hence, the acknowledgment is attached
along with the next data frame to be sent by piggybacking.

Example

The following diagram depicts a scenario with sequence numbers 0, 1, 2, 3, 0, 1, 2 and so on. It depicts the
sliding windows in the sending and the receiving stations during frame transmission.

You might also like