Data link layer – Error Detection and Correction

In the data link layer, an error refers to any deviation or alteration in the transmitted data that makes it different from the original data sent by the sender. These errors can occur due to various reasons, such as noise in the communication channel, interference, hardware or software malfunctions, etc.

There are primarily two types of errors that can occur in the data link layer:

  • Single-Bit Error:

A single-bit error occurs when only one bit of data is altered during transmission. For example, if a bit is flipped from 1 to 0 or from 0 to 1 during transmission.

  • Burst Error:

A burst error occurs when two or more bits of data are altered in close proximity to each other during transmission. For example, if a group of bits are flipped from 1 to 0 or from 0 to 1 during transmission. These types of errors are usually caused by external factors such as interference or noise in the communication channel.

 

Different error detection and correction techniques are used to detect and correct these errors in the data link layer.

Length of an Error:

The length of an error in a burst error is the number of bits that are affected by the error and are contiguous in the data stream. For example, if there is a burst error that affects 5 consecutive bits in a data stream, the length of the error would be 5 bits. The length of a burst error is an important factor in determining the effectiveness of error correction techniques, as some techniques are better suited to correcting shorter burst errors while others are better for longer burst errors.

 

Error Detection Techniques:

There are several techniques for error detection in the data link layer. Some of the commonly used techniques are:

  • Cyclic Redundancy Check (CRC):

It is a popular technique used for error detection in the data link layer. In this technique, the sender and receiver both use the same polynomial to compute a checksum for the data. The checksum is appended to the data and transmitted. The receiver also calculates the checksum using the same polynomial and compares it with the received checksum. If they match, the data is assumed to be error-free, it is rejected.

  • Checksum:

In this technique, the data is divided into small chunks of fixed length and a checksum is calculated for each chunk. The checksum is appended to the data and transmitted. The receiver also calculates the checksum for each chunk and compares it with the received checksum. If they match, the data is assumed to be error-free, else it is rejected.

  • Parity Checking:

In this technique, an additional bit called parity bit is added to the data to make the total number of 1’s even or odd. The parity bit is calculated and appended to the data. The receiver also calculates the parity bit and checks it with the received parity bit. If they match, the data is assumed to be error-free, else it is rejected.

  • Hamming Code:

It is a technique used for error detection and correction. In this technique, additional bits called parity bits are added to the data to form a code word. The code word is transmitted along with the data. The receiver also calculates the parity bits and checks them with the received parity bits. If there is an error, the receiver can correct it based on the position of the erroneous bit.

  • LRC (Longitudinal Redundancy Check):

In this technique, a block of data is divided into smaller blocks, and a parity bit is generated for each block. The parity bits are then combined using XOR operations to form a final parity bit called LRC. The LRC is appended to the data and transmitted. The receiver also calculates the LRC and compares it with the received LRC. If they match, the data is assumed to be error-free, else it is rejected.

Error Correction Techniques:

In the data link layer, error correction techniques are used to detect and correct errors that occur during data transmission. The most commonly used error correction techniques in the data link layer are:

Automatic Repeat Request (ARQ):

In this technique, the receiver sends an acknowledgement to the sender for each received frame. If the sender does not receive an acknowledgement within a certain time period, it retransmits the frame. ARQ is classified into three types:

  • Stop-and-Wait ARQ: In this method, the sender sends a frame and waits for the acknowledgement from the receiver. The receiver sends an acknowledgement only when it receives the frame without error. If the sender does not receive an acknowledgement, it retransmits the frame.
  • Go-Back-N ARQ: In this method, the sender can send multiple frames without waiting for the acknowledgement from the receiver. The receiver sends an acknowledgement for each received frame. If the receiver detects an error in a frame, it discards that frame and all subsequent frames until it receives the correct frame.
  • Selective Repeat ARQ: In this method, the sender can send multiple frames without waiting for the acknowledgement from the receiver. The receiver sends an acknowledgement for each received frame. If the receiver detects an error in a frame, it requests the sender to retransmit only that particular frame.

Forward Error Correction (FEC):

In this technique, error correction codes are added to the data at the sender’s end. The receiver uses these error correction codes to detect and correct errors in the received data. FEC can be classified into two types:

  • Block codes: In this method, a block of data is treated as a single unit and error correction codes are added to the entire block.
  • Convolutional codes: In this method, error correction codes are added to each bit of data based on the previous bits.

Both of these techniques have their own advantages and disadvantages, and the choice of technique depends on the specific requirements of the application.

16 thoughts on “Data link layer – Error Detection and Correction”

  1. Pingback: Network Topology - Computer Notes

  2. Pingback: Processing and Analysis of Data in Research Methodology

  3. Pingback: Duties of Data Link Layer

  4. Pingback: Ethernet

  5. Pingback: CSMA/CD

  6. Pingback: Checksum - Error Detection Technique

  7. Pingback: Network Topology

  8. Pingback: Data link layer - Framing

  9. My spouse and I stumbled over here different website and thought I might check things out.
    I like what I see so i am just following you. Look forward to
    checking out your web page again.

  10. Hello there, I do think your blog could possibly be having internet browser compatibility issues.
    When I look at your site in Safari, it looks fine however,
    when opening in IE, it’s got some overlapping issues. I simply
    wanted to provide you with a quick heads up!
    Apart from that, fantastic blog!

Leave a Comment

Your email address will not be published. Required fields are marked *