Professional Documents
Culture Documents
Lec 07 DLC L08 Error Control
Lec 07 DLC L08 Error Control
DATA COMMUNICATION
& NETWORKING
Lecture 07/08
5
Lecture 07
Normal operation
Lost Frame
Lost ACK frame
Delayed ACK frame
Normal operation Stop- And- Wait ARQ
eH
lost frame Stop- And- Wait ARQ
eH
lost ACK frame Stop- And- Wait ARQ
eH
delayed ACK Stop- And- Wait ARQ
eH
Note:
Sequence Number
Resending Frames
Operation
Sender sliding window Go- Back- N ARQ
Receiver sliding window Go- Back- N ARQ
Control variables Go- Back- N ARQ
normal operation Go- Back- N ARQ
lost frame Go- Back- N ARQ
sender window size Go- Back- N ARQ
Selective-Repeat ARQ
Selective-Repeat ARQ
Operation
Bidirectional Transmission
Pipelining
sender and receiver windows Selective Repeat ARQ
lost frame Selective Repeat ARQ
Note:
Error Control
What’s an “error”?
• Human errors:
– Incorrect IP address assignment, or subnet mask, etc., etc.
• Network errors:
– Lost data
– Corrupted data (received, but garbled)
Basic concepts
eH
Single bit errors are the least likely
type of errors in serial data
transmission because the noise must
have a very short duration which is
very rare. However this kind of errors
can happen in parallel transmission.
Example:
If data is sent at 1Mbps then each bit
lasts only 1/1,000,000 sec. or 1 μs.
For a single-bit error to occur, the noise
must have a duration of only 1 μs,
which is very rare.
eH
Multiple bit error
eH
Burst error
eH
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.
eH
Error Detection and
Correction
Error detection
1 Even parity
0 1 0 1 0 1 0
0 Odd parity
Example
D 1 0 1
0 1
0 1 0 0 1
A 1 0 0 0 0 0 1 1
T 1 0 1 0 1 0 0 0
A 1 0 0 0 0 0 1 1
Longitudinal Parity
0 1 0 1 0 1 0 0
1 0 0 1 1 1 0 1
BCC 0 0 1 1 0 1 1 1
Example
D 68
A 65 282
= 1 remainder 27
T 84 255
A 65
Checksum 0 0 1 1 0 1 1 1
Cyclical redundancy check
7 6 5 4 3 2 1 0
0 0 1 1 0 1 1 1
Message polynomial
x5+x4+x2+x1+x0 x5+x4+x2+x+1
Generating polynomial
ATM CRC x8 + x2 + x + 1
CRC-16 x16 + x15 + x2 + 1
56
Error Control
67
Redundancy
Four types of redundancy checks are used
in data communications
Vertical Redundancy Check
VRC
Performance
78
Figure 10.21 A polynomial to represent a divisor binary word
79
CRC division using polynomials • The dataword 1001 is represented as
x3 + 1. The divisor 1011 is represented
as x3 + x + 1.
• To find the augmented dataword, we
have left-shifted the dataword 3 bits
(multiplying by x3). The result is x6 + x3.
• Division is straightforward. We divide
the first term of the dividend, x6, by the
first term of the divisor, x3. The first
term of the quotient is then x6/x3, or x3.
• Then we multiply x3 by the divisor and
subtract (according to our previous
definition of subtraction) the result from
the dividend. The result is x4, with a
degree greater than the divisor’s
degree; we continue to divide until the
degree of the remainder is less than
the degree of the divisor.
80
Checksum
At the sender
The unit is divided into k sections, each of
n bits.
All sections are added together using
one’s complement to get the sum.
The sum is complemented and becomes
the checksum.
The checksum is sent with the data
At the receiver
The unit is divided into k sections, each of
n bits.
All sections are added together using
one’s complement to get the sum.
The sum is complemented.
If the result is zero, the data are accepted:
otherwise, they are rejected.
Performance
The checksum detects all errors involving
an odd number of bits.
It detects most errors involving an even
number of bits.
If one or more bits of a segment are
damaged and the corresponding bit or bits
of opposite value in a second segment are
also damaged, the sums of those columns
will not change and the receiver will not
detect a problem.
Error Correction
It can be handled in two ways:
1) receiver can have the sender retransmit
the entire data unit.
2) The receiver can use an error-correcting
code, which automatically corrects
certain errors.
Single-bit error correction
To correct an error, the receiver reverses the
value of the altered bit. To do so, it must know
which bit is in error.
Number of redundancy bits needed
• Let data bits = m
• Redundancy bits = r
Total message sent = m+r
The value of r must satisfy the following
relation:
2r ≥ m+r+1
Error Correction
Hamming Code
Hamming Code
Hamming Code
Example of Hamming Code
Single-bit error
Error
Detection
Any
Questions?