Switching
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.
Switching
takes place at the Data Link layer of the OSI Model. This means that after the
generation of data packets in the Physical Layer, switching is the immediate
next process in data communication. In this article, we shall discuss different
processes involved in switching, what kind of hardware is used in switching,
etc.
Network
Switching:
A
switch is a dedicated piece of computer hardware that facilitates the process
of switching i.e., incoming data packets and transferring them to their
destination. A switch works at the Data Link layer of the OSI Model. A switch
primarily handles the incoming data packets from a source computer or network
and decides the appropriate port through which the data packets will reach
their target computer or network.
A
switch decides the port through which a data packet shall pass with the help of
its destination MAC(Media Access Control) Address. A switch does this
effectively by maintaining a switching table, (also known as forwarding table).
A
network switch is more efficient than a network Hub or repeater because it
maintains a switching table, which simplifies its task and reduces congestion
on a network, which effectively improves the performance of the network.
Types
of Switching
There
are three types of switching methods:
· Message
Switching
· Circuit
Switching
· Packet
Switching
§ Datagram
Packet Switching
§ Virtual
Circuit Packet Switching

Message
Switching:
Message
switching was a technique developed as an alternative to circuit switching
before packet switching was introduced. In message switching, end-users
communicate by sending and receiving messages that included the entire data to
be shared. Messages are the smallest individual unit.
Also,
the sender and receiver are not directly connected. There are a number of
intermediate nodes that transfer data and ensure that the message reaches its
destination. Message switched data networks are hence called hop-by-hop
systems.
They
provide 2 distinct and important characteristics:
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:

Characteristics
of message switching –
Message
switching is advantageous as it enables efficient usage of network resources.
Also, because of the store-and-forward capability of intermediary nodes,
traffic can be efficiently regulated and controlled. Message delivery as one
unit, rather than in pieces, is another benefit.
However,
message switching has certain disadvantages as well. Since messages are stored
indefinitely at each intermediate node, switches require a large storage
capacity. Also, these are pretty slow. This is because at each node, first
there is a wait till the entire message is received, then it must be stored and
transmitted after processing the next node and links to it depending on
availability and channel traffic. Hence, message switching cannot be used for
real-time or interactive applications like a video conference.
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.
Applications:
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.
Circuit
Switching
In circuit switching network
resources (bandwidth) are divided into pieces and bit delay is constant during
a connection. The dedicated path/circuit established between sender and
receiver provides a guaranteed data rate. Data can be transmitted without any
delays once the circuit is established.
Telephone
system network is one of the example of Circuit switching. TDM (Time Division Multiplexing) and FDM (Frequency Division
Multiplexing) are two methods of multiplexing multiple signals
into a single carrier.
·
Frequency Division Multiplexing : Divides into multiple bands
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 carry different signal.
Practical use in radio spectrum & optical fibre to share multiple
independent signals.
·
Time Division Multiplexing : Divides into frames
Time-division multiplexing (TDM) is a method of transmitting and receiving
independent signals over a common signal path by means of synchronized switches
at each end of the transmission line. TDM is used for long-distance
communication links and bears heavy data traffic loads from end user.
Time division multiplexing (TDM) is also known as a digital circuit switched.
Diagram:

Drawbacks:
Inefficient
use of resources: Circuit switching requires the establishment
of a dedicated communication path between two nodes, which means that the
resources along that path, such as bandwidth and switch ports, are reserved for
the duration of the communication. This can result in inefficient use of
resources, as the resources may remain unused during periods of low or no
communication.
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.
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.
Lack of
flexibility: Circuit switching is not flexible as it only
allows one type of communication at a time, such as voice or data. This can
limit the ability of users to perform multiple tasks simultaneously.
Limited
mobility: Circuit switching is not well-suited for mobile devices or nodes
that move frequently, as it requires the establishment of a dedicated
communication path. This can result in communication disruptions or dropped
calls.
Limited
capacity: Circuit switching can have limited capacity as it
requires the establishment of a dedicated communication path between two nodes.
This can limit the number of simultaneous communications that can occur.
High setup
time: Circuit switching requires a significant setup time to establish
the dedicated communication path between two nodes. This can result in delays
in initiating communication.
No
prioritization: Circuit switching does not provide any mechanism
for prioritizing certain types of traffic over others. This can result in
delays or poor performance for time-critical applications, such as voice or
video.
Advantages of Circuit Switching:
It has the following advantages:
1. The main
advantage of circuit switching is that a committed transmission channel is
established between the computers which give a guaranteed data rate.
2. In-circuit
switching, there is no delay in data flow because of the dedicated transmission
path.
3. 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.
4. 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.
5. 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.
6. 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.
7. 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:
It has the following disadvantages :
1. It takes a
long time to establish a connection.
2. More
bandwidth is required in setting up dedicated channels.
3. It cannot
be used to transmit any other data even if the channel is free as the
connection is dedicated to circuit switching.
4. 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.
5. 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.
6. 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.
7. 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.
8. Not
suitable for bursty traffic: Circuit switching is not
suitable for bursty 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.
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 manner
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 spentstation 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 Circuit , Message and Packet Switching
|
Basics |
Circuit Switching |
Message Switching |
Packet Switching |
|
Connection Creation |
Connection is created between
the source and destination by establishing a dedicated path between source
and destination. |
Links are created
independently one by one between the nodes on the way. |
Links are created
independently one by one between the nodes on the way. |
|
Queuing |
No queue is formed. |
Queue is formed. |
Queue is formed. |
|
Message and Packets |
There is one big entire data
stream called a message. |
There is one big entire data
stream called a message. |
The big message is divided
into a small number of packets. |
|
Routing |
One single dedicated path
exists between the source and destination. |
Messages follow the
independent route to reach a destination. |
Packets follow the independent
path to hold the destination. |
|
Addressing and sequencing |
Messages need not be addressed
as there is one dedicated path. |
Messages are addressed as
independent routes are established. |
Packets are addressed, and
sequencing is done as all the packets follow the independent route. |
|
Propagation Delay |
No |
Yes |
Yes |
|
Transmission Capacity |
Low |
Maximum |
Maximum |
|
Sequence Order |
Message arrives in Sequence. |
Message arrives in Sequence. |
Packets do not appear in
sequence at the destination. |
|
Use Bandwidth |
Wastage |
Bandwidth is used to its
maximum extent. |
Bandwidth is used to its
maximum extent. |
Reference
Website:
1. What is Switching?
- GeeksforGeeks.
Submitted
By:
1.Sudharshan P(21USC024).
2.Kathiravan R(21USC010).
REVIEWED BY:
C R SAKTHIVEL ,MCA.,M.Phil., Ph.D
It's a nice blogspot of switching
ReplyDeleteGood definition about Switching and it's types.
ReplyDeleteIt is helpful to take a reference in website.
ReplyDeleteEasy to learn and understand the concept
ReplyDeleteExcellent work and easy to understand.
ReplyDeleteIt is helpful for learning.
ReplyDeleteIt is helpful to take a reference in website
ReplyDeleteEasy to understand
ReplyDelete