Computer network 3ed sem
Computer network 3ed sem
1. Message:
This is most useful asset of a data communication system.
The message simply refers to data or piece of information
which is to be communicated. A message could be in any
form, it may be in form of a text file, an audio file, a video
file, etc.
2. Sender:
To transfer message from source to destination, someone
must be there who will play role of a source. Sender plays
part of a source in data communication system. It is simple
a device that sends data message. The device could be in
form of a computer, mobile, telephone, laptop, video
camera, or a workstation, etc.
3. Receiver:
It is destination where finally message sent by source has
arrived. It is a device that receives message. Same as
sender, receiver can also be in form of a computer,
telephone mobile, workstation, etc.
4.Transmission Medium:
In entire process of data communication, there must be
something which could act as a bridge between sender and
receiver, Transmission medium plays that part. It is physical
path by which data or message travels from sender to receiver.
Transmission medium could be guided (with wires) or unguided
(without wires), for example, twisted pair cable, fiber optic cable,
radio waves, microwaves, etc.
Communication Channels
Data Representation
A network is a collection of different devices connected and capable of
communicating. For example, a company's local network connects
employees' computers and devices like printers and scanners. Employees
will be able to share information using the network and also use the
common printer/ scanner via the network. Data to be transferred or
communicated from one device to another comes in various formats like
audio, video, etc. This tutorial explains how different data types are
represented in a computer and transferred in a network.
1. Texts
2. Numbers
3. Images
4. Videos
5. Audios
1.Textual data:
Data in text format is represented using bit patterns (combinations of two
binary bits - 0 and 1). Textual data is nothing but a string, and a string is a
collection of characters. Each character is given a specific number
according to an international standard called Unicode. The process of
allocating numbers to characters is called "Coding," and these numbers
are called "codes". Now, these codes are converted into binary bits to
represent the textual data in a pattern of bits, and these bits are
transferred as a stream via the network to other devices.
Unicode: It is the universal standard of character encoding. It gives a
unique code to almost all the characters in every language spoken in the
world. It defines more than 1 40 000 characters. It even defined codes for
emojis. The first 128 characters of Unicode point to ASCII characters. ASCII
is yet another character encoding format, but it has only 128 codes to 128
characters. Hence, ASCII is a subset of Unicode.
2. Numerical data
Numbers are directly converted into binary patterns by dividing by 2 without
any encoding. The numbers we want to transfer generally will be of the decimal
number system- ( )10. We need to convert the numbers from ( )10 to a binary
number system - ( )2 to get a bit stream.
Number formats:
Integers
Date
Boolean
Decimal
Fixed point
Floating point
Example:
3. Image
Image data is also transferred as a stream of bits like textual data. An
image, also called a picture, is a collection of little elements called
"Pixels". A single pixel is the smallest addressable element of a picture,
and it is like a dot with a size of 1/96 inch/ 0.26 mm. The dimensions of an
image are given by the number of pixels along the height of the
image X Number of pixels along the width of the image.
File extensions:
The audio quality depends on the sampling rate and the bit rate. If
more bits are used to represent the amplitudes in moments and more
moments are captured accurately, we can save the audio with every
detail accurately.
File extensions:
5. Videos
A video is a collection of frames; each frame is a picture with the
same or different dimensions. These frames/ images are represented as
matrices, as we discussed above. All the frames/ images are displayed
continuously, one after the other, to show a video in movement. To
represent a video, The computer will analyze data about the video like:
File extensions:
Mesh Topology
Bus Topology
Note: Network Layer, Data Link Layer, and Physical Layer are also
known as Lower Layers or Hardware Layers.
TCP/IP Model
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 destination and are called
errors.
Types of Errors
Errors can be of three types, namely single bit errors, multiple bit errors, and
burst 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 bits error − In the received frame, more than one bits are
corrupted.
Burst error − In the received frame, more than one consecutive bits
are corrupted.
Error Control
For both error detection and error correction, the sender needs to send some
additional bits along with the data bits. The receiver performs necessary
checks based upon the additional redundant bits. If it finds that the data is
free from errors, it removes the redundant bits before passing the message
to the upper layers.
The parity check is done by adding an extra bit, called parity bit to the data
to make a number of 1s either even in case of even parity or odd in case of
odd parity.
While creating a frame, the sender counts the number of 1s in it and adds the
parity bit in the following way
The parity check is suitable for single bit error detection only.
Checksum
Cyclic Redundancy Check (CRC) involves binary division of the data bits being
sent by a predetermined divisor agreed upon by the communicating system.
The divisor is generated using polynomials.
Here, the sender performs binary division of the data segment by the
divisor. It then appends the remainder called CRC bits to the end of the
data segment. This makes the resulting data unit exactly divisible by
the divisor.
The receiver divides the incoming data unit by the divisor. If there is no
remainder, the data unit is assumed to be correct and is accepted.
Otherwise, it is understood that the data is corrupted and is therefore
rejected.
Error Correction Techniques
Error correction techniques find out the exact number of bits that have been
corrupted and as well as their locations. There are two principle ways
Hamming Codes
Binary Convolution Code
Reed – Solomon Code
Low-Density Parity-Check Code
Line Discipline:
Line discipline is the functionality used to establish coordination between link
systems. It decides which device sends data and when.
Flow Control:
Flow control is an essential function that coordinates the amount of data the sender
can send before waiting for acknowledgment from the receiver.
Error Control:
Error control is functionality used to detect erroneous transmissions in data frames
and retransmit them.
Working:
The sliding window protocol is the flow control protocol for noisy channels
that allows the sender to send multiple frames even before acknowledgments
are received. It is called a Sliding window because the sender slides its window
upon receiving the acknowledgments for the sent frames.
Working:
Error detection is the process by which the receiver informs the sender about
any erroneous frame (damaged or lost) sent during transmission.
Error control is a vital function of the data link layer that detects errors in
transmitted frames and retransmits all the erroneous frames. Error discovery and
amendment deal with data frames damaged or lost in transit and the
acknowledgment frames lost during transmission. The method used in noisy
channels to control these errors is ARQ or Automatic Repeat Request.
Categories of Error Control
Stop-and-wait ARQ
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 retransmits the frame and starts the timeout counter.
In case the receiver receives a negative acknowledgment, the sender
retransmits the frame.