Error Detection in Computer Networks
Error Detection in Computer Networks
Error
A condition when the receiver’s information does not match with the sender’s
information. During transmission, digital signals suffer from noise that can introduce
errors in the binary bits travelling from sender to receiver. That means a 0 bit may
change to 1 or a 1 bit may change to 0.
Error Detecting Codes (Implemented either at Data link layer or Transport Layer
of OSI Model)
Whenever a message is transmitted, it may get scrambled by noise or data may get
corrupted. To avoid this, we use error-detecting codes which are additional data added
to a given digital message to help us detect if any error has occurred during
transmission of the message.
Basic approach used for error detection is the use of redundancy bits, where additional
bits are added to facilitate detection of errors.
Some popular techniques for error detection are:
1. Simple Parity check
2. Two-dimensional Parity check
3. Checksum
4. Cyclic redundancy check
1. Simple Parity check
Blocks of data from the source are subjected to a check bit or parity bit
generator form, where a parity of :
1 is added to the block if it contains odd number of 1’s, and
0 is added if it contains even number of 1’s
This scheme makes the total number of 1’s even, that is why it is called even
parity checking.
01000111 -0
1101011 -1
1001 -> 10010 ---transmission media ----- 10011----reject
Data to be sent
4. Cyclic redundancy check (CRC)
Unlike checksum scheme, which is based on addition, CRC is based on
binary division.
In CRC, a sequence of redundant bits, called cyclic redundancy check
bits, are appended to the end of data unit so that the resulting data unit
becomes exactly divisible by a second, predetermined binary number.
At the destination, the incoming data unit is divided by the same number.
If at this step there is no remainder, the data unit is assumed to be
correct and is therefore accepted.
A remainder indicates that the data unit has been damaged in transit and
therefore must be rejected.
Example :
1001
X4 +x2+1 ---- (1. X4) + (0. X3) + (1. X2) + (0. X1) +1
10101 5-1 =4
1.X3 +0.x2+0. x+ 1
1001
Error Correction
In the digital world, error correction can be done in two ways:
Backward Error Correction When the receiver detects an error in the data
received, it requests back the sender to retransmit the data unit.
Forward Error Correction When the receiver detects some error in the data
received, it executes error-correcting code, which helps it to auto-recover and to
correct some kinds of errors.
The first one, Backward Error Correction, is simple and can only be efficiently used
where retransmitting is not expensive. For example, fiber optics. But in case of wireless
transmission retransmitting may cost too much. In the latter case, Forward Error
Correction is used.
To correct the error in data frame, the receiver must know exactly which bit in the
frame is corrupted. To locate the bit in error, redundant bits are used as parity bits for
error detection.