Error Control -
Error Control is a technique of error detection and retransmission.
Requirements for error control mechanism:
Error detection - The sender and receiver, either both or any, must ascertain that there is some error in the transit.
Positive ACK - When the receiver receives a correct frame, it should acknowledge it.
Negative ACK - When the receiver receives a damaged frame or a duplicate frame, it sends a NACK back to the sender and the sender must retransmit the correct frame.
Retransmission - The sender maintains a clock and sets a timeout period. If an acknowledgement of a data-frame previously transmitted does not arrive before the timeout the sender retransmits the frame, thinking that the frame or it’s acknowledgement is lost in transit.
Stop-and-wait ARQ
Stop-and-wait ARQ is a technique used to retransmit the data in case of damaged or lost frames.
This technique works on the principle that the sender will not transmit the next frame until it receives the acknowledgement of the last transmitted frame.
The following transition may occur in Stop-and-Wait ARQ:
-> The sender maintains a timeout counter.
-> When a frame is sent, the sender starts the timeout counter.
-> If acknowledgement of frame comes in time, the sender transmits the next frame in queue.
-> If acknowledgement does not come in time, the sender assumes that either the frame or its acknowledgement is lost in transit.
-> Sender retransmits the frame and starts the timeout counter.
If a negative acknowledgement is received, the sender retransmits the frame.
Sliding Window ARQ
Sliding Window ARQ is a technique used for continuous transmission error control.
Two protocols used in sliding window ARQ -
Go-Back-n ARQ -
In Go-Back-N ARQ protocol, if one frame is lost or damaged, then it retransmits all the frames after which it does not receive the positive ACK.
Three possibilities can occur for retransmission:
Damaged Frame: When the frame is damaged, then the receiver sends a NAK frame.
In the above figure, three frames have been transmitted before an error discovered in the third frame. In this case, ACK 2 has been returned telling that the frames 0,1 have been received successfully without any error. The receiver discovers the error in data 2 frame, so it returns the NAK 2 frame. The frame 3 is also discarded as it is transmitted after the damaged frame. Therefore, the sender retransmits the frames 2,3.
Lost Data Frame: In Sliding window protocols, data frames are sent sequentially. If any of the frames is lost, then the next frame arrive at the receiver is out of sequence. The receiver checks the sequence number of each of the frame, discovers the frame that has been skipped, and returns the NAK for the missing frame. The sending device retransmits the frame indicated by NAK as well as the frames transmitted after the lost frame.
Lost Acknowledgement: The sender can send as many frames as the windows allow before waiting for any acknowledgement. Once the limit of the window is reached, the sender has no more frames to send; it must wait for the acknowledgement. If the acknowledgement is lost, then the sender could wait forever. To avoid such situation, the sender is equipped with the timer that starts counting whenever the window capacity is reached. If the acknowledgement has not been received within the time limit, then the sender retransmits the frame since the last ACK.
Selective-Reject ARQ -
1. Selective-Reject ARQ technique is more efficient than Go-Back-n ARQ.
2. In this technique, only those frames are retransmitted for which negative acknowledgement (NAK) has been received.
3. The receiver storage buffer keeps all the damaged frames on hold until the frame in error is correctly received.
4. The receiver must have an appropriate logic for reinserting the frames in a correct order.
5. The sender must consist of a searching mechanism that selects only the requested frame for retransmission.
Error Control is a technique of error detection and retransmission.
Requirements for error control mechanism:
Error detection - The sender and receiver, either both or any, must ascertain that there is some error in the transit.
Positive ACK - When the receiver receives a correct frame, it should acknowledge it.
Negative ACK - When the receiver receives a damaged frame or a duplicate frame, it sends a NACK back to the sender and the sender must retransmit the correct frame.
Retransmission - The sender maintains a clock and sets a timeout period. If an acknowledgement of a data-frame previously transmitted does not arrive before the timeout the sender retransmits the frame, thinking that the frame or it’s acknowledgement is lost in transit.
Stop-and-wait ARQ
Stop-and-wait ARQ is a technique used to retransmit the data in case of damaged or lost frames.
This technique works on the principle that the sender will not transmit the next frame until it receives the acknowledgement of the last transmitted frame.
The following transition may occur in Stop-and-Wait ARQ:
-> The sender maintains a timeout counter.
-> When a frame is sent, the sender starts the timeout counter.
-> If acknowledgement of frame comes in time, the sender transmits the next frame in queue.
-> If acknowledgement does not come in time, the sender assumes that either the frame or its acknowledgement is lost in transit.
-> Sender retransmits the frame and starts the timeout counter.
If a negative acknowledgement is received, the sender retransmits the frame.
Sliding Window ARQ
Sliding Window ARQ is a technique used for continuous transmission error control.
Two protocols used in sliding window ARQ -
Go-Back-n ARQ -
In Go-Back-N ARQ protocol, if one frame is lost or damaged, then it retransmits all the frames after which it does not receive the positive ACK.
Three possibilities can occur for retransmission:
Damaged Frame: When the frame is damaged, then the receiver sends a NAK frame.
In the above figure, three frames have been transmitted before an error discovered in the third frame. In this case, ACK 2 has been returned telling that the frames 0,1 have been received successfully without any error. The receiver discovers the error in data 2 frame, so it returns the NAK 2 frame. The frame 3 is also discarded as it is transmitted after the damaged frame. Therefore, the sender retransmits the frames 2,3.
Lost Data Frame: In Sliding window protocols, data frames are sent sequentially. If any of the frames is lost, then the next frame arrive at the receiver is out of sequence. The receiver checks the sequence number of each of the frame, discovers the frame that has been skipped, and returns the NAK for the missing frame. The sending device retransmits the frame indicated by NAK as well as the frames transmitted after the lost frame.
Lost Acknowledgement: The sender can send as many frames as the windows allow before waiting for any acknowledgement. Once the limit of the window is reached, the sender has no more frames to send; it must wait for the acknowledgement. If the acknowledgement is lost, then the sender could wait forever. To avoid such situation, the sender is equipped with the timer that starts counting whenever the window capacity is reached. If the acknowledgement has not been received within the time limit, then the sender retransmits the frame since the last ACK.
Selective-Reject ARQ -
1. Selective-Reject ARQ technique is more efficient than Go-Back-n ARQ.
2. In this technique, only those frames are retransmitted for which negative acknowledgement (NAK) has been received.
3. The receiver storage buffer keeps all the damaged frames on hold until the frame in error is correctly received.
4. The receiver must have an appropriate logic for reinserting the frames in a correct order.
5. The sender must consist of a searching mechanism that selects only the requested frame for retransmission.