Devices are connected together using a network to allow the exchange of information between them. The path between devices over which the information will flow can be categorized into two namely circuit-switching and packet-switching Networks.
Also, read Introduction to Computer Network.
Circuit-Switching
In the circuit-switching networking method, a connection i.e circuit is set up between two devices, which is used for the whole communication.
The connection between the devices can be of two types, either a fixed connection or a connection based on an as-needed basis. Circuit-Switching follows the same path for a given dialog, even if many paths exist between them.
An example of Circuit Switching would be the telephone system. A connection is established, and circuit is maintained for a steady stream of data, between the two nodes when communicating with each other.
The red line in the image shows the path of sending data and the green line shows the path of receiving data. In-circuit switching a connection is well established before the sharing of information and maintains the path for the sharing.
Packet Switching
In the packet-switching network type, no such specific path is defined for data transfer, Instead, the data is chopped up into small fragments called packets and sent over the network. The fragmented data is then routed by the routers to reach the destination. On the receiving end, the data is read from the packets and arranged in order.
Circuit-Switching vs Packet-Switching
We took a look at both the switching networks now there will be a question in your mind, which switching network we should use or which one is the best? The Answer is well it depends. There are places for which one is more suited than the other.
In real-world both circuit-switching and packet-switching are being used concurrently.