Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
5 views41 pages

Client-Server Network

Uploaded by

Gurdeep sohal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views41 pages

Client-Server Network

Uploaded by

Gurdeep sohal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 41

Client-Server Network

This model are broadly used network model. In the Client-Server Network,
Clients and servers are differentiated, and Specific servers and clients are
present. In Client-Server Network, a Centralized server is used to store the
data because its management is centralized. In Client-Server Network, the
Server responds to the services which is requested by the Client.

Peer-to-Peer Network

This model does not differentiate the clients and the servers, In this each and
every node is itself client and server. In Peer-to-Peer Network, Each and every
node can do both request and respond for the services.

 Peer-to-peer networks are often created by collections of 12 or fewer


machines. All of these computers use unique security to keep their data, but
they also share data with every other node.
 In peer-to-peer networks, the nodes both consume and produce resources.
Therefore, as the number of nodes grows, so does the peer-to-peer
network’s capability for resource sharing. This is distinct from client-server
networks where an increase in nodes causes the server to become
overloaded.

 It is challenging to give nodes in peer-to-peer networks proper security


because they function as both clients and servers. A denial of service attack
may result from this.

 The majority of contemporary operating systems, including Windows and


Mac OS, come with software to implement peer.
Difference between Client-Server and Peer-to-Peer Network

Sr.
no. Client-Server Network Peer-to-Peer Network
1 In Client-Server Network, Clients
and server are differentiated, In Peer-to-Peer Network, Clients
Specific server and clients are and server are not differentiated.
present.
2 Client-Server Network focuses on While Peer-to-Peer Network
information sharing. focuses on connectivity.
3 In Client-Server Network,
While in Peer-to-Peer Network,
Centralized server is used to store
Each peer has its own data.
the data.
4 While in Peer-to-Peer Network,
In Client-Server Network, Server
Each and every node can do both
respond the services which is
request and respond for the
request by Client.
services.
5 While Peer-to-Peer Network are
Client-Server Network are costlier
less costlier than Client-Server
than Peer-to-Peer Network.
Network.
6 While Peer-to-Peer Network are
Client-Server Network are more
less stable if number of peer is
stable than Peer-to-Peer Network.
increase.
7 While Peer-to-Peer Network is
Client-Server Network is used for generally suited for small
both small and large networks. networks with fewer than 10
computers
LAN

LAN stands for local area network. It is a group of network devices that
allow communication between various connected devices. Private ownership
has control over the local area network rather than the public. LAN has a
shorter propagation delay than MAN as well as WAN. It covers smaller
areas such as colleges, schools, hospitals, and so on.

MAN

MAN stands for metropolitan area network. It covers a larger area than
LAN such as small towns, cities, etc. MAN connects two or more computers
that reside within the same or completely different cities. MAN is expensive
and should or might not be owned by one organization.

WAN

WAN stands for wide area network. It covers a large area than LAN as well
as a MAN such as country/continent etc. WAN is expensive and should or
might not be owned by one organization. PSTN or satellite medium is used
for wide area networks.
Differences Between LAN, MAN, and WAN

Basis LAN MAN WAN


MAN stands for WAN stands for
LAN stands for
metropolitan area wide area
local area network.
Full-Form network. network.
Operates in small Operates in
areas such as the Operates in large areas larger areas such
Geographic same building or such as a city. as country or
Span campus. continent.
While WAN also
LAN’s ownership is MAN’s ownership can might not be
private. be private or public. owned by one
organization.
Ownership
Whereas the
The transmission While the transmission
transmission
speed of a LAN is speed of a MAN is
Transmission speed of a WAN
high. average.
Speed is low.
Whereas, there is
The propagation There is a
a long
delay is short in a moderate propagation
propagation
Propagation LAN. delay in a MAN.
delay in a WAN.
delay
Whereas there is
There is less While there is more more congestion
congestion in LAN. congestion in MAN. than MAN in
Congestion WAN.

Whereas WAN’s
design and
LAN’s design and While MAN’s design
maintenance are
maintenance are and maintenance are
also difficult than
easy. difficult than LAN.
LAN as well
Design & MAN.
Maintenance
In WAN, there is
There is more fault While there is less fault
Fault also less fault
tolerance in LAN. tolerance.
tolerance tolerance.
Network Topology

Network topology is the way devices are connected in a network. It defines


how these components are connected and how data transfer between the
network. Understanding the different types of network topologies can help in
choosing the right design for a specific network.

There are two major categories of Network Topology i.e. Physical Network
topology and Logical Network Topology.

Physical Network Topology refers to the actual structure of the physical


medium for the transmission of data. Logical network Topology refers to the
transmission of data between devices present in the network irrespective of
the way devices are connected.
Types of Network Topology

Below mentioned are the types of Network Topology

 Point to Point Topology


 Mesh Topology
 Star Topology
 Bus Topology
 Ring Topology
 Tree Topology
 Hybrid Topology

