Back to Knowledge Base
networkingNODE: #layer-4-transport

OSI Layer 4: Transport Layer

The OSI layer responsible for end-to-end communication, segmentation, flow control, error checking, and port addressing.

AKA:Layer 4, L4, Transport Layer
#networking#osi-layers#tcp#udp#flow-control#ports

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

  1. Service Point / Port Addressing: Directs traffic to specific processes/applications on a machine using port numbers (0 to 65535).
  2. Segmentation & Reassembly: Splits large data blocks into manageable segments with sequence numbers, reassembling them at destination.
  3. 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.
  4. Flow Control: Prevents a fast sender from overwhelming a slow receiver (e.g., Sliding Window protocol).
  5. 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