Computer
Networks
Unit 1
Introduction
• A computer network is a system that connects
numerous independent computers in order to share
information (data) and resources.
• A computer network is a collection of two or more
computer systems that are linked together.
• A network connection can be established using
either cable or wireless media.
• Hardware and software are used to connect
computers and tools in any network.
Introduction (Cont..)
• A computer network consists of various kinds of
nodes.
• Servers, networking hardware, personal computers,
and other specialized or general-purpose hosts can
all be nodes in a computer network.
• Hostnames and network addresses are used to
identify them.
• Criteria of good network:
o Performance
o Reliability
o Security
Data Communications
• Data communication refers to the exchange of
data between a source and a Designation via form
of transmission media such as a wire cable or
wireless.
Components of Data Communication
• Message: A message is a piece of information that is to
be transmitted from one person to another. It could be a
text file, an audio file, a video file, etc.
• Sender: It is simply a device that sends data messages. It
can be a computer, mobile, telephone, laptop, video
camera, or workstation, etc.
• Receiver: It is a device that receives messages. It can be
a computer, telephone mobile, workstation, etc.
Cont..
• Medium: It is the channel or physical path through
which the message is carried from sender to the
receiver. The medium can be wired like twisted pair
wire, coaxial cable, fiber-optic cable or wireless like
laser, radio waves, and microwaves.
• Protocol: It is a set of rules that govern the
communication between the devices. Both sender
and receiver follow same protocols to
communicate with each other.
o For example, Sonali sends a message to Chetan. If Sonali
writes in Hindi and Chetan cannot understand Hindi, it is a
meaningless conversation.
Cont..
Type of data communication:
o The data communication is divided into three types:
• Simplex Communication: It is one-way
communication or we can say that unidirectional
communication in which one device only receives
and another device only sends data and devices
uses their entire capacity in transmission.
o For example, Radio station, monitor, television, entering data using a
keyboard, listing music using a speaker, etc.
• Half Duplex communication: It is a two-way
communication or we can say that it is a
bidirectional communication in which both the
devices can send and receive data but not at the
same time.
o For example, walkie-talkie.
Cont..
• Full-duplex communication: It is a two-way
communication or we can say that it is a
bidirectional communication in which both the
devices can send and receive data at the same
time.
o For example, mobile phones, landlines, etc.
Transmission Media
Communication Channels
• Communication channels are the medium that
connects two or more computers.
• Workstations can be connected by either wired
media or wireless media. It is also known as a
transmission medium
We can group the communication media into two
categories:
o Guided media transmission
o Unguided media transmission
Cont..
Guided Media: In this transmission medium, the
physical link is created using wires or cables between
two or more computers or devices, and then the data
is transmitted using these cables in terms of signals.
1. Twisted pair cable: two identical wires are wrapped
together in a double spiral. The twisting of the wire
reduces the crosstalk. 2 types
It is used in computers and
electronic equipment is in heavy use. telephones widely
Cont..
• 2. Coaxial Cable:It
consists of a solid wire
core that is surrounded
by one or more foil or
wire shields. Used in set-
up box
• 3. Optical fibers: Optical
fiber is an important
technology. It transmits
large amounts of data
at very high speeds due
to which it is widely used
in internet cables.
Cont..
2. Unguided Media: The unguided transmission media
is a transmission mode in which the signals are
propagated from one device to another device
wirelessly.
• 1. Microwave:
Cont..
• 2. Radio wave: When communication is carried out
by radio frequencies, then it is termed radio waves
transmission. It offers mobility.
• It consists of the transmitter and the receiver. Both
use Omni-directional antennas to radiate and
capture the radio signal.
• Can penetrate through walls
• Frequency between 3khz to 1ghz
• Eg: Radio and Television
• 3. Infrared: It is short-distance communication and
can pass through any object. It is generally used in
TV remotes, wireless mouse, etc.
Network Models
• To ease network engineering, the whole
networking concept is divided into multiple
layers. Each layer is involved in some particular
task and is independent of all other layers.
• Layers share data between them and they
depend on each other only to take input and send
output.
Categories of Networks
• Personal Area Network (PAN)
• Local Area Network (LAN)
o Wireless Local Area Network (WLAN)
• Campus Area Network (CAN)
• Metropolitan Area Network (MAN)
• Wide Area Network (WAN)
• Storage Area Network (SAN)
Personal Area Network
(PAN)
• The smallest and most
basic type of network, a
PAN is made up of a wire
or wireless modem, a
computer or two, phones,
printers, tablets, etc., and
revolves around one
person in one building.
• Range of 10 meters(33 feet)
• These types of networks
are typically found in small
offices or residences, and
are managed by one
person or organization
from a single device.
LAN (Local Area Network)
• A LAN is a computer network that spans a
relatively small area.
• Most often, a LAN is confined to a single room,
building or group of buildings, university campus
etc
• Ethernet and Wi-Fi are the two most common
technologies in use for LAN
• Upto 2 KM
Wireless Local Area Network (WLAN)
Campus Area Network (CAN)
• A campus area network (CAN) is a network of
multiple interconnected local area
networks (LAN) in a limited geographical area.
• A CAN is smaller than a wide area
network (WAN) or metropolitan area
network (MAN). A CAN is also known as a
corporate area network (CAN).
• 1 to 5 KM
Metropolitan Area
Network (MAN)
• A metropolitan area network (MAN) is
a network that interconnects users
with computer resources in a
geographic area or region larger than that
covered by even a large (LAN) but smaller
than the area covered by a wide (WAN).
• Shared communication path over a city, town, or
metropolitan area.
• 5 to 50 KM
WAN (Wide Area Network)
• WAN stands for Wide Area Network. It is
a computer network that covers a large
geographical area consisting of two or
more LANs or MANs.
• Above 50KM
Storage Area Network
(SAN)
• SAN is a type of computer network that is high
speed and connects groups of storage devices to
several servers.
• A Storage Area Network (SAN) is a specialized, high-
speed network that provides network access to
storage devices.
Network Topologies
• Network topology refers to the arrangement of different
elements like nodes, links, or devices in a computer
network
• Types:
o Point to Point Topology
o Bus Topology
o Ring Topology
o Star Topology
o Tree Topology
o Mesh Topology
o Hybrid Topology
Point to Point Topology
• Point-to-point topology is a type of topology
that works on the functionality of the sender
and receiver.
• It is the simplest communication between two
nodes, in which one is the sender and the other
one is the receiver. Point-to-Point provides high
bandwidth.
Bus Topology
• Bus topology, alternatively known as line topology, is
a type of network topology where all devices on a
network are connected to a single cable, called a bus
or backbone.
• This cable serves as a shared communication line,
allowing all devices (computers, printers, etc.) to
receive the same signal simultaneously.
• Bus topology is bi-directional, i.e., data is
transmitted in both directions on the backbone cable
to ensure it reaches the recipient, regardless of its
position on the bus.
Cont..
In a bus topology,
when a device sends a
broadcast message
onto the cable that all
other devices see the
message, only the
intended recipient
accepts the message
Cont..
Advantages:
• Simple and inexpensive to implement
• Easy to expand by adding more devices to the cable
Disadvantages:
• Unreliable: If the cable breaks, the entire network
goes down
• Difficult to troubleshoot: If there is a problem with
the network, it can be difficult to identify the source
of the problem
• Performance can be slow if there is a lot of traffic on
the network
Ring Topology
• Ring topology is a network information flows
topology in which all devices on sequentially, it can be
the network are connected in a either in a clockwise
closed loop. Data travels around direction or an
the loop in one direction, from anticlockwise direction.
device to device, until it reaches its
destination.
• Ring topology is a reliable and
easy-to-troubleshoot network
topology.
• However, it can be difficult to
expand and may also be more
expensive to implement than other
topologies.
Cont..
Advantages:
• Predictable Performance: Packages data in a particular
direction and this is good since there are reduced possibilities of
data packet collision.
• Simple to Install: Setting up of this program is very simple,
thus making it very flexible to use.
• Easy to Troubleshoot: There is easier fault isolation since
disturbances are most of the times limited to the section of the
ring that has the fault.
Disadvantages of Ring Topology
• Network Disruption: These are often centralized systems and;
if one connection/link or device is sabotaged it can affect the
whole network.
• Scalability Issues: New devices can only be added through
physically disconnecting the network this has some impact on
the performance.
• Performance Degradation: When more devices are connected
to the network, the time used by data to make its circulation
will take extra time and this will slow down the network.
Star Topology
• One of the most popular types of network topology is the
star topology, which is widely used in LANs and other
small-scale networks. which all nodes are individually
connected to a central connection point, sort of a hub or
a switch.
Cont..
Advantages of Star Topology
• It is very reliable – if one cable or device fails then all the
others will still work.
• It is high-performing as no data collisions can occur.
• It is less expensive
• Easy fault detection because the links are often easily
identified.
• Each device requires just one port i.e. to attach to the hub.
Disadvantages of Star Topology
• If the connecting network device network switch fails, the
nodes attached are disabled and can’t participate in network
communication.
• Extra hardware is required (hubs or switches) which adds to
the cost.
Tree Topology
• A tree topology is a hierarchical network topology
resembling a tree's branches. It combines characteristics
of both star and bus topologies.
• The topmost node is called the "root," and it serves as
the origin point for the network.
• From the root, the network branches out to secondary
nodes (intermediate nodes), which may have their own
connected nodes (child nodes), and so on.
The root node serves as a central hub
connected to the main server, and data moves
either downwards from the root node to the
leaf nodes (child nodes) or upwards from the
leaf nodes towards the hierarchy, depending
on the data's destination.
Cont..
Advantages of Tree Topology :
• As the leaf nodes can add one or more nodes in the
hierarchical chain, this topology provides high scalability.
• The other nodes in a network are not affected if one of
their nodes gets damaged or does not work.
• Tree topology provides easy maintenance and easy fault
identification can be done.
• Tree Topology is highly secure.
Cont..
Disadvantages of Tree Topology :
• This network is very difficult to configure as compared
to the other network topologies.
• Due to the presence of a large number of nodes, the
network performance of tree topology becomes a bit
slow.
• If the computer on the first level is erroneous, the next-
level computer will also go under problems.
• As the data needs to travel from the central cable this
creates dense network traffic.
• The establishment cost increases as well.
• If the bulk of nodes is added to this network, then the
maintenance will become complicated.
Mesh Topology
• Mesh topology is a type of network topology where devices
are interconnected to multiple other devices, forming a
mesh-like structure.
• When you send data from your device, it can take different
routes to reach its destination, depending on distance, traffic
congestion, and link quality. The routing algorithms in the
network determine the best path for data transmission.
There are two types of Mesh topology:
• Full Mesh Topology
• Partial Mesh Topology
Full Mesh
Cont..
Full Mesh Topology:
• In this type of mesh topology, every node (computer, router,
switch, etc.) in the network is connected to every other node.
If there are n nodes, each node will have an n-1 number of
connections.
• To calculate the total number of connections, you can use this
formula: n(n-1)/2.
• If there are ten nodes, the total number of connections will
be: 10(10-1)/2 = 45.
Partial Mesh Topology:
• In this type of mesh topology, every node in the network may
not be connected to every other node.
Cont..
Advantages of Mesh Topology :
• This topology provides multiple paths to succeed in the
destination and tons of redundancy.
• It provides high privacy and security.
• Data transmission is more consistent because failure
doesn’t disrupt its processes.
• Adding new devices won’t disrupt data transmissions.
• A mesh doesn’t have a centralized authority.
Disadvantages of Mesh Topology :
• Installation is extremely difficult in the mesh.
• Power requirement is higher as all the nodes will need
to remain active all the time and share the load.
• Each node requires a further utility cost to think about.
• Maintenance needs are challenging with a mesh.
Hybrid Topology
• It is a type of network topology that combines or integrates
two or more types of topologies like star, bus, mesh, or ring
to create a network infrastructure that offers the benefits of
each topology while minimizing their disadvantages.
The OSI Model
• OSI stands for Open
Systems Interconnection.
It has been developed
by ISO – ‘International
Organization for
Standardization‘, in the
year 1984.
• It is a 7 layer architecture
with each layer having
specific functionality to
perform. All these 7 layers
work collaboratively to
transmit the data from
one person to another
across the globe.
(Protocol Data Unit)
TCP/IP Model
• The TCP/IP model, it was designed and developed
by Department of Defense (DoD) in 1960s and is
based on standard protocols. It stands for
Transmission Control Protocol/Internet Protocol.
• 4 layer Protocol
Introduction to
Physical Layer
• It is responsible for the movements of individual bits from
one node to the next
• It activates, maintains, and deactivates the physical
connections
• It converts the logical 1's and 0's into electrical signals
• Data encoding is also done in this layer
Cont..
Transmission
Impairments
• Transmission impairment occurs when the received signal
is different from the transmitted signal.
• A signal can be transmitted as Analog signal or it can be
transmitted as a digital signal.
• Consequences – for analog (Degrades of signal quality)
- for digital signal (bit error)
Cont..
Attenuation – It refers to loss of energy by signal time
• The strength of signal decreases with increasing
distance which causes loss of energy in overcoming
resistance of medium.
• Amplifiers are used to amplify the attenuated signal
which gives the original signal back and
compensate for this loss.
Cont..
• Distortion – It means changes it’s the form or shape
of the signal. Each frequency component has its
own propagation speed traveling through a
medium. And that’s why it a delay in arriving at the
final destination
• Every component arrives at a different time which
leads to distortion. Therefore, they have different
phases at receiver end from what they had at
senders end.
Cont..
Noise – The random or unwanted signal that mixes up with
the original signal is called noise.
There are several types of noise which may corrupt the
signal.
• Induced noise comes from sources such as motors and
appliances. These devices act as sending antenna and
transmission medium act as receiving antenna.
• Thermal noise is movement of electrons in wire which creates
an extra signal.
• Crosstalk noise is when one wire affects the other wire.
• Impulse noise is a signal with high energy that comes from
lightning or power lines
Data Rate Limits
Data rate governs the speed of data transmission. A
very important consideration in data communication
is how fast we can send data, in bits per second, over
a channel. Data rate depends upon 3 factors:
• The bandwidth available
• Number of levels in digital signal
• The quality of the channel – level of noise
To calculate the data rate 2 methods was using
1. Nyquist for a noiseless channel,
2. Shannon for a noisy channel.
Cont..
• Nyquist bit rate
• Bandwidth is the bandwidth of the channel,
• L is the number of signal levels used to represent
data, and
• BitRate is the bit rate in bits per second.
• Bandwidth is a fixed quantity, so it cannot be
changed.
Cont..
Examples:
• Input1 : Consider a noiseless channel with a
bandwidth of 3000 Hz transmitting a signal with 2
signal levels. What can be the maximum bit rate?
Output1 : BitRate = 2 * 3000 * log2(2) = 6000bps
• Input2 : Consider a noiseless channel with a
bandwidth of 3000 Hz transmitting a signal with 4
signal levels. What can be the maximum bit rate?
Output2 : BitRate = 2 * 3000 * log2(4) = 12000bps
Cont..
• Shannon Capacity
• In 1944, Claude Shannon developed
• Bandwidth is the bandwidth of the channel,
• SNR is the signal-to-noise ratio, and
SNR = (Power of signal) / (power of noise).
• Capacity is the capacity of the channel in bits per
second.
Cont..
• Examples:
• Input1: A telephone line normally has a bandwidth of
3000 Hz (300 to 3300 Hz) assigned for data
communication. The SNR is usually 0. What will be the
capacity for this channel?
Output1 : C = 3000 * log2(1 + 0) = 3000 * 0 = 0 bps
Therefore : We cannot receive any data from this channel
• Input2 : A telephone line normally has a bandwidth of
3000 Hz (300 to 3300 Hz) assigned for data
communication. The SNR is usually 3162. What will be the
capacity for this channel?
Output2 : C = 3000 * log2(1 + SNR)
= 3000 * 11.62
= 34860 bps
Performance
The physical layer of the OSI model is responsible for
the performance of data transmission by establishing
and maintaining a physical connection between a
sender and receiver:
• Data rate: Determines how fast data is transmitted in
bits per second
• Synchronization: Ensures that the sending and
receiving devices are synchronized
• Transmission mode: Determines the direction of
data transmission
Cont..
• Modulation: Converts data into radio waves
• Signal equalization: Helps create more reliable
connections
• Error correction codes: Improves reliability
• Electromagnetic compatibility: Specifies signal
strength and frequency allocation
• Bit synchronization: Manages the flow of data in
synchronous serial communication
• Start-stop signaling and flow control: Manages the
flow of data in asynchronous serial communication
Introduction to Data-
Link- Layer
• The data link layer is the protocol layer in a program
that handles the moving of data into and out of a
physical link in a network.
• The data link layer is Layer 2 in the Open Systems
Interconnection (OSI) architecture model for a set
of telecommunication protocols.
• Data bits are encoded, decoded, error deduction,
flow control, and organized in the data link layer,
before they are transported as frames between two
adjacent nodes on the same LAN or WAN.
Cont..
• The data link layer also determines how devices
recover from collisions that may occur when nodes
attempt to send frames at the same time.
Sub-layers of Data Link Layer:
The data link layer is further divided into two sub-
layers, which are as follows:
• Logical Link Control (LLC):
o This sublayer of the data link layer deals with
multiplexing, the flow of data among applications
and other services, and LLC is responsible for
providing error messages and acknowledgments as
well.
Cont..
• Media Access Control (MAC):
o MAC sublayer manages the device’s interaction,
responsible for addressing frames, and also controls
physical media access.
Functions of the Data-link Layer:
1. Framing
2. Addressing
3. Error Control
4. Flow Control (speed)
5. Access Control (device)
Error Detection and
Correction
• Error
A condition when the receiver’s information does
not match with the sender’s information.
• During transmission, digital signals suffer from noise
that can introduce errors in the binary bits travelling
from sender to receiver. That means a 0 bit may
change to 1 or a 1 bit may change to 0.
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.
Cont..
• 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.
Cont..
Cont..
Parity Check
• 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.
Block Coding
• In block coding, we divide our message into blocks,
each of k bits, called data words
• Eg: 00011011 into 00, 01, 10,11 (data word(k))
o Therefore here k=2
• We add r redundant bits to each block to make the
length n = k + r. The resulting n-bit blocks are called
code words.
Cont..
Error Detection
• If the following two conditions are met, the receiver
can detect a change in the original code word by
using Block coding technique.
• 1. The receiver has (or can find) a list of valid code
words.
2. The original codeword has changed to an invalid
one.
Combining of
dataword +
Redundant bit
Cont..
• Assume the sender encodes the data word 01 as
011 and sends it to the receiver. Consider the
following cases:
1. The receiver receives O11. It is a valid code
word. The receiver extracts the data word 01 from
it.
2. The code word is corrupted during transmission,
and 111 is received (the leftmost bit is corrupted).
This is not a valid code word and is discarded.
Cyclic Codes
• A special linear block code
• In a cyclic code, if a code is cyclically
shifted(rotated), the result in another codeword
most significant bit Right Circular Shift
(MSB); the other least significant bit
positions are shifted (LSB) to the leftmost
by 1 to the right. position,
Codeword
Left Circular Shift is just
opposite to RCS
Cont..
Cyclic Redundancy Check
• CRC or Cyclic Redundancy Check is a method of
detecting accidental changes/errors in the
communication channel.
• CRC uses Generator Polynomial which is available
on both sender and receiver side. An example
generator polynomial is of the form like x3 + x + 1.
This generator polynomial represents key 1011.
Another example is x2 + 1 that represents key 101.
Cont..
Cont..
Therefore, the remainder is 001
Illustration: and hence the encoded data sent
Example 1 (No error in transmission): is 100100001. Receiver Side:
Data word to be sent - 100100 Key - 1101 [ Code word received at the
Or generator polynomial x3 + x2 + 1] receiver side 100100001
Sender Side:
Therefore, the remainder
is all zeros. Hence, the
data received has no
error.
Checksum
• Checksum is the error detection method.
• At the Sender side, the data is divided into equal
subunits of n bit length by the checksum generator.
• These subunits are then added together using one’s
complement method.
• This sum is of n bits. The resultant bit is then
complemented.
• This complemented sum which is called checksum is
appended to the end of original data unit and is
then transmitted to Receiver.
Cont..
Eg:
1. Take original data and divide into segment
• Total 4 segment
• 2. Add segment 1 and 2 the resultant with 3 that
resultant with 4 vice versa
Cont..
Cont..
Cont..