Point to Point Topology

Point-to-point topology is a type of topology that works on the functionality of


the sender and receiver. It is the simplest communication between two nodes,
in which one is the sender and the other one is the receiver.
Mesh Topology

In a mesh topology, every device is connected to another device via a


particular channel. Every device is connected to another via dedicated
channels. These channels are known as links. In Mesh Topology, the protocols
used are AHCP (Ad Hoc Configuration Protocols), DHCP(Dynamic Host
Configuration Protocol), etc.

Mesh Topology

Suppose, the N number of devices are connected with each other in a mesh
topology, the total number of ports that are required by each device is N-1.
In Figure 1, there are 5 devices connected to each other, hence the total
number of ports required by each device is 4. The total number of ports
required = N * (N-1).

Suppose, N number of devices are connected with each other in a mesh


topology, then the total number of dedicated links required to connect them
is N C 2 i.e. N(N-1)/2. In Figure 1, there are 5 devices connected to each
other, hence the total number of links required is 5*4/2 = 10.

Advantages of Mesh Topology


 Communication is very fast between the nodes.
 Mesh Topology is robust.
 The fault is diagnosed easily. Data is reliable because data is transferred
among the devices through dedicated channels or links.
 Provides security and privacy.

Disadvantages of Mesh Topology
 Installation and configuration are difficult.
 The cost of cables is high as bulk wiring is required, hence suitable for less
number of devices.
 The cost of maintenance is high.

A common example of mesh topology is the internet backbone, where various


internet service providers are connected to each other via dedicated channels.
This topology is also used in military communication systems and aircraft
navigation systems.

Star Topology

In Star Topology, all the devices are connected to a single hub through a cable.
This hub is the central node and all other nodes are connected to the central
node. The hub can be passive in nature i.e., not an intelligent hub such as
broadcasting devices, at the same time the hub can be intelligent known as an
active hub. Active hubs have repeaters in them. Coaxial cables or RJ-45 cables
are used to connect the computers. In Star Topology, many
popular EthernetLAN protocols are used as CD(Collision
Detection), CSMA (Carrier Sense Multiple Access), etc.

Star Topology
Advantages of Star Topology
 If N devices are connected to each other in a star topology, then the number
of cables required to connect them is N. So, it is easy to set up.
 Each device requires only 1 port i.e. to connect to the hub, therefore the
total number of ports required is N.
 It is Robust. If one link fails only that link will affect and not other than
that.
 Easy to fault identification and fault isolation.
 Star topology is cost-effective as it uses inexpensive coaxial cable.

Disadvantages of Star Topology


 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.

A common example of star topology is a local area network (LAN) in an


office where all computers are connected to a central hub. This topology is
also used in wireless networks where all devices are connected to a wireless
access point.

Bus Topology

Bus Topology is a network type in which every computer and network device
is connected to a single cable. It is bi-directional. It is a multi-point connection
and a non-robust topology because if the backbone fails the topology crashes.
In Bus Topology, various MAC (Media Access Control) protocols are
followed by LAN ethernet connections like TDMA, Pure Aloha,
CDMA, Slotted Aloha, etc.

Bus Topology
Advantages of Bus Topology

 If N devices are connected to each other in a bus topology, then the number
of cables required to connect them is 1, known as backbone cable, and N
drop lines are required.
 Coaxial or twisted pair cables are mainly used in bus-based networks that
support up to 10 Mbps.
 The cost of the cable is less compared to other topologies, but it is used to
build small networks.
 Bus topology is familiar technology as installation and troubleshooting
techniques are well known.
 CSMA is the most common method for this type of topology.

Disadvantages of Bus Topology


 A bus topology is quite simpler, but still, it requires a lot of cabling.
 If the common cable fails, then the whole system will crash down.
 If the network traffic is heavy, it increases collisions in the network. To
avoid this, various protocols are used in the MAC layer known as Pure
Aloha, Slotted Aloha, CSMA/CD, etc.
 Adding new devices to the network would slow down networks.
 Security is very low.

A common example of bus topology is the Ethernet LAN, where all devices
are connected to a single coaxial cable or twisted pair cable. This topology is
also used in cable television networks.

Ring Topology

In a Ring Topology, it forms a ring connecting devices with exactly two


neighboring devices. A number of repeaters are used for Ring topology with a
large number of nodes, because if someone wants to send some data to the last
node in the ring topology with 100 nodes, then the data will have to pass
through 99 nodes to reach the 100th node. Hence to prevent data loss repeaters
are used in the network.
The data flows in one direction, i.e. it is unidirectional, but it can be made
bidirectional by having 2 connections between each Network Node, it is
called Dual Ring Topology. In-Ring Topology, the Token Ring Passing
protocol is used by the workstations to transmit the data.
Ring Topology

