Unit 6 · The Internet & Computing Systems · Lesson 6.4

Packets and TCP

Your message doesn’t travel as one piece. It’s chopped into packets that may take different routes, arrive out of order, or not arrive at all — and it still shows up perfect. Today: how.

Big Idea 4 — Computer Systems & NetworksCED 4.1 · metadata, doing new work

Before this lesson — read on Runestone

Ten minutes. Read it before class; we start from it. Enrolled in our Runestone course? Open it from there so your progress counts.

1

Where We Are

People→ Bits→ Programs→ Internet→ Security→ Big Data→ Impact

Internet. You know the rules (6.2) and the addresses (6.3). Now the thing that actually moves: the packet.

2

The Hook

Read this message aloud. One volunteer gets a message written across eight index cards — shuffled, with two cards held back. “Read it.” They can’t, until they know the order and get the missing cards.

That’s not the internet failing. That’s the internet’s normal day.

3

The Idea

Data sent over the internet is split into packets: small chunks of data, each with metadata attached — where it’s from, where it’s going, and which piece of the message it is (“packet 3 of 8”). Unit 5’s metadata, doing a new job.

Why not send the whole thing at once?

The counterintuitive fact the exam loves: packets from the same message may take different routes and arrive out of order. That’s fine — the receiver uses the numbers to put them back in order.

Two protocols split the work. IP addresses each packet and sends it on its way — and makes no promise it arrives. TCP adds the guarantees: it numbers the packets, the receiver sends back acknowledgments, and anything that doesn’t get acknowledged is sent again. (A third protocol, UDP, skips those guarantees to be faster — fine for live video, where a late packet is useless anyway.)

4

Try It — The Packetizer

Type a message and pick a packet size. Send it across the network, then put it back together.

message:
characters per packet:
5

Vocabulary

packet Internet
A small chunk of data sent over a network, with metadata attached that is used to route and reassemble it.
packet metadata Internet
The extra information on a packet: source and destination addresses, sequence number, and more.
TCP Internet
Transmission Control Protocol. Numbers packets, confirms they arrived, and resends any that didn’t — reliable delivery.
IP Internet
Internet Protocol. Addresses each packet and moves it toward its destination, with no guarantee of delivery.
routing Internet
Finding a path from sender to receiver. Preview — it’s 6.6’s whole lesson.
6

Check

Five questions. If one feels backwards, that’s the point — read the explanation.

0 of 5 answered
7

Impact Check

Everybody’s packets share the road

Your video, your neighbor’s game, and a hospital’s records can travel through the same router in the same second, interleaved packet by packet. That sharing is what makes the internet affordable — and it’s also why your packets pass through equipment you’ll never see, owned by people you’ll never meet. Unit 7 picks up that thread.

8

Connections

Came from 5.2 — metadata. A packet header is metadata — and like phone metadata, it reveals who talked to whom even without the content.
Came from 6.3 — the destination IP address is on every single packet.
Next in 6.5 — you build this in Python: split, lose some, reassemble, resend.
Returns in 6.6 — where do packets go between sender and receiver? Routers decide, one hop at a time.
← 6.3 Addresses and Names