GCSE · Computer Science · AQA · Spec 8525

TCP (Transmission Control Protocol)

You download a file. On the way, one piece goes missing and two others swap places. So why does the file still open perfectly?

Step through it

One download, nine steps

Mia's phone is downloading a tiny text file from a server. Press Next and watch what happens to each packet on the way.

The server will send packets #1, #2, #3 and #4 in that order. Will they reach Mia's phone in that order? Decide, then step through.

Message: SEE YOU AT THE PARK

Server (sending)→The network→Mia's phone (receiving)
Data=SEE YOU AT THE PARKConnection=Being set up

Output

 

Step 1: Before a single bit of the file moves, TCP sets up a connection between the server and Mia's phone. Connection first, data second.

1 / 9

Press Next one step at a time. Watch the 'Arrived so far' chip: does it match the order the packets were sent in?

Step 1 of 9: Before a single bit of the file moves, TCP sets up a connection between the server and Mia's phone. Connection first, data second..

Exam line: Connection first. Then split the data into packets and number them. Check each arrival for errors, acknowledge the ones that arrive correctly, send anything lost or corrupted again, and use the sequence numbers to rebuild the data in order.
Watch out: A packet overtook another and one went missing, and the file still arrived complete. 'Reliable' doesn't mean nothing goes wrong on the way. It means TCP puts it right.

What do you really think?

So what does 'reliable' mean?

Your friend says: "TCP is the reliable one, so on a TCP connection packets just arrive safely, in order. Nothing ever goes wrong."

Which is closest to what you think right now?
How sure are you?

Exam line: Reliable doesn't mean nothing goes wrong. It means TCP puts it right: sequence numbers sort out the order, and lost or corrupted packets are sent again, so the complete data arrives intact.

TCP or IP?

Who does which job?

Which protocol does each job?

Still to sort

TCP (0)

Reliable, ordered delivery

Where the line is: TCP's part is reliable, ordered delivery. If a job helps make the delivery reliable, or helps put the data back in order, it's TCP's.

IP (0)

Addressing and routing

Where the line is: IP's part is addressing packets and routing them. If a job is one of those two, it's IP's.

6 of 6 still to sort.

TCP never works alone. It teams up with IP, and the two split the work between them. That's why you'll often see them written together as TCP/IP. Sort each job to the protocol that does it.

Exam line: TCP: reliable, ordered delivery of the data. IP: addressing packets and routing them across networks. Together they're known as TCP/IP.
Watch out: A sequence number and an address can both sound like 'labels' for a packet, but they belong to different protocols. The number is for TCP's ordering; the address is IP's.

TCP or UDP?

TCPvsUDP

Two transport protocols making opposite trade-offs. Start with the top row: it's the one people mix up most.

Focus

Is delivery reliable?

TCP

Yes. A lost or corrupted packet is sent again.

UDP

No. Delivery isn't guaranteed.

The insight

This is the big difference. UDP is a transport protocol too, but it doesn't promise every packet gets there.

Is the order kept?

TCP

Yes. Sequence numbers let the receiver put packets back in order.

UDP

Not necessarily. Order isn't guaranteed.

What's the trade-off?

TCP

Reliable delivery comes first.

UDP

Trades reliability for speed.

Right for data where every piece must arrive correctly?

TCP

Yes: web pages (HTTP/HTTPS), email and file transfer all use TCP.

UDP

Not a safe choice: delivery and order aren't guaranteed.

WHAT YOU'VE LEARNED

A quick recap of today's lesson.

Watch a download go wrong, then watch TCP put it right.

What you need to know

  • TCP stands for Transmission Control Protocol. Its job: reliable delivery of data between two devices, like a client and a server.
  • Before any data moves, TCP sets up a connection between the sending and receiving devices.
  • On the sending side, TCP splits the data into packets, also called segments.
  • Every packet gets its own sequence number.
  • Packets can arrive out of order. The receiver uses the sequence numbers to put them back in the right order.
  • Have a goPackets reach your phone as #3, #1, #4, #2. What order does TCP put them back into, and what tells it?

    #1, #2, #3, #4, worked out from the sequence numbers.

    The arrival order is just the order they happened to turn up. The sequence numbers say where each packet belongs.

  • Each packet is checked for errors, and the receiver acknowledges the packets that arrive correctly.
  • A packet that's lost or corrupted is sent again, so the complete data arrives intact.
  • Have a goPacket #2 of your download goes missing on the way. Your friend groans: "That's it, the file's ruined." Are they right?

    No. The lost packet is sent again.

    It's tempting to think a lost packet means broken data, but with TCP any lost packet is sent again, so the complete data still arrives intact.

  • IP is TCP's partner. TCP handles reliable, ordered delivery; IP addresses packets and routes them across networks.
  • Have a goWhich word is wrong in this sentence? "IP gives each packet a sequence number and routes it across networks."

    'Sequence number'. Numbering packets is TCP's job.

    IP's job is addressing packets and routing them, so the routing part is right; giving packets sequence numbers belongs to TCP.

  • Web pages (HTTP/HTTPS), email and file transfer use TCP, because every piece of that data must arrive correctly.
  • UDP is an alternative transport protocol. It doesn't guarantee delivery or order, trading reliability for speed.

