Syllabus & Goals 3 min
Cambridge 2.1 · Types and methods of data transmission Paper 1 · Computer Systems
By the end of this lesson you can:
- Describe the structure of a data packet — header, payload and trailer — and what each part holds.
- Explain how packet switching sends data, including the role of the router.
- State the benefits and drawbacks of packet switching and use a trailer error check.
Textbook: Chapter 2, §2.1.1 (pp. 45–49) — data packets and packet switching.
Recap / Warm-Up 5 min
Unit 1 was about how data is represented in binary. Unit 2 is about how that data is moved between devices — quickly, correctly and safely.
Quick starter
You must post a 500-page book to a friend. Would you send one huge parcel, or several small ones? Give one reason.
Reveal a sensible answer
Several small parcels. Each is easier to handle, and they can travel by different vans. If one van is delayed, the others still arrive. Networks split data up for the same reasons.
Key Concept 14 min
1 · Why data is split into packets
Data sent over long distances is broken up into small data packets (sometimes called datagrams). A typical packet carries about 64 KiB of data. Small packets are much easier to control than one long, continuous stream.
Each packet can travel by a different route. That helps when a route is broken or very busy. The one obvious cost is that the receiver must reassemble the packets at the end.
2 · The structure of a packet
Every packet has three parts: a header, the payload and a trailer.
Header
- sender's IP address
- receiver's IP address
- sequence number — so packets can be put back in order
- packet size — so the receiver can check the packet arrived intact
Payload
The actual data being carried — usually about 64 KiB.
Trailer
- a way of identifying the end of the packet
- an error check — a cyclic redundancy check (CRC)
3 · The trailer's CRC check
At IGCSE, the cyclic redundancy check is described like this:
- The sender adds up all the
1-bits in the payload. - It stores that total as a hex value in the trailer, then sends the packet.
- The receiver counts the
1-bits in the payload again. - If its count matches the trailer value, there was no error. If not, the packet is re-sent.
4 · Packet switching
Packet switching breaks a message into packets. Each packet is then sent independently from the start point to the end point. At every stage there is a node containing a router.
- A router receives a packet and reads its header.
- It uses the destination IP address to decide where to send the packet next.
- The choice depends on how many packets are waiting at each node. The shortest available path is picked.
- So each packet may follow its own route and arrive in a different order.
- The receiver uses the sequence numbers to reassemble the original data.


