cloud computing trends

Error Detection Techniques in Data Link Layer

written by HB Nadun Udara
On Mar 19, 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)

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 Posts

Routing

Routing

What is Routing? Routing is the method of choosing the most appropriate path for network traffic to travel between different networks or network devices. It involves determining the path that data should take through the network to reach its intended destination....

Network Address Translation

Network Address Translation

Network Address Translation or NAT gives the facility of accessing the internet by multiple devices through a single public IP address. To do this, the private IP address must be converted to a public IP address. Network Address Translation is the procedure that...

IP Address

IP Address

IP is abbreviated from Internet Protocol. So IP address also known as Internet Protocol address is a unique address used to identify a device on the internet or in a LAN. Generally, IP address enables the devices to exchange information between them since they contain...

Comments

1 Comment

  1. Avatar

    I just could not leave your web site before suggesting that I really enjoyed the standard information a person supply to your visitors Is gonna be again steadily in order to check up on new posts

    Reply

Submit a Comment

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