Circuit Switching & Packet Switching (1.5.f, 1.5.g)
When transferring data across a network (e.g. the internet), data is split into small bundles called "packets". The packets are a standard size and larger messages simply have more packets. Each packet has:
- A label (a unique ID for the packet)
- A sequence number (where in the order it belongs)
- A destination address (where it is being sent)
- A checksum (to ensure no errors occurred during transmission)
When using circuit switching, a path between the two computers is established at the start, and then all the packets are sent in order. The advantage of this is that the message arrives in the right order, and the packets do not need sorting. However, it makes inefficient use of the network, as the paths the packets are sent over cannot be reused until the packets have finished being transmitted, and the message is very easy to intercept.
When using packet switching, the packets of data are sent at the most convenient route at the time of transmission. Therefore, the packets take various different routes, as each packet tries to find the most efficient route. When a machine receives a packet it checks the destination address to see if has arrived at the correct destination, if not it passes the packet on. The major disadvantage of packet switching is that the packets need sorting at the destination in order to be read. However, it makes more efficient use of the network, and it makes it more difficult to intercept the whole message.