Table of contents
1.
Introduction to packet switching
2.
Types of packet switching
2.1.
Connectionless packet switching
2.2.
Connection-oriented packet switching
3.
Delays in Packet Switch network
4.
Comparison of Circuit Switching and Packet Switching
4.1.
Advantages of packet switching over circuit switching
4.2.
Disadvantages of packet switching over circuit switching
5.
Frequently Asked Questions
5.1.
Write the principle used by most of the packet switches?
5.2.
What methods are used to transport data across a network of connections and switches?
5.3.
What is a frame relay circuit?
6.
Conclusion
Last Updated: Mar 27, 2024

Packet Switching

Computer Networks

Introduction to packet switching

Packet Switching breaks down data into blocks or packets for more effective transmission over digital networks utilizing different network devices. When one device delivers a file to another, the file is broken down into packets so that the most effective path for transferring the data over the network at the moment may be determined. The packets are then routed to the destination reassembled for usage by the receiving device. This is known as packet switching. (Also see, Switching Modes)

Packet Switching

Packet Switching

Source: avinetwork

What is contained in the packets?  

  • Every packet has a header that carries the destination's information. These packets find the path with the help of this knowledge/information.
  • Each packet is assigned a unique number that can be used to identify it at the receiving end.
  • The Internet is one of the most well-known examples of a packet-switched network.
  • The header of a packet is made up of two parts: the header and the payload.
  • The routing information is primarily contained in the header.
  • The data to be conveyed is contained in the payload.
  • This way of switching is based on the store and forward mechanism as well.
  • There are no resource reservations in a packet-switched network, and resources are allocated on demand.
  • Each packet's headers contain information about the source and destination, as we all know. As a result, all packets in the network can travel independently.
  • Packets connected to the same file may travel distinct paths, which is mostly determined by the path's availability. At the destination, these packets will be reassembled. The receiver node is responsible for rearranging the received packet in order to obtain the original data.
  • If the packets arrive in the correct order, the receiver will send an acknowledgment message.
  • The message will be sent by the receiver to the sender to resend the message if a packet is missing or malformed.

Types of packet switching

Connectionless packet switching, also known as datagram switching, and connection-oriented packet switching, also known as virtual circuit switching, are two types of packet switching. Ethernet, Internet Protocol (IP), and the User Datagram Protocol are examples of connectionless systems (UDP). X.25, Frame Relay, Multiprotocol Label Switching (MPLS), and the Transmission Control Protocol are all connection-oriented systems (TCP).

Connectionless packet switching

Each packet in connectionless mode has a destination address, source address, and port number. It might alternatively be tagged with the packet's sequence number. This information removes the need for a pre-established route to assist the packet to make its way to its destination, but it also implies that the packet header must include more information, making it bigger. Individual packets are routed, and they may take various courses, resulting in out-of-order delivery. Based on the packet sequence numbers, the original message may be reconstructed in the right order at the destination. A transport layer protocol offers a virtual circuit conveying a byte stream to the application, despite the network just providing a connectionless network layer service.

Connection-oriented packet switching

In contrast to connection-oriented packet switching, each packet in Connectionless Packet Switching includes all required addressing information such as source, destination, and port numbers, among other things. Each packet is processed individually in Datagram Packet Switching. Because routing choices are made dynamically, packets belonging to the same flow may follow multiple paths, resulting in packets arriving at the destination out of order. Unlike Virtual Circuits, it does not need any connection setup or deconstruction.

Because packet delivery in connectionless packet switching is not assured, end systems must offer reliable delivery utilizing extra protocols.

Delays in Packet Switch network

The types of delays encountered in a packet-switched network are:

  • Propagation delay
  • Transmission delay
  • Queuing delay
  • Processing delay

Network Delay

Propagation Delay

The time it takes for a bit to go from one end of a connection to the other is known as propagation delay. The delay is determined by the distance (DD) between the transmitter and receiver, as well as the wave signal's propagation speed (SS). It's computed as DD/SS.

 

Transmission Delay

The time it takes to transfer a data packet onto an outbound connection is referred to as transmission delay. The size of the packet and the capacity of the outbound connection influence the delay. If a packet contains LL bits and the connection has a capacity of BB bits per second, the transmission delay is equal to LL/BB

 

Queuing Delay

The time it takes for a packet to be processed in a switch's buffer is referred to as queuing delay. The delay is determined by the pace at which incoming packets arrive, the outbound link's transmission capacity, and the network's traffic.

 

Processing Delay

The time it takes a switch to process a packet header is known as processing delay. The delay is determined by the switch's processing speed.

Comparison of Circuit Switching and Packet Switching

Because circuit-switched networks were not particularly successful for little messages, packet-switched networks were created to solve these shortcomings.

Advantages of packet switching over circuit switching

  • Less network bandwidth is wasted due to increased efficiency. The system is more efficient since there is no need to reserve the circuit even when it is not in use. Because a continually committed circuit wastes network capacity, network efficiency improves when packet switching is used.
     
  • Transmission speed is optimal, and latency is kept to a minimum.
     
  • Fault tolerance has been improved. Packets might be diverted and take various pathways during partial outages or other network problems. A single outage on a circuit switching network may shut down the specified communications line
     
  • Comparatively low-cost and straightforward to install. Packet switching often costs solely for the time it takes to connect, but circuit switching pays for both the time it takes to connect and the distance it takes to connect.
     
  • Packet switching works well for data transmission, transferring digital data straight to its destination. In a packet-switched network, data transmissions are normally of high quality since the network utilizes error detection and examines data distribution with the objective of error-free transmissions.

Disadvantages of packet switching over circuit switching

  • Reliability:  Because the destination can detect any missing packets, the packet switching mechanism is reliable. Circuit-switched networks, on the other hand, transport packets in sequence along the same path and are therefore less prone to losing packets in the first place.
     
  • Complexity: Because packet switching protocols are complicated, switching nodes need greater processing power and memory.
     
  • File Size: Smaller communications benefit from packet switching, whereas bigger ones benefit from circuit switching. This is because of repeated rerouting delays, the possibility of several packets being lost, and other difficulties.
     

Must Read Subnetting in Computer Networks

Frequently Asked Questions

Write the principle used by most of the packet switches?

Store and forward: The packet switch will not send the first bit to the outgoing connection until the full packet has been received. If the complete packet is not received before the time-out period ends, the packet switch will notify the sender to resend the portion of the entire packet, depending on the algorithm.

What methods are used to transport data across a network of connections and switches?

The two kinds of switching technologies used to link many communication devices are packet switching and circuit switching. In traditional LAN systems, packet switching is employed, whereas, in telephonic systems, circuit switching is used.

What is a frame relay circuit?

A-frame relay is a virtual circuit service that is connection-oriented. It's similar to renting a line between two networks on a temporary basis. A connected public line may carry many talks between various ends over the same connection.

Conclusion

In this article, we learned about the introduction to packet switching what are its advantages and disadvantages over circuit switching, the types of packet switching and what are the delays in packet switching

Hope you now understand the concept of Packet switching. 

Recommended Readings:


Do check out The Interview guide for Product Based Companies as well as some of the Popular Interview Problems from Top companies like Amazon, Adobe, Google, etc. on Coding Ninjas Studio.

Also check out some of the Guided Paths on topics such as Data Structure and Algorithms, Competitive Programming, Operating Systems, Computer Networks, etc. as well as some Contests, Test Series, Interview Bundles, and some Interview Experiences curated by top Industry Experts only on Coding Ninjas Studio.

Live masterclass