DLL
DLL
The data link layer needs to pack bits into frames, so that each
frame is distinguishable from another.
Methods
1.Byte count
2.Flag bytes with byte/character stuffing
3.Flag bits with bit stuffing
Error Control
Types of Error
During data transmission, one or more bits of
data being transmitted may get corrupted
Depending on the number of bits in data that
have been corrupted, there exist two types of
error:
1. Single bit error
2. Burst error
Two basic strategies for dealing with errors
1.Error Detection
2.Error Correction
Burst error
Burst error means that 2 or more bits in the
data unit have changed from 1 to 0 or from 0
to 1
Redudancy
To detect or correct errors, we need to send
some extra bits with our data.
Error detection uses the concept of redundancy,
which means adding extra bits for detecting errors
at the destination.
Odd Parity
Dataword
Dataword
is
received:
Additive Checksum
It can be applied to a message of any length
It can be used to detect multiple errors
At the source, message is divided into m-bit units
At the sender, Generator creates an extra m-bit unit
called checksum by adding the bits of data to be
transmitted, which is sent with the message
At the receiver, checksum is again computed by
adding the bits of received bytes
If the newly computed checksum is same as one
transmitted, then it implies no error
It is calculated by adding all the bytes bit-by-bit by
neglecting the final carry (i.e out of MSB)
It can detect all odd numbers of errors and most of
the even number of errors.
3.Additive Checksum
Example
Data:10110011;10101011;01011010;11010101
Check sum:01110000
Transmitted Data:
10110011;10101011;01011010;11010101;
01110000
1 0 0 1
1 0 1 1
1
1
0
0
0
1
0
1
Dataword
1
CRC
(Remainder)
0 0 1 1
1 0
Codeword
1 0 0 1 1 1 0
the
CRC
code
for
1101011011
using generator
write both in the polynomial form.
Answer: CRC = 1110
Codeword =
11010110111110
the
dataword
10011.
Also
Standard polynomials
10.34
Performance of CRC
r1= 1, 3, 5, 7, 9, 11, , , , , ,
r2=2,3, 6, 7, 10, 11, , , , ,
r4 = 4, 5, 6, 7, 12, 13, 14, 15, , , , ,
r8 = 8,9,10,11,12,13,14,15, , , , ,
and so on
Ex-OR the bits to get redundancy bits/ parity bits
Hamming Distance
The minimum Hamming distance is the smallest Hamming
distance between all possible pairs in a set of words.
Example
Hamming distance
Y=
XOR
d(X, Y) = 4