0% found this document useful (0 votes)
0 views

Computer Network Module 2

Data communication involves the exchange of data between devices over networks, utilizing various protocols like Ethernet and Wi-Fi. It encompasses data flow, transmission modes (simplex, half-duplex, full-duplex), and bandwidth concepts, which are essential for efficient information exchange. Multiplexing techniques, such as frequency-division and time-division multiplexing, allow multiple signals to share a single communication channel, enhancing capacity and efficiency.

Uploaded by

LAUGH TOGERTHER
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views

Computer Network Module 2

Data communication involves the exchange of data between devices over networks, utilizing various protocols like Ethernet and Wi-Fi. It encompasses data flow, transmission modes (simplex, half-duplex, full-duplex), and bandwidth concepts, which are essential for efficient information exchange. Multiplexing techniques, such as frequency-division and time-division multiplexing, allow multiple signals to share a single communication channel, enhancing capacity and efficiency.

Uploaded by

LAUGH TOGERTHER
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 56

󾠯

Computer Network: Module 2


Data Communication
Data communication refers to the exchange of data between two or more devices
over a network or other communication channel. It is a fundamental aspect of
modern computing and can be used for a wide variety of purposes, including file
transfer, remote access, telephony, and the Internet.

There are many different types of data communication, including wired and wireless
communication, and various protocols and technologies are used to facilitate the
exchange of data. Some common examples include Ethernet, Wi-Fi, Bluetooth, and
cellular networks.

Data communication is essential for the functioning of many modern systems and
devices, and it plays a critical role in connecting people, businesses, and devices
around the world.

Data Flow
Data flow refers to the movement of data within a system or between different
systems. In a computer system, data flow refers to the movement of data
between different components of the system, such as between the processor and

Computer Network: Module 2 1


the memory, or between the system and external devices such as printers or
storage devices.
In a larger sense, data flow can also refer to the exchange of data between
different systems, such as between two computers over a network or between a
server and a client. Data flow can be one-way, where data is sent from one
system to another, or two-way, where data is exchanged between systems.
Data flow is an important aspect of many modern systems, as it enables the
efficient exchange of information and enables different systems and devices to
work together and communicate with each other.

Data Transmission Mode

The way in which data is transmitted from one device to another device is
known as transmission mode.

The transmission mode is also known as the communication mode.

Each communication channel has a direction associated with it, and


transmission media provide the direction. Therefore, the transmission mode
is also known as a directional mode.

The transmission mode is defined in the physical layer.

Simplex

Computer Network: Module 2 2


In Simplex mode, the communication is unidirectional, i.e., the data flow
in one direction.

A device can only send the data but cannot receive it or it can receive the
data but cannot send the data.

This transmission mode is not very popular as mainly communications


require the two-way exchange of data. The simplex mode is used in the
business field as in sales that do not require any corresponding reply.

The radio station is a simplex channel as it transmits the signal to the


listeners but never allows them to transmit back.

Keyboard and Monitor are the examples of the simplex mode as a


keyboard can only accept the data from the user and monitor can only be
used to display the data on the screen.

The main advantage of the simplex mode is that the full capacity of the
communication channel can be utilized during transmission.

Advantage of Simplex mode:


In simplex mode, the station can utilize the entire bandwidth of the
communication channel, so that more data can be transmitted at a
time.

Disadvantage of Simplex mode:


Communication is unidirectional, so it has no inter-communication
between devices.

Half-Duplex

Computer Network: Module 2 3


In a Half-duplex channel, direction can be reversed, i.e., the station can
transmit and receive the data as well.

Messages flow in both the directions, but not at the same time.

The entire bandwidth of the communication channel is utilized in one


direction at a time.

In half-duplex mode, it is possible to perform the error detection, and if


any error occurs, then the receiver requests the sender to re-transmit the
data.

A Walkie-talkie is an example of the Half-duplex mode. In Walkie-talkie,


one party speaks, and another party listens. After a pause, the other
speaks and first party listens. Speaking simultaneously will create the
distorted sound which cannot be understood.

Advantage of Half-duplex mode:


In half-duplex mode, both the devices can send and receive the data
and also can utilize the entire bandwidth of the communication
channel during the transmission of data.

Disadvantage of Half-Duplex mode:


In half-duplex mode, when one device is sending the data, then
another has to wait, this causes the delay in sending the data at the
right time.

Full-Duplex

Computer Network: Module 2 4


In Full duplex mode, the communication is bi-directional, i.e., the data
flow in both the directions.

Both the stations can send and receive the message simultaneously.

Full-duplex mode has two simplex channels. One channel has traffic
moving in one direction, and another channel has traffic flowing in the
opposite direction.

The Full-duplex mode is the fastest mode of communication between


devices.

The most common example of the full-duplex mode is a telephone


network. When two people are communicating with each other by a
telephone line, both can talk and listen at the same time.

Advantage of Full-duplex mode:


Both the stations can send and receive the data at the same time.

Disadvantage of Full-duplex mode:


If there is no dedicated path exists between the devices, then the
capacity of the communication channel is divided into two parts.

Basis for
Simplex mode Half-duplex mode Full-duplex mode
comparison
In half-duplex mode,
In simplex mode, In full-duplex mode,
Direction of the communication
the communication the communication
communication is bidirectional, but
is unidirectional. is bidirectional.
one at a time.

Computer Network: Module 2 5


Basis for
Simplex mode Half-duplex mode Full-duplex mode
comparison

A device can only


send the data but Both the devices Both the devices
cannot receive it or can send and can send and
Send/Receive
it can only receive receive the data, but receive the data
the data but cannot one at a time. simultaneously.
send it.