The most common access method of ring topology is token passing.

 Token passing: It is a network access method in which a token is passed


from one node to another node.
 Token: It is a frame that circulates around the network.Operations of Ring
Topology
 One station is known as a monitor station which takes all the responsibility
for performing the operations.
 To transmit the data, the station has to hold the token. After the
transmission is done, the token is to be released for other stations to use.
 When no station is transmitting the data, then the token will circulate in the
ring.
 There are two types of token release techniques: Early token
release releases the token just after transmitting the data and Delayed
token release releases the token after the acknowledgment is received from
the receiver.

Advantages of Ring Topology


 The data transmission is high-speed.
 The possibility of collision is minimum in this type of topology.
 Cheap to install and expand.
 It is less costly than a star topology.
Disadvantages of Ring Topology
 The failure of a single node in the network can cause the entire network to
fail.
 Troubleshooting is difficult in this topology.
 The addition of stations in between or the removal of stations can disturb
the whole topology.
 Less secure.

Tree Topology

Tree topology is the variation of the Star topology. This topology has a
hierarchical flow of data. In Tree Topology, protocols like DHCPand SAC
(Standard Automatic Configuration) are used.

Tree Topology

In tree topology, the various secondary hubs are connected to the central hub
which contains the repeater. This data flow from top to bottom i.e. from the
central hub to the secondary and then to the devices or from bottom to top i.e.
devices to the secondary hub and then to the central hub. It is a multi-point
connection and a non-robust topology because if the backbone fails the
topology crashes.

Advantages of Tree Topology


 It allows more devices to be attached to a single central hub thus it
decreases the distance that is traveled by the signal to come to the devices.
 It allows the network to get isolated and also prioritize from different
computers.
 We can add new devices to the existing network.
 Error detection and error correction are very easy in a tree topology.

Disadvantages of Tree Topology


 If the central hub gets fails the entire system fails.
 The cost is high because of the cabling.
 If new devices are added, it becomes difficult to reconfigure.

A common example of a tree topology is the hierarchy in a large organization.


At the top of the tree is the CEO, who is connected to the different
departments or divisions (child nodes) of the company. Each department has
its own hierarchy, with managers overseeing different teams (grandchild
nodes). The team members (leaf nodes) are at the bottom of the hierarchy,
connected to their respective managers and departments.

Hybrid Topology

Hybrid Topology is the combination of all the various types of topologies we


have studied above. Hybrid Topology is used when the nodes are free to take
any form. It means these can be individuals such as Ring or Star topology or
can be a combination of various types of topologies seen above. Each
individual topology uses the protocol that has been discussed earlier.

Hybrid Topology
The above figure shows the structure of the Hybrid topology. As seen it
contains a combination of all different types of networks.

Advantages of Hybrid Topology


 This topology is very flexible .
 The size of the network can be easily expanded by adding new devices.

Disadvantages of Hybrid Topology


 It is challenging to design the architecture of the Hybrid Network.
 Hubs used in this topology are very expensive.
 The infrastructure cost is very high as a hybrid network requires a lot of
cabling and network devices.

A common example of a hybrid topology is a university campus network. The


network may have a backbone of a star topology, with each building connected
to the backbone through a switch or router. Within each building, there may be
a bus or ring topology connecting the different rooms and offices. The wireless
access points also create a mesh topology for wireless devices. This hybrid
topology allows for efficient communication between different buildings while
providing flexibility and redundancy within each building.

Switching

In computer networking, Switching is the process of transferring data packets


from one device to another in a network, or from one network to another,
using specific devices called switches. A computer user experiences switching
all the time for example, accessing the Internet from your computer device,
whenever a user requests a webpage to open, the request is processed through
switching of data packets only.
Types of Switching

There are three types of switching methods:


 Message Switching
 Circuit Switching
 Packet Switching
o Datagram Packet Switching
o Virtual Circuit Packet Switching
Message Switching: This is an older switching technique that has become
obsolete. In message switching technique, the entire data block/message is
forwarded across the entire network thus, making it highly inefficient.

Circuit Switching: In this type of switching, a connection is established


between the source and destination beforehand. This connection receives the
complete bandwidth of the network until the data is transferred completely.
This approach is better than message switching as it does not involve sending
data to the entire network, instead of its destination only.

Packet Switching: This technique requires the data to be broken down into
smaller components, data frames, or packets. These data frames are then
transferred to their destinations according to the available resources in the
network at a particular time.

This switching type is used in modern computers and even the Internet. Here,
each data frame contains additional information about the destination and
other information required for proper transfer through network components.

Datagram Packet Switching: In Datagram Packet switching, each data frame


is taken as an individual entity and thus, they are processed separately. Here,
no connection is established before data transmission occurs. Although this
approach provides flexibility in data transfer, it may cause a loss of data
frames or late delivery of the data frames.

Virtual-Circuit Packet Switching: In Virtual-Circuit Packet switching, a


