Packet switching is similar to message switching using short messages. Any message exceeding a network-defined maximum length is broken up into shorter units, known as packets, for transmission; the packets, each with an associated header, are then transmitted individually through the network. The fundamental difference in packet communication is that the data is formed into packets with a pre-defined header format, and well-known "idle" patterns which are used to occupy the link when there is no data to be communicated.
A packet network equipment discards the "idle" patterns between packets and processes the entire packet as one piece of data. The equipment examines the header information and then either removes the header (in an end system) or forwards the packet to another system. If the out-going link is not available, then the packet is placed in a queue until the link becomes free. A packet network is formed by links that connect packet network equipment.
Communication between A and D using circuits which are shared using packet switching.
Packet-switched communication between systems A and D
(A message in this case has been broken into three packets labeled 1-3)
There are two important benefits from packet switching.
Two types of packet switched network, known as "datagram" and "virtual circuit".