Error Coding

As noted in Protocol Data Unit, the data link layer contains the Ethernet header and trailer. The trailer contains the Frame Check Sequence (FCS) for error checking.

Figure 5.3 Data flows down from upper layers to lower layers.

Figure 5.3 Data flows down from upper layers to lower layers.

Recall that the physical layer translates the frame into a series of bits, $1$'s and $0$'s,

Figure 5.10 Physical layer.

Figure 5.10 Physical layer.

Thus, when bits are transmitted over the computer network, they are subject to get corrupted due to interference and network problems. These are called errors. In particular, there are two type:

  1. Single-bit Error: Only one bit is changed, either from $1$ to $0$ or vice-versa.

    Untitled

  2. Burst Error: Two or more bits are changed, either from $1$ to $0$ or vice-versa.

    Untitled

And so, the FCS is responsible for catching these error.

How It Works?

You can think of the FCS as a special function that generates a unique code.

Figure 7.1 Error detection.

Figure 7.1 Error detection.

  1. The sender applies a specific function to the entire data frame $D$ and attaches the FCS $f(D)$ to the end of the data frame.
  2. The data frame is then transmitted to the receiver.
  3. The receiver applies the same function to the received data frame $D'$ to generate an FCS $f(D')$.
  4. Then, it compares the calculated FCS $f(D')$ with the received FCS $f(D)$. If it matches, there are no errors. Otherwise, an error has occurred.

Now, let’s cover what these functions are.

Error Detection Techniques