You are on page 1of 31

Packet Switching

By R VIJAYAN,Assistant Professor(SG),SITE,VIT University


Outline

Limitations of Circuit Switching?


Message switching
Packet Switching concepts
Packet Switching Techniques:
Virtual Circuit
Datagram
Datagram versus virtual circuit
Internal and External operations
Circuit switching versus packet switching

By R VIJAYAN,Assistant Professor(SG),SITE,VIT University


Problems with circuit switching

Network resources are dedicated to a particular


connections.
Two shortcomings for data communication.
In a typical user/host data connections line utilization
is very low.
Provides facility for data transmission at a constant
rate.
Data transmission pattern may not ensure this.
Limits the utility of the method.

By R VIJAYAN,Assistant Professor(SG),SITE,VIT University


Message switching
Basic idea:
Each network node receives and stores the message(stored and
forward)
Determines the next leg of the route, and
Queues the message to go out on that link.
Advantages:
Line efficiency is greater (sharing of links).
Data rate conversion is possible.
Even under heavy traffic, messages are accepted, possibly with
a greater delay in delivery.
Message priorities can be used, to satisfy the requirements, if
any.
Disadvantages: Message of large size monopolizes the
link and storage

By R VIJAYAN,Assistant Professor(SG),SITE,VIT University


Message switching

By R VIJAYAN,Assistant Professor(SG),SITE,VIT University


Packet Switching
New form of architecture for long-distance data
communication(1970).
Packet switching technology has evolved over
time.
Basic technology has not changed
Packets switching remains one of the few effective
technologies for long-distance data communication.
WAN used Packet switching network.

By R VIJAYAN,Assistant Professor(SG),SITE,VIT University


Packet Swiching:Basic Idea
Based on the same store-and-forward approach
Data are transmitted in short packets(few Kbytes).
A longer message is broken up into a series of packets.
Every packet contains some control information in its header(required
for routing and other purposes).
Header
Src address,dest address ,seq no.

Trailer
For error detection and correction purposes

By R VIJAYAN,Assistant Professor(SG),SITE,VIT University


Advantages
Line efficiency
Single node to node link can be shared by many packets over
time
Packets queued and transmitted as fast as possible
Data rate conversion
Each station connects to the local node at its own speed
Nodes buffer data if required to equalize rates
Packets are accepted even when network is busy
Delivery may slow down
Priorities can be used

By R VIJAYAN,Assistant Professor(SG),SITE,VIT University


Packet Switching Techniques
As mentioned earlier, a packet switching
network breaks up a message into packets.
Two approaches are commonly used for
handling these packets:
Virutual Circuit
Datagram

By R VIJAYAN,Assistant Professor(SG),SITE,VIT University


Virtual Circuit Approach
A preplanned route is established before any packets
are sent.
Call Request and Call accept packets are used to
establish the connection.
Route is fixed for the duration of the logical
connection(like circuit switching)(no dedicated path).
Each packet contains a virtual circuit identifier(VCI) as well as
data
Each node on the route knows where to forward packets.
A Clear Request packet issued by one of the two
stations terminates the connection.
Not a dedicated path

By R VIJAYAN,Assistant Professor(SG),SITE,VIT University


Connection Setup
Connect Connect Connect
request request request
SW SW SW
1 2 n
Connect Connect Connect
confirm confirm confirm

Signaling messages propagate as route is selected


Signaling messages identify connection and setup tables in
switches
Typically a connection is identified by a local tag, Virtual
Circuit Identifier (VCI)
Each switch only needs to know how to relate an incoming
tag in one input to an outgoing tag in the corresponding
output
Once tables are setup, packets can flow along path

By R VIJAYAN,Assistant Professor(SG),SITE,VIT University


Virtual
Circuit

By R VIJAYAN,Assistant Professor(SG),SITE,VIT University


Virtual Ciruit

By R VIJAYAN,Assistant Professor(SG),SITE,VIT University


Routing in Virtual-Circuit Packet
Networks

2
1 7 8
1 3 B
A 3
5 1 6 5
4 2
VCI
Host 4

3 5 Switch or router
2
C 5
6
2 D

Route determined during connection setup


Tables in switches implement forwarding that realizes
selected route
By R VIJAYAN,Assistant Professor(SG),SITE,VIT University
Routing Tables in VC Packet
Networks
Node 3
Incoming Outgoing
Node 1 Node VCI Node VCI Node 6
Incoming Outgoing 1 2 6 7 Incoming Outgoing
Node VCI Node VCI 1 3 4 4 Node VCI Node VCI
A 1 3 2 4 2 6 1 3 7 B 8
A 5 3 3 6 7 1 2 3 1 B 5
3 2 A 1 6 1 4 2 B 5 3 1
3 3 A 5 4 4 1 3 B 8 3 7

Node 4
Incoming Outgoing
Node VCI Node VCI
Node 2 2 3 3 2
Node 5
3 4 5 5
Incoming Outgoing 3 2 2 3 Incoming Outgoing
Node VCI Node VCI 5 5 3 4 Node VCI Node VCI
C 6 4 3 4 5 D 2
4 3 C 6 D 2 4 5

