Open In App

Transport Layer in OSI Model

Last Updated : 13 Oct, 2025
Comments
Improve
Suggest changes
7 Likes
Like
Report

The Transport Layer ensures end-to-end communication between applications on different hosts. It sits between the Network Layer (which delivers packets to the right machine) and the Session Layer (which manages communication sessions). Its main job is to deliver data reliably, efficiently, and in the correct order.

28
Transport Layer in OSI Model

Functions of Transport Layer

The Transport Layer is responsible for end-to-end communication of data packets. It provides a number of important functions that are responsible for reliable, efficient, and organized data transfer between host systems in a networked environment.

The primary functions of the Transport Layer are:

To read in detail about services offered by transport layer, refer to Transport Layer Services

Working of Transport Layer

The Transport Layer provides logical communication between processes on different hosts — meaning that even though data travels across various physical networks, the communicating applications perceive a direct, reliable link.

Working of Transport-layer

  • Implemented only in end systems, not in intermediate routers.
  • Uses port numbers to identify sending and receiving applications.
  • Supports process-to-process delivery, enabling multiple applications to share a single network connection.
  • Performs multiplexing and demultiplexing using port numbers to direct data to the correct process.
  • Divides data from upper layers into segments (TCP) or datagrams (UDP) and adds necessary headers.
  • Handles error detection, retransmission, and sequencing to maintain reliable communication.
  • Coordinates flow control to ensure the receiver is not overloaded.
  • Communicates with the Network Layer, which handles addressing and routing, to send data across networks.
  • At the receiving end, it removes headers, reassembles data, and passes it to the appropriate application.

3-Way Handshake

The 3-Way Handshake ensures both client and server are ready before data transmission begins:

Step 1: SYN → (Client → Server)

  • Client sends a TCP segment with SYN=1, including its ISN (Initial Sequence Number).
  • Marks the request to initiate a connection

Step 2: SYN‑ACK ← (Server → Client)

  • Server replies with SYN=1 & ACK=1, containing its own ISN and ACK = client_ISN + 1.
  • Confirms receipt of client’s SYN and initiates its own sync

Step 3: ACK → (Client → Server)

  • Client sends an ACK=1 segment with ACK = server_ISN + 1.
  • Completes synchronization; connection enters ESTABLISHED state

Why not just two steps?

If there would have been just two steps i.e., SYN and SYN-ANK, the server would not know if the client is actually receiving the responses or not. Similarly the client would not know if server is receiving the responses or not. Therefore the third step is important for the mutual confirmation between both the client and server for the flow of data.

Transport Layer Protocols

Transport Layer Protocol uses different protocol for the better communication between two ends uses of protocol may differ from specifications. Below mention are some protocols used in Transport Layer

1. Transmission Control Protocol(TCP)

  • TCP is connection-oriented Protocol.
  • TCP is reliable protocol.
  • As TCP is connection-oriented protocol, so first the connection is established between two ends and then data is transferred and then the connection is terminated after all data being sent.

2. User Datagram Protocol (UDP)

  • UDP is not reliable protocol
  • The protocol UDP is connectionless.
  • When speed and size are more important than security and dependability, this kind of protocol is employed.
  • The data from the higher layer is supplemented with transport-level addresses, checksum error control, and length information by UDP, an end-to-end transport level protocol.
  • A user datagram is the packet that the UDP protocol generates.

3. Stream Control Transmission Protocol (SCTP)

  • Many Internet applications use SCTP to perform transport layer duties, similar to User Datagram Protocol (UDP) and Transmission Control Protocol (TCP).
  • On top of a connectionless packet network like IP, SCTP is a dependable transport protocol that facilitates data transfer over the network in scenarios involving one or more IP addresses.

Difference Between TCP and UDP at Transport Layer

Choosing between TCP and UDP depends on the application's need for reliability versus speed and efficiency.

transport_layer_protocols
TCP vs UDP

TCP

UDP

TCP is a connection-oriented protocol

UDP is the connection-less protocol

TCP supports error-checking mechanisms. 

UDP has only the basic error-checking mechanism using checksums.

An acknowledgment segment is present.

No acknowledgment segment.

TCP is slower than UDP

UDP is faster, simpler, and more efficient than TCP.

Retransmission of lost packets is possible in TCP, but not in UDP.

There is no retransmission of lost packets in the User Datagram Protocol (UDP)

TCP has a (20-60) bytes variable length header.

The header length is fixed of 8 bytes.


Transport Layer in OSI Model
Visit Course explore course icon
Article Tags :

Explore