How2Lab Logo
tech guide & how tos..


Error Control Techniques


Error control refers to a mechanism to detect and correct errors that occur in the transmission of frames/ message packets.

Data are sent as a sequence of frames. Frames arrive in the same order in which they are sent, and each transmitted frame suffers an arbitrary and variable amount of delay before reception.

During transmission, there is possibility of 2 types of errors:

  1. Lost frame: A frame fails to arrive at the other side. A noise burst may damage a frame to the extent that the receiver is not aware that a frame has been transmitted.

  2. Damaged frame: A recognizable frame does arrive but some of the bits are in error, i.e. they have been altered during transmission.

The most common techniques for error control are based on some or all of the following:

Error detection: Using parity check or CRC check.

Positive acknowledgement: The destination returns a positive acknowledgement to successfully received, error-free frames.

Re-transmission after timeout: The source re-transmits a frame that has not been acknowledged after a predetermined amount of time.

Negative acknowledgement and re-transmission: The destination returns a negative acknowledgement to frames in which an error is detected. The source re-transmits such frames.

Collectively, these mechanisms are referred to as Automatic-Repeat-Request (ARQ).


There are 3 popular ARQ techniques:

  • Stop – and –wait ARQ
  • Go – back – N ARQ
  • Selective – reject ARQ

Stop – and –wait ARQ

In Stop-and-Wait ARQ sender (say station A) transmits a single frame and then waits till it receives a positive acknowledgement (ACK) or a negative acknowledgement (NACK) from the receiver (say station B). No other data frames can be sent until the destination station’s reply arrives at the source station.

The frame transmitted by the source could suffer an error. If the error is detected by the destination, it discards the frame and sends a NACK, causing the source to re-transmit the damaged frame. On the other hand, if the transmitted frame is so corrupted by noise as not to be received, the destination will not respond. To account for this possibility, the source is equipped with a timer. After a frame is transmitted, the source waits for an acknowledgement (ACK or NACK). If no recognizable acknowledgement is received (i.e. either no acknowledgement was received or a damaged acknowledgement was received) during the timeout period, then the frame is re-transmitted.

This mechanism requires that the source maintain a copy of the transmitted frame until an ACK is received for the frame.


It is quite possible that a frame was sent correctly, but the ACK was damaged in transit, then the source will timeout and re-transmit that frame. The destination will now receive and accept two copies of the same frame. To avoid this problem, frames are alternately labeled with 0 or 1 and positive acknowledgements are of the form ACK0 or ACK1 - an ACK0 (ACK1) acknowledges receipt of a frame numbered 1 (0) and indicates that the receiver is ready for a frame numbered 0 (1).

Stop–and–wait ARQ is simple but it is an inefficient protocol as it makes inefficient use of the transmission line.


Go – back – N ARQ

One variant of continuous ARQ is known as Go-back-N ARQ. In this technique, a station may send a series of frames determined by window size, using the sliding-window flow control technique. While no errors occur, the destination will acknowledge (ACK) incoming frames as usual.


Consider that station A is sending frames to station B. After each transmission, A sets an acknowledgement timer for the frame just transmitted. The Go-back-N technique takes into account the following contingencies:-

  1. Damaged frame

    There are 3 sub-cases:

    a) A transmits frame i. B detects an error and has previously successfully received frame i-1. B send an NACK i indicating that frame i is rejected. When A receives this NACK, it must re-transmit frame i and all subsequent frames that it has transmitted.

    b) Frame i is lost in transit. A subsequently sends frame i+1. B receives frame i+1 out of order and sends a NACK i.

    c) Frame i is lost in transit, and A does not soon send additional frames. B receives nothing and returns neither an ACK nor a NACK. A will timeout and re-transmit frame i.

  2. Damaged ACK

    There are 2 sub-cases:

    a) B receives frame i and sends ACK i+1 which is lost in transit. Since ACKs are cumulative (example ACK6 means that all frames thru’ 5 are acknowledged), it may be that A will receive a subsequent ACK to a subsequent frame that will do the job of the lost ACK before the associated time expires.

    b) If A’s timer expires, A retransmits frame i and all subsequent frames.

  3. Damaged NACK

    If a NACK is lost, A will eventually timeout on the associated frame and re-transmit that frame and all subsequent frames.

In this technique, the number N normally specifies how many frames can be sent without receiving acknowledgement. If no acknowledgement is received after sending N frames, the sender takes the help of a timer. After the time–out, it resumes re-transmission.

This scheme is little more complex than the previous one but gives much higher throughput.


Selective – reject ARQ

With selective-reject ARQ, the only frames re-transmitted are those that receive a NACK or which time out. This would appear to be more efficient than the Go-back-N approach, since it minimizes the amount of re-transmission. On the other hand, the receiver must contain storage to save post NACK frames, until the frame in error is transmitted, and contain logic for re-inserting that frame in the proper sequence. The transmitter too, will require more complex logic to be able to send frames out of sequence. Because of such complications, the selective-reject ARQ is rarely implemented.


Share:
Buy Domain & Hosting from a trusted company
Web Services Worldwide | Hostinger
About the Author
Rajeev Kumar
CEO, Computer Solutions
Jamshedpur, India

Rajeev Kumar is the primary author of How2Lab. He is a B.Tech. from IIT Kanpur with several years of experience in IT education and Software development. He has taught a wide spectrum of people including fresh young talents, students of premier engineering colleges & management institutes, and IT professionals.

Rajeev has founded Computer Solutions & Web Services Worldwide. He has hands-on experience of building variety of websites and business applications, that include - SaaS based erp & e-commerce systems, and cloud deployed operations management software for health-care, manufacturing and other industries.


Refer a friendSitemapDisclaimerPrivacy
Copyright © How2Lab.com. All rights reserved.