Example: VCI from A to D


From A & VCI 5 3 & VCI 3 4 & VCI 4
5 & VCI 5 D & VCI 2

By R VIJAYAN,Assistant Professor(SG),SITE,VIT University


Virtual Circuit
Main characteristics:
Route between stations is set up prior to data transfer.
A packet is buffered at each node, and queued for output over a
line.
A data packet needs to carry only the virtual circuit identifier for
effecting routing decisions.
Intermediate nodes take no routing decisions.
Often provides sequencing and error control.
The most common forms of Virtual Circuit networks are
X.25 and Frame Relay, which are commonly used for
public data networks (PDN).

By R VIJAYAN,Assistant Professor(SG),SITE,VIT University


Datagram Approach
Each packet is treated independently, with no reference
to packets that have gone before.
Every intermediate node has to take routing decisions.
Every packet contains source and destination addresses.
Intermediate nodes maintain routing tables.
Packets can take any practical route
Packets may arrive out of order
Packets may go missing
Up to receiver to re-order packets and recover from
missing packets

By R VIJAYAN,Assistant Professor(SG),SITE,VIT University


Datagram
Diagram

By R VIJAYAN,Assistant Professor(SG),SITE,VIT University


Datagram approach

By R VIJAYAN,Assistant Professor(SG),SITE,VIT University


Routing Tables in Datagram Packet
Networks
Node 3

Node 1 Destination Next node Node 6


Destination Next node 1 1 Destination Next node
2 4 1 3
2 2
3 3 4 4 2 5
5 6 3 3
4 4
6 6 4 3
5 2
6 3 5 5

Node 4
Destination Next node
1 1
2 2
Node 2 Node 5
3 3
Destination Next node Destination Next node
5 5
1 1 1 4
6 3
3 1 2 2
4 4 3 4
5 5 4 4
6 5 6 6

By R VIJAYAN,Assistant Professor(SG),SITE,VIT University


Datagram Approach
Advantages:
Call setup phase is avoided(for transmission for a few
packets,datagram will be faster).
It is more primitive,it is more flexible.
Congestion/failed link can be avoided(more
relieable).
Problems:
Packets may be delivered out of order.
If a node crashes momemtarily, all of its queued
packets are lost.

By R VIJAYAN,Assistant Professor(SG),SITE,VIT University


Virtual Circuits v Datagram
Virtual circuits
Packets are forwarded more quickly->No routing decisions to
made by Node.
More difficult to adopt to congestion.
Network can provide sequencing and error control
All packets are sent through the same preplanned route.
Vitual Circuit Identifier.
Less reliable
Loss of a node looses all circuits through that node
Datagram
Each packet is treated independently.
No call setup phase->Better if few packets,Lesser delay
More flexible
Routing can be used to avoid congested parts of the network

By R VIJAYAN,Assistant Professor(SG),SITE,VIT University


Packet Size
As packet size is increased,the transmission time
reduces until it is comparable to the size of control
information.(header and trailer-Overhead)
There is a close relationship between packet size and
transmission time.
Example: Assume that there is a virtual circuit from
station A through nodes 1,2,4 and 5, to station
C.Message size is 32 bytes,packet header is 4 bytes.

By R VIJAYAN,Assistant Professor(SG),SITE,VIT University


Packet Size
In spite of increase
in overhead, the
transmission time
decreases because
of parallelism in
transmission

By R VIJAYAN,Assistant Professor(SG),SITE,VIT University


External and Internal operations
Whether to use virtual circuit or datagram
Two dimensions to the problem:
External->Between station and a network node , may
have connection-oriented or connectionless service.
Internally,the network may use VC or
datagrams(DG).
Leads to four differenct scenarios
External VC,Internal VC
External VC,Internal DG
External DG,Internal DG
External DG,Internal VC

By R VIJAYAN,Assistant Professor(SG),SITE,VIT University


Scenario 1: External VC,Internal VC
When the user requests a VC,a dedicated route
through the network is constructed.
All packets follow the same route.

By R VIJAYAN,Assistant Professor(SG),SITE,VIT University


Scenario 2: External VC,Internal DG
The network handles each packet separately.
Different packets for the same external VC may take different
routes.
The Network buffers packets,if necessary,so that they ar
delivered to the destination in the proper order.

By R VIJAYAN,Assistant Professor(SG),SITE,VIT University


Scenario 3: External DG,Internal DG
Each packet is treated independently from both
the users end and the networks point of view.

By R VIJAYAN,Assistant Professor(SG),SITE,VIT University


Scenario 4: External DG,Internal VC
The External user does not see any connections it
simply sends packets one at a time.
The network sets up a logical connection between
stations for packet delivery.
May leave such connections in place for an extended
period,so as to satisfy anticipated future needs.

By R VIJAYAN,Assistant Professor(SG),SITE,VIT University


Event Timing

By R VIJAYAN,Assistant Professor(SG),SITE,VIT University


Comparison

By R VIJAYAN,Assistant Professor(SG),SITE,VIT University