Skip to main content

What errors does the data link layer detect?

The data link layer detects errors related to data corruption while a frame is transmitted over the physical medium.

Briefly and to the point: L2 checks whether the frame arrived without bit errors.


1. Bit errors

The most fundamental type.

They occur when:

  • the signal is distorted
  • interference flips a 0 to a 1 or vice versa

The data link layer:

  • recalculates the checksum (FCS)
  • compares it with the received one
  • if they do not match, it considers the frame corrupted

2. Frame corruption

If:

  • part of the frame is lost
  • the data is altered
  • the frame arrived incomplete

The checksum:

  • will not match
  • the frame will be discarded

3. Loss of frame integrity

The data link layer can detect:

  • errors in the payload
  • errors in the frame header

Any change to the bits:

  • results in an FCS error

On networks with CSMA/CD:

  • collisions corrupted frames
  • such frames failed the FCS check

Important for an interview:

The data link layer:

  • does not understand logical errors (wrong address, wrong port, wrong protocol)
  • does not check delivery order
  • does not guarantee delivery
  • does not correct errors (it only detects them)

Correction and retransmission are handled by:

  • the transport layer (TCP)
  • or logic above it

How error detection actually happens

Ethernet uses:

  • CRC (Cyclic Redundancy Check)
  • the value is recorded in the FCS field

The receiver:

  1. recalculates the CRC
  2. compares it with the FCS
  3. if they do not match: discards the frame

Short Answer

Interview ready
Premium

A concise answer to help you respond confidently on this topic during an interview.