In telecommunications and Computer Networks, the switching technique is used to collect all the switching elements (Data), rearrange, and control in such a way to establish the communication path between any two nodes. It controls or switches the data to transmit from source to destination by the nodes. It helps to decide the best route from multiple paths for data transmission in large networks. The work of the packet switching system is to receive the signal/data from the source and forward it to the destination with necessary modifications.
It is mainly used to connect the systems for point-to-point communications. The switching techniques are classified into 3 types. They are Message Switching, Packet Switching, and Circuit Switching. Some other practical switching techniques are crossbar switching, digital switching, and electronic switching. This article explains the Packet Switching Technique working, modes, advantages, and disadvantages.
What is Packet Switching?
Packet switching is a connectionless switching network, which transfers the message in the form of data packets from source to destination. In this technique, the message is divided into small units called data packets that are routed individually to reach the destination. It doesn’t require any dedicated channel for the transmission of data, unlike circuit switching.
It uses a store and forward method to switch the packets to a network. Each hop first stores the data packet and then forwards it to the destination. This technique is more beneficial than circuit switching because the message/information is divided into data packets for faster and efficient transmission and to reduce transmission latency.
At the receiving end or destination, these variable data packets are reassembled to form the original message. It is suitable for both data and voice applications. The process of transferring the data packets from source to destination is shown in the below packet switching diagram. Where A, B, C, and D are the data packets routed individually from source to destination.
There are two parts in each data packet in this technique such as header and payload. All the address information of the data packet that is to be transmitted is handled by the header. The intermediate nodes or routers utilize the information in the header to forward it towards the destination. While the actual message is carried by the payload.
The data packets transmitted to the destination using the header information are out of order. Because they aren’t routed via the same logical path. Hence the end node devices at the destination should reassemble the packets to get the original message.
Modes of Packet Switching
There are two modes of packet switching, which are explained below.
This mode of packet switching is also known as Datagram switching. Each data packet that is to be transmitted to the destination is routed individually. That means each data packet contains all the routing information such as source address, destination address, port number, etc.
The drawbacks of this type of packet switching include different transmission paths, out-of-order transmission, depending on the variable loads on network nodes like adapters, switches, and routers at any time. Due to the dynamic routing decisions, the data packets going through one route might take different routes.
Hence the packet can’t reach the destination and might be out-of-order. However, the end nodes should use additional protocols to get reliable packet delivery. The diagram for connectionless packet switching is shown below.
The multiple data packets in the connectionless packet switching contain the following information,
- The address of the destination
- The address of the source
- Total no. of data packets
- Sequence number to reassemble the data packets.
When the multiple data packets reach the destination through various routes, then the end node device rearranges the received data packets to form the original message.
This mode of packet switching is also known as circuit switching or virtual circuit switching. All the data packets are transmitted sequentially over the network to the destination through a predefined logical path or virtual path, which is established using signaling protocols. Due to the sequential transmission of data packets across the predefined route, the address information is not required in this virtual switching.
The end node devices like switches and routers provide the virtual circuit ID to identify the virtual connection. The message is divided into small data packets and they are assembled with the help of sequence numbers to transmit over the network to a destination. There are 3 phases in the connection-oriented circuit switching such as, the setup phase, data transfer phase, and tear down phase, which are shown in the below diagram.
The complete address information of the message is transferred during the setup phase. After deciding the best route to the destination, entry is added to the switching table of each intermediate node. During the transfer of data, the packet header contains information like length, sequence number, etc. This type of switching is widely used in switched WAN networks. Some protocols like X. 25, frame relay, ATM, and MPLS use this switching.
Delays in Packet Switching
In packet switching, the amount of time taken for a packet to go from source to destination is known as a delay. It is also known as Network Delay or end-to-end delay. It refers to the time taken for the processing of a packet in the network. Delays in packet switching are classified into 4 types, such as transmission delay, propagation delay, queuing delay, and processing delay.
Transmission Delay: It refers to the rate of transmission of a network interface. The amount of time taken to send the data packet from the source/host to the transmission medium or communication link is known as transmission delay. It depends on the data packet size and the bandwidth of the communication link. If the data packet consists of length L bits with a transmission medium capacity of B bits/sec, then the transmission delay is given as,
T = L/B
The factors affecting the transmission delay in packet switching are,
- As the bandwidth of the transmission medium increases, the transmission delay decreases.
- If the transmission link is shared to multiple network devices, then the MAC protocol controls the delay.
- Transmitting and receiving the data packets involved in context switching in the operating system, which takes limited time.
- This delay is more significant when there are multiple active links.
Propagation Delay: When the data packet is transmitted through the transmission medium to reach the destination, the time taken for the last bit of the data packet to reach the destination is known as propagation delay. It depends on the distance between the transmitter (sender) and received; propagation speed of the signal. If ‘D’ is the distance between the sender and receiver, and ‘S’ is the propagation speed of the signal, then the propagation delay is calculated from the formula given below,
Propagation Delay = D/S
The propagation delay depends on the following factors
- When the distance between the sender and receiver is high or the distance of the transmission medium is longer, then the propagating time of the packet to reach its destination is more.
- The data packet reaches its destination very fastly only when the speed of the signal is high.
Queuing Delay: When the data packet arrives at the destination, it is not processed immediately. It has to wait in a queue in the buffer. The amount of time that the packet waits in the queue for processing is known as Queuing Delay. There is no formula to calculate the queuing delay. It depends on the arrived data packets at the destination, the transmission capacity of the communication medium, and the network’s traffic.
The factors affecting the queuing delay are given below,
- The queuing delay is high when the size of the queue is large. The queuing delay is zero when the queue is empty and all the data packets are processed.
- If the data packets arrive in a short period, then the queuing delay will be high
- The limited number of communication links leads to a greater queuing delay.
Processing Delay: The time taken for the packet to be processed by the switch is called processing delay. The time taken by the processor to process the data packet is the time required by the routers to decide the best path to forward the packet to its destination. It depends on the speed of the processor and there is no formula to calculate. The speed of the processing varies from network to network.
Advantages and Disadvantages
To overcome the drawbacks of circuit switching, packet-switched networks were designed. The packet switching is independent of time and widely used in data and voice transmission applications. The advantages of packet switching over circuit switching are given below,
- It provides higher efficiency than circuit switching because each data packet follows a different route.
- Delay in the transmission of packets is less.
- No need to use the dedicated channel to transmit the data packets to the destination.
- It can resend the data packets to reduce the loss of data packets
- It is designed at a very low cost because of no dedicated channel for the transmission of voice and data traffic.
- It is more reliable than circuit switching because it ensures that the packet is reached its destination or detects the missing packet.
- Data packets follow different paths to reach the destination.
- Continues to deliver the data packets even though the communication link is failed.
- It allows multiple users to utilize the single-channel simultaneously
- Better bandwidth usage because multiple data packets can be transmitted from multiple sources via the same transmission link.
- Easy to implement.
- Transmits highest priority data first.
The disadvantages of packet switching over circuit switching are,
- It is not applicable for high-volume voice call applications.
- When the high-volume networks lose the data packets due to the high traffic, it requires to resend or cannot recover the data packets
- It requires complex security protocols during the transmission of packets from source to destination.
- It is necessary to provide sequence numbers because the packets are not delivered in order when compared to circuit switching.
- As the packets follow multiple paths, the complexity increases at every node.
- It is more beneficial to transmit only small messages but not for huge data.
- Errors in delivered data packets due to network issues and transmission delays.
Thus, this is all about an overview of packet switching – definition, diagram, modes, advantages over circuit switching, and disadvantages over circuit switching. The packet switching technique is more suitable for direct high-quality data transmission to the destination along with error correction and detection. Here is a question for you, “What are the differences between Circuit Switching and Packet Switching Techniques?”