CNS Unit 1

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 106

Unit 1 - Introduction to

Computer Networks
Computer Networks & Security – 2019 pattern
Prof. Nalini Mhetre.
SCOE, Pune

7/15/2021 1
What is Computer Network?
• Computer Network is a group of computers connected with
each other through medium like wires, optical fibres or
optical links so that various devices can interact with each
other through a network.
• The aim of the computer network is the sharing of resources
among various devices.
• There are several types of computer networks that vary from
simple to complex level.
Uses Of Computer Network
• Resource sharing:
• Resource sharing is the sharing of resources such as programs,
printers, and data among the users
• Communication medium:
• Computer network behaves as a communication medium among
the users.
• E-commerce:
• Computer network is also important in businesses. We can do the
business over the internet.
Features of Computer network
• A list of Computer network
features is given below.
• Communication speed
• File sharing
• Back up and Roll back is easy
• Software and Hardware sharing
• Security
• Scalability
• Reliability
Network Architectures
Computer Network Architecture
• Computer Network Architecture is
defined as the physical and logical
design of the software, hardware,
protocols, and media of the
transmission of data.
• The three types of network Network
architectures are used Architectures
• Peer to Peer network
• Client-Server network
Peer to Client
• Hybrid Networks Hybrid
Peer Server
Peer-To-Peer network
• A network in which all the
computers are linked together with
equal privilege and responsibilities
for processing the data.
• Useful for small environments,
usually up to 10 computers.
• No dedicated server.
• Special permissions are assigned to
each computer for sharing the
resources
Peer-To-Peer network
• Advantages of Peer-To-Peer Network:
• It is less costly as it does not contain any dedicated server.
• If one computer stops working, other computers will not stop
working.
• It is easy to set up and maintain as each computer manages itself.
• Disadvantages of Peer-To-Peer Network:
• it does not contain the centralized system . Therefore, it cannot
back up the data as the data is different in different locations.
• It has a security issue as the device is managed by itself.
Client Server Network
• Central controller is known as
a server while other computers
are called clients
• Server performs all major
operations
• Server is responsible for
managing all resources
• All clients communicates with
each other through server
Advantages Of Client/Server network
• A Client/Server network contains the centralized system.
Therefore we can back up the data easily.
• A Client/Server network has a dedicated server that improves
the overall performance of the whole system.
• Security is better in Client/Server network as a single server
administers the shared resources.
• It also increases the speed of the sharing resources.
Disadvantages Of Client/Server network:
• Client/Server network is expensive as it requires the server
with large memory.
• A server has a Network Operating System(NOS) to provide
the resources to the clients, but the cost of NOS is very high.
• It requires a dedicated network administrator to manage all
the resources.
Hybrid Network
• A hybrid, in general , is a composition of two different types
of elements
• A hybrid network architecture is created to get benefits of
both , peer to peer and client server architectures in a network
Type of Networks
Computer Network Types
• Computer networks can be categorized by their size. And are
mainly of four types:

1. PAN (Personal Area Network)


2. LAN (Local Area Network)
3. MAN (Metropolitan Area Network)
Types of
4. WAN (Wide Area Network) Networks
5. Wireless Networks
PAN LAN MAN WAN Wireless
Networks
Personal Area Networks (PAN)
• This kind of network connects computers for solely personal use
with 10m of range. Personal devices like laptops, mobile
phones, and play stations usually use this network
• Two types of PANs

Wireless personal area network. Wired personal area network


