CN Module 1 Notes(21CS52)
CN Module 1 Notes(21CS52)
-+
MODULE 1
CHAPTER 1 - INTRODUCTION TO
COMPUTER NETWORKS
NETWORK
• Computer network is a collection of autonomous computers
interconnected by a single technology.
• Two computers are said to be interconnected if they are able to
exchange information.
• The connection need not be via a copper wire; fiber optics,
microwaves, infrared, and communication satellites can also be
used.
• Networks come in many sizes, shapes and forms.
• The Internet is not a single network but a network of networks and
the Web is a distributed system that runs on top of the Internet.
Mr. Sunil J, Dept. of CSE, CIT Gubbi 1
1 2
COMPUTER NETWORKS (21CS52) Module-1
• e-mail
• Video conferencing
• e-commerce (electronic commerce)
2. Home Applications
Access to remote information
Person-to-person communication
Interactive entertainment (Online Games)
Electronic commerce
Mr. Sunil J, Dept. of CSE, CIT Gubbi 1
2
COMPUTER NETWORKS (21CS52) Module-1
3. Mobile Users
Mobile computers, such as notebook computers and personal
digital assistants (PDAs)
wireless networks
mobile computing
4. Social Issues
new social, ethical, and political problems.
anonymous (unknown) messages.
Data Flow
• Communication between two devices can be simplex, half-duplex,
and full-duplex.
Simplex
Communication is unidirectional.
Only one of the two devices on a link can transmit; the other
can only receive.
Eg : Keyboards and traditional monitors.
The simplex mode can use the entire capacity of the
channel to send data in one direction.
Half-Duplex
Each station can both transmit and receive, but not at the
sametime.
When one device is sending, the other can only receive, and
viceversa.
Eg: Walkie-talkies and CB (citizens band) radios.
Full-Duplex
Both stations can transmit and receive simultaneously.
Signals going in one direction share the capacity of the link.
NETWORK HARDWARE
Two criterion for classifying networks are
1. Transmission technology
Prepared By Mr. EBIN PM, Chandigarh University, Punjab EDULINE9
2. Scale
There are two types of transmission technology
A. Broadcast links
• Broadcast networks have a single communication channel that is
shared by all the machines on the network.
• Short messages, called packets, sent by any machine are received
by all the others.
10
• MESH TOPOLOGY - every device has a dedicated point-to-point link to every other
device. The term dedicated means that the link carries traffic only between the two
• To findit the
devices number of physical links in a fully connected mesh
connects.
network with n nodes
• n(n -1) /2
ADVANTAGE
• Eliminating the traffic problems - the use of dedicated links
guarantees that each connection can carry its own data load
• Mesh topology is robust - If one link becomes unusable, it does
not incapacitate the entire system
• Privacy or security - When every message travels along a dedicated
line, only the intended recipient sees it.
DISADVANTAGE
• The main disadvantages of a mesh are related to the amount of
cabling and the number of I/O ports required
EXAMPLE - connection of telephone regional offices
ADVANTAGE
ADVANTAGE
• Ease of installation.
• Bus uses less cabling than mesh or star topologies
DISADVANTAGE
• Difficult reconnection and fault isolation.
• Difficult to add new devices.
• A fault or break in the bus cable stops all transmission.
• Eg : Ethernet LANs can use a bus topology.
• RING TOPOLOGY - each device has a dedicated point-to-point
connection with only the two devices on either side of it.
• A signal is passed along the ring in one direction, from device to
device, until it reaches its destination. Each device in the ring
incorporates a repeater. Repeater regenerates the bits and passes
them.
ADVANTAGE
• Easy to install and reconfigure
• To add or delete a device requires changing only two connections
DISADVANTAGE
• Unidirectional traffic
• A break in the ring can disable the entire network
NETWORK SOFTWARE
Protocol Hierarchies:
• To reduce the design complexity, most networks are organized as a
stack of layers or levels, each one built upon the one below it.
• The number of layers, the name of each layer, the contents of each
layer, and the function of each layer differ from network to
network.
• The purpose of each layer is to offer certain services to the higher
layers, shielding those layers from the details of how the offered
services are actually implemented.
• Each layer is a kind of virtual machine, offering certain services to
the layer above it.
25
• Layer 2 adds not only a header to each piece, but also a trailer, and
gives the resulting unit to layer 1 for physical transmission.
• At the receiving machine the message moves upward, from layer to
layer, with headers being stripped off as it progresses.
Connection-Oriented Service
• To use a connection-oriented network service, the service user first
establishes a connection, uses the connection, and then releases the
connection (Eg: telephone system)
• In most cases the order is preserved so that the bits arrive in the
order they were sent.
• The source first makes a connection with the destination before
sending a packet. When the connection is established, a sequence of
packets from the same source to the same destination can be sent
one after another.
• In this case, there is a relationship between packets. They are sent on
the same path in sequential order.
Protocols
• A protocol is a set of rules that govern data communications. A
protocol defines what is communicated, how it is communicated, and
when it is communicated. The key elements of a protocol are syntax,
semantics, and timing.
Syntax - The term syntax refers to the structure or format of the
data, meaning the order in which they are presented
Semantics - The word semantics refers to the meaning of each
section of bits
Timing - The term timing refers to two characteristics: when data
should be sent and how fast they can be sent
The arrival of the request packet at the server machine unblocks the server so it can
handle the request
After it has done the work, the server uses SEND to return the answer to the client
The arrival of this packet unblocks the client, which can now inspect the answer. If the
client has additional requests, it can proceed immediately.
When the client is done, it executes DISCONNECT to terminate the connection. Usually, a
DISCONNECT is a blocking call, suspending the client and sending a packet to the server
saying that the connection is no longer needed.
When the server gets the client disconnect packet, it also issues a server
DISCONNECT of its own, acknowledging the client and releasing the
connection
When the server’s packet gets back to the client machine, the client process
is released and the connection is broken
In a nutshell, this is how connection-oriented communication works:
PHYSICAL LAYER
• The physical layer is concerned with transmitting raw bits over a
communication channel
• The physical layer is responsible for movements of individual bits from
one hop (node) to the next.
Other Responsibilities :
1. Physical characteristics of interfaces and medium – defines the
characteristics of the interface between the devices and the
transmission medium. It also defines the type of transmission
medium.
3. Flow control - If the rate at which the data are absorbed by the
receiver is less than the rate at which data are produced in the
sender, the data link layer imposes a flow control mechanism to
avoid overwhelming the receiver.
4. Error control - The data link layer adds reliability to the physical
layer by adding mechanisms to detect and retransmit damaged or
lost frames. It also uses a mechanism to recognize duplicate
frames. Error control is normally achieved through a trailer added
to the end of the frame
5. Access control - When two or more devices are connected to the
same link, data link layer protocols are necessary to determine
which device has control over the link at any given time.
NETWORK LAYER
• The network layer is responsible for the delivery of individual
packets from the source host to the destination host
• If two systems are connected to the same link, there is usually no
need for a network layer.
• If the two systems are attached to different networks (links) with
connecting devices between the networks (links), there is often a
need for the network layer to accomplish source-to-destination
delivery
Other Responsibilities :
TRANSPORT LAYER
• The transport layer is responsible for process-to-process delivery of
the entire message
• The transport layer is responsible for the delivery of a message from
one process to another. A process is an application program
running on a host.
Other responsibilities
1. Service-point addressing - delivery of message not only from one
computer to the next but also from a specific process (running
program) on one computer to a specific process (running
program) on the other. The transport layer header must therefore
include a type of address called a service-point address (or port
address).
• The network layer gets each packet to the correct computer; the
transport
The network
layerlayer
getsgets
the each packet
entire to thetocorrect
message computer;
the correct the on
process
transport layer gets the entire message to the correct process on
that computer.
that
2. computer.
Segmentation and reassembly - A message is divided into
2. Segmentation
transmittableand reassembly
segments, - Aeach
with message is divided
segment into a sequence
containing
transmittable
number.segments, with each
These numbers segment
enable containing
the transport a to
layer
sequence number. These numbers enable the transport layer to
reassemble the message correctly upon arriving at the
reassemble the message correctly upon arriving at the
destination.
destination.
3. 3. Connection
Connection control
control - The-transport
The transport
layer can be layer
eithercan be either
connectionless
connectionless or connection
or connection oriented.
oriented.
4. Flow
4. Flow control
control - The- The transport
transport layerlayer is responsible
is responsible for flowforcontrol.
flow control.
However,
However, flow control
flow control at thisat thisislayer
layer is performed
performed end to end
end to end rather
rather
than across a single link
than across a single link
5. Error control - Like the data link layer, the transport layer is
responsible for error control. However, error control at this layer is
performed process-to process rather than across a single link.
• The sending transport layer makes sure that the entire message arrives
at the receiving transport layer without error (damage, loss, or
duplication).
• Error correction is usually achieved through retransmission.
SESSION LAYER
• The session layer is responsible for dialog control and
synchronization.
Specific responsibilities :
1. Dialog control - The session layer allows two systems to enter into
a dialog. It allows the communication between two processes to
take place in either half duplex (one way at a time) or full-duplex
(two ways at a time) mode.
2. Synchronization - The session layer allows a process to add
checkpoints, or synchronization points, to a stream of data
PRESENTATION LAYER
• The presentation layer is concerned with the syntax and semantics
of the information exchanged between two systems
Specific responsibilities :
1. Translation - Because different computers use different encoding
systems, the presentation layer is responsible for interoperability
between these different encoding methods. The presentation
layer at the sender changes the information from its sender-
dependent format into a common format. The presentation layer
at the receiving machine changes the common format into its
receiver-dependent format
APPLICATION LAYER
• The application layer is responsible for providing services to the
user.
• It provides user interfaces and support for services such as
electronic mail, remote file access and transfer, shared database
management, and other types of distributed information services
Other Responsibilities:
1. Network Virtual Terminal (NVT) - A network virtual terminal is a
software version of a physical terminal, and it allows a user to log
on to a remote host. The remote host believes it is
communicating with one of its own terminals and allows the user
to log on.
54
Host-to-network
At the physical and data link layers, TCP/IP does not define any
specific protocol. It supports all the standard and proprietary
protocols. A network in a TCP/IP internetwork can be a local-area
network or a wide-area network.
Internet Layer
TCP/IP supports the Internetworking Protocol.
IP uses four supporting protocols:
• ARP
• RARP
• ICMP
• IGMP
Transport Layer
• Transport layer was represented in TCP/IP by two protocols: TCP
and UDP.
• IP is a host-to-host protocol, meaning that it can deliver a packet
from one physical device to another.
• UDP and TCP are transport level protocols responsible for delivery
of a message from a process (running program) to another process.
• A new transport layer protocol, SCTP, has been devised to meet the
needs of some newer applications.
Application Layer
• The application layer in TCP/IP is equivalent to the combined
session, presentation, and application layers in the OSI model.
• Many protocols are defined at this layer – FTP, DNS, TELNET, SMTP
etc.
30
Mr. Sunil J, Dept. of CSE, CIT Gubbi
COMPUTER NETWORKS (21CS52) Module-1
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.
70
NETWORK PERFORMANCE
1. Bandwidth
• Bandwidth is the data carrying capacity of the
Network/transmission medium. Bandwidth is usually measured in
bits transferred per second (bps) through a path or link.
bandwidth in hertz
• It is the range of frequencies in a composite signal or the range of
frequencies that a channel can pass.
bandwidth in bits per second
• It is the speed of bit transmission in a channel or link.
2. Throughput
• The throughput is a measure of how fast we can actually send data
through a network.
• Practical measure of the amount of data actually transmitted
through a channel.
• It depends on the latency.
3. Latency (Delay)
• The latency or delay defines how long it takes for an entire
message to completely arrive at the destination from the time the
first bit is sent out from the source.
• Latency = propagation time + transmission time + queuing time +
processing delay.
Propagation Time
• Propagation time measures the time required for a bit to travel
from the source to the destination.
Propagation time = Distance/Propagation speed
Transmission Time
• There is a time between the first bit leaving the sender and the last
bit arriving at the receiver.
Transmission time =Message size /Bandwidth
Queuing Time
• The time needed for each intermediate or end device to hold the
message before it can be processed.
TRANSMISSION MEDIA
• A transmission medium can be broadly defined as anything that
can carry information from a source to a destination
97
Twisted-Pair Cable
• A twisted pair consists of two conductors (normally copper), each with
its own plastic insulation, twisted together.
• One of the wires is used to carry signals to the receiver, and the other is
used only as a ground reference. The receiver uses the difference
between the two.
• Noise and crosstalk may affect both wires and create unwanted signals.
• In one twist, one wire is closer to the noise source and the other is
farther; in the next twist, the reverse is true.
• Twisting makes it probable that both wires are equally affected by
external influences (noise or crosstalk).
• The most common UTP connector is RJ45 (RJ stands for registered
jack)
• Twisted-pair cables are used in telephone lines to provide voice
and data channels. Local-area networks also use twisted-pair
cables.
Coaxial Cable
• Coaxial cable (or coax) carries signals of higher frequency ranges
than those in twisted pair cable.
• Instead of having two wires, coax has a central core conductor of
solid or stranded wire (usually copper) enclosed in an insulating
sheath, which is, in turn, encased in an outer conductor of metal
foil, braid, or a combination of the two.
• The outer metallic wrapping serves both as a shield against noise
and as the second conductor, which completes the circuit.
• This outer conductor is also enclosed in an insulating sheath, and
the whole cable is protected by a plastic cover.
Fiber-Optic Cable
• A fiber-optic cable is made of glass or plastic and transmits signals
in the form of light.
• Optical fibers use reflection to guide light through a channel. A
glass or plastic core is surrounded by a cladding of less dense glass
or plastic
• Current technology supports two modes (multimode and single
mode) for propagating light along optical channels, each requiring
fiber with different physical characteristics.
• Multimode can be implemented in two forms: step-index or
graded-index.
Light weight.
Greater immunity to tapping.
Disadvantages:
Installation and maintenance
Unidirectional light propagation
Cost.
Ground propagation:
• Radio waves travel through the lowest portion of the atmosphere,
hugging the earth.
• These low-frequency signals emanate in all directions from the
transmitting antenna and follow the curvature of the planet.
• Distance depends on the amount of power in the signal: The
greater the power, the greater the distance
Sky propagation:
• Higher-frequency radio waves radiate upward into the ionosphere
(the layer of atmosphere where particles exist as ions) where they
are reflected back to earth.
Line-of-sight propagation:
• Very high-frequency signals are transmitted in straight lines directly
from antenna to antenna.
• Antennas must be directional, facing each other and either tall
enough or close enough together not to be affected by the
curvature of the earth.
• Line-of-sight propagation is tricky because radio transmissions
cannot be completely focused.
Wireless Transmission Waves
Radio Waves
• Electromagnetic waves ranging in frequencies between 3 kHz and 1
GHz are normally called radio waves.
• Radio waves are omnidirectional and use omnidirectional
antennas.
• When an antenna transmits radio waves, they are propagated in all
directions. This means that the sending and receiving antennas do
not have to be aligned.
• A sending antenna sends waves that can be received by any
receiving antenna.
• Radio waves that propagate in the sky mode can travel long
distances. This makes radio waves a good candidate for long-
distance broadcasting such as AM radio.
Microwaves
• Electromagnetic waves having frequencies between 1 and 300 GHz
are called microwaves.
• Microwaves are unidirectional.
• The sending and receiving antennas need to be aligned.
Characteristics of microwave propagation:
• Microwave propagation is line-of-sight
• Very high-frequency microwaves cannot penetrate walls
• The microwave band is relatively wide, almost 299 GHz
• Use of certain portions of the band requires permission from
authorities
Infrared
• Infrared waves, with frequencies from 300 GHz to 400 THz
(wavelengths from 1 mm to 770 nm), can be used for short-range
communication.
• Infrared waves, having high frequencies, cannot penetrate walls.
• Infrared signals useless for long-range communication.
• We cannot use infrared waves outside a building because the sun's
rays contain infrared waves that can interfere with the
communication
• The Infrared Data Association (IrDA) has established standards for
using these signals for communication between devices such as
keyboards, mice, PCs, and printers.
RJ 45 Connector
RJ 45 Connector network
network interface
interface cardcard (NIC)
(NIC)
Router
Router
2. Hub
• A hub is basically a multiport repeater.
• A hub connects multiple wires coming from different branches, for
example, the connector in star topology which connects different
stations.
• Hubs cannot filter data, so data packets are sent to all connected
devices.
• Transmission mode is half duplex.
• Also, they do not have the intelligence to find out the best path for
data packets which leads to inefficiencies and wastage.
Types of Hub:
Active Hub
• These are the hubs that have their own power supply and can
clean, boost, and relay the signal along with the network.
• Active hubs amplify and regenerate the incoming electrical signals
before broadcasting them
• Passive Hub
• These are the hubs that collect wiring from nodes and power
supply from the active hub.
• Can’t be used to extend the distance between nodes.
Intelligent Hub
• It works like active hubs and includes remote management
capabilities.
• They also provide flexible data rates to network devices.
• It also enables an administrator to monitor the traffic passing
through the hub and to configure each port in the hub.
**********************
Mr. Sunil J, Dept. of CSE, CIT Gubbi
61