0% found this document useful (0 votes)
7 views37 pages

CN 10-11 Data Link Layer

The document discusses the Data Link Layer's role in error detection and correction in computer networks, focusing on types of errors such as single-bit and burst errors. It explains redundancy techniques like Vertical Redundancy Check (VRC), Longitudinal Redundancy Check (LRC), and Hamming code for ensuring data integrity during transmission. The document emphasizes the importance of detecting and correcting errors to maintain reliable communication in networks.

Uploaded by

ishaan0643.be21
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views37 pages

CN 10-11 Data Link Layer

The document discusses the Data Link Layer's role in error detection and correction in computer networks, focusing on types of errors such as single-bit and burst errors. It explains redundancy techniques like Vertical Redundancy Check (VRC), Longitudinal Redundancy Check (LRC), and Hamming code for ensuring data integrity during transmission. The document emphasizes the importance of detecting and correcting errors to maintain reliable communication in networks.

Uploaded by

ishaan0643.be21
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 37

Data Link Layer

Lecture10-11 (Theory)

Computer Networks
Index

1. Types of Errors
2. Redundancy
3. Error Detection
4. Error Correction
TYPES OF ERRORS

■ Single bit error :-


Only one bit in the data unit has changed.

■ Burst error :-
It means that two or more bits in the data unit has changed.
Single-bit error
Basic concepts
★ Networks must be able to transfer data from one device to another with complete
accuracy.

★ Data can be corrupted during transmission.

★ For reliable communication, errors must be detected and corrected.

★ Error detection and correction are implemented either at the data link layer or the
transport layer of the OSI model.
• 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.
Burst error
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.

Burst errors does not necessarily mean that the errors occur in consecutive bits, the length of
the burst is measured from the first corrupted bit to the last corrupted bit. Some bits in between
may not have been corrupted.
■ Data can be corrupted during transmission. For reliable communication, errors must be
detected and corrected.

■ Error detection and correction are implemented either at data link layer or the transport
layer of the OSI model.
★ Burst error is most likely to happen in serial transmission since the duration of noise is
normally longer than the duration of a bit.

★ The number of bits affected depends on the data rate and duration of noise.

Example:
🢂 If data is sent at rate = 1Kbps then a noise of 1/100 sec can affect 10 bits.(1/100*1000)

🢂 If same data is sent at rate = 1Mbps then a noise of 1/100 sec can affect 10,000 bits.(1/100*10 6)
Error detection

Error detection means to decide whether the received data is correct or not without having a copy
of the original message.

Error detection uses the concept of redundancy, which means adding extra bits for detecting
errors at the destination.
Redundancy

■ Instead of repeating the entire data stream, a shorter group of bits may
be appended to the end of each unit.

■ This technique is called Redundancy because the extra bit are


redundant to the information. They are discarded as soon as the
accuracy of the transmission has been determined.
There are basically four types of redundancy checks. They are:

1. 1. VRC (Vertical Redundancy Check).


2. 2. LRC (Longitudinal Redundancy Check).
3. 3. CRC (Cyclical Redundancy Check).
4. 4. Checksum
Redundancy
Four types of redundancy checks are used in data communications
Vertical Redundancy Check

• It is also known as parity check


• It is least expensive mechanism for error detection
• In this technique, the redundant bit called parity bit is appended to every
data unit so that the total number of 1s in the unit becomes even (including
parity bit)

17
Vertical Redundancy Check

1100001
Data
Checking function

1100001 | 1 Even – parity


Is total number generator
of 1s even
?
Receiver 1

Sender
18
Vertical Redundancy Check VRC
VERTICAL REDUNDANCY CHECK

 Example :
1110110 1101111 1110010

- After adding the parity bit 11101101 11011110 11100100

20
Vertical Redundancy Check

■ VRC can detect all single – bit errors


■ It can detect burst errors if the total number of errors in each data unit is odd.
■ VRC can not detect errors where the total number of bits changed is even.
LONGITUDINAL REDUNDANCY CHECK(LRC)

In this method , a block of bits is organized in table(rows and columns)


calculate the parity bit for each column and the set of this parity bit is also sending
with original data.

From the block of parity we can check the redundancy .


Longitudinal Redundancy Check
LRC
LRC Example
11100111 11011101 00111001
10101001
11100111
11011101
00111001
10101001

LRC 10101010

11100111 1101101 00111001 10101001


10101010

Original data plus


LRC
LRC Example
Suppose the following block is sent :

10101001 00111001 11011101 11100111 10101010


• (LRC)
• However,it is hit by burst of length eight and some bits are corrupted (Yellow bits are changed) :
• 10100011 10001001 11011101 11100111 10101010
• (LRC)
• When the receiver checks the LRC,some of the bits are not following even parity rule and whole
block is discarded (the non matching bits are shown in red )
• 10100011 10001001 11011101 11100111 10101010
Advantage :

-> LRC of n bits can easily detect burst error of n bits.

Disadvantage :

-> If two bits in one data units are damaged and two bits in exactly same position in another
data unit are also damaged , the LRC checker will not detect the error.
VRC and LRC
Hamming code C(7, 4) C(n,k) dmin=3
The structure of the encoder and
decoder for a Hamming code
Hamming Code

• Parity checks are created as follow (using modulo-2)


• r0 = a2 + a1 + a0
• r1 = a3 + a2 + a1
• r2 = a1 + a0 + a3
Hamming Code

• The checker in the decoder creates a 3-bit syndrome (s2s1s0).


• In which each bit is the parity check for 4 out of the 7 bits in the received codeword:
• s0 = b2 + b1 + b0 + q0
• s1 = b3 + b2 + b1 + q1
• s2 = b1 + b0 + b3 + q2
• The equations used by the checker are the same as those used by the generator with the
parity-check bits added to the right-hand side of the equation.
Logical decision made by the
correction logic analyzer

Hamming code C(7, 4) can :


• detect up to 2-bit error (dmin -1)
• can correct up to 1 bit error (dmin-1)/2
Burst error correction using
Hamming code

Split burst error between multiple codewords


The minimum Hamming distance is the smallest Hamming distance between
all possible pairs in a set of words.

Let us find the Hamming distance between two pairs of words.

1. The Hamming distance d(000, 011) is 2

2. The Hamming distance d(10101, 11110) is 3 because


Example
Find the minimum Hamming distance of the coding scheme in Table

Solution
We first find all Hamming distances.

The dmin in this case is 2.


Practice Questions

• https://pinoybix.org/2017/07/mcq-in-network-layer-internet-protocol-forouzan.html
• https://edurev.in/course/quiz/attempt/-1_Test-Ipv4--IP-Packet/0decdb37-7206-4824-afdd
-d47013a5c4cd
Computer Networks

You might also like