Computer Communications & Networks CS-576: Lecture#13
Computer Communications & Networks CS-576: Lecture#13
Computer Communications & Networks CS-576: Lecture#13
Lecture#13
Introduction
Networks must be able to transfer data from one device to
another with complete accuracy.
A System that can not guarantee that the data received by one
device is not identical to the data transmitted by another
device is essentially useless.
Anytime data is transmitted from source to destination ,it gets
corrupted on the way.
Many factors including NOISE can alter or wipe out one or
more bits of a given data unit.
Reliable systems have a mechanism for detecting and
correcting such errors
Error detection and Correction is implemented either at
the data link layer or at the transport layer.
Detection vs Correction
Detection
By detection, we only concentrate on finding an error.
Least interest in count or solution
Single bit error is same as burst error for detection.
Correction
By correction, we point out towards the solution of error.
Number of error bits and size of data is important.
Exact number of corrupted bits and their location.
If we need to correct 1 bit error in 8-bit data, possible error locations
would be 8. For 2-bit, possibilities would be 28. For 3-bit possibilities
would be 56.
Imagine if 10-bits of data unit are corrupted, what would
happen???
Types of Errors
The term single bit error means that only one bit of a given data unit(such
as a byte , character or a packet) is changed form 1 to 0 or from 0 to 1.
Figure shows the effect of a single bit error on a data unit.
ASCII character 00000010(ASCII STX) is sent, meaning start of text but
00001010(ASCII LF) is received , meaning line feed.
Single bit errors are the least likely type of error in serial data
transmission.
To see Why? Imagine a sender sends data at 1Mbps
This means that each bit lasts only 1/1,000,000 seconds or 1 microsecond
For single bit error to occur, the noise must have a duration of 1
microsecond which is very rare, noise lasts much longer than that bits
Burst Errors
The term burst error means that two or more bits in the data
unit have changed from 1 to 0 or from 0 to 1.
Performance of VRC
VRC can detect all single bit errors
In case of even-parity checking
Can also detect Burst errors as long as the total number of bits
changed is ODD (1,3,5 etc )
It can not detect errors if total number of errors is even
Vertical Redundancy Check (VRC)
Longitudinal Redundancy Check(LRC)
We then calculate the Parity bit for each column and create a new row
of 8 bits which are the parity bits for the whole block
Note that the first parity bit in the 5th row is calculated based on all
the first bits.
Longitudinal Red Check(LRC)
The second parity bit is calculated based on all the second bits
and so on
We then attach the 8 parity bits to the original data and send
them to the receiver
Example
Longitudinal Red Check(LRC)
Cyclic Redundancy Check (CRC)
Most powerful of checking techniques
VRC and LRC are based on Addition
CRC is based on Binary Division
A sequence of redundant bits called CRC or CRC remainder is
appended to the end of the data unit so that the resulting data
unit becomes exactly divisible by a second predetermined
binary number.
At its destination, the data unit is divided by the same
number .
If at this step there is no remainder, the incoming data unit is
assumed to be intact and is therefore accepted.
A remainder indicates that a data unit has been damaged and
therefore must be rejected.
Qualities of CRC
10101001
00111001
----------------
11100010 Sum
00011101 Checksum
Sent pattern: 10101001 00111001 00011101
checksum
EXAMPLE
Segment 1 10101001
Segment 2 00111001
Checksum 00011101
----------------- ----------------
SUM 11111111
Complement 00000000
EXAMPLE
Segment1 10101111
Segment2 11111001
Checksum 00011101
Sum 11000110
Complement 00111001