top of page
Writer's pictureNileesha Dilshan

Error Detection Techniques in Data Link Layer

Updated: Jan 12, 2023

The data-link layer applies error control techniques to guarantee that frames, or bit streams of data, are effectively delivered from the source to the destination.

So how do these errors occur?

The errors occur when bits of data are lost or corrupted while transported over a computer network because of interference and network issues. Due to these corrupted bits of data, there is a chance of getting fake data to the destination.

There are three types of errors.

  • Single bit errors

  • Multiple bit errors

  • Burst errors

To avoid these errors, there are three popular techniques for error detection in the data-link layer.

  • Parity Check

  • Checksum

  • Cyclic Redundancy Check(CRC)

 

Table of Contents

 

Types of Errors

Single bit errors

If one bit is corrupted in the received frame, then it is a single-bit error. Likewise either changed from 0 to 1 or from 1 to 0.

Multiple bits errors

If several bits are corrupted in the received frame, then it is a multiple-bit error. Likewise here also several bits are either changed from 0 to 1 or from 1 to 0.

Burst errors

Here in the received frame, if several bits are corrupted in a consecutive manner, then it is a burst error.

Error Detection Techniques

Parity Check

The parity check is performed by adding an additional bit to the data known as the parity bit, which results in a number of 1s that are either even in the case of even parity or odd in the case of odd parity.

The sender counts the amount of 1s in the frame and adds the parity bit in the following manner:

  • Even parity: If the number of 1s is even, the parity bit value is 0. The parity bit value is 1 if the number of 1s is odd.

  • Odd parity: The parity bit value is 0 if the number of 1s is odd. If the number of 1s is an even amount, the parity bit value is 1.

When a frame is received, the receiver counts the number of 1s in it. In the case of an even parity check, the frame is accepted if the number of 1s is even; otherwise, it is refused. For odd parity checks, a similar rule is used.

The parity check is only useful for detecting single-bit errors.

Checksum

When the data is separated into frames or segments with set sizes, to calculate the total, the sender sums the segments using 1's complement arithmetic. It then adds the amount to obtain the checksum, which it sends along with the data frames.

Then the receiver gets the total of incoming segments and the checksum to obtain the sum and then compliments it using 1's complement arithmetic.

The received frames are accepted if the result is zero or else, they are discarded.

Cyclic Redundancy Check (CRC)

CRC requires binary division of the data bits being delivered by a specified divisor agreed upon by the communication system. Polynomials are used to create the divisor.

The sender does a binary division of the data segment with the help of the divisor. The remainder, known as CRC bits, is then appended to the end of the data segment. This results in a data unit that is exactly divided by the divisor.

Then the incoming data unit is divided by the divisor by the receiver. If no remainder is found, the data unit is presumed to be valid and accepted. Otherwise, it is assumed that the data is corrupted and so discarded.

Related Blogs

6 views0 comments

Recent Posts

See All

Comentários


bottom of page