You are on page 1of 21

Unit-7:

Packet Switching
Packet Switching
 Packet Switchingn Principles
 Switching Techniques
 Datagram Approach
 Virtual Circuit Approach
Overview of Switching
 Switching is the mechanism for moving information between different
network.
 It is the process of forwarding packets coming in from one port to a port
leading towards the destination.
 When data comes on a port it is called ingress and when data leaves a port or
goes out it is called egress.
 In large networks there might be multiple paths linking sender and receiver.
Information may be switched as it travels through various communication
channels.
 Switching helps in deciding the best route for data transmission if there are
multiple paths in a large networks.
 Switching can be done in three ways:
 Circuit switching
 Message switching
 Packet Switching
Overview of Switching: Circuit Switching
 When two nodes communicate with each other over a dedicated communication path then it
is called circuit switching.
 There is a need of pre-specified route from which data will travels and no other data is
permitted.
 In circuit switching a dedicated channel (or circuit) is set up for a single connection between
the sender and recipient during the communication session.
 Once the connection is established between two parties, it will be available till end of the
conversation.
 The channel is reserved between the users till the connection is active.
 A telephone communication system, the normal voice call is the example of circuit switching.
The telephone service provider maintain a unbroken link for each telephone call.
 Application which use circuit switching may have to go through three phases:
 Establish a circuit
 Transfer the data
 Connection teardown
 This method is used by old traditional telephone call carried over PSTN (Public Switched
Telephone Network). It is also referred to as Plain Old Telephone Service (POTS).
Overview of Switching: Circuit Switching
Overview of Switching: Circuit Switching
Advantages:
 It is suitable for long continuous transmission, since a continuous transmission route is
established, that remains throughout the conversation.
 The dedicated path ensures a steady data rate of communication
 No intermediate delays are found once the circuit is established. So they are suitable for real
time communication of both voice and data transmission.
Disadvantages
 Dedicated connection cannot be used for transmitting any other data even if the data load is
very low.
 Bandwidth requirement is very high even in the case of low data volume.
 Time required to establish the connection may be high.
Overview of Switching: Message Switching
 In message switching, it is not necessary to establish a dedicated path between transmitter
and receiver.
 In message switching, when source node sends a message, the destination address is append
to the message. So, in message switching there is no need to establish a dedicated path
between two communication nodes.
 Messages are the smallest individual unit. Also the sender and receiver are not directly
connected. There are a number of intermidate nodes transfer data and ensure that the
message reaches its destination.
 Message switched data networks are hence called as hop by hop systems.
 Characteristics of message switching:
 Store and forward: The intermediate nodes have the responsibility of transferring the
entire message to the next node. Hence each node must have storage capacity. A
message will only be delivered if the next hop and link connecting it both are available
otherwise it will store indefinitely.
 Message delivery: This implies wrapping the entire information in a single message and
transferring it from the source to the destination node. Each message must have a header
that contains the message routing information, including source and destination.
Overview of Switching: Message Switching
Advantages:
 Message switching is advantageous as it enables efficient usage of network resources. Due to
store and forward capability of intermediary nodes, traffic can be efficiently regulate and
controlled.
 Message delivered as one unit rather than in pieces.
 Messages of unlimited sizes can be sent.
 It does not have to deal with out of order packets or lost packets as in packet switching.
 Sharing of communication channels ensure better bandwidth usage.
Disadvantages
 To store many messages of unlimited sizes each intermediate switching node requires large
storage capacity.
 Message switching is very slow because of store and forward technique.
 Message switching is not recommended for real time applications like voice and video.2323
Overview of Switching: Message Switching
Overview of Switching: Message Switching
Advantages:
 Message switching is advantageous as it enables efficient usage of network resources. Due to
store and forward capability of intermediary nodes, traffic can be efficiently regulate and
controlled.
 Message delivered as one unit rather than in pieces.
 Messages of unlimited sizes can be sent.
 It does not have to deal with out of order packets or lost packets as in packet switching.
 Sharing of communication channels ensure better bandwidth usage.
Disadvantages
 To store many messages of unlimited sizes each intermediate switching node requires large
storage capacity.
 No suitable for real time applications due to store and forward method which introduces
delay at each switching node.
Overview of Switching: Message Switching
Advantages:
 Message switching is advantageous as it enables efficient usage of network resources. Due to
store and forward capability of intermediary nodes, traffic can be efficiently regulate and
controlled.
 Message delivered as one unit rather than in pieces.
 Messages of unlimited sizes can be sent.
 It does not have to deal with out of order packets or lost packets as in packet switching.
 Sharing of communication channels ensure better bandwidth usage.