5 · Benefits and drawbacks
Benefits
- No need to tie up a single communication line.
- Failed, busy or faulty lines are overcome by re-routing packets.
- It is relatively easy to expand the network's use.
- A high data transmission rate is possible.
Drawbacks
- Packets can be lost and need to be re-sent.
- More prone to errors with real-time streaming (e.g. a live sports match).
- There is a delay at the destination while packets are re-ordered.
Worked Example 12 min
(a) Send a photo by packet switching
Question: Sam sends Alex a 300 KiB photo. Each payload holds 64 KiB. Describe what happens, step by step.
- Work out the number of packets: 300 ÷ 64 = 4.6875, so 5 packets — four full ones and one of 300 − 4 × 64 = 44 KiB.you cannot send part of a packet, so always round up.
- Each packet gets a header: Sam's IP, Alex's IP, a sequence number 1…5, and its size. The trailer gets an end marker and a CRC value.the header makes each packet self-addressed, so it can travel alone.
- At every node, a router reads the destination IP and forwards the packet on the best free route.routes change from moment to moment, so packets split up.
- The packets arrive in the order 3, 1, 5, 2, 4. Alex's computer checks each CRC and asks for any damaged packet again.a quick route for one packet may be jammed for the next.
- The computer sorts the packets by sequence number back into 1, 2, 3, 4, 5 and rebuilds the photo.the header's "5 packets in total" tells it nothing is missing.
How the marks are earned: data split into packets (1) · each packet sent independently (1) · routers use the destination IP in the header to choose the route (1) · packets may arrive out of order (1) · reassembled using sequence numbers (1).
(b) Use the trailer's CRC to check a payload
Question: a packet's payload holds these six bytes. Show how the receiver checks it arrived error-free.
| Byte | Bits | Number of 1-bits |
|---|---|---|
| 1 | 11010010 | 4 |
| 2 | 01110000 | 3 |
| 3 | 11111011 | 7 |
| 4 | 00000101 | 2 |
| 5 | 10011110 | 5 |
| 6 | 01100001 | 3 |
| Total | 24 | |
- Sender counts the 1-bits in each byte: 4 + 3 + 7 + 2 + 5 + 3 = 24.the CRC value is built from the whole payload.
- Convert to hex: 24 = 1 × 16 + 8, so 18 (hex). This goes in the trailer.the textbook method stores the total as a hex value.
- Receiver recounts the 1-bits in the payload it received. It gets 24 = 18 hex. It matches the trailer, so the packet is accepted.
- Suppose byte 3 arrived as 11101011 (one bit flipped). The recount is 23 = 17 hex, which does not match 18, so an error is detected and the packet is re-sent.any single changed bit changes the count by exactly 1.
Try It Yourself 12 min
Goal: draw a data packet. Label the header, payload and trailer. Write two items that go in the header and two that go in the trailer.
Goal: a 448 KiB file is sent in 64 KiB payloads. How many packets are needed? They arrive in the order 4, 7, 1, 2, 6, 3, 5. Explain how the receiver rebuilds the file and how it knows none are missing.
Goal: a payload holds 10110011 01111110 00000001. Work out the CRC value in hex that the sender puts in the trailer. Then give one change to the payload that this check would not detect.
Hint
Count the 1s in each byte, add them, then divide by 16 for the hex digits. For the second part, think about two bits changing in opposite directions.
📝 Exam Practice 10 min
A data packet has a header. Identify three items of data stored in the packet header.
Mark scheme
- IP address of the sender / source (1).
- IP address of the receiver / destination (1).
- Sequence number / packet number (1).
- Size of the packet / total number of packets (1).
Any three, 1 mark each.
Describe how packet switching is used to send a large file from one computer to another.
Mark scheme
- The file is broken up into packets (1).
- Each packet has a header with the destination IP address / sequence number (1).
- Each packet is sent independently / can take a different route (1).
- A router at each node reads the header and decides where to send the packet next (1).
- The route depends on how busy each path / node is (1).
- Packets may arrive out of order (1).
- Packets are reassembled into the correct order at the destination using the sequence numbers (1).
Any five, 1 mark each.
A video conference uses packet switching. Explain two problems that could affect the sound and video, and what causes them.
Mark scheme
- Picture freezes / sound drops out / lag (1)…
- …because packets are lost / delayed on busy routes and must be re-sent (1).
- Sound and video out of step / jerky playback (1)…
- …because packets arrive out of order and there is a delay while they are re-ordered (1).
Explain how the trailer of a packet is used to check that the payload arrived without error.
Mark scheme
- The sender adds up the 1-bits in the payload and stores the value (in hex) in the trailer / CRC (1).
- The receiver recalculates the number of 1-bits in the received payload (1).
- The two values are compared; if different, an error has occurred and the packet is re-sent (1).
Recap & Key Terms 3 min
Data is split into packets: header (IPs, sequence number, size), payload (≈ 64 KiB) and trailer (end marker, CRC). In packet switching, routers read the destination IP and send each packet its own way. The receiver reorders the packets by sequence number.
- Data packet
- A small part of a message / data that is sent over a network; the packets are reassembled after transmission.
- Packet header
- The part of a packet holding the sender's and receiver's IP addresses, the sequence number and the packet size.
- Payload
- The actual data being carried in a data packet.
- Packet trailer
- The part of a packet that marks its end and holds the CRC error check.
- Cyclic redundancy check (CRC)
- An error check where the 1-bits in the payload are added and stored in the trailer; the receiver repeats the calculation.
- Packet switching
- Transmission where a message is broken into packets that are sent independently along different routes.
- Router
- A device at a network node that reads a packet's header and decides where to send it next.
Homework 1 min
Task (≤ 15 min): give two benefits and two drawbacks of packet switching. Then explain why a live sports stream suffers more than a file download. [6]
Model answer
- Benefit: no single line is tied up for the whole transfer (1).
- Benefit: busy or failed lines can be avoided by re-routing packets (1).
- Drawback: packets can be lost and must be re-sent (1).
- Drawback: there is a delay at the destination while packets are re-ordered (1).
- A live stream must be played as soon as it arrives, so late or lost packets cause freezing (1)…
- …whereas a download can wait until every packet has arrived and been reordered (1).