Mod 1
Mod 1
School of Engineering
Devarakaggalahalli, Harohalli Kanakapura Road, Dt, Ramanagara, Karnataka 562112
COMPUTER NETWORKS
SEMESTER – V & III Semester
Course Code: 22AMXXXX /
23AMXXXX
Dr. G. Naveen Babu, Associate Dean- SOE, DSU.
Dr. Hanumanth Sastry Sistla Professor, Department of CSE(AI&ML), SoE, DSU.
Dr. Mude Nagarjuna Naik, Assistant Professor, Dept. of CS&E (AIML) SoE, DSU.
Dr. Sumith Kumar Yadav, Assistant Professor, Dept. of CS&E (AIML) SoE, DSU.
Prof. Pradeep Kumar K, Assistant Professor, Dept. of CS&E (AIML) SoE, DSU.
Prof. Pavithra A, Assistant Professor, Dept. of CS&E (AIML) SoE, DSU.
Syllabus
UNIT – I 08 Hours
INTRODUCTION:
Networks, network types, internet history, standards and administration (TB1-
Ch1); Network models: Protocol layering, TCP/IP protocol suite, the OSI model
(TB1-Ch2); Transmission media: Introduction, guided media, unguided media
(TB1-Ch7); Switching: Introduction, circuit-switched networks, packet
switching (TB1-Ch8).
28/02/2025 2
Network is the interconnection of a set of devices
Networks capable of communication.
28/02/2025 3
Five components of data communication
Message: The message is the information (data) to be communicated. Popular forms of information include text, numbers, pictures, audio, and
video.
Sender: The sender is the device that sends the data message. It can be a computer, workstation, telephone handset, video camera, and so on.
Receiver: The receiver is the device that receives the message. It can be a computer,
workstation, telephone handset, television, and so on.
Transmission medium: The transmission medium is the physical path by which a message travels from sender to receiver. Some examples of
transmission media include twisted-pair wire, coaxial cable, fiber-optic cable, and radio waves.
Protocol: A protocol is a set of rules that govern data communications. It represents an agreement between the communicating devices.
28/02/2025 4
Network Criteria
Reliability Security
Performance
Failure rate of Data protection
Depends on
network against
Network
components corruption/loss of
Elements
Measured in data due to:
Measured in
terms of Errors
terms of Delay
availability/robust
and Throughput Malicious users
ness
28/02/2025 5
Physical Structures
1. Type of Connection:
A network is two or more devices connected through links. A link is a communications pathway
that transfers data from one device to another.
28/02/2025 6
• Connection provides a dedicated link between two
Point-to-
Text devices. The entire capacity of the link is reserved for
transmission between those two devices.
• When we change television channels by infrared
Multipoint
• In a multipoint environment, the capacity of the
channel is shared, either spatially or temporally. If
several devices can use the link simultaneously, it is
a spatially shared connection. If users must take
turns, it is a timeshared connection.
28/02/2025 7
Physical Topology
The term physical topology refers to the way in which a network is laid out physically.
Two or more devices connect to a link; two or more links form a topology. The topology of a
network is the geometric representation of the relationship of all the links and linking
devices (usually called nodes) to one another.
There are four basic topologies possible: Bus, Ring, Star, Mesh.
28/02/2025 8
Assignment Question?
"Compare and contrast star, mesh, and ring network topologies in terms of reliability,
scalability, and cost. Which topology would you recommend for a large-scale enterprise, and
why?"
Evaluate Level:
28/02/2025 9
Star Network Topology
Reliability: A failure in the central hub can bring down the whole network, making it less reliable if the hub is not highly
robust.
Scalability: Adding new nodes is straightforward. You just connect them to the central hub. However, the hub’s capacity
can be a limiting factor.
Cost: Generally higher due to the central hub and the cabling required to connect each node to the hub. The hub itself
can be expensive, especially if it has to be highly reliable.
Mesh Network Topology
Reliability: Highly reliable since each node is connected to every other node. A failure of one node or connection
doesn’t typically bring down the whole network.
Scalability: Can become complex and expensive as the number of nodes increases. Each node requires multiple
connections.
Cost: Higher due to the amount of cabling and hardware required to interconnect every node.
Ring Network Topology
Reliability: If one node fails, the entire network can go down unless there are mechanisms to bypass the failed node.
Scalability: Adding new nodes requires modifications to the network, which can be cumbersome.
Cost: Typically lower than a mesh network, but higher than a star network due to the need for specialized equipment to
handle the ring configuration.
For a large-scale enterprise, I’d recommend a hybrid topology, often a combination of star and mesh topologies, to
balance reliability, scalability, and cost. Pure mesh might offer the highest reliability but could be prohibitively expensive
and complex. A star-mesh hybrid offers a compromise, where critical nodes are connected in a mesh to ensure
reliability, and other nodes are connected in a star formation to manage costs and scalability.
28/02/2025 10
NETWORK TYPES BASED ON GEOGRAPHICAL SCALE
28/02/2025 11
Assignment Question?
Analyze the differences between Local Area Networks (LAN),
Metropolitan Area Networks (MAN), and Wide Area Networks (WAN) in
terms of their geographical scope, typical use cases, and bandwidth
requirements. How do these differences impact the choice of network
type for a growing business? (include necessary diagrams)
Analyze
Level
28/02/2025 12
Network models
Two models have been devised to define computer
network operations:
1.The TCP/IP protocol suite
2.The OSI model.
28/02/2025 13
PROTOCOL LAYERING
Protocol: A network protocol is a set of established rules that specify how to format, send
and receive data so that computer network endpoints, including computers, servers,
routers and virtual machines, can communicate despite differences in their underlying
infrastructures, designs or standards.
When communication is simple, we may need only one simple protocol; when the
communication is complex, we may need to divide the task between different layers, in
which case we need a protocol at each layer, or protocol layering.
28/02/2025 14
Scenarios
Lets discuss two simple scenarios to better understand the need for
protocol layering
First Scenario In the first scenario, communication is so simple that it can occur in only
one layer. Assume Maria and Ann are neighbors with a lot of common ideas.
Communication between Maria and Ann takes place in one layer, face to face, in the
same language.
Asking students what all way can maria and ann communicate..?
28/02/2025 15
Second Scenario
Ann is offered a higher-level position in her company, but needs to move to another branch
located in a city very far from Maria. The two friends still want to continue their
communication and exchange ideas because they have come up with an innovative project
to start a new business when they both retire. They decide to continue their conversation
using regular mail through the post office. However, they do not want their ideas to be
revealed by other people if the letters are intercepted. They agree on an
encryption/decryption technique. The sender of the letter encrypts it to make it unreadable
by an intruder; the receiver of the letter decrypts it to get the original letter. We can say
that the communication between Maria and Ann takes place in three layers, as shown in
Figure.
28/02/2025 16
Asking students what all way can maria and ann
communicate..?
28/02/2025 17
Principles of Protocol Layering
First Principle: The first principle dictates that if we want bidirectional
communication, we need to make each layer so that it is able to perform two
opposite tasks, one in each direction.
For example, the third layer task is to listen (in one direction) and talk (in the
other direction). The second layer needs to be able to encrypt and decrypt. The
first layer needs to send and receive mail.
Second Principle: The second principle that we need to follow in protocol layering
is that the two objects under each layer at both sites should be identical. For
example, the object under layer 3 at both sites should be a plaintext letter. The
object under layer 2 at both sites should be a ciphertext letter. The object under
layer 1 at both sites should be a piece of mail.
28/02/2025 18
Logical Connections
28/02/2025 19
TCP/IP PROTOCOL SUITE
With the concept of protocol layering and the logical
communication between layers in our second scenario, we can
introduce the TCP/IP (Transmission Control Protocol/Internet
Protocol).
TCP/IP is a protocol suite (a set of protocols organized in different
layers) used in the Internet today.
It is a hierarchical protocol made up of interactive modules, each
of which provides a specific functionality.
The term hierarchical means that each upper level protocol is
supported by the services provided by one or more lower level
protocols.
28/02/2025 20
Communication through an internet
28/02/2025 21
Assume that computer A communicates with computer B. As the figure shows.
we have five communicating devices in this communication:
Source host (computer A),
The link-layer switch in link 1,
The router,
The link-layer switch in link 2, and
The destination host (computer B).
Each device is involved with a set of layers depending on the role of the device in the
internet. The two hosts are involved in all five layers; the source host needs to create a
message in the application layer and send it down the layers so that it is physically sent to
the destination host. The destination host needs to receive the communication at the
physical layer and then deliver it through the other layers to the application layer.
28/02/2025 22
The router is involved in only three layers; there is no transport or application
layer in a router as long as the router is used only for routing.
Although a router is always involved in one network layer, it is involved in n
combinations of link and physical layers in which n is the number of links the
router is connected to.
The reason is that each link may use its own data-link or physical protocol.
For example, in the above figure, the router is involved in three links, but the
message sent from source A to destination B is involved in two links. Each link
may be using different link-layer and physical-layer protocols; the router needs
to receive a packet from link 1 based on one pair of protocols and deliver it to
link 2 based on another pair of protocols.
A link-layer switch in a link, however, is involved only in two layers, data-link
and physical. Although each switch in the above figure has two different
connections, the connections are in the same link, which uses only one set of
protocols.
This means that, unlike a router, a link-layer switch is involved only in one data-
link and one physical layer.
28/02/2025 23
Layers in the TCP/IP Protocol Suite
28/02/2025 24
Identical objects in protocol suite
28/02/2025 25
Description of Each Layer
Physical Layer: Manages the physical transmission of data over a medium.
Data Link Layer: Ensures reliable transmission of data frames between
nodes.
Network Layer: Handles logical addressing and routing of data packets.
Transport Layer: Manages end-to-end data transfer and reliability.
Session Layer: Controls sessions and dialogs between applications.
Presentation Layer: Translates, encrypts, and compresses data.
Application Layer: Provides network services to end-user applications.
28/02/2025 26
1. Physical Layer
•Description:
• The Physical Layer is responsible for the physical connection between
devices. It deals with the transmission and reception of raw bitstreams
over a physical medium (e.g., cables, radio frequencies).
• This layer defines the hardware equipment, cabling, wiring, frequencies,
pulses, and electrical specifications.
•Functions:
• Bit Transmission: Transmits raw bits (0s and 1s) over a physical
medium.
• Physical Topology: Defines the physical layout of the network devices
and media.
• Data Rate Control: Determines the rate of data transmission.
• Physical Interface: Manages the interface between the device and
the transmission medium.
28/02/2025 27
2. Data Link Layer
•Description:
• The Data Link Layer is responsible for node-to-node data transfer and
error detection and correction. It ensures that data frames are
transmitted without errors and in the correct sequence.
• This layer is divided into two sublayers: the Logical Link Control
(LLC) and the Media Access Control (MAC). The LLC manages
communication between the upper layers and the MAC sublayer, while
the MAC handles access to the physical medium.
•Functions:
• Framing: Encapsulates network layer data into frames.
• Error Detection and Correction: Detects and corrects errors that
may occur in the physical layer.
• Flow Control: Ensures that the sender does not overwhelm the
receiver with too much data.
• MAC Addressing: Uses physical addresses (MAC addresses) to
identify devices on the same network.
28/02/2025 28
3. Network Layer
•Description:
• The Network Layer is responsible for the delivery of packets between
devices across different networks. It manages logical addressing, routing,
and packet forwarding.
• This layer determines the best path for data to travel from the source to
the destination across multiple networks.
•Functions:
• Logical Addressing: Assigns IP addresses to devices for identification
across networks.
• Routing: Determines the most efficient path for data packets.
• Packet Forwarding: Moves packets through routers to their final
destination.
• Fragmentation and Reassembly: Breaks down packets if they are too
large to be sent across the network and reassembles them at the
destination.
28/02/2025 29
4. Transport Layer
•Description:
• The Transport Layer is responsible for reliable data transfer between
devices. It manages segmentation, flow control, error detection and
correction, and reassembly of data.
• It also provides end-to-end communication services for applications.
•Functions:
• Segmentation and Reassembly: Divides large messages into smaller
segments and reassembles them at the destination.
• Flow Control: Ensures that the data flow rate is compatible between the
sender and receiver.
• Error Detection and Correction: Identifies errors and retransmits
damaged segments.
• Connection Establishment and Termination: Manages the opening
and closing of connections between devices.
28/02/2025 30
5. Session Layer
•Description:
• The Session Layer manages sessions between applications. It establishes,
maintains, and terminates connections, ensuring that data is
synchronized and properly organized.
• This layer handles dialog control and synchronization between systems.
•Functions:
• Session Management: Establishes, maintains, and terminates sessions
between applications.
• Dialog Control: Manages two-way communication (half-duplex or full-
duplex) between devices.
• Synchronization: Inserts checkpoints in data streams to ensure that
data is properly synchronized and can be resumed from a certain point if
interrupted.
28/02/2025 31
6. Presentation Layer
•Description:
• The Presentation Layer is responsible for data translation, encryption, and
compression. It ensures that data is in a readable format for the application
layer and manages data encryption and decryption for secure
communication.
• It acts as a translator between the application layer and the network,
ensuring that data is presented in a format the receiving application can
understand.
•Functions:
• Data Translation: Converts data between different formats (e.g., from
ASCII to EBCDIC).
• Data Encryption: Ensures data security through encryption and
decryption.
• Data Compression: Reduces the size of data to save bandwidth and
storage space.
28/02/2025 32
7. Application Layer
•Description:
• The Application Layer is the topmost layer of the OSI model. It provides
network services directly to end-user applications. This layer is where
the interaction between the user and the network occurs.
• It supports protocols that enable activities such as file transfers, email,
remote login, and network management.
•Functions:
• Network Services: Provides services like file transfer, email, and
remote login to end-user applications.
• Data Representation: Ensures that data sent from the application
layer of one system is readable by the application layer of another.
• Protocol Support: Supports a wide range of protocols, such as HTTP,
FTP, SMTP, DNS, and more.
28/02/2025 33
Breakdown of each layer in the TCP/IP model
1.Application layer. The application layer is where data originates on the sender’s
side. Applications are used to create the data. A web browser, for example, is used to
generate the data that gets sent through the rest of the layers, assisted by the Domain
Name System (DNS), which associates web domain names with their Internet
Protocol (IP) addresses.
2.Transport layer. In the transport layer, the data gets encoded so it can be
transported through the internet using either the User Datagram Protocol (UDP) or
TCP.
3.Network access layer. In the network access layer, the data gets a header and a
trailer, and these tell the data where to go. This information is then conveyed to the
network interface layer.
4.Network interface layer. At the network interface layer, the packet of data gets
formatted and prepared to be transported and routed through the network.
5.Hardware layer. On the hardware layer, the data is turned into something that can
be sent to and read by a computer or other device. For example, the IEEE 802.3 protocol
is used to convert data into what is used in an Ethernet connection.
28/02/2025 34
OSI model layers
1.Physical. This consists of a data connection between a device generating data and the network.
2.Datalink. The datalink layer is the point-to-point connection that transmits the data to the
network layer.
3.Network. In the network layer, the data gets its address and routing instructions in preparation
for its journey across the network.
4.Transport. In the transport layer, the data hops between different points on the network on its
way to its destination.
5.Session. The session layer has a connection that manages the sessions happening between
applications.
6.Presentation. The presentation layer is where data gets encrypted and decrypted and converted
into a form that is accessible by the application layer,
7.Application. In the application layer, an application, such as an internet browser, gets the data
and a user can then interact with it.
28/02/2025 35
Assignment (same question with different
level of BTL)
What are the similarities and differences between the OSI and
TCP/IP models?
Understanding (Explain ideas or concepts)
•Question: "Explain the primary functions of the Transport layer
in both the OSI and TCP/IP models."
Evaluating (Justify a decision or course of action)
•Question: "Evaluate the usefulness of the OSI model in modern
networking practices compared to the TCP/IP model. Which model would
you recommend for network architecture design, and why?"
28/02/2025 36
OSI versus TCP/IP
28/02/2025 37
Encapsulation and Decapsulation
One of the important concepts in protocol layering in the Internet is encapsulation/
decapsulation.
28/02/2025 38
Encapsulation at the Source Host
At the source, we have only encapsulation.
1. At the application layer, the data to be exchanged is referred to as a message. A message normally does
not contain any header or trailer, but if it does, we refer to the whole as the message. The message is
passed to the transport layer.
2. The transport layer takes the message as the payload, the load that the transport layer should take care
of. It adds the transport layer header to the payload, which contains the identifiers of the source and
destination application programs that want to communicate plus some more information that is needed
for the end-toend delivery of the message, such as information needed for flow, error control, or
congestion control. The result is the transport-layer packet, which is called the segment (in TCP) and the
user datagram (in UDP). The transport layer then passes the packet to the network layer.
3. The network layer takes the transport-layer packet as data or payload and adds its own header to the
payload. The header contains the addresses of the source and destination hosts and some more
information used for error checking of the header, fragmentation information, and so on. The result is the
network-layer packet, called a datagram. The network layer then passes the packet to the data-link layer.
4. The data-link layer takes the network-layer packet as data or payload and adds its own header, which
contains the link-layer addresses of the host or the next hop (the router). The result is the link-layer
packet, which is called a frame. The frame is passed to the physical layer for transmission.
28/02/2025 39
Decapsulation and Encapsulation at the Router
At the router, we have both decapsulation and encapsulation because the router is
connected to two or more links.
1. After the set of bits are delivered to the data-link layer, this layer decapsulates the datagram
from the frame and passes it to the network layer.
2. The network layer only inspects the source and destination addresses in the datagram header
and consults its forwarding table to find the next hop to which the datagram is to be delivered.
The contents of the datagram should not be changed by the network layer in the router unless
there is a need to fragment the datagram if it is too big to be passed through the next link. The
datagram is then passed to the data-link layer of the next link.
3. The data-link layer of the next link encapsulates the datagram in a frame and passes it to the
physical layer for transmission.
28/02/2025 40
Decapsulation at the Destination Host
At the destination host, each layer only decapsulates the packet received, removes the
payload, and delivers the payload to the next-higher layer protocol until the message
reaches the application layer. It is necessary to say that decapsulation in the host involves
error checking.
28/02/2025 41
Addressing
Any communication that involves two parties needs two addresses: source address and
destination address.
Although it looks as if we need five pairs of addresses, one pair per layer, we normally have
only four because the physical layer does not need addresses; the unit of data exchange at
the physical layer is a bit, which definitely cannot have an address.
There is a relationship between the layer, the address used in that layer, and the packet
name at that layer. At the application layer, we normally use names to define the site that
provides services, such as someorg.com, or the e-mail address, such as
[email protected].
At the transport layer, addresses are called port numbers, and these define the
application-layer programs at the source and destination. Port numbers are local addresses
that distinguish between several programs running at the same time.
At the network-layer, the addresses are global, with the whole Internet as the scope. A
network-layer address uniquely defines the connection of a device to the Internet.
The link-layer addresses, sometimes called MAC addresses, are locally defined
addresses, each of which defines a specific host or router in a network (LAN or WAN).
28/02/2025 42
Multiplexing and Demultiplexing
28/02/2025 43
Since the TCP/IP protocol suite uses several protocols at some layers, we can say
that we
have multiplexing at the source and demultiplexing at the destination.
Multiplexing in this case means that a protocol at a layer can encapsulate a packet
from several next-higher layer protocols (one at a time).
Demultiplexing means that a protocol can decapsulate and deliver a packet to
several next-higher layer protocols (one at a time).
To be able to multiplex and demultiplex, a protocol needs to have a field in its
header to identify to which protocol the encapsulated packets belong.
At the transport layer, either UDP or TCP can accept a message from several
application-layer protocols.
At the network layer, IP can accept a segment from TCP or a user datagram from
UDP.
IP can also accept a packet from other protocols such as ICMP, IGMP, and so on.
At the data-link layer, a frame may carry the payload coming from IP or other
protocols such as ARP
28/02/2025 44
Transmission Media
Transmission media are actually located below the physical layer and are directly
controlled by the physical layer.
We could say that transmission media belong to layer zero.
28/02/2025 45
A transmission medium can be broadly defined as anything that can carry information from a
source to a destination.
In communications the definition of the information and the transmission medium is more
specific. The transmission medium is usually free space, metallic cable, or fiber-optic
cable.
The information is usually a signal that is the result of a conversion of data from another form.
The use of long-distance communication using electric signals started with the invention of the
telegraph by Morse in the 19th century. Communication by telegraph was slow and dependent
on a metallic medium.
Extending the range of the human voice became possible when the telephone was invented in
1869. Telephone communication at that time also needed a metallic medium to carry the
electric signals that were the result of a conversion from the human voice. The communication
was, however, unreliable due to the poor quality of the wires. The lines were often noisy and
the technology was unsophisticated.
28/02/2025 46
In telecommunications, transmission media can be divided into two broad categories:
guided and unguided. Guided media include twisted-pair cable, coaxial cable, and fiber-
optic cable. Unguided medium is free space.
28/02/2025 47
Assignment
Analyze the characteristics of guided and unguided transmission
media and evaluate the situations in which each type would be most
effective in a communication network. How would the choice of
medium impact the overall performance and security of the
network?
Refer Text book from ERP: Pg. no 226 – 241 (Edn 5)
28/02/2025 48
Switching
A network is a set of connected devices.
Whenever we have multiple devices, we have the problem of how to connect them to make
one-to-one communication possible.
One solution is to make a point-to-point connection between each pair of devices (a mesh
topology) or between a central device and every other device (a star topology).
These methods, however, are impractical and wasteful when applied to very large networks.
The number and length of the links require too much infrastructure to be cost-efficient, and the
majority of those links would be idle most of the time.
Other topologies employing multipoint connections, such as a bus, are ruled out because the
distances between devices and the total number of devices increase beyond the capacities of
the
media and equipment.
A better solution is switching. A switched network consists of a series of interlinked nodes,
called switches. Switches are devices capable of creating temporary connections between
two or more devices linked to the switch.
In a switched network, some of these nodes are connected to the end systems (computers or
telephones, for example). Others are used only for routing.
28/02/2025 49
Switched network
• Circuit switching
1
• Packet switching
2
• Message switching
3
The end systems (communicating
devices) are labeled A, B, C, D, and so on,
and the switches are labeled I, II, III, IV,
and V. Each switch is connected to
multiple links.
28/02/2025 50
28/02/2025 51
CIRCUIT-SWITCHED NETWORKS
A circuit-switched network consists of a set of switches connected by physical links. A
connection between two stations is a dedicated path made of one or more links. However,
each connection uses only one dedicated channel on each link. Each link is normally divided
into n channels by using FDM or TDM.
28/02/2025 52
Explicitly shown the multiplexing symbols to emphasize the division of the link into
channels even though multiplexing can be implicitly included in the switch fabric.
The end systems, such as computers or telephones, are directly connected to a switch. We
have shown only two end systems for simplicity.
When end system A needs to communicate with end system M, system A needs to request
a connection to M that must be accepted by all switches as well as by M itself. This is called
the setup phase; a circuit (channel) is reserved on each link, and the combination of
circuits or channels defines the dedicated path. After the dedicated path made of
connected circuits (channels) is established, the data-transfer phase can take place.
After all data have been transferred, the circuits are torn down.
28/02/2025 53
Emphasize several points on CSN
❑ Circuit switching takes place at the physical layer.
❑ Before starting communication, the stations must make a reservation for the resources to
be used during the communication. These resources, such as channels (bandwidth in FDM and
time slots in TDM), switch buffers, switch processing time, and switch input/output ports, must
remain dedicated during the entire duration of data transfer until the teardown phase.
❑ Data transferred between the two stations are not packetized (physical layer transfer of the
signal). The data are a continuous flow sent by the source station and received by the
destination station, although there may be periods of silence.
❑ There is no addressing involved during data transfer. The switches route the data based on
their occupied band (FDM) or time slot (TDM). Of course, there is end-to-end addressing used
during the setup phase, as we will see shortly.
28/02/2025 54
Three Phases in CSN
1. Establishment Phase:
•Objective: Set up a dedicated
communication path between the 2. Data Transfer Phase:
sender and receiver. •Objective: Facilitate the actual 3. Termination Phase:
•Process: transmission of data over the •Objective: End the communication
• Call Setup: The caller initiates established circuit. session and release the dedicated
a request to establish a •Process: path.
connection, which is routed • Data Transmission: Data is •Process:
through a series of switches sent from the sender to the • Call Termination: Either party
and nodes in the network. receiver using the dedicated can initiate a termination request
• Path Selection: The network circuit. The path remains to end the session.
selects a specific path based on reserved exclusively for this • Circuit Release: The network
the availability of resources communication session. releases the dedicated circuit,
and the route configuration. • Continuous Connection: The making it available for other calls
• Connection Confirmation: circuit remains open and or sessions.
Once the path is established, dedicated throughout the • Resource Deallocation: Any
both parties receive a duration of the session, allowing resources (e.g., bandwidth,
confirmation, and the for a continuous and consistent switching nodes) allocated for the
connection is activated. data flow. session are deallocated and
returned to the pool for reuse.
28/02/2025 55
2 important parameters of CSN
Efficiency:
It can be argued that circuit-switched networks are not as efficient as the other two types of
networks because resources are allocated during the entire duration of the connection.
In a telephone network, people normally terminate the communication when they have
finished their conversation. However, in computer networks, a computer can be connected
to another computer even if there is no activity for a long time. In this case, allowing
resources to be dedicated means that other connections are deprived.
28/02/2025 56
Delay:
Although a circuit-switched network normally has low efficiency, the delay in this type of
network is minimal. During data transfer the data are not delayed at each switch; the resources
are allocated for the duration of the connection. Figure shows the idea of delay in a circuit-switched
network when only two switches are involved.
The total delay is due to the time needed to create the
connection, transfer data, and disconnect the circuit.
The delay caused by the setup is the sum of four parts:
The propagation time of the source computer request
(slope of the first gray box),
The request signal transfer time (height of the first
gray box),
The propagation time of the acknowledgment from
the destination computer (slope of the second gray box), and
The signal transfer time of the acknowledgment
(height of the second gray box).
The delay due to data transfer is the sum of two parts: the
propagation time (slope of the colored box) and data transfer
time (height of the colored box), which can be very long.
The third box shows the time needed to tear down the
circuit. We have shown the case in which the receiver
28/02/2025
requests disconnection, which creates the maximum delay. 57
PACKET SWITCHING
In data communications, we need to send messages from one end system to another. If the
message is going to pass through a packet-switched network, it needs to be divided into
packets of fixed or variable size. The size of the packet is determined by the network and
the governing protocol.
In packet switching, there is no resource allocation for a packet. This means that there is no
reserved bandwidth on the links, and there is no scheduled processing time for each
packet. Resources are allocated on demand. The allocation is done on a firstcome, first-
served basis. When a switch receives a packet, no matter what the source or destination is,
the packet must wait if there are other packets being processed. As with other systems in
our daily life, this lack of reservation may create delay.
28/02/2025 58
We can have two types of packet-switched networks:
Datagram networks and
Virtual-circuit networks.
28/02/2025 59
Datagram Networks
In a datagram network, each packet is treated independently of all others. Even if a packet is
part of a multipacket transmission, the network treats it as though it existed alone. Packets in
this approach are referred to as datagrams.
Datagram switching is normally done at the network layer. We briefly discuss datagram
networks here as a comparison with circuit-switched and virtual-circuit-switched networks.
Figure shows how the datagram approach is used to deliver four packets from station A to
station X. The switches in a datagram network are traditionally referred to as routers.
28/02/2025 60
In this example, all four packets (or datagrams) belong to the same message, but may travel
different paths to reach their destination.
This is so because the links may be involved in carrying packets from other sources and do
not have the necessary bandwidth available to carry all the packets from A to X.
This approach can cause the datagrams of a transmission to arrive at their destination out of
order with different delays between the packets.
Packets may also be lost or dropped because of a lack of resources.
In most protocols, it is the responsibility of an upper-layer protocol to reorder the datagrams
or ask for lost datagrams before passing them on to the application.
The datagram networks are sometimes referred to as connectionless networks.
The term connectionless here means that the switch (packet switch) does not keep
information about the connection state.
There are no setup or teardown phases. Each packet is treated the same by a switch
regardless of its source or destination.
28/02/2025 61
Routing Table
If there are no setup or teardown phases, how are the
packets routed to their destinations in a datagram
network?
In this type of network, each switch (or packet switch) has
a routing table which is based on the destination address.
The routing tables are dynamic and are updated
periodically.
The destination addresses and the corresponding
forwarding output ports are recorded in the tables.
This is different from the table of a circuit switched
network in which each entry is created when the setup
phase is completed and deleted when the teardown phase
is over. Figure shows the routing table for a switch.
A switch in a datagram network uses a routing table
that is based on the destination address.
28/02/2025 62
Destination Address: Every packet in a datagram network carries a header that
contains, among other information, the destination address of the packet. When the
switch receives the packet, this destination address is examined; the routing table is
consulted to find the corresponding port through which the packet should be
forwarded. This address, unlike the address in a virtual-circuit network, remains the
same during the entire journey of the packet.
28/02/2025 63
Efficiency: The efficiency of a datagram network is better than that of a circuit-switched
network; resources are allocated only when there are packets to be transferred. If a source
sends a packet and there is a delay of a few minutes before another packet can be sent,
the resources can be reallocated during these minutes for other packets from other
sources.
Delay: There may be greater delay in a datagram
network than in a virtual-circuit network.
Although there are no setup and teardown phases,
each packet may experience a wait at a switch
before it is forwarded.
In addition, since not all packets in a message
necessarily travel through the same switches, the
delay is not uniform for the packets of a message.
Figure gives an example of delay in a datagram
network for one packet.
28/02/2025 64
Delay: There may be greater delay in a datagram network than in a virtual-circuit network.
Although there are no setup and teardown phases, each packet may experience a wait at a switch
before it is forwarded.
In addition, since not all packets in a message necessarily travel through the same switches, the
delay is not uniform for the packets of a message.
Figure gives an example of delay in a datagram network for one packet.
28/02/2025 65
Assignment
a) Describe the concept of a Virtual Circuit Network, including how it differs from a
Datagram Network. (BTL-Remembering and Understanding).
b) Explain the process of establishing, maintaining, and terminating a virtual circuit.
Discuss how these processes ensure reliable data transmission in a network. (BTL-
Understanding and Applying)
c) Evaluate the advantages and disadvantages of using Virtual Circuit Networks in
comparison to Datagram Networks, particularly in the context of applications requiring
consistent data flow and low latency. (BTL-Analyzing and Evaluating ).
28/02/2025 66