GCSE · Computer Science · AQA · Spec 8525

Transport layer (TCP/IP)

Your message gets cut up, scrambled and loses a piece on the way. Your friend still reads it perfectly, in the right app. Who fixed it?

Step through it

One message, down and back up

Leo sends a chat message from his laptop to Priya's phone, using TCP. Press Next and watch what the transport layer does to it on each side.

Before you press Next: will Leo's message travel as one big piece? And will the pieces turn up in the order they were sent?

Message: TRAIN IS LATE SAVE ME A SEAT

Laptop: application layer→Laptop: transport layer→Internet layer and below→Phone: transport layer→Phone: application layer
Data=TRAIN IS LATE SAVE ME A SEATFrom=Chat app

Output

 

Step 1: Leo hits send in his chat app. The application layer hands the data down to the transport layer, the next layer below it.

1 / 11

Press Next one step at a time. Watch which layer is lit up, and compare the order things arrive in with the order they were sent.

Step 1 of 11: Leo hits send in his chat app. The application layer hands the data down to the transport layer, the next layer below it..

Exam line: Sending: take the data from the application layer, split it into segments, add a header with port and sequence numbers, pass it down to the internet layer. Receiving: take the segments from the internet layer, put them back in order, pass the data up. TCP adds a connection first, acknowledgements, and re-sending of missing or damaged data.
Watch out: A segment went missing and the order got scrambled, and the message still arrived complete. Reliable delivery doesn't mean nothing goes wrong on the way. It means TCP has a way of dealing with it: the receiver acknowledges what arrives, missing or damaged data is sent again, and the segments are put back in order.

Computer Science · Structure

Where does the transport layer sit?

Tap each layer. Notice how many jobs that sound like 'delivery' belong to the layers around the transport layer, not to it.

data down / data upsegments down / segments up

Tap any part of the diagram to see what it does.

Predict, then check

You've just watched TCP re-send a lost piece. Is re-sending always the right call?

Zara's on a live video call with her gran. A tiny piece of the video data goes missing on the way. Which approach suits a live call like this?

Build the comparison

TCP or UDP: who does what?

Tick each property the protocol has, then check your grid.

TCP
UDP

Exam line: TCP: connection first, acknowledgements, re-sending, so delivery is reliable. UDP: none of those, so delivery and order aren't guaranteed, but less overhead and faster.

WHAT YOU'VE LEARNED

A quick recap of today's lesson.

Follow one message down the TCP/IP layers, through a scramble, and back into the right app.

What you need to know

  • The TCP/IP model splits network communication into four layers: application, transport, internet and link.
  • The transport layer is in the middle: the application layer sits above it, the internet layer below it.
  • When sending, it takes data from the application layer and splits it into smaller units called segments.
  • Each segment gets a header, then the segments are passed down to the internet layer.
  • Port numbers in the header identify which application or service the data belongs to, on both computers.
  • Sequence numbers in the header let the data be put back together in the right order.
  • Have a goYour laptop is running a game and a homework site at the same time (we won't tell). A segment arrives. Which number in its header decides which one gets it?

    The port number.

    The sequence number is about where a piece fits in the data. The port number is the one that identifies the application or service it belongs to.

  • When receiving, it takes segments from the internet layer, reassembles them in order and passes the data up.
  • TCP sets up a connection first. The receiver acknowledges data, and missing or damaged data is sent again.
  • Have a goElla sends a photo over TCP as six segments. Segment #4 turns up damaged. What happens to it?

    It is sent again.

    It's tempting to think only missing data gets re-sent, but with TCP damaged data is re-sent too, so the receiver isn't left with a broken piece.

  • UDP skips the connection, acknowledgements and re-sending: no guaranteed delivery or order, but less overhead and faster.
  • Not transport-layer jobs: choosing routes and adding the computers' addresses (internet layer), or physically sending data (link layer).
  • Have a goImagine the data never physically leaves the computer. Which layer has failed at its job: transport, internet or link?

    The link layer.

    Physically transmitting the data is the link layer's job. The transport layer splits, labels and reassembles; it doesn't do the physical sending.

The big picture

The TCP/IP model has four layers: application, transport, internet and link, with the transport layer between the application and internet layers. Sending, it splits data into segments and adds a header with port numbers (which application or service) and sequence numbers (which order); receiving, it puts the segments back in order and passes the data up. TCP sets up a connection and makes delivery reliable with acknowledgements and re-sending. UDP skips those, so delivery and order aren't guaranteed, but it has less overhead and is faster. Routes, addresses and physical transmission belong to other layers.

Key points

1The TCP/IP model has four layers: application, transport, internet and link. The transport layer sits between the application layer above and the internet layer below.
2Sending: the transport layer splits data from the application layer into segments, adds a header to each and passes them down to the internet layer. Receiving: it puts the segments back together in the correct order and passes the data up to the application layer.
3The header includes port numbers, which identify the application or service on the sending and receiving computers, and sequence numbers, which let the data be reassembled in order.
4TCP sets up a connection before sending and makes delivery reliable: the receiver acknowledges data, missing or damaged data is re-sent, and the data is reassembled in order.
5UDP sends without a connection, acknowledgements or re-sending, so delivery and order aren't guaranteed, but it has less overhead and is faster. It suits uses where speed matters more than every piece arriving, such as live streaming and online games.
6The transport layer does not choose routes or add the computers' addresses (internet layer), and does not physically transmit data (link layer).

Worked example

Problem

Practice question: Ravi writes, "The transport layer adds the receiving computer's address to each segment so it reaches the right computer. Then the receiver uses the port numbers to put the segments back in order." Identify the two mistakes and correct them.

⚠ Watch out

Thinking reliable always means better, so TCP must always win. UDP skips acknowledgements and re-sending; it has less overhead and is faster, which suits live streaming and online games. And don't hand the transport layer the internet layer's jobs: routes and addresses.

🧠

Memory hook

Chop, label, pass down. Collect, sort, pass up. Port picks the app, sequence fixes the order. TCP checks in and re-sends; UDP just goes.

✓

Check yourself

Cover the page. Talk through what the transport layer does when sending and when receiving, what port and sequence numbers are for, and one thing TCP does that UDP doesn't.

Flashcards

(12)
Name the four layers of the TCP/IP model.
Application, transport, internet and link.
Which layers sit directly above and below the transport layer?
The application layer is above it; the internet layer is below it.
What does the transport layer do with data it is sending?
Splits it into smaller units (segments), adds a header to each, and passes them down to the internet layer.
What does the transport layer do with segments it receives?
Puts them back together in the correct order and passes the data up to the application layer.
Why does each segment's header carry port numbers?
So the sending and receiving computers can each tell which app or service the data is meant for.
What are sequence numbers for?
They allow the data to be reassembled in the right order at the destination.
What does TCP do before any data is sent?
It sets up a connection between the sender and the receiver.
How does TCP make delivery reliable once data is moving?
The receiver acknowledges the data it receives, missing or damaged data is re-sent, and the data is reassembled in the correct order.
What does UDP leave out compared with TCP?
Setting up a connection, acknowledgements and re-sending.
What does UDP give up, and what does it gain?
Gives up guaranteed delivery and order; gains less overhead and more speed.
What kind of use does UDP suit?
Uses where speed matters more than every piece arriving, such as live video or audio streaming and online games.
Which layers choose the route, add the computers' addresses and physically transmit the data?
The internet layer chooses the route and adds the addresses; the link layer physically transmits the data.

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.