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.

In simpler words

There are two ways to send data across a network. In circuit switching, one path is set up first and kept for the whole call. Everything goes the same way and arrives in order. In packet switching, the message is cut into packets. Each packet can take a different route. The receiving computer puts them back in order using their numbers.

An everyday comparison

Circuit switching is like booking a private road for your whole journey: nobody else can use it, even when you are not driving. Packet switching is like sending a group of friends to a party by different routes; they arrive in any order and regroup at the door. The comparison stops working because friends know the address, while each packet relies on routers reading its header.

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.

In the exam

Define each method in one sentence. For circuit switching, state that a dedicated path is set up before sending and released at the end. For packet switching, state that each packet has a header with source address, destination address and sequence number. Give benefits and drawbacks for each, linked to the use in the question, such as a landline call or email. Explain the router's role: it reads the destination address, checks its routing table and forwards the packet. State that the destination host reassembles packets.

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