Introduction to the transport layer
The transport layer provides process-to-process communication between applications running on different hosts.
It is implemented in end systems (not in network routers).
Household analogy
Kids in two households send letters to each other:
- the postal service delivers letters between houses:
- it provides house to house communication
- Ann and Bill, who manage mail inside their respective houses, deliver letters to the correct kids:
- they provide person to person communication
This analogy explains how the transport layer relates to the network layer:
- hosts = houses
- application messages = letters
- network-layer protocol = postal service
- processes = kids
- transport-layer protocol = Ann and Bill
What does the transport layer do?
A transport protocol:
- moves messages from application processes to the network layer (and vice versa)
- is a delivery service between application processes
- also known as multiplexing and demultiplexing
- doesn't have any say about how the messages are moved within the network core
- can offer reliable data transfer service to an application
- even when the underlying network protocol is unreliable (loses, garbles, or duplicates packets)
- can use encryption
- even when the network layer cannot guarantee the confidentiality of transport-layer segments
Transport protocol guarantees
Each transport-layer protocol may offer guarantees:
| Guarantee | Description |
|---|---|
Reliable data transfer |
|
Throughput |
|
Timing |
|
Security |
|
Throughput and timing guarantees are services not provided by today's Internet transport protocols.
UDP and TCP
The transport layer makes two transport protocols available to applications:
- UDP (User Datagram Protocol)
- provides an unreliable connectionless service to the invoking application
- TCP (Transmission Control Protocol)
- provides a reliable, connection-oriented service to the invoking application
- can be enhanced at the application layer with TLS to provide security services
Service models provided by UDP and TCP:
- transport-layer multiplexing and demultiplexing (UDP, TCP)
- error/integrity checking (UDP, TCP)
- reliable data transfer (TCP only)
- congestion control (TCP only)
Segment vs datagram
Internet literature refers to:
- TCP packets as segments
- UDP packets as datagrams
- but also uses the term datagrams for the network-layer packets
It is less confusing:
- to refer to both TCP and UDP packets as segments
- to reserve the term datagram for the network-layer packet