Disadvantages
 To store many messages of unlimited sizes each intermediate switching node requires large
storage capacity.
 No suitable for real time applications due to store and forward method which introduces
delay at each switching node.
Packet Switching
 The difference between packet switching and other forms of statistical multiplexing is that
packet switching divide each message into blocks of data known as packets. Packets can be of
fixed or variable size. The size of packet is determined by the network and the governing
protocol.
 Each packet includes source, destination, intermediate node address information so that
individual packet can be routed through the internetwork independently.
 It is easier for intermediate networking devices to store small size packets and they do not
take much resources either on carrier path or in the internal memory of switches.
 In this, there is no resource allocation for a packet i.e. there is no reserved bandwidth on the
links and there is no scheduled processing time for each packet. Resources are allocated on
demand on the basis of FCFS.
 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. Due to lack of reservation may create delay.
 Two types of packet switching:
 Datagram packet switching
 Virtual Circuit Data switching
Packet Switching : Datagram Switching
 In datagram switching each packet is treated independently of all others.
 Although a packet is a part of multipacket transmission, the network treats it as though it
existed alone. This approach is referred to as datagram.
 Datagram switching is done at network layer.

 In this, all four packets belong to the same message but may travel different paths to reach
their destination. This is because the links may be involved in carrying packets from other
sources and do not have necessary bandwidth available to carry all the packets from A to X.
 This approach can cause the datagrams of a transmission to arrive their destination out of
order with different delays between the packets. And packets may be lost or dropped due to
lack of resources.
Packet Switching : Datagram Switching
 Datagram networks are sometimes called as connectionless networks i.e. switch doesnot
keep information about the connection state.
 There are no setup or teardown phases.
 So a question may raise, if there are no setup and teardown phases, how packets routed to
their destination in a datagram network?
 In this network, each switch has a routing table which is based on destination address.
 This routing table is dynamic and updated periodically. The destination address and
corresponding forwarding output ports are recorded in routing table.
 Destination address in the header of a packet in a datagram
network remains the same during entire journey of the packet.
 The efficiency of datagram network is better than that of a circuit
switched network since resources are allocated when there are
packets to be transferred.
 If a source sends a packet and there is a delay of few minutes
before another packets can be sent, the resources can be
reallocated during these times for other packets from other
sources.
Packet Switching : Datagram Switching
 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.
 And since not all packets travels through the same switches the delay is not uniform for the
packets of a message.

 Switching in the internet is done by


using the datagram approach to the
packet switching at the network layer.
Packet Switching : Virtual Circuit Switching
 A virtual circuit network is a cross between a circuit switching and a datagram network. So it
has some characteristics of both.
 As in circuit switching, there are setup and teardown phases in addition to the data
transfer phase.
 Resources can be allocated during setup phase as in circuit switching or on demand, as in
a datagram network.
 As in 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 next
switch should be and the channel on which the packet is being carried), not end to end
jurisdiction.
 As in circuit switched network all packets follow the same path established during the
connection.
 A virtual circuit is normally implemented in the data link layer while a circuit switched
network is implemented in physical layer and datagram network in network layer.
However it may change in future.
Packet Switching : Virtual Circuit Switching
Packet Switching : Virtual Circuit Switching
 Addressing in virtual circuit switching can be done in two ways:
 Global addressing: A source or destination needs to have a global address, an address
that can be unique in the scope of 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
virtual circuit identifier. Unlike global address, it 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.
Packet Switching : Virtual Circuit Switching
 It has three phase: Data transfer phase, setup phase and teardown phase.
 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.
 When 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.
 The data transfer phase is active until the source sends all its frames to the destination.
The procedure at the switch is same for each frame of a message. The process creates a
virtual circuit, not a real circuit between source and destination.
Packet Switching : Virtual Circuit Switching
 It has three phase: Data transfer phase, setup phase and teardown phase.
 Setup phase: In this, a switch creates an entry for virtual circuit. When one source wants
to create virtual circuit with another, two steps are required: setup request and the
acknowledgement.
 Setup request provides incoming port and VCI and outgoing port but not outgoing VCI.
 Setup acknowledgment provides the outgoing VCI thus completing the route information
for virtual circuit.
Packet Switching : Virtual Circuit Switching
 Teardown phase: In this, source A after sending all frames to B, sends a special frame called
teardown request. Destination B responds with a teardown confirmation frame. Then all
switches delete the corresponding entry from their tables.

Efficiency: 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

Delay in virtual circuit networks: In a virtual-circuit network, there is a one-time delay for setup and a one-time delay
for teardown. If resources are allocated during the setup phase, there is no wait time for individual packets.

You might also like