Advantages & Disadvantages of PAN
• Wireless networks use WiFi, Bluetooth but have a very low
range. The wired network uses USB.
• Advantages of PAN
• They are most secure and safe
• Has a short-range solution becoming faster
• Strictly restricted to limited space
• It is easy portable.
• Disadvantages of PAN
• Many device connections may lead to bad or poor speed.
• The distance limits the user space of the network
• Devices are not compatible
Local Area Network (LAN)
• A group of computers connected to each other in a small area
such as building, office.
• Used for connecting two or more personal computers through a
communication medium such as twisted pair, coaxial cable, etc.
• It is less costly as it is built with inexpensive hardware such as
hubs, network adapters, and ethernet cables.
• The data is transferred at an extremely faster rate in LAN.
• LAN provides higher security.
Local Area Network (LAN) Cont...
Advantages of LAN
• Resource Sharing
• Software Applications Sharing
• Easy and low-cost communication
• Centralized Data
• Data security
• Internet sharing
Disadvantages of LAN
• High setup cost
• Privacy Violations
• Data security threat
• Maintenance cost high
• Limited area coverage
Metropolitan Area Network
• Covers larger geographic area
• Govt. used MAN to connect
residents and private industries
• Various LANs connected via
cables or fiber optics
• Most widely used protocols RS-
232, Frame Relay, ATM, ISDN,
ADSL
• Higher range up to 50 km
Advantages and Disadvantages - MAN
• Advantages of MAN
• High-speed carriers establish a fast connection.
• Support large networks giving access to WAN.
• The data transmission can be multidirectional.
• Includes selected areas or an entire city.
• Disadvantages of MAN
• The cable requirement is very high due to the larger space.
• The large setting invites more hackers.
Wide Area Network
• This network is spread over a large geographical area such as
states and countries.
• It uses telephone lines, fiber optic, or satellite links to
establish a connection.
• The Internet remains the biggest WAN of all time.
• Government, large businesses, universities, etc uses WAN the
most.
• Mobile broadband, last mile, and private networks of
companies are all examples of WAN.
Characteristics of Wide Area Network
• They have a large
capacity and connect
many computers together.
They are inherently
scalable.
• Sharing of regional
resources is possible for
them.
• Have uplinks connecting
LANs and MANs to the
Internet.
Advantages Of Wide Area Network
• Wide Geographical area
• Centralised data
• Updated files
• Exchange messages
• Sharing of software and resources
• Global Business
• High bandwidth
Disadvantages of Wide Area Network:
• High Setup cost: An installation cost of the WAN network is
high as it involves the purchasing of routers, switches.
• Security issue: A WAN network has more security issues as
compared to LAN and MAN network as all the technologies
are combined together that creates the security problem.
• Needs Firewall & antivirus software: The data is
transferred on the internet which can be changed or hacked
by the hackers, so the firewall needs to be used.
• Troubleshooting problems: It covers a large area so fixing
the problem is difficult.
Wireless Networks
• Computer networks that are not connected by cables are
called wireless networks.
• They generally use radio waves for communication between
the network nodes.
• They allow devices to be connected to the network while
roaming around within the network coverage.
• Examples of wireless networks
• Mobile phone networks
• Wireless sensor networks
• Satellite communication networks
• Terrestrial microwave networks
Wireless Networks
Types of Wireless Networks
• Wireless LANs − Connects two or more network devices
using wireless distribution techniques.
• Wireless MANs − Connects two or more wireless LANs
spreading over a metropolitan area.
• Wireless WANs − Connects large areas comprising LANs,
MANs and personal networks.
Advantages of Wireless Networks
• It provides clutter-free desks due to the absence of wires and
cables.
• It increases the mobility of network devices connected to the
system since the devices need not be connected to each other.
• Accessing network devices from any location within the
network coverage or Wi-Fi hotspot becomes convenient
since laying out cables is not needed.
• Installation and setup of wireless networks are easier.
• New devices can be easily connected to the existing setup
since they needn’t be wired to the present equipment.
• Also, the number of equipment that can be added or removed
to the system can vary considerably since they are not limited
by the cable capacity. This makes wireless networks very
scalable.
• Wireless networks require very limited or no wires. Thus, it
reduces the equipment and setup costs.
Network Software - Protocol
• A protocol is an agreement between the communicating
layers on how the communication is to proceed:
• A formal description of message formats and the rules the two
layers must follow to exchange those messages.
• Protocol definitions range from how bits are placed on a wire to the
format of an e-mail message.
• Standard protocols allow different manufacturers' computers to
communicate.
• These computers can use completely different software/hardware,
provided each computer's software can agree upon the meaning of
the data.
The Protocol Hierarchy
• To reduce design complexity, most networks are organized as a
series or hierarchy of layers.
• Depending on its functionality, a layer may be implemented in
software, hardware or both.
• Layer n on one machine communicates with layer n on another
machine on the network using an agreed upon protocol.
• The entities comprising the corresponding layers on two
communicating machines over the network are called peers.
• In realty, no data is transferred from layer n on any two
machines. Data and control information is passed to the layer
below.
The Protocol Hierarchy cont..
• Additional information including protocol control information
may be appended by each layer to data as it travels from higher
to lower layers in the form of layer headers.
• Below layer 1 is the physical medium where the actual
communication occur over communication channels (copper
wires, optical fibers, wireless channel etc.)
• Between adjacent layers an interface defines which primitive
operations and services the lower layer offers to the upper
layer.
• The set of layers and associated protocols is called a network
architecture.
A Generic Network Hierarchy
• Diagram representing a five-layer
network.
• The diagram shows communication
between Host 1 and Host 2.
• The data stream is passed through a
number of layers from one host to other.
• Virtual communication is represented
using dotted lines between peer layers.
• Physical communication is represented
using solid arrows between adjacent
layers.
An Example of Information Flow In Layer