The Full-duplex
mode has better
performance among
The performance of The performance of simplex and half-
half-duplex mode is full-duplex mode is duplex mode as it
Performance
better than the better than the half- doubles the
simplex mode. duplex mode. utilization of the
capacity of the
communication
channel.
Examples of
Example of half- Example of the Full-
Simplex mode are
Example duplex is Walkie- duplex mode is a
radio, keyboard, and
Talkies. telephone network
monitor.

Bandwidth

Computer Network: Module 2 6


Bandwidth refers to the amount of data that can be transmitted over a
communication channel in a given amount of time. It is typically measured in bits per
second (bps) or megabits per second (Mbps).

The bandwidth of a communication channel determines how much data can be


transmitted over the channel at any given time. A channel with a high bandwidth can
transmit more data than a channel with a low bandwidth.

Bit rate
The bit rate is the number of bits that are transmitted over the network in a given
amount of time. It is typically measured in bits per second (bps) and is often used
to describe the capacity or speed of a communication channel or network.
The bit rate of a communication channel determines how much data can be
transmitted over the channel in a given amount of time. A higher bit rate allows
for faster data transmission and can support more data-intensive applications,
such as video streaming or online gaming.

Baud rate
The baud rate, also known as the symbol rate, is a measure of the speed of data
transmission in a communication system. It is typically measured in baud
(symbols per second) and is used to describe the number of distinct symbol
changes that occur in a communication channel per second.

Baud rate is the rate at which the number of signal elements or changes to the
signal occurs per second when it passes through a transmission medium. The

Computer Network: Module 2 7


higher a baud rate is the faster the data is sent/received.
Baud rate = number of signal elements/total time (in seconds)

Eg:

• In the above figure, Number of signal elements (marked in red color) = 3,


Number of bits transmitted (1, 0, 1) = 3. So, Here Bit rate = 3/1 = 3 bits per
second. And, Baud rate = 3/1 = 3 baud per second.

Computer Network: Module 2 8


But here in the above image,Number of signal elements (marked in red color) =
6, Number of bits transmitted (1, 1, 0) = 3. So, Here Bit rate = 3/1 = 3 bits per
second. and, Baud rate = 6/1 = 6 baud per second.

Digital Modulation and Multiplexing


Digital modulation is the process of converting a digital bit stream into an analog
carrier wave for transmission via a communication channel.

Digital modulation is broadly divided into two categories −

Bandpass Modulation as in baseband transmission:


Here, the bits are converted directly into signals.

Passband Modulation as in passband transmission:


Here, the amplitude, phase or frequency of the carrier signal is regulated to
transmit the bits.

Computer Network: Module 2 9


Multiplexing
Multiplexing is a technique used to transmit multiple signals over a single
communication channel. It allows multiple signals to be combined and
transmitted at the same time, using techniques such as frequency division
multiplexing (FDM) or time division multiplexing (TDM) or wavelength division
Multiplexing.
Multiplexing can be used to increase the capacity of a communication system by
allowing multiple signals to share the same channel. It is commonly used in
telecommunication systems and networks to transmit multiple voice or data
signals over a single physical link.
Why Multiplexing?

The transmission medium is used to send the signal from sender to receiver.
The medium can only have one signal at a time.

If there are multiple signals to share one medium, then the medium must be
divided in such a way that each signal is given some portion of the available
bandwidth. For example: If there are 10 signals and bandwidth of medium
is100 units, then the 10 unit is shared by each signal.

Computer Network: Module 2 10


When multiple signals share the common medium, there is a possibility
of collision. Multiplexing concept is used to avoid such collision.

Transmission services are very expensive.

working concept

The 'n' input lines are transmitted through a multiplexer and multiplexer
combines the signals to form a composite signal.

The composite signal is passed through a De-multiplexer and de-multiplexer


separates a signal to component signals and transfers them to their
respective destinations.

Advantages of Multiplexing:

More than one signal can be sent over a single medium.

The bandwidth of a medium can be utilized effectively.

Multiplexing Techniques

Computer Network: Module 2 11


Frequency-division Multiplexing (FDM)
It is an analog technique.

Frequency Division Multiplexing is a technique in which the available


bandwidth of a single transmission medium is subdivided into several
channels.

in this figure, a single transmission


medium is subdivided into several
frequency channels, and each frequency
channel is given to different devices.
Device 1 has a frequency channel of
range from 1 to 5.

The input signals are translated into frequency bands by using modulation
techniques, and they are combined by a multiplexer to form a composite
signal.

The main aim of the FDM is to subdivide the available bandwidth into
different frequency channels and allocate them to different devices.

Computer Network: Module 2 12


Using the modulation technique, the input signals are transmitted into
frequency bands and then combined to form a composite signal.

The carriers which are used for modulating the signals are known as sub-
carriers. They are represented as f1,f2..fn.

FDM is mainly used in radio broadcasts and TV networks.

Advantages Of FDM:

FDM is used for analog signals.

FDM process is very simple and easy modulation.

A Large number of signals can be sent through an FDM simultaneously.

It does not require any synchronization between sender and receiver.

Disadvantages Of FDM:

FDM technique is used only when low-speed channels are required.

It suffers the problem of crosstalk.

A Large number of modulators are required.

It requires a high bandwidth channel.

Applications Of FDM:

FDM is commonly used in TV networks.

Computer Network: Module 2 13


It is used in FM and AM broadcasting. Each FM radio station has different
frequencies, and they are multiplexed to form a composite signal. The
multiplexed signal is transmitted in the air.

Wavelength-division Multiplexing (WDM)

Wavelength Division Multiplexing is same as FDM except that the optical


signals are transmitted through the fibre optic cable.

