Sliding Window Protocol
Sliding Window Protocol
Presented by:
Uppu Deekshitha
22S11A0508
Key contexts:
• Introduction
• Key concepts
• Types
• Working of different protocols
Introduction:
• Sliding window protocols are used where Reliable In order delivery of packets is
required, & such as in the Data Link Layer (OSI model) in the Transmission Control
Protocol(TCP).
• This technique places varying limits on the number of data packets that are sent
before waiting for an acknowledgment signal back from the receiving computer.
• The number of data packets is called the window size. 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.
Every packet sent by the sender, must be acknowledged by the receiver. The sender
maintains a timer for every packet sent, and any packet unacknowledged in a certain
time, is resent.
The Receiver advertises a window size that tells the sender how much data it can
receive, in order for the sender not to fill up the receivers buffers.
• So the sender transmits a frame, waits for its acknowledgment, 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.
• The ack field contains the sequence number of the last frame received
without error.
• If this sequence number matches with the sequence number of the frame
to be sent, then it is inferred that there is no error and the frame is
transmitted.
• It depicts the sliding windows in the sending and the receiving stations during frame
transmission.
• It is a case of sliding window protocol having to send window size of N and receiving window size
of 1.
Working Principle:
• Go – Back – N ARQ provides for sending multiple frames before receiving the acknowledgment for
the first frame. The frames are sequentially numbered and a finite number of frames.
• The maximum number of frames that can be sent depends upon the size of the sending window.
• If the acknowledgment of a frame is not received within an agreed upon time period, all frames
starting from that frame are retransmitted.
• The size of the sending window determines the sequence number of the outbound frames.
• If the sequence number of the frames is an n-bit field, then the range of sequence numbers that can be
assigned is 0 to 2n−1.
• Consequently, the size of the sending window is 2 n−1. Thus in order to accommodate a sending window
size of 2n−1, a n-bit sequence number is chosen.
• 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.
• In this technique, only those frames are retransmitted for which negative acknowledgement
(NAK) has been received.
• The sender provide searching mechanism that selects only the requested frame for
retransmission.
• Selective repeat protocol, also called Selective Repeat ARQ (Automatic Repeat request), is a
data link layer protocol that uses sliding window method for reliable delivery of data frames.
Here, only the erroneous or lost frames are retransmitted.
• It uses two windows of equal size: a sending window that stores the frames to be sent and a
receiving window that stores the frames receive by the receiver.
Working Principle:
• Selective Repeat protocol provides for sending multiple frames depending upon the availability
of frames in the sending window, even if it does not receive acknowledgement for any frame.
• The maximum number of frames that can be sent depends upon the size of the sending
window.
• The sender continues to send frames from sending window. Once, it has sent all the frames
from the window, it retransmits the frame whose sequence number is given by the Negative
acknowledgements.
• The receiver records the sequence number of the earliest incorrect or un-received frame. It
sends the sequence number of the missing frame along with every acknowledgement frame.