lOMoARcPSD|58582620
UNIT-1 - CNS notes for insem and endsem of sppu affliated
colleges
computer networks (Savitribai Phule Pune University)
Scan to open on Studocu
Studocu is not sponsored or endorsed by any college or university
Downloaded by Hrishikesh Rathod ([Link]@[Link])
lOMoARcPSD|58582620
Computer Networks
UNIT-1
Introduc on to Computer Networks
-------------------------------------------------------------------------------------------------------
Network:
A computer network is a collec on of interconnected devices that share
resources and informa on. These devices can include computers,
servers, printers, and other hardware. Networks allow for the efficient
exchange of data, enabling various applica ons such as email, file
sharing, and internet browsing.
Basics building blocks of a computer network are Nodes and Links. A
Network Node can be illustrated as Equipment for Data Communica on
like a Modem, Router, etc., or Equipment of a Data Terminal like
connec ng two computers or more. Link in Computer Networks can be
defined as wires or cables or free space of wireless networks.
Types of Networks:
1. LAN: A Local Area Network (LAN) is a network that covers a small area,
such as an office or a home. LANs are typically used to connect computers
and other devices within a building or a campus. E.g. A switch is
connec ng number of computers in a school/college.
2. MAN: A metropolitan area network is a network that covers a larger
geographic area by interconnec ng a different LAN to form a larger
network. In MAN, various LANs are connected to each other through a
telephone exchange line. It has a higher range than Local Area Network
(LAN). MAN devices-Switches/HUB and Routers/Bridges.
Downloaded by Hrishikesh Rathod ([Link]@[Link])
lOMoARcPSD|58582620
Computer Networks
3. WAN: WAN stands for Wide Area Network. It is a telecommunica on
network that made its presence globally very soon. It can be u lized to
connect mul ple devices all over the world or between ci es of a
country. WANs can help in communica on, the sharing of informa on,
and much more between systems or devices from around the world
through a WAN provider.
-----------------------------------------------------------------------------------------------
Downloaded by Hrishikesh Rathod ([Link]@[Link])
lOMoARcPSD|58582620
Computer Networks
-----------------------------------------------------------------------------------------------
WLAN/Wireless network:
Wireless network /WLAN stands for Wireless Local Area Network. WLAN
is a local area network that uses radio communica on to provide mobility
to the network users while maintaining the connec vity to the wired
network.
A WLAN basically, extends a wired local area network.
WLANs are built by a aching a device called the access point (AP) to the
edge of the wired network.
Downloaded by Hrishikesh Rathod ([Link]@[Link])
lOMoARcPSD|58582620
Computer Networks
Clients communicate with the AP using a wireless network adapter which
is similar in func on to an ethernet adapter. It is also called a LAWN is a
Local area wireless network.
Coverage distance is less than few 100 feet.
-------------------------------------------------------------------------------------------------------
Protocols in Networking:
In networking, a protocol is a set of rules and conven ons that allow
devices on a network to communicate with each other.
These rules define how data is transmi ed, forma ed, and processed,
ensuring that devices from different manufacturers and with different
opera ng systems can communicate effec vely.
Protocols operate at different layers of the OSI (Open Systems
Interconnec on) model or the TCP/IP model, each serving a specific
purpose in the communica on process.
Downloaded by Hrishikesh Rathod ([Link]@[Link])
lOMoARcPSD|58582620
Computer Networks
1. HTTP (Hypertext Transfer Protocol):
Layer: Applica on Layer
Purpose: Used for transmi ng web pages over the internet. It defines
how messages are forma ed and transmi ed, and how web servers
and browsers should respond to various commands.
2. TCP (Transmission Control Protocol):
Layer: Transport Layer
Purpose: Ensures reliable, ordered, and error-checked delivery of
data between applica ons. It establishes a connec on before data is
sent and guarantees that data is received in the same order it was
sent.
3. IP (Internet Protocol):
Layer: Network Layer
Purpose: Responsible for addressing and rou ng packets of data so
that they can travel across networks and arrive at the correct
des na on. IPv4 and IPv6 are the most common versions.
4. UDP (User Datagram Protocol):
Layer: Transport Layer
Purpose: Provides a connec onless service that sends data without
establishing a connec on and without ensuring reliability. It is faster
than TCP but does not guarantee the delivery of data.
5. FTP (File Transfer Protocol):
Layer: Applica on Layer
Purpose: Used for transferring files between a client and a server on
a network. It supports both uploading and downloading of files.
6. DNS (Domain Name System):
Layer: Applica on Layer
Downloaded by Hrishikesh Rathod ([Link]@[Link])
lOMoARcPSD|58582620
Computer Networks
Purpose: Translates human-readable domain names (like
[Link]) into IP addresses that computers use to iden fy
each other on the network.
7. SMTP (Simple Mail Transfer Protocol):
Layer: Applica on Layer
Purpose: Used for sending emails across networks. It handles the
transmission of email messages from the client to the server and
between servers.
8. DHCP (Dynamic Host Configura on Protocol):
Layer: Applica on Layer
Purpose: Automa cally assigns IP addresses and other network
configura on parameters to devices on a network, allowing them to
communicate with other IP networks.
9. ARP (Address Resolu on Protocol):
Layer: Network Layer
Purpose: Maps an IP address to a physical machine address that is
recognized in the local network. It is used to discover the MAC (Media
Access Control) address of a device given its IP address.
10. ICMP (Internet Control Message Protocol):
Layer: Network Layer
Purpose: Used by network devices to send error messages and
opera onal informa on. The "ping" command, for example, uses
ICMP to test the reachability of a host.
-------------------------------------------------------------------------------------------------------
Downloaded by Hrishikesh Rathod ([Link]@[Link])
lOMoARcPSD|58582620
Computer Networks
Network Models: The network models are conceptual frameworks that
describe how different networking protocols interact and work together
to enable communica on between devices in a network.
1. OSI Model:
The ISO was one of the first organiza ons to formally define a common
way to connect computers. Their architecture, called the Open System
Interconnec on (OSI).
It is a 7-layer architecture with each layer having specific func onality to
perform. All these 7 layers work collabora vely to transmit the data from
one person to another across the globe.
Downloaded by Hrishikesh Rathod ([Link]@[Link])
lOMoARcPSD|58582620
Computer Networks
OSI Model Layers:
1. Physical Layer (Layer 1):
Func on: Deals with the physical connec on between devices,
including the transmission of raw binary data over a physical
medium such as cables or wireless signals.
Examples: Ethernet cables, fiber op cs, hubs.
2. Data Link Layer (Layer 2):
Func on: Provides node-to-node data transfer and error
detec on/correc on. It is responsible for defining the protocol to
establish and terminate a connec on between two physically
connected devices.
Examples: MAC (Media Access Control) addresses, Ethernet,
switches.
3. Network Layer (Layer 3):
Func on: Manages data transfer between devices on different
networks. It handles the rou ng of data packets and logical
addressing, allowing data to be sent from the source to the
des na on across mul ple networks.
Examples: IP (Internet Protocol), routers.
4. Transport Layer (Layer 4):
Func on: Ensures reliable data transfer between systems by
providing error detec on, data flow control, and retransmission of
lost packets. It manages end-to-end communica on.
Examples: TCP (Transmission Control Protocol), UDP (User
Datagram Protocol).
5. Session Layer (Layer 5):
Func on: Manages sessions or connec ons between applica ons.
It establishes, maintains, and terminates communica on sessions.
Downloaded by Hrishikesh Rathod ([Link]@[Link])
lOMoARcPSD|58582620
Computer Networks
Examples: NFS (Network File System), RPC (Remote Procedure
Call).
6. Presenta on Layer (Layer 6):
Func on: Translates data between the applica on layer and the
network, ensuring that data is in a readable format. It handles data
encryp on, compression, and conversion.
Examples: SSL/TLS (Secure Sockets Layer/Transport Layer
Security), encryp on formats.
7. Applica on Layer (Layer 7):
Func on: Provides network services directly to end-user
applica ons. It is where applica ons interact with the network to
send and receive data.
Examples: HTTP (Hypertext Transfer Protocol), FTP (File Transfer
Protocol), SMTP (Simple Mail Transfer Protocol).
-------------------------------------------------------------------------------------------------------
2. TCP/IP Model:
The TCP/IP model is a fundamental framework for computer networking.
It stands for Transmission Control Protocol/Internet Protocol, which are
the core protocols of the Internet.
This model was developed prior to the OSI model. It was developed by
the U.S. Department of Defense (DoD) in the 1970s.
Downloaded by Hrishikesh Rathod ([Link]@[Link])
lOMoARcPSD|58582620
Computer Networks
TCP/IP model layers:
1. Network Access: This layer is the combina on of data-link and physical
layer, where it is responsible for maintaining the task of sending and
receiving data in raw bits, i.e., in binary format over the physical
communica on modes in the network channel.
Examples: Ethernet, Wi-Fi, ARP (Address Resolu on Protocol).
2. Internet Layer: This layer parallels the func ons of OSI’s Network layer. It
defines the protocols which are responsible for the logical transmission
of data over the en re network. The main protocols residing at this layer
are as follows:
IP: IP stands for Internet Protocol and it is responsible for delivering
packets from the source host to the des na on host by looking at the
IP addresses in the packet headers.
ICMP: It stands for Internet Control Message Protocol and is used
during communica on in IP networks for diagnos c and error-
repor ng func ons. It is encapsulated within IP datagrams.
ARP: ARP stands for Address Resolu on Protocol. Its job is to find the
hardware address (Physical address) of a host from a known IP
address.
3. Transport Layer: The transport layer is responsible for the reliability, flow
control, and correc on of data which is being sent over the network. The
TCP/IP transport layer protocols exchange data receipt
Downloaded by Hrishikesh Rathod ([Link]@[Link])
lOMoARcPSD|58582620
Computer Networks
acknowledgments and retransmit missing packets to ensure that
packets arrive in order and without error.
Examples: UDP and TCP.
4. Applica on Layer: Combines the OSI's Session, Presenta on, and
Applica on layers. It provides services for network applica ons and end-
user processes. This layer allows the user to interact with the applica on.
When one applica on layer protocol wants to communicate with another
applica on layer, it forwards its data to the transport layer.
Examples: HTTP, SNMP, SMTP, DNS, FTP.
-------------------------------------------------------------------------------------------------------
Network Topologies: Network topology refers to the arrangement of
different elements like nodes, links, or devices in a computer network. It
defines how these components are connected and interact with each
other.
Physical topology: The way in which the devices are placed.
Logical topology: The way by which the data flows from one device to
another.
Types of Topologies in Networking:
1. Bus topology:
Advantages:
Downloaded by Hrishikesh Rathod ([Link]@[Link])
lOMoARcPSD|58582620
Computer Networks
It works very efficiently well when there is a small network.
It is easy to connect or remove devices in this network without
affecting any other device.
Disadvantages:
If the main cable is damaged, the whole network fails or splits into two.
High packet loss.
------------------------------------------------------------------------------------------------------
2. Ring Topology:
It is nothing but the bus topology in a closed loop.
It is peer-to-peer topology.
In a Ring Topology, it forms a ring connecting devices with exactly two
neighbouring devices.
The data flows in one direction, i.e. it is unidirectional.
Sending and receiving data with the help of tokens.
Advantages:
The possibility of collision is minimum in this type of topology.
Performance is better than Bus topology.
Disadvantages:
The possibility of collision is minimum in this type of topology.
The addition of stations in between or the removal of stations can
disturb the whole topology.
------------------------------------------------------------------
Downloaded by Hrishikesh Rathod ([Link]@[Link])
lOMoARcPSD|58582620
Computer Networks
3. Star Topology:
In Star Topology, all the devices are connected to a single hub or switch
through a cable.
All the traffic must pass through the hub as it is a centralized
Management.
Advantages:
It is very easy to design and implement. Any time we can add as
many as devices we can.
It is Robust. If one link fails only that link will be affected and no
other than that.
Disadvantages:
If the concentrator (hub) on which the whole topology relies fails,
the whole system will crash down.
The cost of installation is high.
Performance is based on the single concentrator i.e. hub.
-----------------------------------------------------------------------------------------------------
4. Mesh Topology:
In a mesh topology, every device is connected to every other nodein the
network via a particular channel.
Downloaded by Hrishikesh Rathod ([Link]@[Link])
lOMoARcPSD|58582620
Computer Networks
Advantages:
It is fault tolerant as if one channel or link fails to transmit data, it
can use rest of the channels to transfer data.
It is reliable as there are various channels to send data.
Disadvantages:
Issues with broadcasting messages.
The cost of installation is high because of redundant links.
Impractical for large networks.
-----------------------------------------------------------------------------------------------------
5. Hybrid topology:
A hybrid topology is defined as a network topology that combines two
or more different network topologies. A hybrid topology can be a
combination of bus topology, ring topology and mesh topology.
Above Hybrid topology is the combination of star topology and the ring
topology.
Hybrid topology is more secure, reliable, and scalable as compared to
individual star, ring and mesh topology.
Error detection and troubleshooting is easier in hybrid topology.
The design and implementation of hybrid network topology is difficult.
The overall implementation, setup and process of hybrid topology is
much costlier.
Transmission media: Transmission media refer to the physical pathways
through which data is transmitted from one device to another within a
Downloaded by Hrishikesh Rathod ([Link]@[Link])
lOMoARcPSD|58582620
Computer Networks
network. These pathways can be wired or wireless. The choice of
medium depends on factors like distance, speed, and interference.
Explanation:
Guided Media: Guided Media is also referred to as Wired or Bounded
transmission media. Signals being transmitted are directed and confined
in a narrow pathway by using physical links.
Features:
High Speed
Secure
Used for comparatively shorter distances
Types of Guided media:
1) Twisted Pair cable: It consists of 2 separately insulated conductor wires
wound about each other. Generally, several such pairs are bundled
together in a protective sheath.
UTP: Most common for Ethernet networks. Categories include Cat5e,
Cat6, Cat6a, Cat7, and Cat8, each suppor ng higher speeds and
frequencies.
STP: Similar to UTP but with shielding to reduce electromagne c
interference (EMI).
Downloaded by Hrishikesh Rathod ([Link]@[Link])
lOMoARcPSD|58582620
Computer Networks
2) Coaxial cable: A single copper conductor at the centre, surrounded by a
plas c insula ng layer, a metallic shield, and an outer plas c cover. The
shield protects the data signals from external interference. Use Cases:
Cable television, internet connec ons (especially in older networks), and
some older LAN setups.
3) Fibre optic cable: Optical Fibre Cable uses the concept of refraction of
light through a core made up of glass or plastic. The core is surrounded
by a less dense glass or plastic covering called the cladding. It is used for
the transmission of large volumes of data. Types: single mode fiber and
multi-mode fiber.
Downloaded by Hrishikesh Rathod ([Link]@[Link])
lOMoARcPSD|58582620
Computer Networks
Unguided media: Unguided media do not require physical connections.
Instead, they use electromagnetic waves to transmit data through the
air, vacuum, or space. It is also referred to as Wireless or Unbounded
transmission media.
Features of Unguided Media
The signal is broadcasted through air
Less Secure
Used for larger distances.
Types of Unguided media:
1) Radio waves: Electromagnetic waves with frequencies ranging from 3 kHz
to 300 GHz. Used for long-distance communication. It is used in WAN.
Use Cases: Wi-Fi, cellular networks (3G, 4G, 5G), AM/FM radio,
Bluetooth.
2) Micro-waves: It is a line-of-sight transmission i.e. the sending and
receiving antennas need to be properly aligned with each other. The
distance covered by the signal is directly proportional to the height of the
antenna. Use Cases: Satellite communication, microwave links, certain
types of wireless LANs.
Downloaded by Hrishikesh Rathod ([Link]@[Link])
lOMoARcPSD|58582620
Computer Networks
3) Infrared waves: Infrared waves are used for very short distance
communication, typically within a single room. They cannot penetrate
through obstacles.
-----------------------------------------------------------------------------------------------------
Network architecture: It simply describes the allocation task between
all of the computers in the network. It is simply a way in which all
network devices and services are organized and managed to connect
clients like laptops, tablets, servers, etc., and also how tasks are
allocated to computers.
1. Pee-to-Peer Architecture:
It is also known as point-to-point architecture. Peer-To-Peer network is
a network in which all the computers are linked together with equal
privilege and responsibilities for processing the data.
It has no dedicated server.
It is useful for small environments usually up to 10 computers.
These peers are connected to each other with help of Internet.
Each and every computer might send even receive message directly.
Downloaded by Hrishikesh Rathod ([Link]@[Link])
lOMoARcPSD|58582620
Computer Networks
Advantages:
P2P is very simple and not complex. This is because all computers
that are connected in network communication in an efficient and
well-mannered with each other.
Easy to set-up and maintain as each computer manages itself.
All computers are efficiently communicated and well-mannered
with each other.
Disadvantages:
As the size of network increases then it may become very difficult to
handle.
It cannot backup the data from different location because doesn’t
have centralized system.
It also has security issue.
2. Client-Server Architecture:
Client/Server network is a network model designed for the end users
called clients, to access the resources such as songs, video, etc. from a
central computer known as Server.
The central controller is known as a server while all other computers in
the network are called clients.
A server performs all the major operations such as security, network
management, managing all the resources such as files, directories,
printer, etc.
The client sends the request to a server and server processes it and send
response to the specific client.
Downloaded by Hrishikesh Rathod ([Link]@[Link])
lOMoARcPSD|58582620
Computer Networks
Advantages:
A special Network Operating System (NOS) is provided by server to
provide resources to many users that request them.
This network also boosts speed of sharing resources.
It provides better security.
The data is easily accessible.
Disadvantages:
It is very expensive as compared to P2P. This is due to need for
server with more memory as well as need for many networking
devices such as hubs, routers, switches, etc.
If the server fails, clients may lose access to services.
Managing servers requires skilled personnel.
Downloaded by Hrishikesh Rathod ([Link]@[Link])
lOMoARcPSD|58582620
Computer Networks
Network Devices: Network devices, also known as networking
hardware, are physical devices that allow hardware on a computer
network to communicate and interact with one another. For example,
Repeater, Hub, Bridge, Switch, Routers, Gateway, Brouter, and NIC, etc.
1. Repeater:
Repeaters are defined as a networking device that is used to amplify
and generate the incoming signal.
Repeaters work at the physical layer of the OSI model. The main aim
of using a repeater is to increase the networking distance by
increasing the strength and quality of signals.
2. HUB:
A hub is a multi-port repeater.
A hub connects multiple wires coming from different branches, for
example, the connector in star topology which connects different
stations.
A hub acts as a dumb switch that does not know, which data needs
to be forwarded where so it broadcasts or sends the data to each
port.
Downloaded by Hrishikesh Rathod ([Link]@[Link])
lOMoARcPSD|58582620
Computer Networks
3. Routers:
Routers are networking devices operating at layer 3 or a network
layer of the OSI model.
They are responsible for receiving, analysing, and forwarding data
packets among the connected computer networks.
It is based on the IP address of a computer.
It uses protocols such as ICMP to communicate between two or more
networks.
It is also known as an intelligent device as it can calculate the best route
to pass the network packets from source to the destination
automatically.
4. Bridges:
The bridge is a networking device in a computer network that is used to
connect multiple LANs to a larger LAN. The mechanism of network
aggregation is known as bridging.
The bridge is a physical or hardware device but operates at the OSI
model’s data link layer and is also known as a layer of two switches.
Downloaded by Hrishikesh Rathod ([Link]@[Link])
lOMoARcPSD|58582620
Computer Networks
The primary responsibility of a bridge is to examine the incoming traffic
and determine whether to filter or forward it.
5. Switch:
The Switch is a network device that is used to segment the networks
into different subnetworks called subnets or LAN segments.
It uses MAC addresses to forward data to the correct destination.
Switches operate at the data link layer (Layer 2) of the OSI model.
A switch learns the MAC (Media Access Control) addresses of devices
connected to its ports. It builds a table that maps these addresses to
specific ports, allowing it to forward data frames only to the correct
destination port instead of broadcasting to all ports. Hence it is called
as smart device.
6. Gateway:
A network gateway is a device that connects different networks by
translating messages from one protocol into another protocol.
A gateway is a device that acts as an entity between different networks.
It helps facilitates communication and data transfer between networks
with different protocols or architectures.
Downloaded by Hrishikesh Rathod ([Link]@[Link])
lOMoARcPSD|58582620
Computer Networks
Gateways are often used to connect LAN to the internet or larger
network infrastructure.
It acts as a gate/door between networks.
It operates at 7th layer of OSI MODEL.
7. Wireless Access Point:
It is a physical device that is used to establish a connec on between
wired and wireless.
Or a device that provides wireless network connec vity to devices like
smartphones, laptops, and tablets.
A Wireless Access Point (WAP) is used to create the WLAN (Wireless Local
Area Network), it is commonly used in large offices and buildings which
have expanded businesses.
E.g. Wireless printers can be connected to the network and then users
can print anywhere within the range of the access point.
Downloaded by Hrishikesh Rathod ([Link]@[Link])
lOMoARcPSD|58582620
Computer Networks
Manchester and Differen al Manchester Encoding: Manchester and
Differen al Manchester encoding are two-line coding techniques that are
used in digital communica on to encode binary data.
1. Manchester Encoding: Manchester encoding is a method of data
transmission used in computer networks and telecommunica ons. In
Manchester encoding, each bit of data is represented by a transi on at
the middle of the bit period. A high-to-low transi on represents a '0',
while a low-to-high transi on represents a '1'.
Downloaded by Hrishikesh Rathod ([Link]@[Link])
lOMoARcPSD|58582620
Computer Networks
2. Differen al Manchester Encoding:
Differen al Manchester encoding represents data bits based on the
presence or absence of transi ons at the beginning of the bit period,
rather than relying on the absolute signal levels.
It is also known as the Biphase mark code.
In Differen al Manchester Encoding 0 should contain an edge but 1
should not contain any edge it should be con nuous.
E.g. 10101
Downloaded by Hrishikesh Rathod ([Link]@[Link])
lOMoARcPSD|58582620
Computer Networks
DSSS (Direct Sequence Spectrum):
Direct Sequence Spread Spectrum (DSSS) is a modula on technique
used in wireless communica ons to spread a signal across a wider
frequency band. It is employed to improve resistance to interference,
prevent spying and enhance security, and increase the reliability of data
transmission.
Working:
1. Spreading Code: In DSSS, the original data signal is mul plied by a
pseudorandom noise sequence called a spreading code or chipping
sequence. This sequence is much faster than the data signal and has a
broader frequency spectrum.
Downloaded by Hrishikesh Rathod ([Link]@[Link])
lOMoARcPSD|58582620
Computer Networks
2. Signal spread: The result of the mul plica on is a signal whose
bandwidth is much greater than the original data signal. This wider
bandwidth reduces the signal’s suscep bility to interference and noise.
3. Transmission: The spread signal is transmi ed over the airwaves.
Because the signal occupies a wider frequency range, it is less likely to
be affected by narrowband interference or jamming.
4. Recep on and Decoding: At the receiver end, the process is reversed.
The received signal, which includes the spread signal and any noise or
interference, is mul plied by the same spreading code (or a code with
the same proper es) to decode the signal. This process recovers the
original data signal from the spread signal, while any noise or
interference that does not match the spreading code is minimized.
Benefits:
1. Resistance to interference
2. Improved security
3. Mul path resistance
4. Be er Noise performance
Applica ons:
1. Wireless networking
2. Military and secure communica ons
3. Global posi oning Systems (GPS).
Downloaded by Hrishikesh Rathod ([Link]@[Link])