Computer Network Module 2
Computer Network Module 2
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
The way in which data is transmitted from one device to another device is
known as transmission mode.
Simplex
A device can only send the data but cannot receive it or it can receive the
data but cannot send the data.
The main advantage of the simplex mode is that the full capacity of the
communication channel can be utilized during transmission.
Half-Duplex
Messages flow in both the directions, but not at the same time.
Full-Duplex
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.
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.
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
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
Eg:
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.
working concept
The 'n' input lines are transmitted through a multiplexer and multiplexer
combines the signals to form a composite signal.
Advantages of Multiplexing:
Multiplexing Techniques
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.
The carriers which are used for modulating the signals are known as sub-
carriers. They are represented as f1,f2..fn.
Advantages Of FDM:
Disadvantages Of FDM:
Applications Of FDM:
It is used to utilize the high data rate capability of fibre optic cable.
Optical signals from different source are combined to form a wider band
of light with the help of multiplexer.
It can be used to multiplex both digital and analog signals but mainly used
to multiplex digital signals.
TDM has several advantages, including high efficiency, low cost, and the
ability to support a variety of data rates. However, it also has some
Synchronous TDM
If the device does not have any data, then the slot will remain empty.
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.
Asynchronous TDM
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.
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
Once the dedicated path is established, the only delay occurs is in the speed
of data transmission.
Message switching was not a solution for streaming media and real-time
applications.
Packet Switching
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
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.
Popular 2G Systems
Several 2G systems were developed, the notable among which are as follows −
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)
It provides high speed transmission having data transfer rate more than
0.2Mbps.
Global roaming services are available for both voice and data.
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.
CDMA2000
Areas of Application
Wireless voice telephony
Video calls
Mobile TV technologies
Video-on-demand
Video conferencing
Tele-medicine
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.
Advantages of GSM
Since GSM service is obtained over 200 countries, so it provides worldwide
roaming for its clients to roam throughout the world.
Advanced features such as short messages, caller ID, Call hold, Call
forwarding etc.
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.
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.
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.
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.
Advantages –
This method is very easiest and simple and each of the frames is
checked and acknowledged well.
Disadvantages –
Advantages –
Disadvantages –
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).
Error detection is the process by which the receiver informs the sender about
any erroneous frame (damaged or lost) sent during transmission.
The error control mechanism in data link layer involves the following phases −
Else, the sender re-transmits the frame and starts the timeout counter.
1. Go-Back-N ARQ
The sender has buffers called sending window.
After the sender has sent all the frames in window, it checks up to
what sequence number it has received positive acknowledgment.
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.
Piggybacking
Piggybacking is a method of attaching acknowledgment to the
outgoing data packet . The concept of piggybacking is explained as
follows:
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
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.
Error Detection
Types of Errors
In the received frame, only one bit has been corrupted, i.e. either
changed from 0 to 1 or from 1 to 0.
Blocks of data from the source are subjected to a check bit or parity bit
generator form, where a parity of:
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.
In this example 1st and 6th bit in one data unit is changed . Also the 1st
and 6th bit in second unit is changed.
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.
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.
CRC
It is not based on binary addition like VRC and LRC. Rather it is based
on binary division.
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.
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.
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.
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:
r =0 2^0 ≥ 4+0+1 F
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.
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.
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).
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: