Circuit switching, packet switching

Computer Science A2 · Communication and internet technologies. The idea in plain words, the rules to remember, the mistake to avoid and a worked example, written and checked by Mega Lecture.

Test this topic freeAll Computer Science A2 topics

The idea

In circuit switching a dedicated path is set up between the two ends before any data is sent. The path is kept for the whole exchange and released at the end. All data follows the same route and arrives in order.

In packet switching the message is split into packets. Each packet has a header with the source address, destination address and a sequence number. Packets share the links with other users and may take different routes.

A router reads the destination address of each packet, looks it up in its routing table and forwards the packet towards its destination. The receiving host puts the packets back in order and asks for any missing ones to be sent again.

Rules to remember

Common mistake

Students say that the router reassembles the message. A router only forwards each packet separately; it is the destination host that puts the packets back in order using their sequence numbers.

Worked example

A message is sent as four packets with sequence numbers 1 to 4 across a packet-switched network. They arrive in the order 3, 1, 4 and packet 2 does not arrive. What does the receiving host do?

  1. The packets took different routes, so arriving out of order is normal.
  2. The host uses the sequence numbers to place them as 1, _, 3, 4 and sees that 2 is missing.
  3. It asks the sender to send packet 2 again; only that packet is resent, not the whole message.
  4. When packet 2 arrives the host reassembles 1, 2, 3, 4 and removes the headers.

Answer: It reorders the packets by sequence number, requests packet 2 again and then rebuilds the message.

Ask about this

Type what you are stuck on. The helper finds the explanation, worked examples and the notes to read, free and instant.

Keep going

← ProtocolsProcessors, Parallel Processing and Virtual Machines →Take a Computer Science A2 test