logical connection between the source and destination is made before
transmitting any data. These logical connections are called virtual circuits.
Each data frame follows these logical paths and provides a reliable way of
transmitting data with less chance of data loss.

Circuit Switching in Computer Network

Circuit Switching is a type of switching, in which a connection is established


between the source and destination before communication. This connection
receives the complete bandwidth of the network until the data is transferred
completely. However, circuit switching can be inefficient and costly due to its
requirement for dedicated resources, making it less suitable for high-traffic or
large-scale networks. In this article, we will discuss every point about Circuit
Switching.
What is Circuit Switching?

In circuit switching network resources (bandwidth) are divided into pieces and
the bit delay is constant during a connection. The dedicated path/circuit
established between the sender and receiver provides a guaranteed data rate.
Data can be transmitted without any delays once the circuit is established.

The telephone system network is one of the examples of Circuit


switching. FDM (Frequency Division Multiplexing) and TDM (Time
Division Multiplexing) are two methods of multiplexing multiple signals into
a single carrier.
 Frequency Division Multiplexing: Frequency Division Multiplexing or
FDM is used when multiple data signals are combined for simultaneous
transmission via a shared communication medium. It is a technique by
which the total bandwidth is divided into a series of non-overlapping
frequency sub-bands, where each sub-band carries different signal.
Practical use in radio spectrum & optical fiber to share multiple
independent signals.

 Time Division Multiplexing: Time-division multiplexing (TDM) is a


method of transmitting and receiving independent signals over a common
signal path using synchronized switches at each end of the transmission
line. TDM is used for long-distance communication links and bears heavy
data traffic loads from the end user. Time-division multiplexing (TDM) is
also known as a digital circuit switch.

Phases of Circuit Switching

 Circuit Establishment: A dedicated circuit between the source and


destination is constructed via a number of intermediary switching center’s.
Communication signals can be requested and received when the sender and
receiver communicate signals over the circuit.

 Data Transfer: Data can be transferred between the source and destination
once the circuit has been established. The link between the two parties
remains as long as they communicate.

 Circuit Disconnection: Disconnection in the circuit occurs when one of


the users initiates the disconnect. When the disconnection occurs, all
intermediary linkages between the sender and receiver are terminated.
CIRCUIT SWITCHING

SR.
NO. Circuit Switching Packet Switching
1 In Packet switching, each data unit
In-circuit switching, each data unit
just knows the final destination
knows the entire path address which
address intermediate path is decided
is provided by the source.
by the routers.
2
In Packet switching, data is processed
In-Circuit switching, data is
at all intermediate nodes including the
processed at the source system only
source system.
3 The delay between data units in The delay between data units in
circuit switching is uniform. packet switching is not uniform.
4
Circuit switching is more reliable. Packet switching is less reliable.
5 Wastage of resources is more in Less wastage of resources as
Circuit Switching compared to Circuit Switching
6
Circuit switching is not convenient Packet switching is suitable for
for handling bilateral traffic. handling bilateral traffic.
7 In-Circuit Switching there is a In Packet Switching there is no
physical path between the source physical path between the source and
and the destination the destination
What is Circuit Switching Used For?

 Continuous connections: Circuit switching is used for connections that


must be maintained for long periods, such as long-distance communication.
Circuit switching technology is used in traditional telephone systems.

 Dial-up network connections: When a computer connects to the internet


through a dial-up service, it uses the public switched network. Dial-up
transmits Internet Protocol (IP) data packets via a circuit-switched
telephone network.
 Optical circuit switching: Data centre networks also make use of circuit
switching. Optical circuit switching is used to expand traditional data
centres and fulfil increasing bandwidth demands.

Advantages of Circuit Switching

 The main advantage of circuit switching is that a committed transmission


channel is established between the computers which give a guaranteed data
rate.
 In circuit switching, there is no delay in data flow because of the dedicated
transmission path.
 Reliability: Circuit switching provides a high level of reliability since the
dedicated communication path is reserved for the entire duration of the
communication. This ensures that the data will be transmitted without any
loss or corruption.
 Quality of service: Circuit switching provides a guaranteed quality of
service, which means that the network can prioritize certain types of traffic,
such as voice and video, over other types of traffic, such as email and web
browsing.
 Security: Circuit switching provides a higher level of security compared to
packet switching since the dedicated communication path is only accessible
to the two communicating parties. This can help prevent unauthorized
access and data breaches.
 Ease of management: Circuit switching is relatively easy to manage since
the communication path is pre-established and dedicated to a specific
communication. This can help simplify network management and reduce
the risk of errors.
 Compatibility: Circuit switching is compatible with a wide range of
devices and protocols, which means that it can be used with different types
of networks and applications. This makes it a versatile technology for
various industries and use cases.
Disadvantages of Circuit Switching

 Limited scalability: Circuit switching is not well-suited for large-scale


