0% found this document useful (0 votes)
48 views

Switching and Types of Switching Techniques

Switching allows devices in a network to communicate through interconnected nodes called switches. There are three main types of switching: circuit switching, packet switching, and message switching. Circuit switching establishes a dedicated physical connection between devices for the duration of their communication. Packet switching divides messages into packets that are routed independently through a network. Virtual circuit switching combines aspects of circuit and packet switching by establishing logical connections between nodes like in circuit switching but transmitting data in packets like in packet switching.

Uploaded by

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

Switching and Types of Switching Techniques

Switching allows devices in a network to communicate through interconnected nodes called switches. There are three main types of switching: circuit switching, packet switching, and message switching. Circuit switching establishes a dedicated physical connection between devices for the duration of their communication. Packet switching divides messages into packets that are routed independently through a network. Virtual circuit switching combines aspects of circuit and packet switching by establishing logical connections between nodes like in circuit switching but transmitting data in packets like in packet switching.

Uploaded by

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

Switching and Types of Switching

Techniques
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.
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. The
following Figure shows a switched network.
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.

There are three methods of switching have


been important:
Circuit Switching,
Packet Switching,
and Message Switching.

Circuit Switched Network


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.

The following figure shows a trivial circuit-


switched network with four switches and four
links. Each link is divided into n (n is 3 in the
figure) channels by using FDM or TDM.
The end systems, such as computers or
telephones, are directly connected to a
switch. 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, data transfer can take place.
After all data have been transferred, the
circuits are tom down. Circuit switching takes
place at the physical layer.
The actual communication in a circuit-
switched network requires three phases:
connection setup
data transfer
connection teardown.
1. Setup Phase:
Before the two parties (or multiple parties in
a conference call) can communicate, a
dedicated circuit (combination of channels in
links) needs to be established. The end
systems are normally connected through
dedicated lines to the switches, so
connection setup means creating dedicated
channels between the switches. For
example, in the above figure when system A
needs to connect to system M, it sends a
setup request that includes the address of
system M, to switch I. Switch I finds a
channel between itself and switch IV that can
be dedicated for this purpose. Switch I then
sends the request to switch IV, which finds a
dedicated channel between itself and switch
III. Switch III informs system M of system
A's intention at this time. In the next step to
making a connection, an acknowledgment
from system M needs to be sent in the
opposite direction to system A. Only after
system A receives this acknowledgment is
the connection established.

2. Data Transfer Phase:


After the establishment of the dedicated
circuit (channels), the two parties can
transfer data.
3. Teardown Phase:
When one of the parties needs to disconnect,
a signal is sent to each switch to release the
resources.

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. These resources are unavailable
to other connections.

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.
As in the above figure, there is no waiting
time at each switch. 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.
Datagram Networks
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 first
come, first-served basis. When a switch
receives a packet, no matter what is the
source or destination, the packet must wait if
there are other packets being processed.
In a datagram network, each packet is
treated independently of all others. Even if a
packet is part of a multi packet 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.

The following 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.

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.
Routing Table:

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.

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.

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. The following figure
gives an example of delay in a datagram
network for one single packet.

The Internet has chosen the datagram


approach to switching at the network layer.
It uses the universal addresses defined in the
network layer to route packets from the
source to the destination.

Virtual-Circuit Network
A virtual-circuit network is a cross between a
circuit-switched network and a datagram
network. It has some characteristics of both.
1. As in a circuit-switched network, there are
setup and teardown phases in addition to the
data transfer phase.

2. Resources can be allocated during the


setup phase, as in a circuit-switched
network, or on demand, as in a datagram
network.
3. As in a datagram network, data are
packetized and each packet carries an
address in the header. However, the address
in the header has local jurisdiction (it defines
what should be the next switch and the
channel on which the packet is being
carried), not end-to-end jurisdiction. The
reader may ask how the intermediate
switches know where to send the packet if
there is no final destination address carried
by a packet.
4. As in a circuit-switched network, all
packets follow the same path established
during the connection.
5. A virtual-circuit network is normally
implemented in the data link layer, while a
circuit-switched network is implemented in
the physical layer and a datagram network in
the network layer. But this may change in
the future.
The following figure is an example of a
virtual-circuit network. The network has
switches that allow traffic from sources to
destinations. A source or destination can be
a computer, packet switch, bridge, or any
other device that connects other networks.