WDM is used on fibre optics to increase the capacity of a single fibre.

It is used to utilize the high data rate capability of fibre optic cable.

It is an analog multiplexing technique.

Optical signals from different source are combined to form a wider band
of light with the help of multiplexer.

At the receiving end, de-multiplexer separates the signals to transmit


them to their respective destinations.

Multiplexing and De-multiplexing can be achieved by using a prism.

Prism can perform a role of multiplexer by combining the various optical


signals to form a composite signal, and the composite signal is
transmitted through a fibre optical cable.

Prism also performs a reverse operation, i.e., de-multiplexing the signal.

Computer Network: Module 2 14


Time-division Multiplexing (TDM)
It is a digital technique.

In Frequency Division Multiplexing Technique, all signals operate at the


same time with different frequency, but in case of Time Division
Multiplexing technique, all signals operate at the same frequency with
different time.

In Time Division Multiplexing technique, the total time available in the


channel is distributed among different users. Therefore, each user is
allocated with different time interval known as a Time slot at which data is
to be transmitted by the sender.

A user takes control of the channel for a fixed amount of time.

In Time Division Multiplexing technique, data is not transmitted


simultaneously rather the data is transmitted one-by-one.

In TDM, the signal is transmitted in the form of frames. Frames contain a


cycle of time slots in which each frame contains one or more slots
dedicated to each user.

It can be used to multiplex both digital and analog signals but mainly used
to multiplex digital signals.

TDM is commonly used in telecommunications networks to increase the


capacity of the channel and to allow multiple devices to share the same
link. It is also used in other types of networks, such as local area
networks (LANs) and storage area networks (SANs).

TDM has several advantages, including high efficiency, low cost, and the
ability to support a variety of data rates. However, it also has some

Computer Network: Module 2 15


limitations, such as the need for precise synchronization of the time slots
and the inability to handle bursty traffic.

The types of TDM includes:

Synchronous TDM

A Synchronous TDM is a technique in which time slot is preassigned


to every device.

In Synchronous TDM, each device is given some time slot


irrespective of the fact that the device contains the data or not.

If the device does not have any data, then the slot will remain empty.

In Synchronous TDM, signals are sent in the form of frames. Time


slots are organized in the form of frames. If a device does not have
data for a particular time slot, then the empty slot will be transmitted.

The most popular Synchronous TDM are T-1 multiplexing, ISDN


multiplexing, and SONET multiplexing.

If there are n devices, then there are n slots.

Computer Network: Module 2 16


Disadvantages Of Synchronous TDM:

The capacity of the channel is not fully utilized as the empty slots
are also transmitted which is having no data. In the above figure,
the first frame is completely filled, but in the last two frames,
some slots are empty. Therefore, we can say that the capacity of
the channel is not utilized efficiently.

The speed of the transmission medium should be greater than


the total speed of the input lines. An alternative approach to the
Synchronous TDM is Asynchronous Time Division Multiplexing.

Asynchronous TDM

An asynchronous TDM is also known as Statistical TDM.

An asynchronous TDM is a technique in which time slots are not fixed


as in the case of Synchronous TDM. Time slots are allocated to only
those devices which have the data to send. Therefore, we can say
that Asynchronous Time Division multiplexor transmits only the data
from active workstations.

An asynchronous TDM technique dynamically allocates the time slots


to the devices.

In Asynchronous TDM, total speed of the input lines can be greater


than the capacity of the channel.

Asynchronous Time Division multiplexor accepts the incoming data


streams and creates a frame that contains only data with no empty
slots.

In Asynchronous TDM, each slot contains an address part that


identifies the source of the data.

The difference between Asynchronous TDM and Synchronous


TDM is that many slots in Synchronous TDM are unutilized, but in
Asynchronous TDM, slots are fully utilized. This leads to the

Computer Network: Module 2 17


smaller transmission time and efficient utilization of the capacity
of the channel.

In Synchronous TDM, if there are n sending devices, then there


are n time slots. In Asynchronous TDM, if there are n sending
devices, then there are m time slots where m is less than n
(m<n).

The number of slots in a frame depends on the statistical analysis


of the number of input lines.

In the above diagram, there are 4 devices, but only two devices
are sending the data, i.e., A and C. Therefore, the data of A and
C are only transmitted through the transmission line.

Frame of above diagram can be represented as:

Computer Network: Module 2 18


Switching Technique

In large networks, there can be multiple paths from sender to receiver. The switching
technique will decide the best route for data transmission.(One to One connection)

Circuit Switching
When two nodes communicate with each other over a dedicated communication
path, it is called circuit switching. There is a need of pre-specified route from
which data travels and no other data is permitted. In circuit switching to transfer
the data, circuit
must be established so that the data transfer can take place.
Circuits can be permanent or temporary. Applications which use circuit switching
may
have to go through three phases:

1. Establish a circuit

2. Transfer the data

3. Disconnect the circuit

Computer Network: Module 2 19


Circuit switching was designed for voice applications. Telephone is the best
suitable example of circuit switching. Before a user can make a call, a virtual path
between caller and called is established over the network.
Disadvantages Of Circuit Switching:

Once the dedicated path is established, the only delay occurs is in the speed
of data transmission.

It takes a long time to establish a connection approx 10 seconds during


which no data can be transmitted.

It is more expensive than other switching techniques as a dedicated path is


required for each connection.

It is inefficient to use because once the path is established and no data is


transferred, then the capacity of the path is wasted.

In this case, the connection is dedicated therefore no other data can be


transferred even if the channel is free.

Computer Network: Module 2 20


