Transport Layer
gocourse.in Maintenance

We'll be back soon

Our CDN (cdn.gocourse.in) is currently unreachable. Some images, JavaScript, or CSS files may not load properly.

Estimated downtime: ~30 minutes

Transport Layer

Sabareshwari

Introduction

In computer networking, data travels through multiple layers before reaching its destination. Each layer performs specific tasks to ensure that communication is efficient, reliable, and organized. One of the most important layers in this process is the Transport Layer.

The Transport Layer is responsible for providing end-to-end communication between applications running on different devices. It ensures that data reaches the correct application, arrives in the correct order, and is delivered reliably when required.

Whether you are sending an email, browsing a website, streaming a video, or chatting online, the Transport Layer plays a crucial role in making communication possible.

In this article, we will explore the Transport Layer, its functions, services, protocols, and importance in modern computer networks.

What is the Transport Layer?

The Transport Layer is the fourth layer of the OSI (Open Systems Interconnection) Model, located above the Network Layer and below the Session Layer.

Its primary responsibility is to provide communication services directly to application processes running on different hosts.

Simple Definition

The Transport Layer is responsible for delivering data from one application process to another application process across a network.

Unlike the Network Layer, which focuses on delivering packets between devices, the Transport Layer focuses on delivering data to the correct application running on those devices.

Why is the Transport Layer Important?

Imagine you are using a computer and simultaneously:
  • Browsing a website
  • Downloading a file
  • Watching a YouTube video
  • Sending an email
All these applications generate data at the same time.

The Transport Layer ensures that:
  • Data reaches the correct application.
  • Data is delivered in the proper order.
  • Lost data is retransmitted when necessary.
  • The receiver is not overwhelmed with excessive data.
Without the Transport Layer, applications would not be able to communicate reliably.

Position of the Transport Layer in the OSI Model

OSI Layer and its Function:
  1. Application Layer - User applications
  2. Presentation Layer - Data formatting
  3. Session Layer - Session management
  4. Transport Layer - End-to-end communication
  5. Network Layer - Routing and logical addressing
  6. Data Link Layer - Node-to-node delivery
  7. Physical Layer - Transmission of bits
The Transport Layer acts as a bridge between application services and network services.

Transport Layer Protocols


Transport Layer Protocols.svg


The Internet primarily uses two Transport Layer protocols:

1. Transmission Control Protocol (TCP)

TCP is a connection-oriented protocol that provides reliable communication.

Features of TCP

  • Reliable delivery
  • Error detection and recovery
  • Flow control
  • Sequence numbering
  • Acknowledgments
  • Congestion control

Applications Using TCP

  • Web Browsing (HTTP/HTTPS)
  • Email Services
  • File Transfer (FTP)
  • Online Banking

Example

When downloading a PDF file, every piece of data must arrive correctly. TCP ensures that missing packets are retransmitted and arranged in the correct order.

2. User Datagram Protocol (UDP)

UDP is a connectionless protocol that focuses on speed rather than reliability.

Features of UDP

  • Faster transmission
  • No acknowledgments
  • No retransmission
  • Lower overhead

Applications Using UDP

  • Video Streaming
  • Online Gaming
  • Voice Calls (VoIP)
  • Live Broadcasting

Example

During a live cricket stream, receiving data quickly is more important than retransmitting every lost packet. Therefore, UDP is preferred.

Communication Process in the Transport Layer

The communication process is bidirectional.

Sending Process

Application → Transport Layer → Network Layer

Receiving Process

Network Layer → Transport Layer → Application

The Transport Layer acts as an intermediary between applications and the underlying network infrastructure.

Services Provided by the Transport Layer

The Transport Layer provides several essential services.

1. End-to-End Delivery

The primary function of the Transport Layer is to provide end-to-end communication between source and destination applications.

Example

When you send a WhatsApp message from your phone to a friend, the Transport Layer ensures that the message travels from your application to the recipient's application.

Benefits

  • Complete message delivery
  • Application-to-application communication
  • Reliable data transfer

2. Reliable Delivery

Reliable delivery ensures that data reaches the destination accurately and completely.

If packets are:
  • Lost
  • Corrupted
  • Delayed
the Transport Layer takes corrective actions.

Reliable delivery includes four major components:
  1. Error Control
  2. Sequence Control
  3. Loss Control
  4. Duplication Control

Error Control

No communication medium is completely error-free.

Errors may occur due to:
  • Noise
  • Signal interference
  • Hardware faults
The Transport Layer detects and handles these errors.

How It Works

The sender includes error-checking information.

The receiver verifies the data.

