Explain like I'm five · Network

What's the Role of the Transport Layer?

The transport layer, told as a story about handing an envelope — once it reaches the right town — to the right counter, and choosing registered or plain mail.

the envelope reached the right town, but doesn't know which counter to go tothe same town has separate counters for web, for mail, and more

The envelope reached the right town, but doesn't know which counter to go to.The same town has separate counters for web, for mail, and more.

registered: confirmed, so sure but slowplain: fast, but could get lostyou can't have both certainty and speed at once

You have to choose between certainty (registered) and speed (plain).You can't have both certainty and speed at once.

8053443the transport layer = splitting counters by number, and choosing registered vs plain mailthe transport layer hands the envelope — once it's in the right town — to the right counter, the right way

The transport layer = splitting by counter number and choosing registered vs plain.The transport layer hands the envelope to the right counter, the right way, once it's in the right town.

Port Separationsplits by counter number
Reliability Choiceregistered or plain mail
Segment & Reassemblesplits a big load into pieces
Flow Controlmatches the other side's pace
WHAT THE TRANSPORT LAYER DOESport separation — splits counters in the same town by numberreliability choice — registered (TCP) or plain (UDP)segmentation — splits a big load, reassembles it at the other endflow/congestion control — slows down when the receiver or the road can't keep up

The transport layer handles port separation, reliability choice, segmentation, and flow and congestion control.The sender slows down when the receiver or the road can't keep up.

the transport layer picks the counter and the methodbut the route to the town is the network layer's (routing) jobregistered or plain, the actual route is decided one layer below

The transport layer doesn't decide the route itself.The actual route is decided one layer below, by the network layer.

In one breath

The transport layer = the stage that splits envelopes arriving in town by counter number (port) and chooses between registered (TCP) and plain (UDP) mail.

The transport layer (OSI Layer 4) distinguishes multiple services on the same host by port number, exchanges data via either TCP (connection-oriented, reliable) or UDP (connectionless, fast), and, with TCP, also splits data into segments and regulates the sending rate through flow and congestion control. Its role is distinct from the network layer, which decides the destination address.

When grown-ups say it

Port Number
Which counter inside the town. Distinguishes services at the same address.
TCP
The registered envelope, with delivery confirmed. Connection-oriented and highly reliable.
UDP
The plain envelope, sent fast with no confirmation. Connectionless and fast, but envelopes can get lost.
Segment
The unit of data split at the transport layer. Similar to a packet, but this layer's own name for it.
Flow/Congestion Control
Slowing the sending rate to match the other side. One reason registered mail (TCP) can slow down.
L4 Switch
The sorter who splits by counter, reading the port too. A device that actually uses this layer's information. → the sorter who checks the port
Network Layer (Subnetting)
One layer below, deciding the town (address). The transport layer operates on top of this one. → splitting the town into smaller zip-code zones
Network IPC
The dedicated mailbox that picks its target by port. A direct example of using this layer's port concept. → the dedicated mailbox between processes
Next story
One Contract, Many Dedicated Lanes →
Want another term as a picture book? Request →