Addressing:
In a virtual-circuit network, two types of
addressing are involved: global and local
(virtual-circuit identifier).
Global Addressing:
A source or a destination needs to have a
global address-an address that can be unique
in the scope of the network or internationally
if the network is part of an international
network.

Virtual-Circuit Identifier:

The identifier that is actually used for data


transfer is called the virtual-circuit identifier
(VCI). A VCI, unlike a global address, is a
small number that has only switch scope. It
is used by a frame between two switches.
When a frame arrives at a switch, it has a
VCI; when it leaves, it has a different VCI.
The following figure show how the VCI in a
data frame changes from one switch to
another. Note that a VCI does not need to be
a large number since each switch can use its
own unique set of VCIs.
Three Phases:

As in a circuit-switched network, a source


and destination need to go through three
phases in a virtual-circuit network: setup,
data transfer, and teardown.

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.

Data Transfer Phase

To transfer a frame from a source to its


destination, all switches need to have a table
entry for this virtual circuit. The table, in its
simplest form, has four columns. This means
that the switch holds four pieces of
information for each virtual circuit that is
already set up. We show later how the
switches make their table entries, but for the
moment we assume that each switch has a
table with entries for all active virtual
circuits.
The following figure shows a frame arriving
at port 1 with a VCI of 14. When the frame
arrives, the switch looks in its table to find
port 1 and a VCI of 14. When it is found, the
switch knows to change the VCI to 22 and
send out the frame from port 3.

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.

Setup Request: A setup request frame is


sent from the source to the destination. The
following figure shows the process.
a. Source A sends a setup frame to switch 1.

b. Switch 1 receives the setup request frame.


It knows that a frame going from A to B goes
out through port 3. The switch, in the setup
phase, acts as a packet switch and it has a
routing table which is different from the
switching table. For the moment, assume
that it knows the output port. The switch
creates an entry in its table for this virtual
circuit, but it is only able to fill three of the
four columns. The switch assigns the
incoming port (1) and chooses an available
incoming VCI (14) and the outgoing port (3).
It does not yet know the outgoing VCI, which
will be found during the acknowledgment
step. The switch then forwards the frame
through port 3 to switch 2.

c. Switch 2 receives the setup request frame.


The same events happen here as at switch 1
and three columns of the table are
completed: in this case, incoming port (l),
incoming VCI (66), and outgoing port (2).

d. Switch 3 receives the setup request frame.


Again, three columns are completed:
incoming port (2), incoming VCI (22), and
outgoing port (3).

e. Destination B receives the setup frame,


and if it is ready to receive frames from A, it
assigns a VCI to the incoming frames that
come from A, in this case 77. This VCI lets
the destination know that the frames come
from A, and no other sources.

Acknowledgment:

A special frame, called the acknowledgment


frame, completes the entries in the switching
tables. The following figure shows the
process.
a. The destination sends an acknowledgment
to switch 3. The acknowledgment carries the
global source and destination addresses so
the switch knows which entry in the table is
to be completed. The frame also carries VCI
77, chosen by the destination as the
incoming VCI for frames from A. Switch 3
uses this VCI to complete the outgoing VCI
column for this entry. Note that 77 is the
incoming VCI for destination B, but the
outgoing VCI for switch 3.

b. Switch 3 sends an acknowledgment to


switch 2 that contains its incoming VCI in the
table, chosen in the previous step. Switch 2
uses this as the outgoing VCI in the table.

c. Switch 2 sends an acknowledgment to


switch 1 that contains its incoming VCI in the
table, chosen in the previous step. Switch 1
uses this as the outgoing VCI in the table.

d. Finally switch 1 sends an acknowledgment


to source A that contains its incoming VCI in
the table, chosen in the previous step.

e. The source uses this as the outgoing VCI


for the data frames to be sent to destination
B.

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.

Efficiency:

• Resource reservation in a virtual-circuit


network can be made during the setup or can
be on demand during the data transfer
phase. In the first case, the delay for each
packet is the same; in the second case, each
packet may encounter different delays.
• There is one big advantage in a virtual-
circuit network even if resource allocation is
on demand. The source can check the
availability of the resources, without actually
reserving it.

You might also like