networks with many nodes, as it requires a dedicated communication path
between each pair of nodes. This can result in a high degree of complexity
and difficulty in managing the network.
 Vulnerability to failures: Circuit switching relies on a dedicated
communication path, which can make the network vulnerable to failures,
such as cable cuts or switch failures. In the event of a failure, the
communication path must be re-established, which can result in delays or
loss of data.
 Limited Flexibility: Circuit switching is not flexible as it requires a
dedicated circuit between the communicating devices. The circuit cannot be
used Waste of Resources for any other purpose until the communication is
complete, which limits the flexibility of the network.
 Waste of Resources: Circuit switching reserves the bandwidth and
network resources for the duration of the communication, even if there is
no data being transmitted. This results in the wastage of resources and
inefficient use of the network.
 Expensive: Circuit switching is an expensive technology as it requires
dedicated communication paths, which can be costly to set up and maintain.
This makes it less feasible for small-scale networks and applications.
 Susceptible to Failure: Circuit switching is susceptible to failure as it
relies on a dedicated communication path. If the path fails, the entire
communication is disrupted. This makes it less reliable than other
networking technologies, such as packet switching.
 Not suitable for high traffic: Circuit switching is not suitable for high
traffic, where data is transmitted intermittently at irregular intervals. This is
because a dedicated circuit needs to be established for each communication,
which can result in delays and inefficient use of resources.
 Delay and latency: Circuit switching requires the establishment of a
dedicated communication path, which can result in delay and latency in
establishing the path and transmitting data. This can impact the real-time
performance of applications, such as voice and video.
 High cost: Circuit switching requires the reservation of resources, which
can result in a high cost, particularly in large-scale networks. This can
make circuit switching less practical for some applications.
 No prioritization: Circuit switching does not provide any mechanism for
prioritizing certain types of traffic over others.
Message Switching

Message switching is a switching mechanism in which a message is sent as a


single unit and routed to intermediary nodes where it is stored and forwarded.
The message-switching approach does not provide a dedicated path between
the sender and receiver. In message switching, end-users communicate by
sending and receiving messages that include the entire data to be shared.
Messages are the smallest individual unit. Also, the sender and receiver are not
directly connected. Several intermediate nodes transfer data and ensure that
the message reaches its destination. Message-switched data networks are
hence called hop-by-hop systems.

 Store and forward – The intermediate nodes have the responsibility of


transferring the entire message to the next node. Hence, each node must
have storage capacity. A message will only be delivered if the next hop and
the link connecting it are both available, otherwise, it’ll be stored
indefinitely. A store-and-forward switch forwards a message only if
sufficient resources are available and the next hop is accepting data. This is
called the store-and-forward property.

 Message delivery – This implies wrapping the entire information in a


single message and transferring it from the source to the destination node.
Each message must have a header that contains the message routing
information, including the source and destination.

Message switching network consists of transmission links (channels), store-


and-forward switch nodes, and end stations as shown in the following picture:
MESSAGE SWITCHING

Advantages of Message Switching

 As message switching is able to store the message for which


communication channel is not available, it helps in reducing the traffic
congestion in the network.
 In message switching, the data channels are shared by the network devices.
 It makes traffic management efficient by assigning priorities to the
messages.
 Because the messages are delivered via a store and forward method, it is
possible to include priority in them.
 It allows for infinite message lengths.
 Unlike circuit switching, it does not necessitate the actual connection of
source and destination devices.

Disadvantages of Message Switching

 Message switching cannot be used for real-time applications as storing


messages causes delay.
 In message switching, the message has to be stored for which every
intermediate device in the network requires a large storing capacity.
 Because the system is so intricate, people are frequently unaware of
whether or not messages are correctly conveyed. This could cause problems
in social relationships.
 The type of message switching does not create a dedicated path between
the devices. It is not dependable communication because there is no direct
relationship between sender and receiver.
Difference between Message Switching and Packet Switching

SR.
NO. Message Switching Packet Switching
1 In message switching the complete In packet switching the entire
message is passed across a message is broken into smaller units
network. known as Packets.
2 In this, computer language used is In packet switching, binary type is
ASCII, baudot, morse. used.
3 Message exist only in one location Packets of the message exist in many
in the network. places in the network.
4 Access time is reduced due to
increase in performance as packets Packets are stored in main memory.
are stored in disk.
5 In message switching there is no Packet switching places a tight upper
limit on block size. limit on block size.
6 Physical links are allocated Virtual links are made
dynamically. simultaneously.

Applications of Message Switching

The store-and-forward method was implemented in telegraph message


switching centres. Today, although many major networks and systems are
packet-switched or circuit-switched networks, their delivery processes can be
based on message switching. For example, in most electronic mail systems the
delivery process is based on message switching, while the network is in fact
either circuit-switched or packet-switched.

Packet Switching

Packet Switching in computer networks is a method of transferring data to a


network in the form of packets. In order to transfer the file fast and efficiently
over the network and minimize the transmission latency, the data is broken
into small pieces of variable length, called Packet. At the destination, all these
small parts (packets) have to be reassembled, belonging to the same file. A
packet is composed of a payload and various control information. No pre-setup
or reservation of resources is needed.
Packet Switching uses the Store and Forward technique while switching the
packets; while forwarding the packet each hop first stores that packet then
forwards. This technique is very beneficial because packets may get discarded
at any hop for some reason. More than one path is possible between a pair of
sources and destinations. Each packet contains the Source and destination
address using which they independently travel through the network. In other
words, packets belonging to the same file may or may not travel through the
same path. If there is congestion at some path, packets are allowed to choose
different paths possible over an existing network.

Diagram of Packet Switching

In packet switching the data is divided into small packets which allow faster
movement of data. Each packet contains two parts that is Header and Payload,
the header on each packet conation information. Below is the diagram of how
packet switching works.

Types of Delays in Packet Switching

Transmission Delay: Time required by the spent station to transmit data to


the link.
Propagation Delay: Time of data propagation through the link.
Queueing Delay: Time spent by the packet at the destination’s queue.
Processing Delay: Processing time for data at the destination.

Advantages of Packet Switching over Circuit Switching

 More efficient in terms of bandwidth, since the concept of reserving a


circuit is not there.
 Minimal transmission latency.
 More reliable as a destination can detect the missing packet.
 More fault tolerant because packets may follow a different path in case any
link is down, Unlike Circuit Switching.
 Cost-effective and comparatively cheaper to implement.

Disadvantage of Packet Switching over Circuit Switching

 Packet Switching doesn’t give packets in order, whereas Circuit Switching


provides ordered delivery of packets because all the packets follow the
same path.
 Since the packets are unordered, we need to provide sequence numbers for
each packet.
 Complexity is more at each node because of the facility to follow multiple
paths.
 Transmission delay is more because of rerouting.
 Packet Switching is beneficial only for small messages, but for bursty data
(large messages) Circuit Switching is better.

Types of Packet Switching

1. Connection-oriented Packet Switching (Virtual Circuit)

Before starting the transmission, it establishes a logical path or virtual


connection using a signaling protocol, between sender and receiver and all
packets belongs to this flow will follow this predefined route. Virtual Circuit
ID is provided by switches/routers to uniquely identify this virtual connection.
Data is divided into small units and all these small units are appended with
help of sequence numbers. Packets arrive in order at the destination. Overall,
three phases take place here- The setup, data transfer and tear-down phases.
All address information is only transferred during the setup phase. Once the
route to a destination is discovered, entry is added to the switching table of
each intermediate node. During data transfer, packet header (local header) may
contain information such as length, timestamp, sequence number, etc.
Connection-oriented switching is very useful in switched WAN. Some popular
protocols which use the Virtual Circuit Switching approach are X.25, Frame-
Relay, ATM, and MPLS(Multi-Protocol Label Switching).

2. Connectionless Packet Switching (Datagram)

Unlike Connection-oriented packet switching, In Connectionless Packet


Switching each packet contains all necessary addressing information such as
source address, destination address, port numbers, etc. Packets belonging to
one flow may take different routes because routing decisions are made
dynamically, so the packets that arrived at the destination might be out of
order. It has no connection setup and teardown phase, like Virtual Circuits.
Packet delivery is not guaranteed in connectionless packet switching, so
reliable delivery must be provided by end systems using additional protocols.
Difference between Packet Switching and Circuit Switching

Sr.
no. Packet Switching Circuit Switching
1 In packet switching data is divided
There is a dedicated path for each
into packets, and packets is sent
packet in circuit switching.
independently.
2
In Packet switching, data is
In-Circuit switching, data is
processed at all intermediate nodes
processed at the source system only.
including the source system.
3 The delay between data units in The delay between data units in
packet switching is not uniform. circuit switching is uniform.
4
Packet switching is less reliable. Circuit switching is more reliable.
5 Transmission of the data is done not
Transmission of the data is done by
only by the source but also by the
the source.
intermediate routers.
6 Wastage of resources is more in
Less wastage of resources.
Circuit Switching.
7 In Packet Switching there is no In-Circuit Switching there is a
physical path between the source and physical path between the source and
the destination. the destination.
8 Call setup is not required in packet Call setup is required in circuit
switching. switching.
9 Packet switching requires complex Circuit switching requires simple
protocols for delivery. protocols for delivery.
10
Latency is high in Packet switching. Latency is low in circuit switching.
11 Little bit more overheating in packet Overheading is low in circuit
switching. switching.
Difference between circuit switching, message switching and packet switching.

Basics Circuit Switching Message Switching Packet Switching


