0% found this document useful (0 votes)
16 views56 pages

Chapter 10

Chapter 10 discusses error detection and correction in data transmission, emphasizing the importance of accurate data transfer and the types of errors that can occur, such as single-bit and burst errors. It outlines various methods for error detection, including redundancy checks like VRC, LRC, CRC, and checksum, as well as error correction techniques like Hamming code. Additionally, it covers data link control protocols such as HDLC and access methods like Aloha and CSMA for managing data transmission over networks.

Uploaded by

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

Chapter 10

Chapter 10 discusses error detection and correction in data transmission, emphasizing the importance of accurate data transfer and the types of errors that can occur, such as single-bit and burst errors. It outlines various methods for error detection, including redundancy checks like VRC, LRC, CRC, and checksum, as well as error correction techniques like Hamming code. Additionally, it covers data link control protocols such as HDLC and access methods like Aloha and CSMA for managing data transmission over networks.

Uploaded by

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

Chapter 10

Error Detection
and Correction

• Types of Errors
• Detection
• Correction
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.
Types of Errors
Single-bit error
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.
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*106)
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
Four types of redundancy checks are used
in data communications
Vertical Redundancy Check
VRC
Performance

It can detect single bit error


It can detect burst errors only if the total
number of errors is odd.
Longitudinal Redundancy Check
LRC
Performance

LCR increases the likelihood of detecting


burst errors.
If two bits in one data units are damaged
and two bits in exactly the same positions in
another data unit are also damaged, the
LRC checker will not detect an error.
VRC and LRC
Cyclic Redundancy Check
CRC
Cyclic Redundancy Check
• Given a k-bit frame or message, the
transmitter generates an n-bit sequence,
known as a frame check sequence (FCS),
so that the resulting frame, consisting of
(k+n) bits, is exactly divisible by some
predetermined number.
• The receiver then divides the incoming
frame by the same number and, if there is
no remainder, assumes that there was no
error.
Binary Division
Polynomial
Polynomial and Divisor
Standard Polynomials
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
High-level Data Link Control (HDLC)
Transfer Modes
HDLC supports two types of transfer modes,
normal response mode and asynchronous
balanced
Normal mode.
Response Mode (NRM)
two types of stations are there, a
primary station that send commands and
secondary station that can respond to
received commands. It is used for both
point - to - point and multipoint
communications
Asynchronous Balanced Mode (ABM)
the configuration is balanced, i.e. each
station can both send commands and
respond to commands. It is used for only
point - to - point communications
HDLC Frame

•Flag − It is an 8-bit sequence that marks the beginning and


the end of the frame. The bit pattern of the flag is 01111110.
•Address − It contains the address of the receiver. If the
frame is sent by the primary station, it contains the
address(es) of the secondary station(s). If it is sent by the
secondary station, it contains the address of the primary
station. The address field may be from 1 byte to several bytes.
•Control − It is 1 or 2 bytes containing flow and error control
information.
•Payload − This carries the data from the network layer. Its
length may vary from one network to another.
•FCS − It is a 2 byte or 4 bytes frame check sequence for
error detection. The standard code used is CRC (cyclic
Types of HDLC Frames
•I-frame − I-frames or Information frames carry user
data from the network layer. They also include flow and
error control information that is piggybacked on user
data. The first bit of control field of I-frame is 0.

•S-frame − S-frames or Supervisory frames do not


contain information field. They are used for flow and
error control when piggybacking is not required. The
first two bits of control field of S-frame is 10.

•U-frame − U-frames or Un-numbered frames are used


for myriad miscellaneous functions, like link
management. It may contain an information field, if
required. The first two bits of control field of U-frame is
11.
Aloha Rules

1.Any station can transmit data to a channel at any

time.

2.It does not require any carrier sensing.

3.Collision and data frames may be lost during the

transmission of data through multiple stations.


Pure Aloha
Whenever data is available for sending over a channel at stations, we
use Pure Aloha. In pure Aloha, when each station transmits data to a
channel without checking whether the channel is idle or not, the
chances of collision may occur, and the data frame can be lost. When
any station transmits the data frame to a channel, the pure Aloha waits
for the receiver's acknowledgment. If it does not acknowledge the
receiver end within the specified time, the station waits for a random
amount of time, called the backoff time (Tb). And the station may
assume the frame has been lost or destroyed. Therefore, it retransmits
Slotted Aloha

The slotted Aloha is designed to overcome the pure Aloha's

efficiency because pure Aloha has a very high possibility of frame

hitting. In slotted Aloha, the shared channel is divided into a fixed

time interval called slots. So that, if a station wants to send a frame

to a shared channel, the frame can only be sent at the beginning of

the slot, and only one frame is allowed to be sent to each slot. And if

the stations are unable to send data to the beginning of the slot, the
CSMA (Carrier Sense Multiple Access)
It is a carrier sense multiple access based on media access protocol
to sense the traffic on a channel (idle or busy) before transmitting the
data. It means that if the channel is idle, the station can send data to
CSMA AccessOtherwise,
the channel. Modes it must wait until the channel becomes idle.
1-Persistent:
Hence, In the
it reduces the 1-Persistent
chances mode on
of a collision of CSMA that defines
a transmission each
medium.
node, first sense the shared channel and if the channel is idle, it
immediately sends the data. Else it must wait and keep track of
the status of the channel to be idle and broadcast the frame
unconditionally as soon as the channel is idle.
Non-Persistent: It is the access mode of CSMA that defines
before transmitting the data, each node must sense the channel,
and if the channel is inactive, it immediately sends the data.
Otherwise, the station must wait for a random time (not
continuously), and when the channel is found to be idle, it
transmits the frames.
P-Persistent: It is the combination of 1-Persistent and Non-
persistent modes. The P-Persistent mode defines that each node
senses the channel, and if the channel is inactive, it sends a frame
with a P probability. If the data is not transmitted, it waits for a (q

You might also like