What’s the Problem?
In a network we have many devices. The prime problem we face is how to connect them with each other. One solution could be a mesh topology, where every node is connected with every other node. But this is impractical when the network is large. Similarly star and bus topologies have many constraints like distance between nodes, length of cabling between nodes etc.
What’s the Solution?
A good solution is a switched network. Where multiple interlinked nodes can create a temporary connection between two nodes. There are two most used categories of switched networks
- Circuit switching in networking
- Packet switching in networking
In this article we are going to discuss both of these in detail.
Circuit Switching Definition
A circuit switching in computer networks consist of a group of switches. These switches are connected with dedicated physical links or channel. There are n channels in each link. Before communication a link is established between nodes. The link is reserved for the duration of communication. (See Fig-1)
Fig-1: Circuit Switching Diagram
Note the following things in above networks
- This network consists of 8 switches S1,S2,S3 and so on
- Switches are connected with dedicated physical links
- Each link has n channels or in other words n circuits.
How Does Circuit Switching Work?
Suppose telephone connected with S1 wants to communicate with telephone connected with S6. First of all a dedicated link will be established between both telephones via switches S1, S7 and S6. Then both telephones can communicated with each other through this established connection. Remember during this time no other telephone can use this link which is allocated to both of these telephones.
You can observe when you call someone. First a connection is established and then you both can talk to each other all the time. The connection will not be lost even if you are silent for sometime. The connection is only terminated when anyone of you terminate manually.
Circuit Switching Examples
- An Integrated Services Digital Network (ISDN) is an example of circuit switching
- Circuit switched data (CSD)
Advantages of Circuit Switching
- Suitable for video and voice chat where a dedicated link is needed
- no noticeable delay is seen during the communication once the link is established
Disadvantages Of Circuit Switching
- Efficiency in terms of channels availability is low when there is a high demand
- Bandwidth utilization is poor. Means even for a very low data volume you need to provide the same bandwidth as that of high data volume
Packet Switching Definition
In packet switching the message is sent in the form of packets from source to the destination. The complete data is divided into small blocks of data or packets. After that these packets are sent to the destination via different roots. This is why this is also known as data packet switching.
What are data packets?
A data packet is a small unit used in data communication systems. It could be a text data, audio or video information.
Packet Switched Network Definition
This is a network which supports packet switching technology. Some of the packet-switched networks are Apple talk, ARPANET, X.25 etc
How does packet switching work?
As in case of circuit switching example given above that before communication starts a dedicated link is established between the two nodes. After that no other node can use that link and data is sent sequentially.
But here in packet switching no need to establish a dedicated link. The whole message is divided into small packets. Packets have sequence numbers and may arrive at destination without any order. These packets can be sent through various routes or links. The size of the packet can be fixed or variable depending upon the technology and protocols.
Packet Switching Types
Packet switching is further divided into two types. These two types are explained using packet switching diagram below
1. Datagram Switching:
In datagram switching each packet contains source address, destination address and intermediate nodes addresses. These packets are given sequence numbers and also know the total number of packets. Packets reach to the destination from various paths. The destination node then arranges these packets. Datagram switching also known as connection-less packet switching.
Fig-2: Connection-less Packet Switching
You can observe in fig-2 packets are following two paths from source (node 1) to destination (node 2)
- via switches S1, S7 and S6
- Via switches S1, S2, S8, S5 and S6
2. Virtual Circuit Switching:
A virtual circuit network contains the characteristics of both datagram switching and circuit switching. Here first a link is established between source and destination just like a circuit switched network. Then all the packets follow the same route in sequence. This is also known as connection-oriented switching.
Fig-3: Connection-oriented Packet Switching
You can observe in fig-3 all packets are following only path of switches S1, S7 and S6
Advantages of Packet Switching
- The link is not reserved, so efficient use of bandwidth
- destination can detect the lost packet
- As packets follow many routes so if one link is down, the packets continue to flow through other links
- multiple users can use the same channel simultaneously
Disadvantages of Packet Switching
- packet do not arrive in sequence so more resources we need to use at destination to rearrange them
- Different routes have different lengths, so some packets arrive early and some could come with delay
- Not suitable for high speed data transmission or live streaming due to delay in packets plus due to their non-sequential arrival