What is the transport layer of the OSI model?
The transport layer (Transport Layer, L4) is the fourth layer of the OSI model, responsible for delivering data from application to application between devices on a network.
In short: the transport layer provides data transfer between programs on different devices.
Why the transport layer is needed
The network layer (L3) can deliver packets from node to node, but it does not know which application on the computer needs that data.
The transport layer solves exactly this:
- links specific applications
- manages reliability and order of delivery
- controls the data flow
Main tasks of the transport layer
1. Delivering data "from application to application"
The transport layer uses ports:
- source port
- destination port
Thanks to ports:
- one computer can simultaneously
- work with many network programs
Examples of ports:
- 80 - HTTP
- 443 - HTTPS
- 22 - SSH
2. Data segmentation
The transport layer:
- splits application data into segments
- sends them over the network
- reassembles them on the receiver's side
3. Reliable delivery (when TCP is used)
Depending on the protocol, the transport layer can:
- acknowledge receipt of data
- retransmit lost segments
- ensure correct delivery order
4. Flow control
The transport layer makes sure:
- the sender does not transmit data faster
- than the receiver can process it
5. Network congestion control
Some protocols (TCP):
- reduce transmission speed
- if the network is congested
Main transport layer protocols
TCP (Transmission Control Protocol)
- reliable
- connection-oriented
- guarantees delivery and order
Used for:
- websites
- file transfers
UDP (User Datagram Protocol)
- unreliable
- connectionless
- faster and simpler
Used for:
- video and audio
- online games
- DNS
What the transport layer does NOT do
Important for the interview. The transport layer:
- does not choose the route (that is L3)
- does not work with MAC addresses
- does not transmit data as a signal
Relationship to other layers
- L3 (network) - delivers packets between nodes
- L4 (transport) - delivers data between applications
- L7 (application) - works with user data
In short, for the interview
The transport layer of the OSI model is responsible for transferring data between applications on different devices, using ports, providing segmentation, reliability (TCP), and data flow control.
Short Answer
Interview readyA concise answer to help you respond confidently on this topic during an interview.