M = Message H = Header
Network Hierarchy : Advantages
• The layers generally reduce complexity of communication
between networks
• It increases network lifetime.
• It also uses energy efficiently.
• It does not require overall knowledge and understanding of
network.
Design issues for layers
• Reliability
• Security
• Routing
• Scalability
• Error Control
• Addressing
• Flow Control
• Resource Allocation
Network Models
ISO-OSI reference Model
• First step towards international standardization of the
protocol used in the various layers was by Day and
Zimermann, 1983. And the proposed model was called ISO-
OSI Reference Model
• OSI = Open Systems Interconnection: deals with open
systems, i.e. systems open for communications with other
systems.
• Specified in ISO 7498.
• Model has 7 layers.
ISO-OSI reference Model
• The OSI model has seen layers. The principles that were
applied to arrive at the seven layers can briefly be
summarized as follows:
• A layer should be created where a different abstraction is needed.
• Each layer should perform a well-defined function.
• The function of each layer should be chosen with an eye toward
defining internationally standardized protocols.
• The layer boundaries should be chosen to minimize the information
flow across the interfaces.
• The number of layers should be large enough that distinct functions
need not be thrown together in the same layer out of necessity and
small enough that the architecture does not become unwieldy
7-Layer OSI Model
ISO-OSI reference Model -
Interactions
Layer 7: Application Layer
• Level at which applications access network services.
• Represents services that directly support software
applications for file transfers, database access, and electronic
mail etc.
Layer 6: Presentation Layer
• Related to representation of transmitted data
• Translates different data representations from the Application
layer into uniform standard format
• Providing services for secure efficient data transmission
• e.g. data encryption, and data compression.
Layer 5: Session Layer
• Allows two applications on different computers to establish,
use, and end a session.
• e.g. file transfer, remote login
• Establishes dialog control
• Regulates which side transmits, plus when and how long it
transmits.
• Performs token management and synchronization.
Layer 4: Transport Layer
• Manages transmission packets
• Repackages long messages when necessary into small packets for
transmission
• Reassembles packets in correct order to get the original message.
• Handles error recognition and recovery.
• Transport layer at receiving acknowledges packet delivery.
• Resends missing packets
Layer 3: Network Layer
• Manages addressing/routing of data within the subnet
• Addresses messages and translates logical addresses and names
into physical addresses.
• Determines the route from the source to the destination computer
• Manages traffic problems, such as switching, routing, and
controlling the congestion of data packets.
• Routing can be:
• Based on static tables
• determined at start of each session
• Individually determined for each packet, reflecting the current
network load.
Layer 2: Data Link Layer
• Packages raw bits from the Physical layer into frames
(logical, structured packets for data).
• Provides reliable transmission of frames
• It waits for an acknowledgment from the receiving computer.
• Retransmits frames for which acknowledgement not received
Layer 1: Physical Layer
• Transmits bits from one computer to another
• Regulates the transmission of a stream of bits over a physical
medium.
• Defines how the cable is attached to the network adapter and
what transmission technique is used to send data over the
cable. Deals with issues like
• The definition of 0 and 1, e.g. how many volts represents a 1, and
how long a bit lasts?
• Whether the channel is simplex or duplex?
• How many pins a connector has, and what the function of each pin
is?
TCP/IP Model