Message Switching
This technique was somewhere in middle of circuit switching and packet
switching.
In message switching, the whole message is treated as a data unit and is
switching/ transferred in its entirety.
A switch working on message switching, first receives the whole message and
buffers it until there are resources available to transfer it to the next hop. If the
next hop is not having enough resource to accommodate large size message,
the message is stored and switch waits.

This technique was considered substitute to circuit switching. As in circuit


switching the whole path is blocked for two entities only. Message switching is
replaced by packet switching. Message switching has the following drawbacks:

Every switch in transit path needs enough storage to accommodate entire


message.

Because of store-and-forward technique and waits included until resources


are available, message switching is very slow.

Message switching was not a solution for streaming media and real-time
applications.

Packet Switching

Computer Network: Module 2 21


Packet switching is a technique in which the entire message is broken down into
smaller chunks called packets. The switching information is added in the header
of each packet and transmitted independently. Packet switching enhances line
efficiency as packets from multiple applications can be multiplexed over the
carrier. The internet uses packet switching technique. Packet switching enables
the user to differentiate data streams based on priorities. Packets are stored and
forwarded according to their priority to provide quality of service.

When compared to message switching, packets are smaller in size and thus
easier for intermediate networking devices to store. Furthermore, they do not
take much resources either on carrier path or in the internal memory of switches.

The main disadvantage of packet switching is that packets may arrive out of
order, due to different routes taken by each packet. To enable the receiver to
understand the message, the packets are rearranged in the right order and
transmitted.

Mobile System
1G

Computer Network: Module 2 22


The previous wireless communication technologies were push-to-talk systems
and sparsely used wireless phones in military and maritime applications. The
main difference between the existing wireless communication systems and 1G
was the introduction of cellular technology. Here, land area was divided into small
sectors known as cells. Each cell had a base station, which used radio signals
and a transceiver for communicating with mobile devices. Base stations were
connected to telephone networks. Frequency modulation techniques were used
for voice calls by base stations.
The main features of 1G Analog Phones are listed below:

1. Analog Technology: 1G systems are purely Analog Systems

2. FDM Access Technique : All 1G systems are FDM based system

3. Modulation Scheme : All 1G systems are based on FM modulation scheme

4. Year of Introduction : 1980s to end of 80s

5. Services offered: Voice only.

6. Bad Utilization of Spectrum: Capacity of 1G is low because of FDMA


access technique

Drawbacks of 1G mobile communications


Analog signals were prone to interference, so the communication was noisy.
Additionally, analog systems did not support adequate encryption systems,
making security a vital issue and making tapping difficult to control.

2G
Advantages of 2G over 1G
It allows voice signals to be digitized and compressed. So, they are more
efficient on frequency spectrum than 1G.

They introduced data services for mobile in form of SMS text messaging.

Data and voice signals are digitally encrypted. So, security against
eavesdropping and fraud increased manifold.

Computer Network: Module 2 23


Digital signals consume less battery power. And so mobile sets are much
more energy efficient than their 1G counterparts.

Popular 2G Systems
Several 2G systems were developed, the notable among which are as follows −

D – AMPS (Digital Advanced Mobile Phone Systems) : D-AMPS was a


digital version of advanced mobile phone systems (AMPS) that coexisted
with AMPS. It used time division multiplexing (TDM) for multiple calls.

GSM (Global System for Mobile Communications) : 2G was launched


through GSM. It is the most widely globally used technology. It uses
frequency division multiplexing (FDM) and time division multiplexing (TDM)
for handling multiple calls simultaneously.

CDMA (Code Division Multiple Access) : It uses a different technology


from the above and was standardized by International Standards IS-95.

3G
Third generation mobile phones, or “3G Internet” mobile phones, is a set of
standards for wireless mobile communication systems, that promises to deliver
quality multimedia services along with high quality voice transmission.

Features
3G systems comply with the International Mobile Telecommunications-2000
(IMT-2000)

specifications by the International Telecommunication Union (ITU).

The first 3G services were available in 1998.

It provides high speed transmission having data transfer rate more than
0.2Mbps.

Global roaming services are available for both voice and data.

It offers advanced multimedia access like playing music, viewing videos,


television services etc.

Computer Network: Module 2 24


It provides access to all advanced Internet services, for example surfing
webpages with audio and video.

It paved the way for the increased usage of smartphones with wide screens
as they provided better viewing of mobile webpages, videos and mobile
televisions.

Specifications for 3G
3G specifications are laid down by two groups, 3GPP and 3GPP2.

3GPP (Third Generation Partnership Project) − These specifications are


based upon Global System for Mobile (GSM) communications, and are
known as Universal Mobile Telecommunications Systems (UMTS). The
technologies includes in it are −

Universal Terrestrial Radio Access (UTRA)

General Packet Radio Service (GPRS)

Enhanced Data rates for GSM Evolution (EDGE)

3GPP2 − These specifications are based upon Code Division Multiple


Access (CDMA). Two main specifications under this are −

Wideband CDMA (WCDMA)

CDMA2000

Areas of Application
Wireless voice telephony

Fixed wireless Internet access

Mobile Internet access

Video calls

Mobile TV technologies

Video-on-demand

Video conferencing

Tele-medicine

Computer Network: Module 2 25


Global Positioning System (GPS)

Location-based services

GSM
GSM stands for Global System for Mobile communication. It is a standard
developed by European Telecommunication Standards Institute (ETSI)
to describe protocols for second generation (2G) digital cellular networks
. It was a replacement for the first generation (1G) cellular networks. The idea of
developing GSM originated from a cell-based mobile radio system at the Bell
Laboratories in the early 1970s.

Data Application Supported By GSM