The big picture

TCP (Transmission Control Protocol) provides reliable delivery of data between two devices, such as a client and a server. It sets up a connection first, splits the data into packets (segments) and numbers each one; the receiver uses the sequence numbers to rebuild the data in order, because packets can arrive out of order. TCP checks packets for errors, the receiver acknowledges packets that arrive correctly, and lost or corrupted packets are sent again, so the complete data arrives intact. TCP handles reliable, ordered delivery while IP handles addressing and routing (TCP/IP). Web pages, email and file transfer use TCP; UDP doesn't guarantee delivery or order, trading reliability for speed.

Key points

1TCP (Transmission Control Protocol) provides reliable delivery of data between two devices, such as a client and a server, and sets up a connection before data is exchanged.
2The sending side splits the data into packets (segments) and gives each a sequence number; the receiver uses the sequence numbers to put packets that arrive out of order back in the right order.
3TCP checks packets for errors; the receiver acknowledges packets that arrive correctly, and lost or corrupted packets are sent again, so the complete data arrives intact.
4TCP handles reliable, ordered delivery; IP handles addressing packets and routing them across networks. Together they are known as TCP/IP.
5TCP is used where every piece of data must arrive correctly, such as web pages (HTTP/HTTPS), email and file transfer; UDP does not guarantee delivery or order, trading reliability for speed.

Worked example

Problem

Practice question: A server sends packets #1 to #4 of a file to a laptop using TCP. They arrive in the order #4, #1, #3, #2, and #3 arrives corrupted. Describe what TCP does so that the laptop ends up with the complete file.

⚠ Watch out

Thinking 'reliable' means nothing ever goes wrong. Packets can still be lost, corrupted or arrive out of order; TCP puts that right with sequence numbers, error checks, acknowledgements and sending packets again. And don't hand TCP's jobs to IP: IP addresses packets and routes them.

🧠

Memory hook

Number it, check it, acknowledge it, resend it if it's lost, put it back in order. TCP doesn't promise a smooth trip; it puts things right so the complete data arrives at the end. Addressing and routing? That's IP.

✓

Check yourself

Cover the page. Talk through what TCP does from before the first packet leaves the server until the complete file is rebuilt on the receiving device. Then say what IP does instead.

Flashcards

(12)
What does TCP stand for?
Transmission Control Protocol.
What is TCP's job?
Reliable delivery of data between two devices, such as a client and a server.
What does TCP set up before any data is exchanged?
A connection between the sending and receiving devices.
What does TCP do to the data on the sending side?
Splits it into packets (segments) and gives each packet a sequence number.
Why does the receiver need the sequence numbers?
Packets can arrive out of order. The numbers let the receiver put them back in the correct order.
What does TCP check every packet for?
Errors.
What does the receiver do with a packet that arrives correctly?
Acknowledges it.
What happens to a packet that is lost or corrupted?
It is sent again, so the complete data arrives intact.
Which protocol addresses packets and routes them across networks, and what is it called together with TCP?
IP. Working with TCP, the pair is known as TCP/IP.
Give examples of data sent using TCP.
Web pages (HTTP/HTTPS), email and file transfer: data where every piece must arrive correctly.
What is UDP?
An alternative transport protocol that does not guarantee delivery or order.
What does UDP trade away, and what does it get in return?
It trades reliability for speed.

Tap any card to flip it, or use Study as deck to go through them one at a time. In the full lesson these run as a spaced-repetition deck — you rate each card Hard, Good or Easy and the tricky ones keep coming back until they stick.

Learning with Lightbulb is opening soon

You can use this lesson now. Join the waitlist and we'll let you know when the full Lightbulb experience is ready.

Keep me posted

More AQA GCSE Computer Science topics

See the full AQA Computer Science curriculum →

How this lesson was checked. This AQA GCSE Computer Science (specification 8525)lesson was published through Lightbulb Learning's human-designed editorial process — the educational standards, accuracy rules and publication checks it must pass were authored and approved by Philip Halpin. It passed subject-specific assessment, automated educational checks and technical publication verification before going live (publication checks completed 4 November 2026). Published pages are monitored, human spot-checking is ongoing across the lesson library, and anything found wrong is corrected or withdrawn. How our lessons are made and checked. Spotted a mistake? Email hello@lightbulblearning.co and we'll review it.