Connection is
created between
Links are created
the source and Links are created
independently one
Connection destination by independently one by
by one between
Creation establishing a one between the
the nodes on the
dedicated path nodes on the way.
way.
between source
and destination.
No queue is
Queuing Queue is formed. Queue is formed.
formed.
The big message
There is one big There is one big
Message and is divided into a
entire data stream entire data stream
Packets small number of
called a message. called a message.
packets.
One single
Packets follow the
dedicated path Messages follow the
independent path
Routing exists between the independent route to
to hold the
source and reach a destination.
destination.
destination.
Packets are
addressed, and
Messages need not Messages are
Addressing sequencing is
be addressed as addressed as
and done as all the
there is one independent routes
sequencing packets follow the
dedicated path. are established.
independent
route.
Propagation
No Yes Yes
Delay
Transmission
Low Maximum Maximum
Capacity
Packets do not
Sequence Message arrives in Message arrives in appear in
Order Sequence. Sequence. sequence at the
destination.
Bandwidth is used
Bandwidth is used to
Use Bandwidth Wastage to its maximum
its maximum extent.
extent.
UNIT #2
OSI MODEL

The OSI (Open Systems Interconnection) Model is a set of rules that explains
how different computer systems communicate over a network. OSI Model was
developed by the International Organization for Standardization (ISO).

The OSI Model consists of 7 layers and each layer has specific functions and
responsibilities. The OSI Model is widely used as a reference to understand how
network systems function.
Layers of the OSI Model

There are 7 layers in the OSI Model and each layer has its specific role in
handling data. All the layers are mentioned below:

 Physical Layer
 Data Link Layer
 Network Layer
 Transport Layer
 Session Layer
 Presentation Layer
 Application Layer

Layer 1 – Physical Layer

 The lowest layer of the OSI reference model is the Physical Layer.
 It is responsible for the actual physical connection between the devices.
 The physical layer contains information in the form of bits.
 Physical Layer is responsible for transmitting individual bits from one
node to the next.
 When receiving data, this layer will get the signal received and convert
it into 0s and 1s and send them to the Data Link layer, which will put the
frame back together.
 Common physical layer devices are Hub, Repeater, Modem, and Cables.
Physical Layer

Functions of the Physical Layer

 Bit Synchronization: The physical layer provides the synchronization of


the bits by providing a clock. This clock controls both sender and receiver
thus providing synchronization at the bit level.

 Bit Rate Control: The Physical layer also defines the transmission rate i.e.
the number of bits sent per second.

 Physical Topologies: Physical layer specifies how the different,


devices/nodes are arranged in a network i.e. bus topology, star topology,
or mesh topology.

 Transmission Mode: Physical layer also defines how the data flows
between the two connected devices. The various transmission modes
possible are Simplex, half-duplex and full duplex.

Layer 2 – Data Link Layer (DLL)

 The data link layer is responsible for the node-to-node delivery of the
message.
 The main function of this layer is to make sure data transfer is error-free
from one node to another, over the physical layer.
 When a packet arrives in a network, it is the responsibility of the DLL to
transmit it to the Host using its MAC address.
 Packet in the Data Link layer is referred to as Frame.
 Switches and Bridges are common Data Link Layer devices.
The Data Link Layer is divided into two sublayers:

 Logical Link Control (LLC)

 Media Access Control (MAC)

The packet received from the Network layer is further divided into frames
depending on the frame size of the NIC (Network Interface Card). DLL also
encapsulates Sender and Receiver’s MAC address in the header.

The Receiver’s MAC address is obtained by placing an ARP (Address


Resolution Protocol) request onto the wire asking, “Who has that IP address?”
and the destination host will reply with its MAC address.

Functions of the Data Link Layer

 Framing: Framing is a function of the data link layer. It provides a way for
a sender to transmit a set of bits that are meaningful to the receiver. This
can be accomplished by attaching special bit patterns to the beginning and
end of the frame.

 Physical Addressing: After creating frames, the Data link layer adds
physical addresses (MAC addresses) of the sender and/or receiver in the
header of each frame.

 Error Control: The data link layer provides the mechanism of error
control in which it detects and retransmits damaged or lost frames.

 Flow Control: The data rate must be constant on both sides else the data
may get corrupted thus, flow control coordinates the amount of data that
can be sent before receiving an acknowledgment.

 Access Control: When a single communication channel is shared by


multiple devices, the MAC sub-layer of the data link layer helps to
determine which device has control over the channel at a given time.
Layer 3 – Network Layer

 The network layer works for the transmission of data from one host to
the other located in different networks.
 It also takes care of packet routing i.e. selection of the shortest path to
transmit the packet, from the number of routes available.
 The sender and receiver’s IP address are placed in the header by the
network layer. Segment in the Network layer is referred to as Packet.
 Network layer is implemented by networking devices such as routers
and switches.

