You are on page 1of 48

SWITCHING

INTRODUCTION
• 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 a switch.
• In a switched network, some of these nodes are
connected to the end systems (computers or
telephones).
• Other nodes are used for routing
Figure 8.1 Switched network

8.3
8.4
SWITCHING AND TCP/IP LAYERS
• At the physical layer, circuit switching only is
possible.
• No packets are exchanged at physical layer.
• Switches at physical layer allow signals to travel in
one path or another.
• At the data link layer, packet switching is possible.
• Packet switching is done using a virtual – circuit
approach.
SWITCHING AND TCP/IP LAYERS
• At the Network layer, packet switching is used.
• Virtual – Circuit approach is used.
• At the application layer, message switching is
used.
• Communication at the application layer occurs
by exchanging messages.
CIRCUIT SWITCHED NETWORKS
• Consists of set of switches connected by
physical links.
• A connection between two stations is a
dedicated path made of one or more links.
• Each connection uses only one dedicated
channel on each link.
• Each link is normally divided into n channels
by using FDM or TDM
Figure 8.3 A trivial circuit-switched network

8.8
CIRCUIT SWITCHED NETWORKS
• In the diagram, the end systems such as
computers or telephones are directly
connected to a switch.
• When end system A wants to communicate
with end system M, system A needs to request
a connection to M.
• This request must be accepted by all switches.
• The above process is called Setup Phase.
CIRCUIT SWITCHED NETWORKS
• After the dedicated path is established, the data
transfer phase takes place.
• After all data have been transferred, the circuits
are torn down.
• Circuit switching takes place at the physical layer.
• Before starting communication, the stations must
make a reservation for the resources to be used
during the communication.
CIRCUIT SWITCHED NETWORKS
• The resources such as channels, switch buffers, switch
processing time, switch input/output ports must remain
dedicated during the entire duration of data transfer until
the teardown phase.
• Data transferred between the two stations are not
packetized.
• Data are continuous flow sent by source station and received
by destination station.
• No addressing is involved during data transfer.
• The switch route the data based on their occupied band
(FDM) or time slot (TDM).
CIRCUIT SWITCHED NETWORKS – THREE
PHASES
• The three phases are
– Connection setup
– Data transfer
– Connection teardown
THREE PHASES OF SWITCHING

8.13
CIRCUIT SWITCHED NETWORKS – THREE
PHASES
• Setup Phase:
– Dedicated circuit needs to be established.
– End systems are normally connected through
dedicated lines to the switches.
– Connection setup – creating dedicated channels
between the switches.
– When system A needs to connect with 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.
CIRCUIT SWITCHED NETWORKS – THREE
PHASES
• Setup Phase:
– Switch I finds a channel between itself and switch
IV. Switch I sends the request to switch IV.
– Switch IV finds a dedicated channel between itself
and switch III. Switch III informs system M about
system A’s intention.
– To establish a connection, an acknowledgement
from system M needs to be sent in the opposite
direction to system A.
– Only after system A receives the
acknowledgement, the connection is established.
CIRCUIT SWITCHED NETWORKS – THREE
PHASES
• Data Transfer Phase
– After the establishment of the dedicated circuit,
two parties can transfer data.
• Teardown Phase
– When one system wants to disconnect, a signal is
sent to each switch to release the resource.
CIRCUIT SWITCHED NETWORKS –
EFFICIENCY & DELAY
• EFFICIENCY
– Circuit switch networks not efficient as the other
two networks.
– Resources are allocated during the entire duration
of the connection.
– Resources are unavailable to other connections.
CIRCUIT SWITCHED NETWORKS –
EFFICIENCY & DELAY
• DELAY
– Circuit switched network has low efficiency.
– Delay is minimal.
– During data transfer the data are not delayed at
each switch.
– No waiting time at each switch.
– Total delay is due to the time needed to create the
connection, transfer data and disconnect the
circuit.
– Delay caused by setup is sum of four parts:
CIRCUIT SWITCHED NETWORKS –
EFFICIENCY & DELAY
• DELAY
– Delay caused by setup is sum of four parts:
• Propagation time of the source computer request
• The request signal transfer time
• The Propagation time of the acknowledgment from the
destination.
• Signal transfer time of the acknowledgement
– Delay caused by data transfer is sum of two parts:
• Propagation time
• Data transfer
Figure 8.6 Delay in a circuit-switched network

8.20
PACKET SWITCHING
• In data communications, we need to send
messages from one end system to another.
• In packet switched network, the messages
must be divided into packets of fixed or
variable size.
• The size of the packet is determined by the
network and governing protocol.
PACKET SWITCHING
• In packet switching, there is no resource
allocation for a packet.
– No reserved bandwidth on the links.
– No scheduled processing time for each packet.
– Resources are allocated on demand.
– The allocation is done on first come first serve
basis.
– When a switch receives a packet, the packet must
wait if there are other packets being processed.
– This lack of reservation causes delay.
PACKET SWITCHING – DATAGRAM
NETWORKS
• In a Datagram network, each packet is treated
independently. Packets are referred as
datagrams.
• Datagram switching is done at Network Layer.
• The following figure explains how datagram
approach is used to deliver four packets from
station A to station X.
• Switches in a Datagram network is referred to
as Routers.
Figure 8.7 A datagram network with four switches (routers)

