OSI Layer 4: Transport Layer
Definition
The Transport Layer provides transparent transfer of data between end systems (host-to-host). It takes data from the session layer, breaks it into smaller units called Segments (or Datagrams), and ensures they arrive accurately and in order at the receiving host.
Key Functions
- Service Point / Port Addressing: Directs traffic to specific processes/applications on a machine using port numbers (0 to 65535).
- Segmentation & Reassembly: Splits large data blocks into manageable segments with sequence numbers, reassembling them at destination.
- Connection Control:
- Connection-Oriented (TCP): 3-way handshake (SYN, SYN-ACK, ACK), reliable delivery, retransmissions.
- Connectionless (UDP): Fast, best-effort delivery without handshakes or acknowledgments.
- Flow Control: Prevents a fast sender from overwhelming a slow receiver (e.g., Sliding Window protocol).
- Error Control: Checksums to detect corrupted segments and request retransmission.
Common Protocols
- TCP (Transmission Control Protocol): Reliable, sequenced, connection-oriented.
- UDP (User Datagram Protocol): Lightweight, low-latency, connectionless (used for DNS, VoIP, gaming).
- QUIC: UDP-based multiplexed transport with built-in TLS.
- SCTP (Stream Control Transmission Protocol): Message-oriented multihomed transport.
Protocol Data Unit (PDU)
- Segment (TCP) / Datagram (UDP)
Adjacent Layers
- Sits between OSI Layer 5: Session Layer and OSI Layer 3: Network Layer.