GSM provides following functionalities when you connect your GSM phone with a
computer system.
Internet: GSM provides the most ubiquitous and robust wireless data connectivity
to access the internet.
Mobile Fax: With GSM, you can send and receive faxes to any place where GSM
service is available.
Secured LAN access: GSM provides secured access for corporate LAN. It
encrypts the air links and provides additional security for confidential e-mails and
faxes.

Advantages of GSM
Since GSM service is obtained over 200 countries, so it provides worldwide
roaming for its clients to roam throughout the world.

Computer Network: Module 2 26


GSM is extremely secured because its devices and facilities cannot be easily
duplicated.

It has an extensive coverage in all over the world.

Clear voice calls and efficient use of spectrum.

Compatible with wide range of handsets and accessories.

Advanced features such as short messages, caller ID, Call hold, Call
forwarding etc.

Compatible with Integrated Services Digital Network (ISDN) and other


telephone company services.

Disadvantages of GSM
The biggest disadvantage of GSM is that multiple users share the same
bandwidth. This may cause interference and due to interference bandwidth
limitation occurs.

The other disadvantage of GSM is that it may cause electronic interference.


That is why sensitive locations, such as hospitals and airplanes, require cell
phones to be turned off, as it can interfere with the equipment in these
places.

Data Link Control(DLC.)


Data Link Control is a set of protocols used by the Data Link Layer to ensure reliable
data transfer over a physical medium, such as preventing collisions between devices
transmitting data simultaneously.

The Data link layer provides three functions:

Computer Network: Module 2 27


Line Discipline
Line discipline in Data link Control refers to the rules of the Data link layer that
provides the coordination among the link systems. It determines which device
can send, and when it can send the data.

Line Discipline can be achieved in two ways:

ENQ/ACK
END/ACK stands for Enquiry/Acknowledgement.

Under the ENQ/ACK method, the device that wants to send the data sends
an ENQ (enquire) frame to the other device and waits for an ACK
(acknowledge) frame from the receiver. Once the ACK is received, the sender
can send the data frame. When the receiver receives the data frame, it sends
an acknowledgement frame to the sender. This method is used to prevent
collisions between two devices that are sending data at the same time.

Computer Network: Module 2 28


Poll/select
The Poll/Select method in line discipline basically works with some topologies
where one of devices is considered as primary station and other devices are
considered as secondary stations. Multipoint connections can be seen rather
than two i.e., multipoint systems must coordinate several nodes.

Working of Poll/Select

The primary device has control over the communication line. All
exchanges go through the primary device, even if the destination is a
secondary device. The primary device decides which device can use the
communication channel so it is the one who starts the session. If the
primary device wants to get data from the secondary device, it will ask the
secondary if it has anything to send, which is called polling. If the primary
wants to send data to the secondary, it will tell the secondary to get ready
for the data, which is called selecting.

Computer Network: Module 2 29


Flow Control
It is a set of procedures that tells the sender how much data it can transmit
before the data overwhelms the receiver.

The receiving device has limited speed and limited memory to store the data.
Therefore, the receiving device must be able to inform the sending device to
stop the transmission temporarily before the limits are reached.

It requires a buffer, a block of memory for storing the information until they
are processed.

Approaches to Flow Control


Flow Control is classified into two categories:

Computer Network: Module 2 30


Feedback – based Flow Control :The sender sends data,
information, or frames to the receiver. The receiver then sends the
data back to the sender and lets them know how it is being
processed. This means that the sender only sends data or frames
when they get an acknowledgement from the receiver.

Rate – based Flow Control : When data is sent from a sender to a


receiver at a faster speed than the receiver can handle, a protocol will
automatically limit the rate at which the data is sent without any
feedback from the receiver.

Techniques of Flow Control in Data Link Layer


There are basically two types of techniques being developed to control
the flow of data

1. Stop-and-Wait Flow Control : This method is the easiest and


simplest way to control the flow of data. It works by breaking down a

Computer Network: Module 2 31


message or data into multiple frames, then the receiver signals that it
is ready to receive the frame of data. When the receiver
acknowledges, the sender will then send the next frame. This process
is repeated until the sender sends the EOT (End of Transmission)
frame. With this method, only one frame can be sent at a time,
leading to less productivity if the propagation delay is longer than the
transmission delay. In this method, the sender sends one frame, and
the receiver takes one frame at a time and sends an
acknowledgement (which is just the next frame number) for the new
frame.

Advantages –

This method is very easiest and simple and each of the frames is
checked and acknowledged well.

This method is also very accurate.

Disadvantages –

This method is fairly slow.

In this, only one packet or frame can be sent at a time.

Computer Network: Module 2 32


It is very inefficient and makes the transmission process very slow.

2. Sliding Window Flow Control :This method is required where


reliable in-order delivery of packets or frames is very much
needed like in data link layer. It is point to point protocol that
assumes that none of the other entity tries to communicate until
current data or frame transfer gets completed. In this method,
sender transmits or sends various frames or packets before
receiving any acknowledgement. In this method, both the sender
and receiver agree upon total number of data frames after which
acknowledgement is needed to be transmitted. Data Link Layer
requires and uses this method that simply allows sender to have
more than one unacknowledged packet “in-flight” at a time. This
increases and improves network throughput. and Ultimately In this
method sender sent multiple frame but receiver take one by one
and after completing one frame acknowledge(which is next frame
number only) for new frame.

Computer Network: Module 2 33


https://youtu.be/LnbvhoxHn8M

Advantages –

It performs much better than stop-and-wait flow control.

This method increases efficiency.

Multiples frames can be sent one after another.

Disadvantages –

The main issue is complexity at the sender and receiver due


to the transferring of multiple frames.

The receiver might receive data frames or packets out the


sequence.

Error Control
Error control in data link layer is the process of detecting and correcting data
frames that have been corrupted or lost during transmission.

