Switching Techniques
❑ In large networks there might be multiple paths linking sender
and receiver. Information may be switched as it travels through
various communication channels.
Fig. Switched Network
Source: B. A. Forouzan, “ Data Communications and Networking ,” McGraw-
Hill Forouzan Networking Series,5E. 2
Switching Techniques
Source: B. A. Forouzan, “ Data Communications and Networking ,” McGraw-
Hill Forouzan Networking Series,5E. 3
Circuit Switching
❑ Circuit switching is a technique that directly connects the sender and the
receiver in an unbroken path.
❑ Telephone switching equipment, for example, establishes a path that connects
the caller's telephone to the receiver’s telephone by making a physical
connection.
❑ With this type of switching technique, once a connection is established, a
dedicated path exists between both ends until the connection is terminated.
❑ Routing decisions must be made when the circuit is first established, but there
are no decisions made after that time.
Prof. Sudip Misra, IIT Kharagpur 4
Circuit Switching
❑ Circuit switching in a network operates almost the same way as the telephone
system works.
❑ A complete end-to-end path must exist before communication can take place.
❑ The computer initiating the data transfer must ask for a connection to the
destination.
❑ Once the connection has been initiated and completed to the destination device,
the destination device must acknowledge that it is ready and willing to carry on a
transfer.
Prof. Sudip Misra, IIT Kharagpur 5
Circuit Switching
Source: B. A. Forouzan, “ Data Communications and Networking ,” McGraw-
Hill Forouzan Networking Series,5E.
Prof. Sudip Misra, IIT Kharagpur 6
Circuit Switching
❑ Advantages:
➢ The communication channel (once established) is dedicated.
❑ Disadvantages:
➢ Possible long wait to establish a connection, (10 seconds, more on long-
distance or international calls.) during which no data can be transmitted.
➢ More expensive than any other switching techniques, because a dedicated path
is required for each connection.
➢ Inefficient use of the communication channel, because the channel is not used
when the connected systems are not using it.
Prof. Sudip Misra, IIT Kharagpur 7
Message Switching
❑ With message switching there is no need to establish a dedicated
path between two stations.
❑ When a station sends a message, the destination address is
appended to the message.
❑ The message is then transmitted through the network, in its entirety,
from node to node.
❑ Each node receives the entire message, stores it in its entirety on
disk, and then transmits the message to the next node.
❑ This type of network is called a store-and-forward network.
Prof. Sudip Misra, IIT Kharagpur 8
Message Switching
❑ A message-switching node is typically a general-purpose computer.
The device needs sufficient secondary-storage capacity to store the
incoming messages, which could be long. A time delay is introduced
using this type of scheme due to store- and-forward time, plus the time
required to find the next node in the transmission path.
Source: Ecomputers “Switching-Techniques”, [Online], Available:
Prof. Sudip Misra, IIT Kharagpur [Link]
9
Message Switching
Advantages:
❑ Channel efficiency can be greater compared to circuit- switched
systems, because more devices are sharing the channel.
❑ Traffic congestion can be reduced, because messages may be
temporarily stored in route.
❑ Message priorities can be established due to store-and-forward
technique.
❑ Message broadcasting can be achieved with the use of broadcast
address appended in the message.
Prof. Sudip Misra, IIT Kharagpur 10
Message Switching
Disadvantages
❑ Message switching is not compatible with interactive applications.
❑ Store-and-forward devices are expensive, because they must have
large disks to hold potentially long messages.
Prof. Sudip Misra, IIT Kharagpur 11
Packet Switching
❑ Packet switching can be seen as a solution that tries to combine the
advantages of message and circuit switching and to minimize the
disadvantages of both.
❑ There are two methods of packet switching: Datagram and
virtual
Source: Kataria, “Modem-Switching-Techniques”, [Online], Available:
[Link]
Prof. Sudip Misra, IIT Kharagpur 12
Packet Switching
❑ In both packet switching methods, a message is broken into small parts, called
packets.
❑ Each packet is tagged with appropriate source and destination addresses.
❑ Since packets have a strictly defined maximum length, they can be stored in
main memory instead of disk, therefore access delay and cost are minimized.
❑ Also the transmission speeds, between nodes, are optimized.
❑ With current technology, packets are generally accepted onto the network on a
first-come, first-served basis. If the network becomes overloaded, packets are
delayed or discarded.
Prof. Sudip Misra, IIT Kharagpur 13
Packet Switching : Datagram
❑ Datagram packet switching is similar to message switching in that each packet is a
self-contained unit with complete addressing information attached.
❑ This fact allows packets to take a variety of possible paths through the network.
❑ So the packets, each with the same destination address, do not follow the same route,
and they may arrive out of sequence at the exit point node (or the destination).
❑ Reordering is done at the destination point based on the sequence number of
the packets.
❑ It is possible for a packet to be destroyed if one of the nodes on its way is crashed
momentarily. Thus all its queued packets may be lost.
Prof. Sudip Misra, IIT Kharagpur 14
Packet Switching : Datagram
Fig. Datagram Networks Fig. Routing Table in
Datagram Networks
Source: B. A. Forouzan, “ Data Communications and Networking ,” McGraw-
Hill Forouzan Networking Series,5E.
Prof. Sudip Misra, IIT Kharagpur 15
Delay in Datagram Network
The total delay is due to the time needed to create the connection, transfer data, and disconnect
the circuit.
Delay caused by the setup is the sum of four parts: the propagation time of the source computer
request, the request signal transfer time, the propagation time of the acknowledgment from the
destination computer, and the signal transfer time of the acknowledgment.
The delay due to data transfer is the sum of two parts: the propagation time and data transfer
time, which can be very long.
Source: B. A. Forouzan, “ Data
Communications and Networking ,”
McGraw-Hill Forouzan Networking
Series,5E.
Prof. Sudip Misra, IIT Kharagpur 16
Packet Switching : Virtual Circuit
❑ In the virtual circuit approach, a preplanned route is established before any
data packets are sent.
❑ A logical connection is established when
➢ a sender send a "call request packet" to the receiver and
➢ the receiver send back an acknowledge packet "call accepted packet" to the
sender if the receiver agrees on conversational parameters.
❑ The conversational parameters can be maximum packet sizes, path to be
taken, and other variables necessary to establish and maintain the
conversation.
❑ Virtual circuits imply acknowledgements, flow control, and error control, so
virtual circuits are reliable.
❑ That is, they have the capability to inform upper-protocol layers if a
transmission problem occurs.
Prof. Sudip Misra, IIT Kharagpur 17
Packet Switching : Virtual Circuit
VC's offer guarantees that:
❑ the packets sent arrive in the
order sent
❑ with no duplicates or omissions
❑ with no errors (with high
probability) regardless of how
they are implemented internally.
Source: B. A. Forouzan, “ Data Communications and Networking ,” McGraw-
Hill Forouzan Networking Series,5E.
Prof. Sudip Misra, IIT Kharagpur 18
Addressing in Virtual Circuit
In a virtual-circuit network, two types of addressing are involved: global and
local.
Global Address
Global address in virtual-circuit networks is used only to create a virtual-circuit
identifier.
Virtual-Circuit Identifier
The identifier that is actually used for data transfer is called the virtual-circuit
identifier (Vel)
Fig.: Vel
Source: B. A. Forouzan, “ Data Communications and Networking ,” McGraw-
Prof. Sudip Misra, IIT Kharagpur Hill Forouzan Networking Series,5E. 19
Three Phases
▪ Source and destination need to go through three phases in a virtual-circuit
network: setup, data transfer, and teardown.
▪ In the setup phase, the source and destination use their global addresses to
help switches make table entries for the connection.
▪ In the teardown phase, the source and destination inform the switches to
delete the corresponding entry.
▪ Data transfer occurs between these two phases.
Prof. Sudip Misra, IIT Kharagpur 20
Setup Phase
▪ In the setup phase, a switch creates
an entry for a virtual circuit.
▪ For example, suppose source A
needs to create a virtual circuit to B.
▪ Two steps are required: the setup
request and the acknowledgment.
Fig.: Switch and tables in a virtual-circuit network
Source: B. A. Forouzan, “ Data Communications and Networking ,” McGraw-
Hill Forouzan Networking Series,5E.
Prof. Sudip Misra, IIT Kharagpur 21
Setup Request
Source: B. A. Forouzan, “ Data Communications and Networking ,” McGraw-
Hill Forouzan Networking Series,5E.
Prof. Sudip Misra, IIT Kharagpur 22
Setup Acknowledgement
Source: B. A. Forouzan, “ Data Communications and Networking ,” McGraw-
Hill Forouzan Networking Series,5E.
Prof. Sudip Misra, IIT Kharagpur 23
Data Transfer Phase
[Link]
FpbnxlZWJhaHJpYTV8Z3g6MjE2MzY2MjcxMGU3MmQ4Nw
Prof. Sudip Misra, IIT Kharagpur 24
Data Teardown Phase
▪ In this phase, source A, after sending all frames to B, sends a special frame
called a teardown request.
▪ Destination B responds with a teardown confirmation frame.
▪ All switches delete the corresponding entry from their tables.
Prof. Sudip Misra, IIT Kharagpur 25
Delay in Virtual-Circuit Network
Source: B. A. Forouzan, “ Data Communications and Networking ,” McGraw-
Hill Forouzan Networking Series,5E.
Prof. Sudip Misra, IIT Kharagpur 26
Packet Switching
Advantages:
❑Packet switching is cost effective, because switching devices do not need
massive amount of secondary storage.
❑Packet switching offers improved delay characteristics, because there are no
long messages in the queue (maximum packet size is fixed).
❑Packet can be rerouted if there is any problem, such as, busy or disabled
links.
❑The advantage of packet switching is that many network users can share the
same channel at the same time. Packet switching can maximize link efficiency
by making optimal use of link bandwidth.
Prof. Sudip Misra, IIT Kharagpur 27
Packet Switching
Disadvantages:
Protocols for packet switching are typically more complex.
It can add some initial costs in implementation.
If packet is lost, sender needs to retransmit the data.
Another disadvantage is that packet-switched systems still can’t deliver the
same quality as dedicated circuits in applications requiring very little delay - like
voice conversations or moving images.
Prof. Sudip Misra, IIT Kharagpur 28
Thank You!!!
29