13.4 Circuit and Packet Switching 483
3. Connection tear down: After data transfer is complete, the end users inform the
intermediate switches to free the connection. This is similar to placing the phone
on the hook to inform the phone company that the circuit can be released.
13.4.2 Packet Switching
In packet switching, data are broken into packets of fixed or variable size, depending
on the protocol used. There are two approaches for packet switching: datagram and
virtual circuit.
In datagram switching, each packet carries with it all the routing information it
needs to reach its destination and each packet is treated independently of the ones
before it or after it. In fact, it is possible that different packets might travel down
different paths. This is actually an advantage since the resulting network is immune
to faults, and packets can be dynamically routed on any available links. This was the
main reason for using packet communication in the first place in the 1970s to build a
highly fault-tolerant communication network that is immune to enemy attack. Since
each packet carries all the information it needs to determine its destination, there
is no need to establish a connection before transmitting the data. The connection
establishment phase of circuit switching is removed. However, packet switching
carries the following penalties:
1. In-sequence delivery of data is not possible since different packets might travel
down different paths.
2. Packet routing will be complex since the router has to choose the optimum route
to send each packet.
3. Packet delay will vary depending on the route chosen for each packet.
4. Packet loss cannot be detected by the network. The end-nodes are able to detect
lost packets.
5. Traffic information is not easily observable since switching nodes do not have
information about the state of each stream.
In virtual circuit switching, a unique path is used to move data between the two
end users. This is similar to the circuit switching approach. However, the channel or
path could be used by other data when there are no packets to send. Virtual circuit
switching has several advantages over circuit switching and datagram switching:
1. Since packets belonging to a certain session are distinct, it is easy to associate
quality of service guarantees to the session and deliver those guarantees.
2. The ability to identify individual sessions enables the service provider to guar-
antee the service, monitor the user traffics, and charge for the services provided.
3. Different classes of service are easily established for the different sessions. The
cost of these services is definitely cheaper compared to leasing a private tele-
phone line.
4. The packets have a simple format since the routing information has been deter-
mined during path, or connection, establishment phase.