Application Layer

Transport Layer

Internet Layer

Data Link Layer


Host-to-Network Layer
Physical Layer
Layer 1: Host-to-network Layer
• Lowest layer of the all.
• Protocol is used to connect to the host, so that the packets can
be sent over it.
• Varies from host to host and network to network.
Layer 2: Internet layer
• Selection of a packet switching network which is based on a
connectionless internetwork layer is called a internet layer.
• It is the layer which holds the whole architecture together.
• It helps the packet to travel independently to the destination.
• Order in which packets are received is different from the way
they are sent.
• IP (Internet Protocol) is used in this layer.
• The various functions performed by the Internet Layer are:
• Delivering IP packets
• Performing routing
• Avoiding congestion
Layer 3: Transport Layer
• It decides if data transmission should be on parallel path or
single path.
• Functions such as multiplexing, segmenting or splitting on
the data is done by transport layer.
• The applications can read and write to the transport layer.
• Transport layer adds header information to the data.
• Transport layer breaks the message (data) into small units so
that they are handled more efficiently by the network layer.
• Transport layer also arrange the packets to be sent, in
sequence.
Layer 4: Application Layer
• The TCP/IP specifications described a lot of applications that
were at the top of the protocol stack. Some of them were
TELNET, FTP, SMTP, DNS etc.
• TELNET is a two-way communication protocol which allows
connecting to a remote machine and run applications on it.
• FTP(File Transfer Protocol) is a protocol, that allows File transfer
amongst computer users connected over a network. It is reliable,
simple and efficient.
• SMTP(Simple Mail Transport Protocol) is a protocol, which is used
to transport electronic mail between a source and destination,
directed via a route.
• DNS(Domain Name Server) resolves an IP address into a textual
address for Hosts connected over a network.
Merits and Demerits of TCP/IP Model
• Merits of TCP/IP model
• It operated independently.
• It is scalable.
• Client/server architecture.
• Supports a number of routing protocols.
• Can be used to establish a connection between two computers.
• Demerits of TCP/IP
• In this, the transport layer does not guarantee delivery of packets.
• The model cannot be used in any other application.
• Replacing protocol is not easy.
• It has not clearly separated its services, interfaces and protocols.
OSI and TCP/IP Model
OSI Model TCP/IP Model
• OSI has 7 layers. • TCP/IP has 4 layers.
• OSI is less reliable • TCP/IP is more reliable
• OSI has very strict boundaries • TCP/IP doesn't have very strict
boundaries.
• OSI follows a vertical • TCP/IP follows a horizontal
approach approach.
• OSI uses separate session and • Both session and presentation
presentation layers. layer in the application layer.
• OSI developed model then • TCP/IP developed protocols
protocol. then model.
Network Topologies
Network Topology
• Network Topology is the representation of a network
arrangement, which describes connection of various
nodes(end systems and devices).
• Types of topologies
• Bus Topology
• Star Topology
• Ring Topology
• Mesh Topology
• Tree / hierarchical Topology
• Hybrid Topology
Bus Topology

Hosts / end systems

Shared connection

Line terminator
Star Topology
Ring Topology
Mesh Topology
Tree / hierarchical Topology
Hybrid Topology
Transmission Mediums
Types of Transmission Mediums
• Transmission medium in Computer Networks is the means
through which data is transferred from one device to another.
• Transmission Medium physically connect computers and
other devices on a network
Types of Transmission Mediums

Medium

Wired or Wireless or
Guided Unguided
Media Media

Coaxial Twisted Pair Infrared


Optical Fiber Radio waves Micro waves waves
Cable Cable

Baseband Unshielded Shielded


Broadband
twisted pair twisted pair
Wired & Wireless Media

Wired or Guided Media Wireless or Unguided Media


• Also, referred as • It is also known as
bounded media. Unbounded media.
• Data moves through • Data travels through free
cables of fixed length. space in form of
• For example: Copper electromagnetic signal.
wires, fibre optic wires, • For example: radio
etc. waves, microwaves, etc.
Coaxial Cable
Inner conductor

