0% found this document useful (0 votes)
94 views

Error Control

The document discusses different types of error control protocols used in data link layers. It describes stop-and-wait ARQ which retransmits frames if errors are detected. Sliding window protocols allow multiple frames to be in transit by using timers and ACK/NAK frames. The most common sliding window protocols are Go-Back-N ARQ, which retransmits all frames after the last ACK if an error occurs, and Selective-Reject ARQ, which only retransmits the specific damaged frame. Both use timers, buffers, and ACK/NAK frames but Selective-Reject ARQ has higher overhead.

Uploaded by

rishiraj0512
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
94 views

Error Control

The document discusses different types of error control protocols used in data link layers. It describes stop-and-wait ARQ which retransmits frames if errors are detected. Sliding window protocols allow multiple frames to be in transit by using timers and ACK/NAK frames. The most common sliding window protocols are Go-Back-N ARQ, which retransmits all frames after the last ACK if an error occurs, and Selective-Reject ARQ, which only retransmits the specific damaged frame. Both use timers, buffers, and ACK/NAK frames but Selective-Reject ARQ has higher overhead.

Uploaded by

rishiraj0512
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 16

Error Control

ARUSHI MITTAL AND SHIPRA HIRA

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

AUTOMATIC REPEAT REQUEST (ARQ)

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

Second Copy Discarded

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.

....

Sliding Window ARQ


The problem of Stop and Wait is not be able to send

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.

Most important protocol of sliding window ARQ

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.

Go-Back-n ARQ, Damaged Frame


Here

frame 3 is

Error, Discarded Discarded Discarded RESENT RESENT RESENT

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

Go-Back-n ARQ, Lost Data Frame


A NAK frame indicate just that it needs to be resent . The sending device than retransmits the frame indicated by NAK, as well as any frame that it had transmitted after the lost one.

Discarded Discarded

Time

....

Time

Go-Back-n ARQ, Lost ACK


Time out

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.

ACK number, like NAK number must refer to the 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

You might also like