Transport Layer protocols
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 protocols

Sabareshwari

Introduction

When we send an email, watch a video online, browse a website, or make a video call, data travels through multiple layers of a network. One of the most important layers responsible for delivering data between applications is the Transport Layer.

The Transport Layer is the fourth layer of the OSI (Open Systems Interconnection) Model. It provides end-to-end communication between devices and ensures that data reaches the correct application on the destination system.

In this article, we will explore Transport Layer protocols, their functions, types, working principles, and real-world applications.

What is the Transport Layer?

The Transport Layer is responsible for transferring data between applications running on different devices connected to a network.

Its primary goal is to provide:
  • End-to-end communication
  • Reliable data delivery
  • Error detection and recovery
  • Flow control
  • Segmentation and reassembly
  • Multiplexing and demultiplexing
Think of the Transport Layer as a courier service.
  • The Network Layer (IP) delivers packets from one computer to another.
  • The Transport Layer ensures that the data reaches the correct application on that computer.

For example:

  • IP delivers data to your laptop.
  • The Transport Layer delivers it specifically to your web browser, email application, or video conferencing software.

Why is the Transport Layer Important?

Modern operating systems support multiple applications running simultaneously.

For example, you may be:
  • Browsing a website
  • Listening to music online
  • Downloading files
  • Chatting with friends
All these applications use the network at the same time.

The Transport Layer identifies each application using port numbers and ensures that incoming data reaches the correct process.

Transport Layer Functions

1. End-to-End Communication

The Transport Layer provides communication between applications running on different hosts.

Example

A browser on your computer communicates with a web server application on another computer.

2. Segmentation and Reassembly

Large data is divided into smaller units called segments before transmission.

At the destination:

  • Segments are received
  • Reassembled into the original data
Example

A 10 MB file is split into many smaller segments before being sent over the Internet.

3. Error Control

The Transport Layer detects transmission errors and ensures data integrity.

Example

If a packet is lost during transmission, the protocol may request retransmission.

4. Flow Control

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

Example

A server sending data to a mobile phone adjusts its transmission rate based on the phone's receiving capacity.

5. Multiplexing and Demultiplexing

Multiple applications can share the same network connection.

The Transport Layer uses port numbers to identify applications.

Example

A computer can simultaneously:
  • Open a website
  • Download files
  • Stream music
without mixing the data.

Port Numbers

A Port Number is a 16-bit logical address used to identify a specific application or service.

Formula

16 bits = 0 to 65535 possible port numbers

Types of Port Numbers

1. Well-Known Ports (0–1023)

Used by standard services.

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

2. Registered Ports (1024–49151)

Used by registered applications and software vendors.

3. Dynamic or Private Ports (49152–65535)

Used temporarily by client applications.

Major Transport Layer Protocols

The Transport Layer mainly uses:
  1. TCP (Transmission Control Protocol)
  2. UDP (User Datagram Protocol)
  3. SCTP (Stream Control Transmission Protocol)
  4. DCCP (Datagram Congestion Control Protocol)
Let's study each protocol in detail.

User Datagram Protocol (UDP)

What is UDP?

UDP (User Datagram Protocol) is a simple, lightweight, and connectionless Transport Layer protocol.

It focuses on speed rather than reliability.

UDP sends data without establishing a connection between sender and receiver.

Features of UDP

  • Connectionless communication
  • Faster transmission
  • Low overhead
  • No acknowledgment mechanism
  • No retransmission of lost packets
  • No sequencing of packets

UDP Header Fields

UDP contains a small header with:
  • Source Port Number
  • Destination Port Number
  • Length
  • Checksum
Header size: 8 Bytes

Advantages of UDP

  • Very fast
  • Low latency
  • Minimal bandwidth consumption
  • Suitable for real-time applications

Disadvantages of UDP

  • No guarantee of delivery
  • No error recovery
  • Packets may arrive out of order
  • Less reliable

Real-World Applications of UDP

Video Streaming

Services like live streaming prioritize speed over perfect delivery.

Online Gaming

Players need immediate updates even if a few packets are lost.

Voice Calls (VoIP)

Small packet loss is acceptable, but delays are not.

DNS Queries

DNS requests and responses are usually transmitted using UDP.

Transmission Control Protocol (TCP)

What is TCP?

TCP (Transmission Control Protocol) is a connection-oriented Transport Layer protocol that provides reliable communication.

Before transmitting data, TCP establishes a connection between sender and receiver.

How TCP Works

TCP follows three phases:

1. Connection Establishment

A connection is created using the Three-Way Handshake:
  1. SYN
  2. SYN-ACK
  3. ACK

2. Data Transfer

Data is exchanged in both directions.

3. Connection Termination

The connection is gracefully closed after communication completes.

