How does data cross the internet as packets, and how do routers decide where to send them?
Explain packet switching, the structure of a packet, how routers forward packets, and contrast it with circuit switching
A focused answer to the H2 Computing outcome on packet switching. How data is split into packets, packet structure with headers, how routers forward packets hop by hop, and the contrast with circuit switching.
Reviewed by: AI editorial process; not yet individually human-reviewed
Have a quick question? Jump to the Q&A page
Jump to a section
What this dot point is asking
SEAB wants you to explain packet switching, the structure of a packet, how routers forward packets, and how this differs from circuit switching. The central idea is that the internet splits messages into independently routed packets that share network links, rather than reserving a dedicated path - making the network efficient and resilient.
The answer
Packet switching
In packet switching, a message or file is split into many small packets. Each packet is routed independently across the network and may take a different path. At the destination, packets are reassembled in the correct order. Links are shared between many communications - capacity is used only when packets are actually sent (statistical multiplexing).
The structure of a packet
A packet has a header of control information and a payload of the actual data. The header typically carries:
- Source IP address and destination IP address (for routing).
- A sequence number (so the receiver can reassemble packets in order).
- A checksum or error-check (to detect corruption).
- A time-to-live (TTL) / hop limit (discarding packets that loop).
[ header: src IP | dest IP | seq no | checksum | TTL ] [ payload: data ]
How routers forward packets
A router connects networks. At each hop, it:
- reads the packet's destination IP address,
- looks it up in its routing table to choose the best next hop toward the destination,
- forwards the packet on the chosen outgoing link.
It does this independently for every packet, so the network can route around congestion or a failed link by choosing different paths.
Reassembly and out-of-order arrival
Because packets travel independently, they can arrive out of order, be delayed differently, or be lost. The transport layer (TCP) fixes this at the destination: sequence numbers let it reorder packets, and missing packets are detected and retransmitted.
Contrast with circuit switching
Circuit switching reserves a dedicated end-to-end path for the whole communication (a traditional phone call), held even when idle. Packet switching reserves nothing, sharing links among many flows.
- Packet switching is efficient (shared capacity, no idle reservation) and resilient (reroutes around failures).
- Circuit switching gives a guaranteed constant path but wastes capacity when idle and fails entirely if the path breaks.
Examples in context
Example 1. Resilience of the internet. If a major link fails, routers detect it and forward subsequent packets along alternative paths, so a download continues with only a brief disruption. This rerouting is possible precisely because packet switching reserves no fixed path, unlike a circuit-switched call that would simply drop.
Example 2. Sharing a home connection. Several family members stream, browse and message at once over one broadband line because their packets are interleaved on the shared link, each using capacity only when sending. Circuit switching would force each to reserve a slice of the line whether or not they were using it, wasting capacity.
Try this
Q1. Give three pieces of information carried in a packet header. [3 marks]
- Cue. Source IP address, destination IP address, sequence number (also acceptable: checksum, time-to-live, protocol).
Q2. Why might packets of one message arrive out of order? [1 mark]
- Cue. Each packet is routed independently and may take a different path with a different delay.
Q3. State one advantage of packet switching over circuit switching for the internet. [1 mark]
- Cue. Efficient shared use of capacity (no idle reserved path) and resilience through rerouting around failures.
Exam-style practice questions
Practice questions written in the style of SEAB exam questions on this dot point, with worked answer explainers. The year tag is the paper they imitate, not the source.
Original6 marks(a) Explain how packet switching transmits a large file across a network. (b) State three pieces of information carried in a packet header. (c) Explain why packets of one message may arrive out of order and how this is resolved.Show worked answer →
(a) The file is split into many small packets, each routed independently across the network. Routers forward each packet toward its destination, possibly by different paths. At the destination the packets are reassembled into the original file using their sequence numbers.
(b) A packet header carries (any three): the source IP address, the destination IP address, a sequence number (for reassembly order), and often a checksum/error-check, time-to-live (hop limit), and protocol information.
(c) Because each packet is routed independently, they may travel different paths with different delays, so they can arrive out of order (or some may be lost). This is resolved at the transport layer (TCP): sequence numbers let the receiver reorder packets correctly, and missing packets are detected and retransmitted.
Markers reward splitting into independently routed packets reassembled at the destination, three valid header fields, and out-of-order arrival resolved by sequence numbers (and retransmission) at the transport layer.
Original5 marksContrast packet switching with circuit switching, giving one advantage of packet switching for a shared network like the internet, and describe what a router does at each hop.Show worked answer →
Circuit switching sets up a dedicated end-to-end path (circuit) reserved for the whole communication, as in a traditional phone call - the path is held even when idle. Packet switching sends independently routed packets over shared links with no reserved path; capacity is used only when packets are actually sent.
An advantage of packet switching for the internet: it uses network capacity efficiently, because many communications share the same links (statistical multiplexing) rather than each tying up a dedicated circuit; it is also resilient, rerouting around a failed link since no fixed path is reserved.
At each hop, a router examines a packet's destination IP address, consults its routing table to choose the best next hop toward the destination, and forwards the packet on that outgoing link. It repeats independently for every packet.
Markers reward the dedicated-path-versus-independent-packets contrast, a valid packet-switching advantage (efficiency from sharing, or resilience), and the router reading the destination address, consulting a routing table, and forwarding to the next hop.
Related dot points
- Describe the layered TCP/IP model, the role of each layer, and how encapsulation passes data between layers
A focused answer to the H2 Computing outcome on the TCP/IP model. The application, transport, internet and link layers, the role of each, encapsulation of data into segments and packets and frames, and why layering matters.
- Explain how DNS resolves domain names to IP addresses, and describe the HTTP/HTTPS request-response model and the client-server architecture
A focused answer to the H2 Computing outcome on DNS and the web. Resolving domain names to IP addresses through DNS, the HTTP and HTTPS request-response cycle, status codes, and the client-server model.
- Explain IPv4 addressing, the role of the subnet mask in separating network and host parts, and the motivation for IPv6
A focused answer to the H2 Computing outcome on IP addressing. The structure of an IPv4 address, how a subnet mask divides network and host bits, calculating hosts per subnet, and why IPv6 was introduced.
- Explain symmetric and public-key (asymmetric) encryption, digital signatures and common network threats and defences
A focused answer to the H2 Computing outcome on network security. Symmetric and public-key encryption, the key-distribution problem, digital signatures for authenticity, hashing, and common threats and defences.
- Describe graphs and their terminology, represent them as adjacency matrices and adjacency lists, and compare the two representations
A focused answer to the H2 Computing outcome on representing graphs. Vertices and edges, directed and weighted graphs, adjacency matrix versus adjacency list, and the space and lookup trade-offs between them.