You are familiar with the-concept of switching. Circuit switching is the study of data link layer. The services of networks are provided by using the concept of packet switching.
When the message block size is large, message switching suffers with long transmission delays. To overcome this problem, packet switching technique is used. Packet switching limits the length of the message to a fixed size. A long message in the message-switching scheme will be split into a sequence of fixed sized packets. The size or length of a packet may be between 1000 to a few thousand bits. Hence, the transmission time is usually short. Apart from the data field, a packet also contains a header and a trailer field. The header field consists of the source and destination addresses, and sequence number of the packet. The trailer field consists of checksum that is used for error control.
Packet switching can be used as an alternate to circuit switching. In the packet switched networks, data is sent in discrete units that have variable length. They are called as packets. There is a strict upper bound limit on the size of packets in a packet switch network. The packet contains data and various control information. The packet switched networks allow any host to send data to any other host without reserving the circuit. Multiple paths between a pair of sender and receiver may exist in a packet switched network.
One path is selected between source and destination. Whenever the sender has data to send, it converts them into packets and forwards them to next computer or router. The router stores this packet till the output line is free.
Then, this packet is transferred to next computer or router (called as hop). This way, it moves to the destination hop by hop. All the packets belonging to a transmission may or may not take the same route. The route of a packet is decided by network layer protocols.
We’ll be covering the following topics in this tutorial:
Advantages of packet Switching
1. The main advantage of packet switching is the efficiency of the network. In circuit switching network, a reserved circuit cannot be used by others, till the sender and receiver leave it. Even if no data is being sent on a reserved circuit, no one else can access the circuit. This results in network bandwidth wastage. The packet switching reduces network bandwidth wastage.
2. The other advantage is that the packet switching is more faults tolerant. In case of circuit switching, all the packets are lost if a router in the circuit is down as all the packets follow the same route. But, in case of packet switching network, the packets can be routed over the malfunctioning component of the network. This is because all the packets may follow a different route to the destination.
3. The circuit switching bills the user depending on the distance and duration of connection whereas packet switching network bill users only on the basis of duration of connectivity.
4. The advantage of circuit switching network over packet switching network is that the circuit switching network provides ordered delivery of packets. As all the packets follow the same route. They arrive in correct order at destination.
5. It uses a digital network. This method enables digital data to be directly transmitted to a destination, and is therefore appropriate for data communication systems.
6. High data transmission quality – The quality of data transmission in a packet switched network is kept high (error free) because the data distribution is checked and error detection is employed during data transmission.
Disadvantages of Packet Switching
The various disadvantage of Packet switching
1. Packets may be lost on their route, so sequence numbers are required to identify missing packets.
2. Switching nodes requires more processing power as the packet switching protocols are more complex.
3. Switching nodes for packet switching require large amount of RAM to handle large quantities of packets.
4. A significant data transmission delay occurs – Use of store and forward method causes a significant data transmission.
Types of Packet Switching
The packet switching has two approaches: Virtual Circuit approach and Datagram approach. WAN, ATM, frame relay and telephone networks use connection oriented virtual circuit approach; whereas internet relies on connectionless datagram based packet switching.
(i) Virtual Circuit Packet Switching: In virtual circuit packet switching, a single route is chosen between the sender and receiver and all the packets are sent through this route. Every packet contains the virtual circuit number. As in circuit switching, virtual circuit needs call setup before actual transmission can be started. He routing is based on the virtual circuit number.
This approach preserves the relationship between all the packets belonging to a message.Just like circuit switching, virtual circuit approach has a set up, data transfer and tear down phases. Resources can be allocated during the set up phase, as in circuit switched networks or on demand, as in a datagram network. All the packets of a message follow the same path established during the connection. A virtual circuit network is normally implemented in the data link layer, while a circuit switched network is implemented in the physical layer and a datagram network in the network layer.
(ii) Datagram Packet Switching: In datagram packet switching each packet is transmitted without any regard to other packets. Every packet contain full packet of source and destination. Every packet is treated as individual, independent transmission.
Even if a packet is a part of multi-packet transmission the network treats it as though it existed alone. Packets in this approach are called datagrams. Datagram switching is done at the network layer. Figure show how a datagram approach is used to deliver four packets from station A to station D. All the four packets belong to same message but they may travel via different paths to reach the destination i.e. station D.
Datagram approach can cause the datagrams to arrive at their destination out of order with different delays between the packets. Packets may also be lost or dropped because of lack of resources. The datagram networks are also referred as connectionless networks. Here connectionless means that the switch does not keep information about connection state. There are no connection establishment or tear down phases.
The datagram can arrive at the destination with a different order from the order in which they where sent. The source and destination address are used by the routers to decide the route for packets. Internet use datagram approach at the network layer.