• Cable made up of
• Inner conductor
• Inner insulator
(dielectric):
Inner insulator
(dielectric)
• Braided shield (metallic):
Outer insulator • Outer insulator
Braided shield (metallic)

Two types:
1. Baseband

2. broadband
Twisted pair cables
- Made of pair of twisted copper wires
Shielded Twisted Pair (STP) Unshielded Twisted Pair (UTP)
• Twisted wire pair • Twisted wire pair.
covered in metal foil. • Eg. CAT 5, CAT 5E, CAT 6
Optical fiber
• Each fiber is made up of
• Core - high quality silica
glass or plastic
• Cladding - high quality silica
glass or plastic, with a lower
refractive index than the core
• Protective outer covering
called buffer.
Radio waves
• Frequencies between 3 KHz and 1 GHz.
• Omnidirectional:
• sending and receiving antennas need not be aligned.
• Low and medium frequency waves can penetrate walls.
• Useful for multicasting.
• For example- AM and FM radio, television.
Micro waves
• Wide band: Waves having frequencies between 1 and 300
GHz .
• Unidirectional.
• sending and receiving antennas need to be aligned
• No inference between antennas.
• Weather conditions impact.
• Very high-frequency microwaves cannot penetrate walls.
• Useful in unicast transmission.
• For example- cellular phones, satellite networks and wireless
LANs.
Infrared waves
• Frequencies from 300 GHz to 400 THz.
• Useful for short-range communication.
• High frequency Infrared waves cannot penetrate walls.
• Prevents interference between systems.
• Used in remote controls.
Network Devices
Network Devices
• Repeater
• Hub
• Bridge
• Switch
• Router
• Brouter
• Gateway
• Access Point
Repeater
• 2 port device
• Connected between links
over the same network
• Regenerates the signal
• Signal can cover longer
Repeater
distance
• Operates at the physical
Host 1 Host 2
layer
• Do not amplify the signal
78
Hub
• Operates at the Physical layer
• Connects multiple devices in a
single LAN: central device
• Broadcasting device
• Single collision domain
• Multiport repeater
• Uplink port
• Types: Active Hub, Passive Hub
79
Bridge
• Operates at data link
layer
• Interconnects two LAN
segments
• 2 port device
• Filters data frames:
• for frame forwarding
decisions

80
Switch
• Operates at data link layer
• Connects multiple devices in
a single LAN: central device
• Multiport device
• Unicasting: point-to-point
device
• Does error checking
• Divides collision domains
81
Router
• Connects LANs and
WANs together
• Network Layer device:
core network device
• Multiple ports
• Routing: IP addresses ,
routing table
• Divides broadcast
domains of hosts
82
Brouter
• Bridging router
• Connects networks with
different protocols
• Features of both bridge and
router
• Work either at data link layer or
at network layer
• As a router: routing
• As a bridge: filter LAN traffic
• Reduce congestion

83
Gateway
• Connect two or more distinct/
dissimilar networks: networking
models not same
• Multiport device
• Messenger agents
• Operate at transport layer and
above
• Protocol converters: handles
Gateway different protocols and standards
from different vendors
• Do all of the functions of routers
84
Access Point
• Connect Wi-Fi devices to
a wired network
• works at the Data Link
layer
• Operate either as bridge
or router.
• Multiple ports
• SSID required for
connection
85
Encoding Techniques
• Digital data, digital signal :: line coding
• Analog data, digital signal
• Digital data, analog signal
• Analog data, analog signal
Line coding schemes
• Digital data converted to digital signal by Line coding.

• Manchester and Differential Manchester encoding


• Frequency hoping spread spectrum (FHSS)
• Direct Sequence spread spectrum (DSSS)
Encoding and Decoding
• Encoding: process of converting a sequence of characters
into another specialized format for efficient data
transmission.

• Decoding: converts an encoded format back into the original


sequence of characters.

• Data Encoding: the process of using various forms of


