The Transport Layer (Layer 4) is the bridge between the application and the network. While the Network Layer delivers data between hosts, the Transport Layer delivers data between applications running on those hosts.
Key Responsibilities
| Responsibility | What it does |
|---|---|
| Segmentation | Splits large application data into chunks (segments) that fit network limits |
| End-to-end delivery | Routes data to the correct application on the destination host |
| Multiplexing | Allows many apps (browser, chat, email) to share the same network connection |
| Reliability | Optional — TCP provides it, UDP doesn’t |
Port Numbers
The transport layer uses 16-bit port numbers (0-65535) to identify applications. Every connection is uniquely identified by a 5-tuple:
(Source IP, Source Port, Destination IP, Destination Port, Protocol)
The Two Protocols
| Protocol | Reliability | Connection | Use case |
|---|---|---|---|
| TCP | Reliable (ACKs, retransmission) | Connection-oriented | Web, email, file transfer |
| UDP | Unreliable (best effort) | Connectionless | Streaming, gaming, DNS |
Q: What is the primary job of the Transport Layer?
A: End-to-end communication between applications. The Network Layer gets data to the right computer; the Transport Layer gets it to the right app (via port numbers).
Q: Why do we need to segment data?
A: To avoid overwhelming the network with one giant transmission. Segmentation allows fair sharing of the link between multiple connections and efficient retransmission — only the lost segment is resent, not the entire file.
Premium Content
Unlock Introduction to Transport Layer and all premium lessons with a subscription.
From ₹199.99/year — See plans