Last Updated : 30 May, 2025
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 SwitchingPacket Switching uses the Store and Forward technique while switching the packets; while forwarding the packet each hop first stores that packet then forwards.
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 contains information. Below is the diagram of packet switching working.
Packet Switching Types of Delays in Packet SwitchingPacket switching involves several types of delays that can affect the overall transmission time of data from source to destination. These delays occur at different stages during packet processing and transmission. The main types of delays are:
Advantages of Packet SwitchingFor more information on delays you can refer to the article Delays in Computer network.
In connection-oriented packet switching, also known as Virtual Circuit Switching, a logical path or virtual connection is established between the sender and receiver before data transmission begins. This path is set up using a signaling protocol, and all packets belonging to that communication flow follow this predefined route.
Each virtual connection is identified by a Virtual Circuit ID, which is assigned by the switches or routers along the path. The data is divided into small packets, and each packet is given a sequence number to ensure they arrive in order at the destination.
This method involves three main phases:
Setup Phase : A path is established between sender and receiver. Address information is exchanged and recorded.
Data Transfer Phase : Packets are transmitted along the established route, with headers containing local information like length, timestamp, and sequence number.
Tear Down Phase : After the transmission is complete, the virtual circuit is released.
Some popular protocols which use the Virtual Circuit Switching approach are X.25, Frame-Relay, ATM, and MPLS(Multi-Protocol Label Switching).
Connectionless Packet Switching (Datagram)In connectionless packet switching, each packet is treated independently and contains all the necessary addressing information, such as source and destination addresses, port numbers, and other control data. Unlike connection-oriented packet switching, there is no need for a connection setup or teardown phase.
Routing decisions are made dynamically for each packet, which means packets belonging to the same flow may take different paths and arrive at the destination out of order. Since the network does not guarantee delivery, reliability must be managed by end systems using higher layer protocols like TCP. This method offers flexibility and speed but requires additional mechanisms for ensuring data integrity and order.
Difference Between Packet Switching and Circuit SwitchingLet us discuss how the Packet switching is different from the circuit switching.
Feature Packet Switching Circuit Switching Data Handling Data is divided into packets and sent independently. Data follows a dedicated path in a continuous stream. Connection Setup No call setup is required. Requires call setup before transmission. Path No fixed path; packets may take different routes. A fixed physical path is established for the entire session. Intermediate Node Processing Data is processed at all intermediate nodes. Data is processed only at the source. Delay Between Data Units Delay is not uniform; may vary. Delay is uniform and consistent. Reliability Less reliable; packets may be lost or arrive out of order. More reliable; dedicated path ensures ordered delivery. Data Transmission Responsibility Transmission is handled by both source and intermediate routers. Transmission is handled mainly by the source. Resource Utilization Efficient; less resource wastage. Inefficient; resources are reserved even when not in use. Protocol Complexity Requires complex protocols for reordering and error checking (e.g., TCP/IP). Requires simpler protocols due to dedicated path. Latency Higher latency due to dynamic routing and reassembly. Lower latency due to dedicated and continuous path. Overhead More overhead due to routing and addressing in each packet. Less overhead since the path and addressing are fixed.RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4