In case of lost or corrupted frames, the receiver does not receive the correct
data-frame and sender is ignorant about the loss. Data link layer follows a
technique to detect transit errors and take necessary actions, which is re-
transmission of frames whenever error is detected or frame is lost. The process
is called Automatic Repeat Request (ARQ).

Phases in Error Control


Error control is a combination of both error detection and error correction. It
ensures that the data received at the receiver end is the same as the one
sent by the sender.

Error detection is the process by which the receiver informs the sender about
any erroneous frame (damaged or lost) sent during transmission.

Computer Network: Module 2 34


Error correction refers to the re-transmission of those frames by the sender.

The error control mechanism in data link layer involves the following phases −

Detection of Error − Transmission error, if any, is detected by either the


sender or the receiver.

Acknowledgment − acknowledgment may be positive or negative.

Positive ACK − On receiving a correct frame, the receiver sends a


positive acknowledge.

Negative ACK − On receiving a damaged frame or a duplicate frame,


the receiver sends a negative acknowledgment back to the sender.

Re-transmission − The sender maintains a clock and sets a timeout


period. If an acknowledgment of a data-frame previously transmitted does
not arrive before the timeout, or a negative acknowledgment is received,
the sender retransmits the frame.

Categories in Error Control


ARQ ⇒ (Automatic Repeat reQuest)
Stop-and-wait ARQ

Computer Network: Module 2 35


In the case of stop-and-wait ARQ after the frame is sent, the sender
maintains a timeout counter.

If acknowledgment of the frame comes in time, the sender transmits


the next frame in the queue.

Else, the sender re-transmits the frame and starts the timeout counter.

In case the receiver receives a negative acknowledgment, the sender


re-transmits the frame.

Sliding Window ARQ


To deal with the re-transmission of lost or damaged frames, a few changes
are made to the sliding window mechanism used in flow control.

Computer Network: Module 2 36


The Two types of Sliding window ARQ are:

1. Go-Back-N ARQ
The sender has buffers called sending window.

The sender sends multiple frames based upon the sending-window


size, without receiving the acknowledgment of the previous
ones(Pipe Lining)

The receiver receives frames one by one. It keeps track of


incoming frame’s sequence number and sends the corresponding
acknowledgment frames.

After the sender has sent all the frames in window, it checks up to
what sequence number it has received positive acknowledgment.

If the sender has received positive acknowledgment for all the


frames, it sends next set of frames.

If sender receives NACK or has not receive any ACK for a


particular frame, it retransmits all the frames after which it does not
receive any positive ACK.

Computer Network: Module 2 37


2. Selective Repeat ARQ
Both the sender and the receiver have buffers called sending
window and receiving window respectively.

The sender sends multiple frames based upon the sending-window


size, without receiving the acknowledgment of the previous ones.

The receiver also receives multiple frames within the receiving


window size.

The receiver keeps track of incoming frame’s sequence numbers,


buffers the frames in memory.

Computer Network: Module 2 38


It sends ACK for all successfully received frames and sends NACK
for only frames which are missing or damaged.

The sender in this case, sends only packet for which NACK is
received.

Pipe Lining
Pipelining is a process of sending multiple data packets serially
without waiting for the previous acknowledgement. This technique
is beneficial when the amount of data to be transferred is very large,
and we send the data by dividing them into various parts. These data
parts can be pipelined and sent to the receiver over the channel. In
pipelining, we do not wait for the acknowledgement of sent data
packets. We keep on sending the data packets continuously without
bothering about the acknowledgements.

Computer Network: Module 2 39


The Data-Link protocols that use pipelining are as follows:

1. Go-Back-N: Go-Back-N(GBN) is a ‘Sliding Window Protocol’ that


ensures pipelining. It first checks the window size of the sender
and receiver, and then it sends multiple data frames at the same
time. It will retransmit all the frames starting from that failed data
frame.

2. Selective Repeat: Selective Repeat is also a sliding window


protocol implementing pipelining. It makes use of a buffer at the
receiver’s side for its implementation. It is the same as GBN,
except that it retransmits only the failed data frame selectively.

Piggybacking
Piggybacking is a method of attaching acknowledgment to the
outgoing data packet . The concept of piggybacking is explained as
follows:

Consider a two-way transmission between host A and host B . When


host A sends a data frame to B, then B does not send the
acknowledgment of the frame sent immediately. The acknowledgment

Computer Network: Module 2 40


is delayed until the next data frame of host B is available for
transmission. The delayed acknowledgment is then attached to the
outgoing data frame of B. This process of delaying acknowledgment so
that it can be attached to the outgoing frame is called piggybacking .

Now, as we are communicating between the host A and host B, three


conditions can arise:

1. When the host has both data and the acknowledgment to send,
then it will attach the data along with the acknowledgment. In the
above diagram, the host B will attach the data frame along with the
acknowledgment of the last frame received from host A.

2. When the host does not have any data to send then it will send
only the acknowledgment. In the above diagram, when host A
does not have any data frame to send. So, it will only send the
acknowledgment of the last frame received.

3. When the host has only data to send then it will send the data
along with the acknowledgment of the last frame received. The
duplicate acknowledgment will be discarded by the receiver and
the data would be accepted.

Advantages of Piggybacking

Computer Network: Module 2 41


1. The available channel bandwidth is used efficiently.

Disadvantages of Piggybacking
1. As there is delayed transmission of acknowledgment so if the
acknowledgment is not received within the fixed time then the
sender has to re-transmit the data.

2. There is additional complexity for implementing this method.

Flow Control vs Error Control

Flow control Error control

Error control refers to the transmission


Flow control refers to the transmission
of error-free and reliable data frames
of data frames from sender to receiver.
from sender to receiver.
Approaches for error detection are
Checksum, Cyclic Redundancy Check,
Approaches for Flow Control : and Parity Checking. Approaches for
Feedback-based Flow Control and error correction are Hamming code,
Rate-based Flow Control. Binary Convolution codes, Reed-
Solomon code, and Low-Density Parity-
Check codes.
Flow control focuses on the proper flow Error control focuses on the detection
of data and data loss prevention. and correction of errors.

Examples of Flow Control Examples of Error Control


techniques are :1. Stop and Wait for techniques are :1. Stop and Wait for
Protocol,2. Sliding Window Protocol. ARQ,2. Sliding Window ARQ.

Error Detection

Computer Network: Module 2 42


When data is transmitted from one device to another device, the system does
not guarantee whether the data received by the device is identical to the data
transmitted by another device. An Error is a situation when the message
received at the receiver end is not identical to the message transmitted.

Types of Errors

Single Bit Error

In the received frame, only one bit has been corrupted, i.e. either
changed from 0 to 1 or from 1 to 0.

Multiple Bit Error


In the received frame, more than one bits are corrupted.

Computer Network: Module 2 43


Burst Error
In the received frame, more than one consecutive bits are corrupted.

Error Detecting Methods


VRC(parity check)
Vertical Redundancy Check

Blocks of data from the source are subjected to a check bit or parity bit
generator form, where a parity of:

0 is added if it contains an even number of 1's.


This scheme makes the total number of 1's even, which is why it
is called even parity checking.

1 is added to the block if it contains an odd number of 1's, and

Computer Network: Module 2 44


Advantages :

VRC can detect all single bit error.

It can also detect burst errors but only in those cases where
number of bits changed is odd, i.e. 1, 3, 5, 7, …….etc.

Disadvantages :The major disadvantage of using this method for


error detection is that it is not able to detect burst error if the number
of bits changed is even, i.e. 2, 4, 6, 8, …….etc.

LRC(2D parity check)


Longitudinal Redundancy Check
Longitudinal Redundancy Check (LRC) is also known as 2-D parity
check. In this method, data which the user want to send is organised into
tables of rows and columns. A block of bit is divided into table or matrix of
rows and columns. In order to detect an error, a redundant bit is added to
the whole block and this block is transmitted to receiver. The receiver uses
this redundant row to detect error. After checking the data for errors,
receiver accepts the data and discards the redundant row of bits.

Example :If a block of 32 bits is to be transmitted, it is divided into matrix


of four rows and eight columns which as shown in the following figure :

Computer Network: Module 2 45


In this matrix of bits, a parity bit (odd or even) is calculated for each
column. It means 32 bits data plus 8 redundant bits are transmitted to
receiver. Whenever data reaches at the destination, receiver uses LRC to
detect error in data and determine weather to accept or reject the data.
Advantage :

LRC is used to detect burst errors.


Disadvantage :The main problem with LRC is that, it is not able to detect
error if two bits in a data unit are damaged and two bits in exactly the
same position in other data unit are also damaged.
Example : If data 110011 010101 is changed to 010010110100.

Figure : Two bits at same bit position damaged in 2 data units

In this example 1st and 6th bit in one data unit is changed . Also the 1st
and 6th bit in second unit is changed.

Computer Network: Module 2 46


Checksum
Checksum is a error detection which detects the error by dividing the data
into the segments of equal size and then use 1's complement to find the
sum of the segments and then sum is transmitted with the data to the
receiver and same process is done by the receiver and at the receiver
side, all zeros in the sum indicates the correctness of the data.

1. First of all data is divided into k segments in a checksum error


detection scheme and each segment has m bits.

2. For finding out the sum at the sender’s side, all segments are added
through 1's complement arithmetic. And for determining the
checksum we complement the sum.

3. Along with data segments, the checksum segments are also


transferred.

4. All the segments that are received on the receiver's side are added
through 1S complement arithmetic to determine the sum. Then
complement the sum also.

5. The received data is accepted only on the condition that the result is
found to be 0. And if the result is not 0 then it will be discarded.

Computer Network: Module 2 47


Advantage : The checksum detects all the errors involving an odd
number of bits as well as the error involving an even number of bits.
Disadvantage : The main problem is that the error goes undetected if one
or more bits of a subunit is damaged and the corresponding bit or bits of a
subunit are damaged and the corresponding bit or bits of opposite value in
second subunit are also damaged. This is because the sum of those
columns remains unchanged.

CRC

Computer Network: Module 2 48


Cyclic Redundancy Check (CRC) An error detection mechanism in
which a special number is appended to a block of data in order to detect
any changes introduced during storage (or transmission). The CRe is
recalculated on retrieval (or reception) and compared to the value
originally transmitted, which can reveal certain types of error. For example,
a single corrupted bit in the data results in a one-bit change in the
calculated CRC, but multiple corrupt bits may cancel each other out.
CRC is more powerful than VRC and LRC in detecting errors.

It is not based on binary addition like VRC and LRC. Rather it is based
on binary division.

At the sender side, the data unit to be transmitted IS divided by a


predetermined divisor (binary number) in order to obtain the
remainder. This remainder is called CRC.

The CRC has one bit less than the divisor. It means that if CRC is of n
bits, divisor is of n+ 1 bit.

The sender appends this CRC to the end of data unit such that the
resulting data unit becomes exactly divisible by predetermined
divisor i.e. remainder becomes zero.

At the destination, the incoming data unit i.e. data + CRC is divided by
the same number (predetermined binary divisor).

If the remainder after division is zero then there is no error in the data
unit & receiver accepts it.