Functions of the Network Layer

 Routing: The network layer protocols determine which route is suitable


from source to destination. This function of the network layer is known as
routing.

 Logical Addressing: To identify each device inter-network uniquely, the


network layer defines an addressing scheme. The sender and receiver’s IP
addresses are placed in the header by the network layer. Such an address
distinguishes each device uniquely and universally.

Layer 4 – Transport Layer

 The transport layer provides services to the application layer and takes
services from the network layer.
 The data in the transport layer is referred to as Segments.
 It is responsible for the end-to-end delivery of the complete message.
 The transport layer also provides the acknowledgment of the successful
data transmission and re-transmits the data if an error is found.
 Protocols used in Transport Layer are TCP, UDP NetBIOS, PPTP.

At the sender’s side, the transport layer receives the formatted data from the
upper layers, performs Segmentation, and also implements Flow and error
control to ensure proper data transmission. It also adds Source and
Destination port number in its header and forwards the segmented data to the
Network Layer.
 Generally, this destination port number is configured, either by default or
manually. For example, when a web application requests a web server, it
typically uses port number 80, because this is the default port assigned to
web applications. Many applications have default ports assigned.

At the Receiver’s side, Transport Layer reads the port number from its header
and forwards the Data which it has received to the respective application. It
also performs sequencing and reassembling of the segmented data.

Functions of the Transport Layer

 Segmentation and Reassembly: This layer accepts the message from the
(session) layer and breaks the message into smaller units. Each of the
segments produced has a header associated with it. The transport layer at
the destination station reassembles the message.

 Service Point Addressing: To deliver the message to the correct process,


the transport layer header includes a type of address called service point
address or port address. Thus, by specifying this address, the transport layer
makes sure that the message is delivered to the correct process.

Services Provided by Transport Layer

 Connection-Oriented Service

 Connectionless Service
Layer 5 – Session Layer

Session Layer in the OSI Model is responsible for the establishment of


connections, management of connections, terminations of sessions between
two devices. It also provides authentication and security. Protocols used in the
Session Layer are NetBIOS, PPTP.

Functions of the Session Layer

 Session Establishment, Maintenance, and Termination: The layer


allows the two processes to establish, use, and terminate a connection.

 Synchronization: This layer allows a process to add checkpoints that are


considered synchronization points in the data. These synchronization points
help to identify the error so that the data is re-synchronized properly, and
ends of the messages are not cut prematurely, and data loss is avoided.

 Dialog Controller: The session layer allows two systems to start


communication with each other in half-duplex or full duplex.

Example

Let us consider a scenario where a user wants to send a message through some
Messenger application running in their browser. The “Messenger” here acts as
the application layer which provides the user with an interface to create the
data. This message or so-called Data is compressed, optionally encrypted (if
the data is sensitive), and converted into bits (0’s and 1’s) so that it can be
transmitted.

Communication in Session Layer


Layer 6 – Presentation Layer

The presentation layer is also called the Translation layer. The data from the
application layer is extracted here and manipulated as per the required format
to transmit over the network. Protocols used in the Presentation Layer
are JPEG, MPEG, GIF, TLS/SSL, etc.

Functions of the Presentation Layer

 Translation: For example, ASCII to EBCDIC.

 Encryption/ Decryption: Data encryption translates the data into another


form or code. The encrypted data is known as the ciphertext, and the
decrypted data is known as plain text. A key value is used for encrypting as
well as decrypting data.

 Compression: Reduces the number of bits that need to be transmitted on


the network.
Layer 7 – Application Layer

At the very top of the OSI Reference Model stack of layers, we find the
Application layer which is implemented by the network applications. These
applications produce the data to be transferred over the network. This layer
also serves as a window for the application services to access the network and
for displaying the received information to the user. Protocols used in the
Application layer are SMTP, FTP, DNS, etc.

Application Layer

Functions of the Application Layer

The main functions of the application layer are given below.

 Network Virtual Terminal (NVT): It allows a user to log on to a remote


host.

 File Transfer Access and Management (FTAM): This application allows


a user to access files in a remote host, retrieve files in a remote host, and
manage or control files from a remote computer.

 Mail Services: Provide email service.

 Directory Services: This application provides distributed database sources


and access for global information about various objects and services.

How Data Flows in the OSI Model?

When we transfer information from one device to another, it travels through 7


layers of OSI model. First data travels down through 7 layers from the
sender’s end and then climbs back 7 layers on the receiver’s end.
Data flows through the OSI model in a step-by-step process:

 Application Layer: Applications create the data.

 Presentation Layer: Data is formatted and encrypted.

 Session Layer: Connections are established and managed.

 Transport Layer: Data is broken into segments for reliable delivery.

 Network Layer: Segments are packaged into packets and routed.

 Data Link Layer: Packets are framed and sent to the next device.

 Physical Layer: Frames are converted into bits and transmitted physically.

You might also like