If errors are found:
  • The packet is discarded.
  • Retransmission is requested.

Example

While downloading software, corrupted packets are retransmitted to ensure correct installation.

Sequence Control

Data is divided into smaller units called segments before transmission.

These segments may travel through different routes and arrive in a different order.

The Transport Layer assigns sequence numbers to each segment.

Purpose

  • Maintain correct order
  • Reassemble data correctly

Example

If packets arrive in the order:

3 → 1 → 2

The Transport Layer rearranges them as:

1 → 2 → 3

before delivering them to the application.

Loss Control

Sometimes packets are lost during transmission.

Loss control ensures that all segments reach the destination.

How It Works

Each segment receives a sequence number.

The receiver checks whether any segment is missing.

If a packet is missing:

A retransmission request is sent.

Example

Suppose a file consists of segments:

1, 2, 3, 4, 5

If segment 3 is missing, the receiver requests it again.

Duplication Control

Network issues can sometimes cause duplicate packets.

The Transport Layer identifies and removes duplicates.

Example

Received packets:

1, 2, 2, 3, 4

After duplication control:

1, 2, 3, 4

This prevents applications from processing the same data multiple times.

Flow Control

Flow Control prevents a fast sender from overwhelming a slow receiver.

Without flow control:
  • Receiver buffers may overflow.
  • Packets may be discarded.
  • Network congestion increases.

Solution

The Transport Layer uses the Sliding Window Protocol.

Sliding Window Concept

The receiver informs the sender about the amount of data it can accept.

The sender adjusts its transmission speed accordingly.

Real-World Example

Imagine pouring water into a glass.

If you pour too fast, the glass overflows.

Similarly, flow control prevents excess data from overflowing the receiver's buffer.

Multiplexing and Demultiplexing

One of the most important services of the Transport Layer is Multiplexing and Demultiplexing.

What is Multiplexing?

Multiplexing allows multiple applications to send data simultaneously through the same network connection.

Example

A user may be:
  • Browsing websites
  • Downloading files
  • Watching videos
All these applications share the same network connection.

The Transport Layer combines data from multiple applications and sends it efficiently.

What is Demultiplexing?

Demultiplexing is the reverse process.

The Transport Layer receives incoming data and delivers it to the correct application.

Example

When data arrives:
  • Email packets go to the email application.
  • Browser packets go to the web browser.
  • Video packets go to the media player.

Types of Multiplexing


Types of Multiplexing.svg


Upward Multiplexing

Multiple transport connections use a single network connection.

Benefit

  • Better resource utilization
  • Reduced communication cost

Downward Multiplexing

A single transport connection uses multiple network paths.

Benefit

  • Increased throughput
  • Improved performance
This technique is useful when individual network links have limited capacity.

Addressing in the Transport Layer

For successful communication, data must reach the correct application.

The Transport Layer uses Port Numbers for this purpose.

What is a Port Number?

A port number identifies a specific application running on a device.

Examples

                Application                     Port Number 
                     HTTP                              80 
                    HTTPS                            443 
                       FTP                                21 
                    SMTP                               25 
                     DNS                                53 

Transport Service Access Point (TSAP)

A Transport Service Access Point (TSAP) identifies a particular user of transport services.

In practical Internet communication, TSAPs are implemented using port numbers.

The combination of:
  • IP Address
  • Port Number
uniquely identifies an application process.

Example

192.168.1.10 : 443

Here:
  • 192.168.1.10 = Device Address
  • 443 = HTTPS Service

Real-World Example of Transport Layer Communication

Suppose a student opens a website.

Step 1

The browser generates a request.

Step 2

TCP divides the request into segments.

Step 3

Each segment receives sequence numbers.

Step 4

The Network Layer routes packets through the Internet.

Step 5

The destination server receives the packets.

Step 6

TCP reassembles the segments.

Step 7

The website is displayed correctly in the browser.

This entire process is managed by the Transport Layer.

Advantages of the Transport Layer

  • Provides end-to-end communication.
  • Ensures reliable data transfer.
  • Performs error detection and recovery.
  • Controls data flow efficiently.
  • Supports multiple applications simultaneously.
  • Maintains proper packet sequence.
  • Eliminates duplicate packets.
  • Enables efficient multiplexing and demultiplexing.

Limitations of the Transport Layer

  • Reliable protocols like TCP introduce additional overhead.
  • Error recovery mechanisms consume bandwidth.
  • Maintaining connections requires memory and processing power.
  • Flow control and congestion control can increase complexity.

Our website uses cookies to enhance your experience. Learn More
Accept !