voltage or current levels to represent 1s and 0s of the digital
signals on the transmission link.
• Unipolar – NRZ
• Polar
• NRZ-L, NRZ-I
• Manchester encoding
• Differential Manchester encoding
Unipolar NRZ (Non-return to Zero )

1 – high
0 - low
NRZ-L
• Two different voltages for 0 and
1 bits
• More often, negative voltage for
one value and positive for the
other
• Voltage constant during same bit
interval
• no transition i.e. no return to
zero voltage
• This is NRZ-L
NRZ-I
• Nonreturn to zero inverted on ones
• Constant voltage pulse for duration
of bit
• Data encoded as presence or absence
of signal transition at beginning of
bit time
• Transition (low to high or high to
low) denotes a binary 1
• No transition denotes binary 0
• An example of differential encoding
NRZ-L and NRZ-I example2
Manchester & Differential Manchester
• Manchester
• Transition in middle of each bit period
• Transition serves as clock and data
• Low to high represents one
• High to low represents zero
• Used by IEEE 802.3
• Differential Manchester
• Midbit transition is clocking only
• Transition at start of a bit period represents zero
• No transition at start of a bit period represents one
• Note: this is a differential encoding scheme
• Used by IEEE 802.5
Spread Spectrum (SS)
• IEEE 802.11
• Wireless LAN standard
• Spread spectrum (SS)
• Spread data over wide bandwidth
• Frequency Hopping (FHSS)
• Signal broadcast over seemingly random series of frequencies
• Direct Sequence (DSSS)
• Each bit is represented by multiple bits in transmitted signal using
Chipping code

98
IEEE 802.11
• Standard for specifications of Wireless Local Area Networks
(WLANs).
• This standard defines interface :
• between wireless client and base station
• between two wireless clients.
• Specifies the set of media access control (MAC) protocols
and physical layer (PHY) protocols for implementing
WLAN.
• The 802.11 (PHY) :
• FHSS: Frequency hopping spread spectrum
• DSSS: Direct Sequence spread spectrum

99
Advantages:
• Greater bandwidth
Spread Spectrum (SS) • Noise reduction
• Resistance to jamming and interception.

• For transmitting signals in wireless communications.


• The frequency of the transmitted signal is deliberately varied.
• Process of spreading the transmitted signal to occupy the
frequency spectrum available for transmission.

100
FHSS
• Frequency hopping: The senders are made to change their
frequencies, from one to another in a specified time interval.

• FHSS is a method of transmitting radio signals by shifting


carriers across numerous channels with pseudorandom
sequence which is already known to the sender and receiver.

• The transmitted signal spreads across multiple channels.

101
FHSS example

Hop sequence1:
f5, f8, f3, f7, f1, f4, f6, f2

Try yourself:
Hop sequence2:
f5, f8, f3, f6, f1, f7, f4, f2

Frequency hopping example from


William Stallings "Data and Computer Communications".
102
FHSS Transmitter

Block diagram of FHSS transmitter, from William Stallings "Data and Computer Communications". 103
FHSS Receiver

Block diagram of FHSS transmitter, from William Stallings "Data and Computer Communications". 104
DSSS
• Used in wireless local area network transmissions.
• Each bit of sender’s data is represented by multiple bits using
chipping code / spreading code.
• Spreading code spreads signal across wider frequency band
• In proportion to number of bits used
• N bit spreading code spreads signal across N times bandwidth of 1
bit code
• The receiver uses the same code to retrieve the original
message.
• Performance similar to FHSS

105
DSSS Transmitter

Block diagram of FHSS transmitter, from William Stallings "Data and Computer Communications". 106
DSSS Receiver

Block diagram of FHSS transmitter, from William Stallings "Data and Computer Communications". 107
FHSS DSSS
Multiple frequencies are used Single frequency is used

Frequency reuse is allowed Frequency reuse is not allowed

Hard to find the sender’s frequency at Once allotted, sender frequency is


any instant of time always the same
if the spectrum is busy, Sender has to
Sender need not wait
wait
Stronger and penetrates through the
It is weaker compared to FHSS
obstacles
Resistance against interference It may be affected by interference

It is cheaper It is expensive
This is the commonly used technique Not frequently used
108

You might also like