8.24
PACKET SWITCHING – DATAGRAM
NETWORKS
• All four datagrams belong to the same message. But they
may travel in different paths to reach their destination.
• 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 be lost or dropped because of a lack of
resources.
• It is responsibility of the upper layer to reorder the
datagrams.
• Datagram Networks – Connectionless networks – switch
does not keep information about the connection state.
PACKET SWITCHING – DATAGRAM
NETWORKS
• Routing Table
– No setup phase and tear down phase.
– Each switch has a routing table which is based on
destination address.
– Routing tables are dynamic and updated
periodically.
– Routing table consists of destination address and
forwarding output ports
Figure 8.8 Routing table in a datagram network

8.27
PACKET SWITCHING – DATAGRAM
NETWORKS
• Destination Address
– Every packet carries a header that contains 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.
PACKET SWITCHING – DATAGRAM
NETWORKS
• Efficiency
– Better than circuit switching.
– Resources are allocated only when there are
packets to be transferred.
• Delay
– Greater delay than circuit switching
– Each packet may experience a wait at a switch
before it is forwarded.
– Since all packets do not travel through same
switches, the delay is not uniform
Figure 8.9 Delay in a datagram network

8.30
PACKET SWITCHING – VIRTUAL CIRCUIT
NETWORKS
• Virtual circuit network is a cross between circuit switched
network and datagram network.
• Setup and teardown phase available.
• Resources can be allocated during the setup phase or on
demand.
• Data’s are packetized and each packet carries an address in the
header.
• The address in the header has local jurisdiction – it defines the
next switch and the channel on which the packet is carried.
(Not end to end Jurisdiction)
• All the packets follow the same path established during the
connection.
• Virtual circuit network is implemented in data link layer.
Figure 8.10 Virtual-circuit network

8.32
PACKET SWITCHING – VIRTUAL CIRCUIT
NETWORKS
• Addressing
– Global addressing
– Local addressing
• Global Addressing
– An address that can be unique in the scope of
network
– Global address is used to only create a virtual
circuit identifier.
PACKET SWITCHING – VIRTUAL CIRCUIT
NETWORKS
• Virtual Circuit Identifier
– The identifier is actually used for data transfer is
called virtual circuit identifier (VCI) or Label.
– VCI 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 different VCI
Figure 8.11 Virtual-circuit identifier

8.35
PACKET SWITCHING – VIRTUAL CIRCUIT
NETWORKS
• Three Phases
– In the setup phase, the source and destination use
their global addresses to help switches for
connection.
– In teardown phase, the source and destination
inform the switches to delete the corresponding
entry.
PACKET SWITCHING – VIRTUAL CIRCUIT
NETWORKS
• Data Transfer phase
– To transfer a frame from source to destination, all
switches need to have a table entry for this virtual
circuit.
– The table has four columns. Incoming Port and VCI,
Outgoing Port and VCI.
– The 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 port1 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.
Figure 8.12 Switch and tables in a virtual-circuit network

8.38
PACKET SWITCHING – VIRTUAL CIRCUIT
NETWORKS
• Setup Phase
– A Switch creates an entry for virtual circuit.
– Suppose source A needs to create a virtual circuit
to B.
– Two steps: Setup Request and Ackno
PACKET SWITCHING – VIRTUAL CIRCUIT
NETWORKS
• Setup Request
– Source A sends a frame to switch I.
– Switch I receives the setup request frame.
– It knows that a frame going from A to B goes out through
port 3.
– The switch has the routing table.
– The switch creates an entry in its table and fills three of
four columns.
– The switch assigns the incoming port as 1 and chooses an
available incoming VCI (14) and outgoing port as 3.
– It does not know the outgoing VCI. This will be found in
acknowledgement step.
PACKET SWITCHING – VIRTUAL CIRCUIT
NETWORKS
• Setup Request
– The switch then forwards the frame through port 3
to switch 2.
– Switch 2 receives the setup request frame. The same
events happen here as at switch 1. In this case
incoming port (1), VCI as 66 and outgoing port as 2.
– Switch 3 receives the setup request frame. Again
three fields are filled. Incoming port (2), VCI as 22
and outgoing port (3)
– Destination B receives the setup frame and if it is
ready to receive frame from A it assigns VCI.
Figure 8.13 Source-to-destination data transfer in a virtual-circuit network

8.42
PACKET SWITCHING – VIRTUAL CIRCUIT
NETWORKS
• Acknowledgement
– Destination sends an ACK to switch 3.
– The ACK carries the global source and destination
address so the switch knows which entry in the table is
to be completed.
– The frame carries VCI 77 chosen by destination as the
incoming VCI for frames from A.
– Switch 3 sends an ACK to switch 2 that contains its
incoming VCI table.
– Switch 3 sends an ACK to switch 1 that contains its
incoming VCI
– Finally switch 1 sends an ACK to system A.
Figure 8.14 Setup request in a virtual-circuit network

8.44
PACKET SWITCHING – VIRTUAL CIRCUIT
NETWORKS
• Teardown 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 entry from their tables.
PACKET SWITCHING – VIRTUAL CIRCUIT
NETWORKS
• Efficiency
– Resource reservation can be made setup or on
demand.
– In first case delay for each packet is same.
– In second case, each packet may encounter
different delays.
– Source can check the availability of resources
PACKET SWITCHING – VIRTUAL CIRCUIT
NETWORKS
• Delay
– The packet is travelling through two switches.
– There are three transmission times, Three
propagation times, data transfer, setup delay and
teardown delay
Total delay = 3T+3Propagation Time + setup delay +
teardown delay
PACKET SWITCHING – MESSAGE
SWITCHING
• Message switching is known by store and
forward mechanism.
• In this mechanism, a node receives a message,
stores it until the appropriate route is free and
then sends the message.

You might also like