Error Control
Error Control
Error Control
Error control includes both error detection and error correction. It allows the receiver to inform the sender if a frame is lost or
damaged during transmission and coordinates the retransmission of those frames by the sender. Error control in the data link layer is based on automatic repeat request (ARQ). Whenever an error is detected, specified frames are retransmitted.
Data Link layer
Line Discipline
Flow Control
Error control
Stop-and-Wait
Stop-and-wait ARQ is a form of stop-and-wait flow control extended to 1. 2. 3.
4.
include re-transmission of data in case of lost or damaged frames. Some features of stop-and-wait ARQ are: Sending device keeps a copy of the last frame until it receives an acknowledgement. For identification, both data frames and ACK frames are numbered alternately 0 & 1. If an error is discovered in a data frame, a NAK frame is returned. The sending device is equipped with a timer.
When a frame is discovered by the receiver to contain an error, it returns a NAK and the sender retransmits the last frame.
Error in Frame 0
Time
....
Time
Time out
The sender is equipped with a timer that starts every time a data frame is transmitted. After the timer at the sender expires, another copy of frame 1 is sent.
....
Time
Time
Time out
Time
Time
If the ACK or NAK frames returned by the receiver is lost in transit. And the timer of the sender expires, the sender retransmits frame 0. Receiver has already received frame 0 and expecting to receive frame 1. Therefore it discards the second copy of frame 0.
....
multiple packets. Sliding Window Protocol allows multiple frames to be in transit. Three features added to the basic flow control mechanism are: 1. The sending device keeps copies of all transmitted frames until they have been ACK. 2. In addition to ACK frames, the receiver has the option of returning a NAK frames , if the data has been received damaged. 3. It is also equipped with a timer to enable it to handle lost ACK.
Go-Back-n ARQIn Go-Back-n ARQ, if one frame is lost or damaged, all frames sent since the last frame ACK are retransmitted. 2. Selective-Reject ARQIn selective-reject ARQ, only the specific damaged frame is retransmitted .
1.
frame 3 is
Time
....
lost. ACK 3 tells the sender that frames 0,1 and 2 have been accepted . When the sender receives NAK 3 frame 3, 4 and 5 are discarded. It retransmit all the three frames 3,4 and 5.
Time
Discarded Discarded
Time
....
Time
It uses timer. If ACK has not been received within the limit the sender retransmit every frame transmitted since the last ACK.
Time
Time
Selective-Reject ARQ
The receiving device must contain sorting logic. The sending device must contain a searching mechanism. A buffer must keep all previously received frames.
received(or lost) instead of next frame expected. It gives better performance, but in practice it is usually discarded in favor of go-back-n. Disadvantage It is expansive and is not often used.
Error in frame 2
NAK 2 tells the sender that data 0 and 1 have been received , but data 2 must be resent Frames receive after the error cannot be ACK until damaged frames have been retransmitted.
Time
Time
Selective-Reject ARQ
Lost Frames : Frames can be accepted out of sequence , they cannot be acknowledged out of sequence. Lost ACK : Lost ACK and NAK frames of selectivereject ARQ are same as that of go-back-n ARQ.
THANK YOU