CHAPTER -4
DATA COMMUNICATION & DATA LINK
CONTROL
.
Error Detection
Data can be corrupted during transmission. Some applications require that errors
be detected and corrected.
Types of Errors:
Single-Bit Error: single-bit error means that only 1 bit of a given data unit is
changed from 1 to 0 or from 0 to 1
Multiple-Bit Error: A multiple-bit error refers to any situation where more than
one bit is flipped, but the errors don't necessarily have to be consecutive
Burst Error: A burst error, on the other hand, specifically refers to a sequence of
consecutive bits are corrupted
A burst error 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.
Redundancy :
To detect or correct errors, we need to send some extra bits (called redundant
bits ) with our data. These redundant bits are added by the sender and removed
by the receiver. Their presence allows the receiver to detect or correct corrupted
bits.
Detection Versus Correction :
In error detection, we are looking only to see if any error has occurred. The
answer is a simple yes or no. But in error correction, we need to know the exact
number of bits that are corrupted and more importantly, their location in the
message.
Different error detection methods:
Parity check
Checksum
CRC
Parity check
The parity check is done by adding an extra bit, called parity bit, to the data to make the number of
1s either even or odd depending upon the type of parity. The parity check is suitable for single bit
error detection only.
The two types of parity checking are
Even Parity Here the total number of bits in the message is made even.
Odd Parity Here the total number of bits in the message is made odd.
Error Detection by Parity Check
Senders End While creating a frame, the sender counts the number of 1s in it and adds the parity
bit the value of which is determined as follows -
In the case of even parity: If a number of 1s is even, the parity bit value is 0. If a number of 1s
is odd, the parity bit value is 1.
In case of odd parity: If a number of 1s is odd, the parity bit value is 0. If a number of 1s is
even, the parity bit value is 1.
Receivers End On receiving a frame, the receiver counts the number of 1s in it. In case of even
parity check, if the count of 1s is even, the frame is accepted, otherwise, it is rejected. In case of odd
parity check, if the count of 1s is odd, the frame is accepted, otherwise, it is rejected.
Cyclic Redundancy Check (CRC) :
The and most powerful of the redundancy checking is CRC, it is based on
modulo-2 binary division. the figure given below provides an outline of three
basic steps.
First, a string of n 0s is appended to the data unit. The number n is one less than
the number of bits in the predetermined divisor, which is n+1 bits.
Second, the newly elongated data unit is divided by the divisor using a process
called binary division. The remainder resulting from this division is CRC.
Third, the CRC of n bits derived from in step 2 replaces the appended 0s at the
end of the data unit. Note that the CRC may consist of all 0s.
The data units arrives at the receiver data first, followed by CRC. The
receiver treats the whole string as a unit and divides it by the same divisor that
was used to find the CRC remainder. If CRC = zero the accept otherwise reject
CRC generator with example: here data= 100100, divisor = 1101
CRC checker with example: here data= 100100, divisor = 1101
As reminder is 000 so there is no error otherwise the data is erroneous.
Checksum:
The error detection method used by the higher-layer protocols is called checksum.
The sender (or checksum generator) follows these steps:
• The unit is divided into k sections, each of n bits.
• All sections are added using one’s complement to get the sum.
• The sum is complemented and becomes the checksum.
• The checksum is sent with the data.
The receiver (or checksum checker) follows these steps:
• The unit is divided into k sections, each of n bits.
• All sections are added using one’s complement to get the sum.
• The sum is complemented.
• If the result is zero, the data are accepted: otherwise, rejected.
Example
Suppose the following block of 16 bits is to be sent using a checksum of 8
bits. 10101001 00111001
The numbers are added using one’s complement
10101001
00111001
Sum 11100010
Checksum 00011101
The pattern sent is 10101001 00111001 00011101
Example
Now suppose the receiver receives the pattern sent in above Example and there
is no error. 10101001 00111001 00011101
When the receiver adds the three sections, it will get all 1s, which, after
complementing, is all 0s and shows that there is no error.
10101001
00111001
00011101
Sum 11111111
Complement 00000000 means that the pattern is OK
LINE CONFIGURATION
Line configuration refers to the way two or more communication devices
attached to a link. There are two possible line configuration or physical
connection: point-to-point and multipoint connection.
1. Point-to-point connection:
A Point-to-point connection Provides a dedicated link between two devices.
Entire capacity of the link is reserved for those two devices.
Connection between infrared remote control and Television set is an example of
Point-to-point connection.
2. Multipoint connection/ multidrop:
Multipoint connection is More than two specific devices share a single link.
Capacity of channel is shared, either spatially or temporally.
It is also called Multidrop configuration.
If the links are used simultaneously between many devices, then it is spatially
shared line configuration.
If user takes turns while using the link, then it is time shared (temporal) line
configuration
FLOW CONTROL
Flow Control is a mechanism or a set of procedures to tell the sender that how
much data it can transmit before waiting for acknowledgment.
The data link layer is responsible for flow control.
There are 2 methods for controlling the flow of data.
Flow Control
Stop and Wait Sliding Window
Send one frame Send several
frames at a time at a time
Stop and Wait
In Stop and Wait flow control method the sender waits for the acknowledgment
after every frame it sends.
When it receives an acknowledge it transmit the next frame.
If a frame is not received by the receiver, an acknowledgement cannot be given.
So the next cannot be sent.
So the sender uses the timer to send the data.
After a particular time if the sender does not receiver the acknowledgement the
data is again retransmitted.
Advantage
It is simple to implement.
Disadvantage
The disadvantage is inefficiency i.e. it is very slow.
Sliding Window
In sliding window method of flow control the sender can transmit several frames
before getting an acknowledgement.
This is a major advantage over stop and wait concept of flow control.
Here several frames are combined to form a window.
It uses modulo. n formula for numbering a window that means if the size of the
window is n then the frames are numbered from 0 to n-1.
Here the acknowledgement number is the next frame it expects to receive next.
The sliding window of the sender shrinks from the left when frames of data
are sent and expands to right when acknowledgement is received.
Sender Sliding Window
Sender Window
5
rection
Di
This wall moves to This wall moves to right
right when a frame when Ack is
received. is sent.
The sliding window of the receiver shrinks from the left when frames of data are
received. The sliding window of the receiver expands to the right when
acknowledgment are sent.
Receiver Sliding Window
Receiver Window
0 1 2 3 4 5 6 7 0 1 2 3 4
This wall moves to right This wall moves to right
when when a frame is sent. Ack is received.
MULTIPLEXING
Multiplexing is the set of techniques that allows the simultaneous transmission
of multiple signals across a single data link.
It the transmission capacity of a link is greater than the transmission needs of
the devices connected to it, then the excess capacity is wasted. At that case
multiplexing is used.
In a multiplexed system, n no. of devices share the capacity of one link.
The lines on the left direct their transmissions stream to a multiplexer, which
combines them into a single stream.
At the receiving end, that stream is fed into a demultiplexer, which separates the
stream back into its component transmission(one to many) and directs them to
their intended receiving devices.
CATAGORIES OF MULTIPLEXING TECHNIQUES:-
There are three basic multiplexing techniques
1. Frequency-division-multiplexing(FDM)
2. Wave-division-multiplexing(WDM)
3. Time-division-multiplexing
FREQUENCY-DIVISION-MULTIPLEXING(FDM):-
FDM is an analog technique that can be applied when the bandwidth of a link as
greater than the combined bandwidth of the signals to be transmitted.
In this technique the signals generated by each sending device modulate
different carrier frequencies.
These modulated signals are then combined into a single composite single
that can be transmitted by the link.
Carrier frequencies are separated by sufficient bandwidth to accommodate the
modulated signal.
FDM as not only used for analog signals but also for digital signal.But for this
digital signals must be converted to analog signal before multiplexing.
Multiplexing process:-
Each source generate a signal of same frequency range. Inside the mux, these
similar signals modulate different carrier frequencies.
The resulting modulate signals are combined into a single composite signal that
is transmitted over a link which has enough bandwidth to accommodate it.
Demultiplexing process: -
The DEMUX uses a series of filters to decompose the multiplexed signals into its
constituent component signals.
The individual signals are then passed to a demodulator that separates them
from their carrier and passes them to the output lines.
Application of FDM:-
A very common application of FDM is radio broadcasting and also FDM is used for
television broadcasting.
WAVE-DIVISION-MULTIPLEXING(WDM):-
WDM is designed to use the high data rate capability of fibral-optic cable.
The optical fibra data rate is higher than the data rate of metallic transmission
cable. Using fibra optic cable for one single line wastes the available bandwidth.
Multiplexing allows us to combine several lines into one.
Conceptually WDM is same as FDM but the multiplexing and demultiplexing
technique involve optical/light signals transmitted through fibra optic cables.
In WDM technique we want to combine multiple light source into one single light
at the MUX and so the reverse at DEMUX.
The combining and splitting of light sources are handled by prism.
Using WDM technique, a MUX can be made to combine several input beams of
light, each containing a narrow band frequencies into one output beam of wider
band frequencies . A DEMUX can also be made to reverse the process.
TIME DIVISION-MULTIPLEXING:-
Time division multiplexing is a digital process that allows several connections
to share the bandwidth of a link.
In FDM a portion of bandwidth is shared but in TDM time is shared.
Each connection occupies a portion of the time in link.
TDM is a digital multiplexing technique. Digital data from different sources are
combined into one-time shared link.
TDM can be divided into two types:-
1.Synchronous Time-division-
multiplexing 2.Asynchronous Time-
division-multiplexing
SYNCHRONOUS TDM :-
In synchronous TDM the multiplexer allocates exactly the same
slot to each device at all times even if a device has not
anything to transmit.
The time slots are grouped into frames.
It we have n connection the frame is divided into n time slots
and one slot is allocated for each unit, for each input line.
In a system with n input lines, each frame has n slots, with
each slot is allocated to carring data from a specific input line.
ASYNCHRONOUS / STATISTICAL TDM:-
Asynchronous TDM/ Statistical TDM is designed to avoid the waste in
synchronous TDM.
In synchronous TDM there may be a device attached which
may not sending data. So the slot for that device remains
empty., So the maximum utilization of link is not used
efficiently.
In asynchronous TDM, the number of slots in each frame is less than
the number of input lines.
The MUX checks each input line in round robin manner that
means it allocated a slot for an input line if the line has data to
send.
Otherwise, it skips the line and checks for the next lines.