Open In App

Packet Switching and Delays in Computer Network

Last Updated : 02 May, 2024
Like Article

Packet Switching in computer networks is a method of transferring data to a network in the form of packets. In order to transfer the file fast and efficiently over the network and minimize the transmission latency, the data is broken into small pieces of variable length, called Packet. At the destination, all these small parts (packets) have to be reassembled, belonging to the same file. A packet is composed of a payload and various control information. No pre-setup or reservation of resources is needed. 

Packet Switching uses the Store and Forward technique while switching the packets; while forwarding the packet each hop first stores that packet then forwards. This technique is very beneficial because packets may get discarded at any hop for some reason. More than one path is possible between a pair of sources and destinations. Each packet contains the Source and destination address using which they independently travel through the network. In other words, packets belonging to the same file may or may not travel through the same path. If there is congestion at some path, packets are allowed to choose different paths possible over an existing network. 

Diagram of Packet Switching

In packet switching the data is divided into small packets which allow faster movement of data. Each packet contains two parts that is Header and Payload, the header on each packet conation information. Below is the diagram of how packet switching works.

Packet Switching

Packet Switching

Types of Delays in Packet Switching

  • Transmission Delay: Time required by the spentstation to transmit data to the link.
  • Propagation Delay: Time of data propagation through the link.
  • Queueing Delay: Time spent by the packet at the destination’s queue. 
  • Processing Delay: Processing time for data at the destination.

Advantages of Packet Switching over Circuit Switching

  • More efficient in terms of bandwidth, since the concept of reserving a circuit is not there.
  • Minimal transmission latency.
  • More reliable as a destination can detect the missing packet.
  • More fault tolerant because packets may follow a different path in case any link is down, Unlike Circuit Switching.
  • Cost-effective and comparatively cheaper to implement.

Disadvantage of Packet Switching over Circuit Switching

  • Packet Switching doesn’t give packets in order, whereas Circuit Switching provides ordered delivery of packets because all the packets follow the same path.
  • Since the packets are unordered, we need to provide sequence numbers for each packet.
  • Complexity is more at each node because of the facility to follow multiple paths.
  • Transmission delay is more because of rerouting.
  • Packet Switching is beneficial only for small messages, but for bursty data (large messages) Circuit Switching is better.

Types of Packet Switching

1. Connection-oriented Packet Switching (Virtual Circuit)

Before starting the transmission, it establishes a logical path or virtual connection using a signaling protocol, between sender and receiver and all packets belongs to this flow will follow this predefined route. Virtual Circuit ID is provided by switches/routers to uniquely identify this virtual connection. Data is divided into small units and all these small units are appended with help of sequence numbers. Packets arrive in order at the destination. Overall, three phases take place here- The setup, data transfer and tear-down phases. 

Virtual Circuit

Virtual Circuit

All address information is only transferred during the setup phase. Once the route to a destination is discovered, entry is added to the switching table of each intermediate node. During data transfer, packet header (local header) may contain information such as length, timestamp, sequence number, etc. 

Connection-oriented switching is very useful in switched WAN. Some popular protocols which use the Virtual Circuit Switching approach are X.25, Frame-Relay, ATM, and MPLS(Multi-Protocol Label Switching).

Phases in Virtual Circuit

2. Connectionless Packet Switching (Datagram)

Unlike Connection-oriented packet switching, In Connectionless Packet Switching each packet contains all necessary addressing information such as source address, destination address, port numbers, etc. Packets belonging to one flow may take different routes because routing decisions are made dynamically, so the packets that arrived at the destination might be out of order. It has no connection setup and teardown phase, like Virtual Circuits. 
Packet delivery is not guaranteed in connectionless packet switching, so reliable delivery must be provided by end systems using additional protocols. 


Datagram Packet Switching

A—R1—R2—BA is the sender (start)R1, R2 are two routers that store and forward dataB is receiver(destination)

To send a packet from A to B there are delays since this is a Store and Forward network. 

Difference Between Packet Switching and Circuit Switching

Packet Switching

Circuit Switching

In packet switching data is divided into packets, and packets is sent independently.

There is a dedicated path for each packet in circuit switching.

In Packet switching, data is processed at all intermediate nodes including the source system.

In-Circuit switching, data is processed at the source system only.

The delay between data units in packet switching is not uniform.

The delay between data units in circuit switching is uniform.

Packet switching is less reliable.

Circuit switching is more reliable.

Transmission of the data is done not only by the source but also by the intermediate routers.

Transmission of the data is done by the source.

Less wastage of resources.

Wastage of resources is more in Circuit Switching.

In Packet Switching there is no physical path between the source and the destination.

In-Circuit Switching there is a physical path between the source and the destination.

Call setup is not required in packet switching.

Call setup is required in circuit switching.

Packet switching requires complex protocols for delivery.

Circuit switching requires simple protocols for delivery.

Latency is high in Packet switching.

Latency is low in circuit switching.

Littel bit more overheating in packet switching.

Overheading is low in circuit switching.

Frequently Asked Question on Packet Switching – FAQs

What is Packet Switching?

Packet switching in computer networks is a method of transferring data to a network in the form of packets. In order to transfer the file fast and efficiently manner over the network and minimize the transmission latency, the data is broken into small pieces of variable length, called Packet

What is the role of routers in Packet Switching networks?

An apparatus that links two or more packet-switched networks or subnetworks is called a router. By forwarding data packets to their intended IP addresses, it manages traffic between these networks and let numerous devices to share an Internet connection.

How does Packet Switching handle congestion?

The control unit of the output port sends all datagrams (packets), acknowledgments included or not, straight to the outgoing connection if the congestion signal from the load measuring unit shows that the load of the switch is below a certain level.

Can packet-switched networks handle voice and video traffic?

Because packet switching can cause latency and packet loss, it is not appropriate for real-time communication, including audio and video.

How does error handling work in Packet Switching?

Several methods at different tiers of the network protocol stack can be used to detect problems at each node when employing packet switching. Typical methods include the following – Checksum: A checksum is a number that a mathematical function determines from the information in a packet.

Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads