Easier to read with cream paper, a tint, more contrast or larger text? Choose your colours and text, once, for every page.

Preview

AC 7.3: How a download is cut into packets

This is the first page of the lesson. Read it and have a go at the activities. The rest is in the full lesson.

50 minutes

A big file in many boxes

An analyst downloads a file of sales records. The server does not send it in one go. It cuts the file into small numbered pieces. Each piece has a label. The pieces go by different routes and arrive in a mixed order.

Your computer uses the numbers to put the file back together.

Key words

WordWhat it means
Packeta small piece of a message, with its own labels
Headerthe labels at the front of a packet
Payloadthe piece of the message a packet carries
Trailerthe part at the end of a packet, with a check value
Packet switchingsending packets by whatever route is free, then rebuilding the message
Sequence numbera number that says where a packet fits in the message
TTLtime to live: a count that stops a packet travelling for ever
Routera device that joins networks and passes packets on
IP addressa number that names a device on a network
Ethernetthe usual wired way to join devices in a building
Networkdevices joined so they can share things

The cells students fill in are left blank in this preview.

By the end of this lesson

Note

I can describe what a packet holds and how packet switching sends a message.

Starter

Have a go

Starter

3 questions
Have a go: your answers are marked here and then forgotten. Sign in if you would like your score kept, and to pick up where you left off.Sign in to keep your score

Your answers are marked here and are not kept. A college account keeps every student’s marks.

Small packets are easier to send

A big message is cut into many small packets. Each packet is sent on its own. If one is lost, only that small piece is sent again.

Small packets also let many people share one line. Each person's packets take turns, so no one waits for a huge file to finish.

What is inside a packet

PartWhat it holdsWhat it is for
Header: source addressThe IP address of the senderSo the reply knows where to go
Header: destination addressThe IP address of the receiverSo routers know where to send it
Header: sequence numberThe place of this packet in the messageSo the message can be put back in order
Header: TTLA count that goes down at each routerSo a lost packet does not travel for ever
PayloadA piece of the messageThe data you actually want
TrailerA check valueSo the receiver can spot damage

The cells students fill in are left blank in this preview.

A note about the trailer

Note

Strictly, an IP packet has no trailer. The check value sits in the trailer of the Ethernet frame that carries the packet. This course treats a packet as a header, a payload and a trailer, as the specification does. The sequence number is really in the TCP header.

Try it: cut a file into packets

Code: python
message = "ORDERS-2026"
size = 4
start = 0
number = 1
while start < len(message):
    print(str(number) + ":" + message[start:start + size])
    number = number + 1
    start = start + size

# Change size to 3 and press Run.
# How many packets do you get now?

Check

Have a go

Check

3 questions
Have a go: your answers are marked here and then forgotten. Sign in if you would like your score kept, and to pick up where you left off.Sign in to keep your score

Your answers are marked here and are not kept. A college account keeps every student’s marks.

The lesson goes on

8 more parts of this lesson are in the full curriculum, with the tasks, the final check and the labs. A college account gives your students all of it.