Download as pdf or txt
Download as pdf or txt
You are on page 1of 41

Module-2

Switching
NEED FOR SWITCHING

• Whenever we have many devices, the interconnection between them


becomes more difficult as the number of devices increases. Some of
the conventional ways of interconnecting devices are:
– Point-to-point connection between devices as in a mesh topology

– Connection between a central device and every other device – as in star


topology.

– Bus topology – not practical if the devices are at great distances

• All these techniques require extensive cabling, dependence on a


central server or a central bus.

• The better solution to this interconnectivity problem is switching.


What is a Switched Network?
• A switched network consists of a series of interlinked nodes, called
switches.

• A switch is a hardware/software device that creates temporary


connections between two or more systems.

• Some of the switches are connected to the end systems (computers or


telephones) and others are used only for routing.
CLASSIFICATION OF SWITCHING
TECHNIQUES
CIRCUIT SWITCHING
• Circuit-switching takes place at the physical layer in the OSI model.

• A dedicated path is established between two end stations.

• Before communication between 2 computers starts, they must reserve


the resources such as channels, switch buffers, switch processing
time, and these must be reserved during the entire duration of data
transfer.

• In case data transfer is by FDM, a bandwidth must be reserved and if


it is by TDM, a time slot must be reserved.

• Data is sent in a continuous flow from source to destination. Data is


not broken up into packets.

• During the setup phase addressing is involved, but once data


transmission begins, addressing is not involved.
Circuit Switching: Multiplexing a Link
• Time-division • Frequency-division
– Each circuit allocated – Each circuit allocated
certain time slots certain frequencies

frequency
time time

7
PHASES IN CIRCUIT-SWITCHING NETWORKS
• The actual communication in circuit-
switching requires 3 phases:
– connection setup or circuit establishment,
– data transfer, and
– connection teardown or circuitdisconnect.
Phase-1 Connection Setup
1. Before the two systems can communicate,
a dedicated circuit (i.e. a combination of
channels and links) must be established.

2. For example, in fig above, when system A


needs to communicate to system M, it sends
a setup request to switch I. This request
contains the address of system M.

3. Switch I finds a channel between itself and


switch IV.

4. Switch I then sends the request to switch IV.


Switch IV finds a
5. dedicated channel between itself and switch
III.

6. Switch III informs system M that system A


wants to communicate.

7. System M then sends an acknowledgement


in the opposite direction to system A. Once
A receives the acknowledgment, the
connection is established.
Phase-2 : Data Transfer
– Once a dedicated path is established between the two
systems, data transfer can take place.

Phase-3: Tear-down Phase


– When one of the systems needs to disconnect (e.g., after
data transfer is completed or after a time-out event), a call
disconnect signal is sent to each switch to release the
resources.
Advantages and Disadvantages

Advantages
• Since a circuit is dedicated to a data transmission there is no interference andno sharing of
data.
• The full bandwidth of the channel is guaranteed for the duration of the call.

Disadvantages
• Circuit establishment and circuit disconnect introduces an extra overhead and delay.
• Constant data rate from source to destination.
• Channel capacity, is dedicated for the duration of the connection even if there is no data
transfer.
• Inefficient for bursty traffic.
• Circuit switching treats all transmission as equal. There is no priority among transmission of
data.
Timing in Circuit Switching

Host 1 Host 2
Switch 1 Switch 2

Transmission delay
propagation delay
between Host 1
Circuit and Switch1
Establishment propagation delay
between Host 1
and Host 2

Transfer
Information
time
Circuit
Teardown
End-to-end delay in a circuit switched network

Total delay = setup delay +3T+ 3τ + teardown delay


ISSUES
Efficiency:
• Circuit-switched networks are not as efficient as packet and message- switched
networks.
• A channel is a resource and it is allocated during the entire duration of the connection.
These resources are not available to other systems. E.g., once a dedicated path is established
between two computers, the path may remain connected even when no data transmission
is taking place.

Delay:
The total delay is due to the time needed to create a connection, transfer data, and
disconnect the circuit.
The delay caused is the sum of
• Request signal transfer time,
• Propagation time of the source computer request,
• Signal transfer time of the acknowledgment, and
• Propagation time of the acknowledgement from the destination to the
source
The delay due to transfer is the sum of two parts: data transfer time and propagation time
DATAGRAM NETWORKS (PACKET-SWITCHED NETWORK)
OR CONNECTIONLESS NETWORK.

