networking-error-corection.html
* created: 2026-04-11T18:50
* modified: 2026-04-11T20:27
title
Network error corection
description
Transmitting and receiving data can be error prone. Error corection acknowledges this and provides sensible routines for such cases.
related notes
Faulty data is not good
A lot of things can go wrong during the transmission of data. The data can be lost or parts of it corrupted. One job of the second osi layer is to identify and handle these cases correctly.
Depending on the medium different bit error ratios are to be expected:
- Digital telephone networks: from 10^{-6} to 10^{-7}
- Coaxial cables: 10^{-9}
- Fiber-optic cables: 10^{-12}
CRC
Error detection can happen by attaching a checksum to the data frame. The cyclic redundancy check (CRC) is used to calculated/validate the correctness of the checksum. This method does not provide any information about which parts of the data are corrupted, so backwards error correction needs to be applied if data is corrupted.
Parity checks
Checks based on additional information being added to a data block. For every horizontal row we get one additional parity bit, which is 1 if the number of 1's is odd. The same applies for every vertical column.
This aforementioned rule is inverted if an odd parity system is used:
- Even parity: Number of bits is odd = 1
- Odd parity: Number of bits is odd = 0
These can be used to pin point the corrupted bit. By checking the horizontal parity we can determine that at least one bit in this row has to be corrupted, afterwards we can look up the exact column by checking each vertical parity bit.
After correcting all corrupted bits the target can send an acknowledgement, which is referred to as forward error correction.
Backwards error correction
If corrupted data can be detected but not corrected on the target machine the sender needs to resend the data frame. This process is referred backwards error correction.
The target system does not send a negative acknowledgement for the data to be re-transmitted by the sender.
Forward error correction
If corrupted data can be detected and corrected on the target machine, the target does simply send an ack. This process is referred to as forward error correction.