Two or more devices connect to form a network.
In a network, the devices should be able to
do one-to-one communication.
For this, we can set up point-to-point connections
among them via mesh topology or star topology.
However, it becomes impractical when the number
of computers increases.
A solution to this problem is switching, where
devices called switches, interlinked to each
other, are used to set up temporary point-to-point
connections among the end systems.
End systems connect directly to the switches.
In a network, there are two fundamental approaches
to transfer data from one device to another
� circuit switching and packet switching.
Suppose there are two restaurants � A and
B. Restaurant A accepts reservation while
restaurant B does not.
If I want to go to restaurant A, I will have
to book a table.
So, when I arrive at the restaurant, I can
immediately be seated and can order my meal.
On the other hand, restaurant B does not accept
the reservation, so when I arrive at the restaurant,
I may have to wait in the queues before I
can be seated.
Circuit switching is analogous to restaurant
A, which accepts reservation.
On the other hand, packet switching is analogous
to restaurant B, which does not accept the
reservation.
That is, in circuit switching, resources are
reserved for the communication session.
On the other hand, resources are not reserved
in packet switching.
Having packet switching already discussed,
let us focus on circuit switching.
Consider a network containing four switches
interlinked by four links.
Each link has four connections or channels.
Host A and host B are directly connected to
the switches.
If host A wants to communicate host B, then
the network first reserves a channel in the
first and second link, say channel 1 in link
1, and channel 2 in link 2.
The combination of channels is called a circuit.
So, a circuit is set up between host A and
host B. Suppose each link has a transmission
rate of 1 Mbps.
Since each link has four channels, so each
channel has a transmission rate of 250 Kbps.
Hence, each end-to-end connection gets a dedicated
transmission rate of 250 Kbps.
Such a network where the sender-to-receiver
connection receives a guaranteed constant
transmission rate with the help of reserved
resources is called a circuit-switched network,
and the switches are called circuit-switches.
In the current network, each link has four
channels.
These channels or the combination of channels
are reserved for one-to-one communication.
So, what exactly these channels are and how
they are established?
The channels are created with Frequency Division
Multiplexing (FDM) or Time Division Multiplexing
(TDM).
Suppose you have a frequency range of 82MHz
to 83MHz.
The difference between the higher and lower
frequency is 1 MHz.
It is called Bandwidth (BW).
The channels are BW in FDM, and time slots
in TDM.
So, BW or time slots are reserved for sender-receiver
pairs in a circuit-switched network.
Communication in the circuit-switched network
involves three phases:
1.
Connection setup phase
2.
Data transfer phase, and
3.
Connection teardown phase
Suppose host A needs to set up a connection
with host B. Host A sends a connection setup
request to switch 1.
This request contains the address of host
B. Switch 1 finds a channel between itself
and switch 2 that can be reserved for the
communication session.
Switch 1, then, sends the request to switch
2.
Switch 2 finds a channel between itself and
switch 3.
Switch 3, then, informs the host B about the
connection request.
Host B accepts the request and sends an acknowledgement
(ACK) message to host A. Once host A receives
the ACK message, the circuit is established.
It is called the connection setup phase.
After the circuit is established, host A and
host B can transfer data.
It is called the data transfer phase.
When one of the two hosts need to disconnect,
a signal is sent to the switches to release
the reserved resources or channels.
It is called the connection teardown phase.
Please note that the data in circuit-switched
networks is not in the form of packets, and
no addressing is involved during the data
transfer phase.
Addressing is used only in the connection
setup request to reserve channels for one-to-one
communication.
After that, the data from sender to receiver
is a continuous flow.
Circuit-switching takes place at the physical
layer.
Suppose a person is talking to his friend.
After some time, both of them stops talking
for 5 minutes.
For these 5 minutes, the reserved resources
are idle, and cannot be used by any other
ongoing communication because they are reserved
only for their communication session.
Due to this reason, circuit-switched networks
have low efficiency.
However, the delay in this type of network
is minimal because there is no waiting at
the switches as the circuit is already set
up before data transfer.
The delay is only due to the time needed to
set up the connection, transfer data, and
terminating 
the circuit.
