Skip to content
geeksforgeeks
  • Tutorials
    • Python
    • Java
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
    • Practice Coding Problems
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Aptitude
  • Engineering Mathematics
  • Discrete Mathematics
  • Operating System
  • DBMS
  • Computer Networks
  • Digital Logic and Design
  • C Programming
  • Data Structures
  • Algorithms
  • Theory of Computation
  • Compiler Design
  • Computer Org and Architecture
Open In App
Next Article:
Transport Layer Services
Next article icon

Transport Layer Services

Last Updated : 29 Jan, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report

The transport Layer is the second layer in the TCP/IP model and the fourth layer in the OSI model. It is an end-to-end layer used to deliver messages to a host. It is termed an end-to-end layer because it provides a point-to-point connection rather than hop-to-hop, between the source host and destination host to deliver the services reliably. The unit of data encapsulation in the Transport Layer is a segment. 

Services Offered by Transport Layer

The transport layer provides reliable data transfer services such as segmentation, flow control, error detection, and retransmission, end-to-end communication between devices.

1.End-to-end Connection between Hosts

The transport layer is also responsible for creating the end-to-end Connection between hosts for which it mainly uses TCP and UDP. TCP is a secure, connection-orientated protocol that uses a handshake protocol to establish a robust connection between two end hosts. TCP ensures the reliable delivery of messages and is used in various applications. UDP, on the other hand, is a stateless and unreliable protocol that ensures best-effort delivery. It is suitable for applications that have little concern with flow or error control and requires sending the bulk of data like video conferencing. It is often used in multicasting protocols.

EotE
End-to-End Connection

2.Flow Control

The transport layer provides a flow control mechanism between the adjacent layers of the TCP/IP model. TCP also prevents data loss due to a fast sender and slow receiver by imposing some flow control techniques. It uses the method of sliding window protocol which is accomplished by the receiver by sending a window back to the sender informing the size of data it can receive.

3. Multiplexing and Demultiplexing

Multiplexing(many to one) is when data is acquired from several processes from the sender and merged into one packet along with headers and sent as a single packet. Multiplexing allows the simultaneous use of different processes over a network that is running on a host.  The processes are differentiated by their port numbers. Similarly, Demultiplexing(one to many) is required at the receiver side when the message is distributed into different processes. Transport receives the segments of data from the network layer distributes and delivers it to the appropriate process running on the receiver’s machine.

CN_Multiplexing-1
Multiplexing and Demultiplexing

4.Connection Establishment

When two devices in a network wants to establish a connection using TCP, it is done through 3-Way Handshake Process.

handshake-1
  • The first computer connects to the second computer by sending a SYN packet to a specified port number.
  • If the second computer is listening, it will respond with a SYN/ACK.
  • When the first computer receives the SYN/ACK, it replies with an ACK packet.
  • After this, the two devices can communicate normally.

5.Connection Termination

In a TCP connection, we have two types of termination mechanisms:

  1. In the Graceful connection release, the connection is open until both parties have closed their sides of the connection.
  2. In an Abrupt connection release, either one TCP entity is forced to close the connection or one user closes both directions of data transfer.

Read more about TCP Connection Termination.

6. Reliable Data Delivery

The transport layer checks for errors in the messages coming from the application layer by using error detection codes, and computing checksums, it checks whether the received data is not corrupted and uses the ACK and NACK services to inform the sender if the data has arrived or not and checks for the integrity of data.

Limitations of Transport Layer Services

  • The Transport Layer does not handle routing or addressing between the source and destination. It rely on the Network Layer for this.
  • Transport layer do not have features like encryption and authentication unless protocols like TLS are used.
  • Reliable transmission methods like TCP add extra overhead which can slow down communication.
  • The Transport Layer depends on the Application Layer for specific needs and the lower layers for handling network failure.

What are the main protocols used in the Transport Layer?

The two most common protocols are

  • TCP (Transmission Control Protocol) for reliable communication
  • UDP (User Datagram Protocol) for faster connectionless transmission.

What is the difference between flow control and congestion control?

Flow control prevents the sender from overwhelming the receiver, while congestion control prevents excessive data from causing network congestion.

What is the role of ports in the Transport Layer?

Ports help identify specific applications on a device. It allows multiple services (like web browsing and email) to run simultaneously over the same network connection.

Why is UDP faster than TCP?

UDP does not establish a connection, send acknowledgments, or retransmit lost data, reducing overhead and making it ideal for real-time applications like VoIP and online gaming.


Next Article
Transport Layer Services

A

anushkadaym
Improve
Article Tags :
  • Computer Organization and Architecture

Similar Reads

    Business Services | Characteristics and Types
    What are Business Services?Business Services refer to those services, which are used by business enterprises to conduct their activities. They are necessary for the effective operation of businesses and include banking, transportation, warehousing, insurance, communication, etc. Business enterprises
    4 min read
    Application Layer Services
    The Application Layer is the topmost layer in the OSI (Open Systems Interconnection) model, directly interacting with end-user applications. Its primary role is to provide services and interfaces that allow applications to communicate over a network.It facilitates data exchange between software appl
    5 min read
    Chapter 7 Transport and Communication| Class 12 Geography Notes
    Transport and Communication are essential for connecting people and goods globally, enabling trade, social interaction, and information exchange. While transport facilitates physical movement through various modes like roads, railways, airways, and waterways, communication involves the transmission
    12 min read
    Transport Layer in OSI Model
    The transport layer, or layer 4 of the OSI model, controls network traffic between hosts and end systems to guarantee full data flows. It is positioned between the network and session layers in the OSI paradigm. The data packets must be taken and sent to the appropriate machine by the network layer.
    5 min read
    Transport & Communication in India| Class 12 Geography Notes
    Class 12 Geography Chapter 7 Transport & Communication discusses the developing process of trade and commerce. This chapter discusses the processes of moving products and different commodities through different Modes of Transportation and the proper Communication Systems. In this article, we are
    6 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences