Sliding Window Protocol
Sliding Window Protocol
Sliding Window Protocol
Describe briefly with the help of diagrams why the max window size in
sliding window Protocol is one less than the sequence number. For example,
if the sequence is: 0,1,2,3,4,5,6,7 the max window size is: 7
Introduction
Sliding window protocol also known as windowing is a data link layer protocol
used to control flow of frames between two nodes. It is used when reliability
in order to delivery of frames is required. It is used by most the connection
oriented network protocol like TCP. It is a full duplex protocol which uses Data
and Acknowledgement (The sequence number of last received frame that is
correct). Data is transmitted as frames where multiple frames can be sent
by a transmitter at a time before getting an acknowledgment. Multiple
frames sent by a transmitter are acknowledged by the receiver using a single
ACK frame.
The basic concept of sliding window protocol is that both Transmitter and
receiver maintain a window. The transmitter maintains the value of expected
acknowledgment and the receiver maintains the value of expected frame
that is received. When the transmitter gets an acknowledgment from the
receiver, the window is advances. On the other hand when the receiver
receives the expected frame, it advances the window.
contain
a
sequence
number
that
ranges
from
0
to
15
(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15). So there would be total 16 sequence
numbers but the window size is 15 which is one less than the sequence
number. We will now try to figure out why the window size is one less than
the sequence number.
Let us assume that we have reserve 3 bit for sequencing. So there would be
8 sequence number and the window size would be 7 which is one less than
the sequence number. Now we will first consider the window size is same as
the
sequence
number
and
observe
what
happened.
Conclusion
So from the above discussion we can conclude that the maximum window
size in sliding window Protocol should be one less than the sequence number
to avoid duplication of frames.