Reliable transmission
• An acknowledgement (ACK for short) is a small control
frame that a protocol sends back to its peer saying that it has
received the earlier frame.
• A control frame is a frame with header only (no data).
• The receipt of an acknowledgement indicates to the sender of
the original frame that its frame was successfully delivered
• If the sender does not receive an acknowledgment after a reasonable
amount of time, then it retransmits the original frame.
• The action of waiting a reasonable amount of time is called a timeout.
• The general strategy of using acknowledgements and timeouts to
implement reliable delivery is sometimes called Automatic Repeat
reQuest (ARQ).
Stop & Wait Protocol
Advantages
Disadvantages
Sliding Window Protocol
• Number of frames to be sent is based on window Size.
• Sender assigns a sequence number denoted as SeqNum to each frame.
• -Assume it can grow infinitely large
• Sender maintains three variables
Sending Window Size (SWS) : Upper bound on the number of
outstanding (unacknowledged) frames that the sender can transmit
• Last Acknowledgement Received (LAR) : Sequence number of
the last acknowledgement received –
• Last Frame Sent (LFS) : Sequence number of the last frame sent
• Sender also maintains the following invariant
• LFS – LAR ≤ SWS
• When an acknowledgement arrives : the sender moves LAR to right, thereby
allowing the sender to transmit another frame
• Also the sender associates a timer with each frame it transmits : It retransmits the
frame if the timer expires before the ACK is received
• Receiver maintains three variables
❖ Receiving Window Size (RWS) : Upper bound on the number of out-of-order
frames that the receiver is willing to accept
❖ Largest Acceptable Frame (LAF) : Sequence number of the largest acceptable
frame
❖ Last Frame Received (LFR) : Sequence number of the last frame received
• Receiver also maintains the following invariant
• LAF – LFR ≤ RWS
• When a frame with sequence number SeqNum arrives, what does the receiver do?
• – If SeqNum ≤ LFR or SeqNum > LAF
• Discard it (the frame is outside the receiver window)
• – If LFR < SeqNum ≤ LAF
• Accept it
• Now the receiver needs to decide whether or not to send an ACK
• The receiver ACKs frame N if all frames with sequence number less than have
been received.
• ACKing frame N implies LFR=N and LAF=LFR+RWS
• This acknowledgement is said to be cumulative.
The concept of cumulative acknowledgment simplifies the process by
confirming receipt of all frames up to a certain point, reducing the
number of individual acknowledgments needed.
Sliding Window Protocol
Go-Back-N ARQ
Selective Repeat ARQ