Characteristics:
1) Create Packets:
-Before transmission, a message is broken down into smaller segments
called packets of a particular size.
-This size may be fixed or variable.
-The size of the packet is determined by the network and the protocol.
-Typically, packet size is 1000 bytes.
-Each packet contains user’s data and some control information.
2) No resource allocation:
-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.
• Store-and-Forward: The packets are passed from node to node
and the nodes may store the data briefly before passing it to the
next node.
• Delay: When a switch receives a packet, the packet must wait if
there are other packets being processed. This can create a delay.
A switch uses its routing table to decide the port that is to be used.
• Packets are independent entities: In a datagram network, each
packet is treated independently of all others. Even if a packet is
part of a multipacket transmission, the network treats it as though it
existed alone. Packets in this approach are referred to as
datagrams.
• Different Routes: The different packets of a message may follow
different routes before they reach the destination. This may happen
because a link is already involved in carrying packets from other
sources and there is not enough bandwidth to carry more packets.
• Variable Delay due to different paths: Since the packets can
follow different routes there is a variable amount of delay and the
packets may arrive out of order at the destination. Some packets
may also be lost.
•Reordering of datagrams: An upper-layer protocol will reorder
the datagrams or ask for lost datagrams before passing them on to
the application layer. The Internet Protocol (IP) transports data in
packets called datagrams.

•Connectionless: Datagram networks are also called


connectionless networks. It means that a switch does not keep
information about the connection state. There are no setup or
teardown phases.

• Datagram switching is done at the network layer.

•The switches in a datagram network are traditionally referred to


as routers.
Datagram Approach
Note
A switch in a datagram network uses a routing table that is based on the destination
address.
The destination address in the header of a packet in a datagram network
remains the same during the entire journey of the packet.

8.22
Figure 8.8 Routing table in a datagram network

8.23
Figure 8.9 Delay in a datagram network

Total delay = 3T+ 3τ +W1+W2

8.24
Note
Switching in the Internet is done by using the datagram approach
to packet switching at
the network layer.

8.25
8-3 VIRTUAL-CIRCUIT NETWORKS

A virtual-circuit network is a cross between a circuit-


switched network and a datagram network. It has some
characteristics of both.

8.26
Figure 8.10 Virtual-circuit network

8.27
Virtual Circuit

• Preplanned route established before any packets sent


• Call request and call accept packets establish
connection (handshake)
• Each packet contains a virtual circuit identifier
instead of destination address
• No routing decisions required for each packet
• Clear request to drop circuit
• Not a dedicated

8.28
Switched Virtual Circuit
Switched Virtual Circuit
Switched Virtual Circuit
Addressing issues in Virtual-circuit Networks

Virtual circuit networks involve two addresses:


• Global address: A source or a destination must have a global address
i.e., an address that is unique in the scope of the network.

• Virtual-circuit Identifier: The identifier that is actually used for data


transfer is called the virtual-circuit identifier (VCI).
– A VCI is a small number that has only switch scope;
– it is used between two switches.
– When a frame arrives at a switch, it has a VCI; when it leaves, it has a different
VCI.
– The VCI in a data frame changes from one switch to another in this fig.
Note

In virtual-circuit switching, all packets belonging to the


same source and
destination travel the same path;
but the packets may arrive at the destination with
different delays
if resource allocation is on demand.

8.33
Figure 8.11 Virtual-circuit identifier

8.34
Figure 8.12 Switch and tables in a virtual-circuit network

8.35
Figure 8.13 Source-to-destination data transfer in a virtual-circuit network

8.36
Figure 8.14 Setup request in a virtual-circuit network

8.37
Figure 8.15 Setup acknowledgment in a virtual-circuit network

8.38
Delay in a datagram network for one single packet

Total delay = setup delay +3T+ 3τ + teardown delay


Note
Switching at the data link layer in a switched WAN is normally
implemented by using
virtual-circuit techniques.

8.40
S(witched)VC vs. P(ermanent)VC setup

A virtual circuit can be either switched or permanent.

If permanent, an outgoing VCI is given to the source,


and an incoming VCI is given to the destination.

The source always uses this VCI to send frames to


this particular destination.

The destination knows that the frame is coming from


that particular source if the frame carries the
corresponding incoming VCI.

If a duplex connection is needed, two virtual circuits


are established.

8.41
S(witched)VC vs. P(ermanent)VC setup

A PVC has several drawbacks:

1. Always connected, so always paying

2.Connection is between two parties only. If


you need a connection to another point, you
need another PVC.

Don’t like these disadvantages? Use an SVC.

8.42
Advantages
• Packet-switching is more economical than transmission over
private/dedicated lines if the data transmission is short.

• Different packets can travel along different routes till they reach their
destination. Thus, a failure in one switch/node or a particular link
does not affect data communication.

• Packets are accepted even when network is busy.

• Priority scheme can be used (some packets/messages have a higher


priority than others)
D:\Academic Year 2017-18\Summer Semester -I
- 2017-18\CSE1004-Network and
Communication\CAT-1\Difference between CS
and PS.pdf

You might also like