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 and Delays in Computer Network
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.