What is Packet Switching?
Packet Switching transmits data across digital networks by breaking it down into blocks or packets for more efficient transfer using various network devices. Each time one device sends a file to another, it breaks the file down into packets so that it can determine the most efficient route for sending the data across the network at that time. The network devices can then route the packets to the destination where the receiving device reassembles them for use.
Packet switching is the transfer of small pieces of data across various networks. These data chunks or “packets” allow for faster, more efficient data transfer.
Types of Packet Switching-
There are two major types of packet switching:
Connectionless Packet Switching. This classic type of packet switching includes multiple packets, each individually routed. This means each packet contains complete routing information — but it also means different paths of transmission and out-of-order delivery are possible, depending on the fluctuating loads on the network’s nodes (adapters, switches and routers) at the moment. This kind of packet switching is sometimes called datagram switching.
Each packet in connectionless packet switching includes the following information in its header section:
- Source address
- Destination address
- Total number of packets
- Sequence number (Seq#) for reassembly
Once the packets reach their destination via various routes, the receiving devices rearrange them to form the original message.
Connection-Oriented Packet Switching. In connection-oriented packet switching, also called virtual circuit switching or circuit switching, data packets are first assembled and then numbered. They then travel across a predefined route, sequentially. Address information is not needed in circuit switching, because all packets are sent in sequence.
Analyzing Packet Switching -
A) DELAY- One of the main disadvantages of Packet switching is Packet Switching technique cannot be implemented in those applications that require low delay.
Transmission Delay :
Time taken to put a packet onto link. In other words, it is simply time required to put data bits on the wire/communication medium. It depends on length of packet and bandwidth of network.
Transmission Delay = Data size / bandwidth = (L/B) second
Propagation delay :
Time taken by the first bit to travel from sender to receiver end of the link. In otherwords, it is simply the time required for bits to reach the destination from the start point. Factors on which Propagation delay depends are Distance and propagation speed.
Propagation delay = distance/transmission speed = d/s
Queuing delay :
Queuing delay is the time a job waits in a queue until it can be executed. It depends on congestion. It is the time difference between when the packet arrived Destination and when the packet data was processed or executed. It may be caused by mainly three reasons i.e. originating switches, intermediate switches or call receiver servicing switches.
Average Queuing delay = (N-1)L/(2*R)
where N = no. of packets
L=size of packet
R=bandwidth
Processing Delay :
Processing delay is the time it takes routers to process the packet header. Processing of packets helps in detecting bit-level errors that occur during transmission of a packet to the destination. Processing delays in high-speed routers are typically on the order of microseconds or less.
In simple words, it is just the time taken to process packets.
B) Implementation -
Packet switching is a method of transferring the data to a network in form of packets. In order to transfer the file fast and efficient manner over the network and minimize the transmission delay, the data is broken into small pieces of variable length, called Packet. Each packet consists of a header which contain IP address of source and destination, and a sequence number which is assigned to every packet while sending it. With the help of sequence number the packets are assembled properly at the destination. If the correct order of the packets is reached, then the acknowledgment message will be sent.
C) Error Handling -
If any error occurs while sending data from source to destination it is correctly handled by packet switching technique. Here if any packet loss in between due to some reasons, it gets detected at destination. As the message received is not complete, destination asks source to resend the complete message correctly. This is called as Retransmission of message.