In a computer network where many different computers are connected to each other, there can be more than one path to send data from one computer to another. Selecting a path that data must take out of the available options is called switching.
There are three main switching techniques which are used. Circuit Switching, Message Switching and Packet Switching
In circuit switching circuit is established between the two ends. It provides a dedicated path for data to travel from one to the other end. Resources are reserved at intermediate switches which are used during the transmission. The intermediate switches are connected by the physical links. Once the circuit is established, the entire data travels over the dedicated path from one end to the other end. As soon as data transfer completes, the circuit is disconnected.
The advantages of Circuit Switching is that
- A well defined and dedicated path exists for the data to travel.
- There is no waiting time at any switch and the data is transmitted without any delay.
- Data always reaches the other end in order.
Circuit switching has the following disadvantages-
- The channel is blocked for duration of transmission.
- It is inefficient in terms of utilization of system resources.
- The time required for establishing the circuit between the two ends is too long.
- It requires more bandwidth and is more expensive
In message switching there is no dedicated path to transfer data from sender to receiver. The message carries a header that contains the full information about the destination. The message is only forwarded from hop to hop. When any intermediate switch receives the message, it stores the entire message. The message is stored until sufficient resources become available to transfer it to the next switch. When resources become available, the switch forwards the message to the next switch. This is called as Store and Forward technique.
The advantages of Message Switching is that the
- Channel is not blocked and more devices can share the channel
- It is helpful in reducing traffic congestion as the message can be temporarily stored in the route and then forwarded whenever required.
The disadvantages of Message Switching are
- It requires enough storage at every switch to accommodate the entire message during the transmission.
- It is extremely slow due to store and forward technique
- Message has to wait until sufficient resources become available to transfer it to the next switch.
In packet switching the entire message to be sent is divided into multiple smaller size packets. This process of dividing a single message into smaller size packets is called as packetization. These smaller packets are sent one after the other. It gives the advantage of pipe lining and reduces the total time taken to transmit the message.
Packet switching is of two types
Virtual Circuit Switching and Datagram Switching
In virtual circuit switching the first packet informs all the intermediate switches of all the packets that are following and reserves resources in terms of CPU bandwidth required for the following packets as well. All the packets then follow the same path
In datagram switching each packet is treated as separate entity and is routed independently through the network
The advantages of Packet Switching is that the
- It is Cost effective and easier to implement
- It uses lesser bandwidth as packets are quickly routed towards the destination
- It does not take large amount of space
- In case any of the packets is lost you can request for a new packet
The disadvantages of Packet Switching are
- They are unsuitable for applications that cannot afford delays in communication like high quality voice calls.
- Packet switching high installation costs.
- They require complex protocols for delivery.
- Network problems may introduce errors in packets, delay in delivery of packets or loss of packets
Below is the summary of different switching techniques