Features of TCP


Features of TCP.svg


1. Reliable Delivery

TCP guarantees delivery of data.

If a packet is lost, TCP retransmits it.

Example

Downloading software requires every byte to arrive correctly.

2. Sequence Numbers

Each byte is assigned a sequence number.

This helps:
  • Detect missing segments
  • Remove duplicate segments
  • Reassemble data correctly

3. Acknowledgments (ACK)

The receiver confirms successful reception.

If acknowledgment is not received within a timeout period, data is retransmitted.

4. Flow Control

TCP uses the Sliding Window Mechanism.

The receiver informs the sender how much data it can accept.

This prevents buffer overflow.

5. Multiplexing

TCP supports multiple applications through port numbers.

6. Full Duplex Communication

Data can travel simultaneously in both directions.

Example

During a video call:
  • You send audio/video.
  • You receive audio/video.
at the same time.

Advantages of TCP

  • Reliable delivery
  • Error recovery
  • Ordered transmission
  • Congestion control
  • Suitable for critical applications

Applications of TCP

Web Browsing

HTTP and HTTPS use TCP.

Email

SMTP, POP3, and IMAP use TCP.

File Transfer

FTP relies on TCP.

Online Banking

Reliable communication is essential.

Stream Control Transmission Protocol (SCTP)

What is SCTP?

SCTP (Stream Control Transmission Protocol) is a Transport Layer protocol designed to combine the strengths of TCP and UDP.

It provides:
  • Reliable communication
  • Message-oriented transmission
  • Enhanced fault tolerance

Key Features of SCTP

Message-Oriented Communication
Data is sent as complete messages rather than a continuous stream.

Multi-Homing

A device can have multiple IP addresses.

If one network path fails, SCTP automatically switches to another.

Example

Telecommunication systems require continuous connectivity even during network failures.

Multi-Streaming

Multiple independent streams can exist within a single connection.

This reduces delays caused by lost packets.

Four-Way Handshake

SCTP uses a secure four-step connection setup process that helps protect against denial-of-service attacks.

Applications of SCTP

  • Telecommunication signaling
  • WebRTC applications
  • Industrial automation
  • Military communication systems
  • High-availability networks

Datagram Congestion Control Protocol (DCCP)

What is DCCP?

DCCP (Datagram Congestion Control Protocol) is a Transport Layer protocol designed for applications that need:
  • Fast delivery
  • Congestion control
  • Low latency
but do not require full reliability.

Features of DCCP

Connection-Oriented

A connection is established before data transmission.

Unreliable Delivery

Lost packets are not retransmitted.

Congestion Control

DCCP continuously adjusts transmission rates to avoid network congestion.

Feature Negotiation

Endpoints can negotiate protocol options and congestion-control mechanisms.

Applications of DCCP

Multimedia Streaming

Live video and audio streaming.

VoIP

Internet voice communication.

Online Gaming

Low latency communication.

IoT and Sensor Networks

Efficient delivery of time-sensitive data.

Error Control Mechanisms

Reliable protocols such as TCP and SCTP use several techniques to detect and recover from errors.

Checksum

Checksums detect corrupted data during transmission.

If corruption is detected, the segment is discarded.

Acknowledgments

Receivers confirm successful delivery of data.

Retransmission

Lost packets are resent automatically.

Flow Control

Flow control prevents the sender from transmitting data faster than the receiver can process.

TCP implements this using the Sliding Window Protocol.

Example

If a receiver can handle only 5 packets at a time, the sender adjusts its transmission speed accordingly.

Congestion Control

What is Network Congestion?

Congestion occurs when network traffic exceeds available bandwidth.

This can cause:
  • Packet loss
  • Increased delays
  • Reduced performance

TCP Congestion Control Techniques

Slow Start

TCP begins with a small transmission rate and gradually increases it.

Congestion Avoidance

TCP uses the Additive Increase Multiplicative Decrease (AIMD) algorithm to control traffic growth.

Fast Retransmit

Lost packets are retransmitted quickly without waiting for a timeout.

Fast Recovery

TCP restores transmission speed efficiently after packet loss.

Modern Transport Layer Protocol: QUIC

What is QUIC?

QUIC (Quick UDP Internet Connections) is a modern transport protocol developed by Google.

It combines:
  • UDP's speed
  • TCP's reliability
  • Built-in security

Advantages of QUIC

  • Faster connection establishment
  • Reduced latency
  • Improved congestion control
  • Built-in encryption
  • Better performance on mobile networks

QUIC and HTTP/3

QUIC is the foundation of HTTP/3, the latest version of the web communication protocol.

Benefits include:
  • Faster website loading
  • Better video streaming
  • Improved online gaming performance
  • Reduced connection delays

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