If remainder after division is not zero, it indicates that the data unit has
been damaged in transit and therefore it is rejected.

This technique is more powerful than the parity check and checksum
error detection.

CRC is based on binary division. A sequence of redundant bits called


CRC or CRC remainder is appended at the end of a data unit such as
byte.

The various steps followed in the CRC method are

Computer Network: Module 2 49


1. A string of n as is appended to the data unit. The length of
predetermined divisor is n+ 1

2. The newly formed data unit i.e. original data + string of n as are
divided by the divisor using binary division and remainder is obtained.
This remainder is called CRC.

3. Now, string of n Os appended to data unit is replaced by the CRC


remainder (which is also of n bit).

4. The data unit + CRC is then transmitted to receiver.

5. The receiver on receiving it divides data unit + CRC by the same


divisor & checks the remainder.

6. If the remainder of division is zero, receiver assumes that there is no


error in data and it accepts it.

7. If remainder is non-zero then there is an error in data and receiver


rejects it.

For example, if data to be transmitted is 1001 and predetermined


divisor is 1011. The procedure given below is used:

Computer Network: Module 2 50


1. String of 3 zeroes is appended to 1011 as divisor is of 4 bits. Now newly
formed data is 1011000.

Error Correcting Codes


When bits are transmitted over the computer network, they are subject to get
corrupted due to interference and network problems. The corrupted bits leads
to spurious data being received by the receiver and are called errors.

Computer Network: Module 2 51


Error-correcting codes (ECC) are a sequence of numbers generated by
specific algorithms for detecting and removing errors in data that has been
transmitted over noisy channels. Error correcting codes ascertain the exact
number of bits that has been corrupted and the location of the corrupted bits,
within the limitations in algorithm.
ECCs can be broadly categorized into two types −

Block codes − The message is divided into fixed-sized blocks of bits, to


which redundant bits are added for error detection or correction.

Convolutional codes − The message comprises of data streams of


arbitrary length and parity symbols are generated by the sliding
application of a Boolean function to the data stream.

Hamming codes
Hamming code is a block code that is capable of detecting up to two
simultaneous bit errors and correcting single-bit errors. It was developed
by R.W. Hamming for error correction.

In this coding method, the source encodes the message by inserting


redundant bits within the message. These redundant bits are extra bits
that are generated and inserted at specific positions in the message itself
to enable error detection and correction. When the destination receives
this message, it performs recalculations to detect errors and find the bit
position that has error.

Redundant bits –Redundant bits are extra binary bits that are generated
and added to the information-carrying bits of data transfer to ensure that
no bits were lost during the data transfer. The number of redundant bits
can be calculated using the following formula:

2^r ≥ m + r + 1
where, r = redundant bit, m = data bit

Eg: if the data size is 4 , How many parity bits are needed?
Ans:

Computer Network: Module 2 52


m= 4(given)

r 2^r ≥ m + r + 1 True or False

r =0 2^0 ≥ 4+0+1 F

r=1 2^1 ≥ 4+1+1 F

r=2 2^2 ≥ 4+2+1 F

r=3 2^3 ≥ 4+3+1 T

ie. , We need 3 redundant or parity bits to handle 4 bits of data.


A parity bit is a bit appended to a data of binary bits to ensure that the
total number of 1’s in the data is even or odd. Parity bits are used for
error detection. There are two types of parity bits:

1. Even parity bit: In the case of even parity, for a given set of bits,
the number of 1’s are counted. If that count is odd, the parity bit
value is set to 1, making the total count of occurrences of 1’s an
even number. If the total number of 1’s in a given set of bits is
already even, the parity bit’s value is 0.

2. Odd Parity bit – In the case of odd parity, for a given set of bits,
the number of 1’s are counted. If that count is even, the parity bit
value is set to 1, making the total count of occurrences of 1’s an
odd number. If the total number of 1’s in a given set of bits is
already odd, the parity bit’s value is 0.

Working of Hamming Code

Error Detection
the first step is to identify the bit position of the data & all the bit
positions which are powers of 2 are marked as parity bits (e.g. 1, 2,
4, 8, etc.). The following image will help in visualizing the received
hamming code of 7 bits.

Computer Network: Module 2 53


First, we need to detect whether there are any errors in this
received hamming code.
Step 1: For checking parity bit P1, use check one and skip
one method, which means, starting from P1 and then skip P2, take
D3 then skip P4 then take D5, and then skip D6 and take D7, this
way we will have the following bits,

As we can observe the total number of bits are odd so we will write
the value of parity bit as P1 = 1. This means error is there.

Step 2: Check for P2 but while checking for P2, we will use check
two and skip two method, which will give us the following data
bits. But remember since we are checking for P2, so we have to
start our count from P2 (P1 should not be considered).

Computer Network: Module 2 54


As we can observe that the number of 1's are even, then we will
write the value of P2 = 0. This means there is no error.
Step 3: Check for P4 but while checking for P4, we will use check
four and skip four method, which will give us the following data
bits. But remember since we are checking for P4, so we have
started our count from P4(P1 & P2 should not be considered).

As we can observe that the number of 1's are odd, then we will
write the value of P4 = 1. This means the error is there.

So, from the above parity analysis, P1 & P4 are not equal to 0, so
we can clearly say that the received hamming code has errors.

Error Correction
To correct the errors, use the following steps:

Now the error word E will be:

Now we have to determine the decimal value of this error


word 101 which is 5 (22 *1 + 21 * 0 + 20 *1 = 5).

Computer Network: Module 2 55


We get E = 5, which states that the error is in the fifth data bit. To
correct it, just invert the fifth data bit.
So the correct data will be:

Computer Network: Module 2 56

You might also like