The go-back-n protocol works well if errors are less, but if the line is poor it wastes a lot of bandwidth on retransmitted frames. An alternative strategy, the selective repeat protocol, is to allow the receiver to accept and buffer the frames following a damaged or lost one.
In this technique, only those frames are
retransmitted for which negative acknowledgement (NAK) has been received.
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. The size is half the maximum sequence number of
the frame. For example, if the sequence number is from 0 – 15, the window size
will be 8.
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 in the
interim. The maximum number of frames that can be sent depends upon the size of
the sending window.
The receiver records the sequence number of
the earliest incorrect or un-received frame. It then fills the receiving window
with the subsequent frames that it has received. It sends the sequence number
of the missing frame along with every acknowledgement frame.
The sender continues to send frames that are
in its sending window. Once, it has sent all the frames in the window, it
retransmits the frame whose sequence number is given by the acknowledgements.
It then continues sending the other frames.
No comments:
Post a Comment