Transport Layer Explanation – Layer 4 of the OSI Model

Did you ever wonder how the raw data (message) that the application from our desktop is transmitted over the internet? By using the OSI model as a reference, we are able to understand how the raw data are transmitted from one host and received from another end-hosts without error. The OSI model has 7 layers, and, in this article, we will focus on Layer 4, which is the Transport Layer.

The upper layers, the Application Layer, Presentation Layer, and Session Layer, are responsible for sending and preparing the raw data. In contrast, the lower layers, the Network Layer, Data Link Layer, and Physical Layer, are responsible for encapsulating the raw data by using headers so that the network devices like routers and switches can understand and direct the traffic to the right device.


Contributions of the Transport Layer on Data Transmission

Transport Layer is responsible for end-to-end communication over the network and provides service to upper-layer protocols (application layer). Simply, it is responsible for tracking the conversations (raw data) between multiple applications that are passing through the network.


Transport Layer provides the logical communication between applications that runs on different hosts by simply adding a transport header on the raw data. The Protocol Data Unit (PDU) is now called a Segment.


Networking devices, like routers and switches, and end devices, like desktops and servers, have limitations on the amount of data that can be inserted in an IP packet. Because of that, the Transport Layer segments and reassemble the data (messages) between the sender and the receiver. Whenever the hosts send a message into the network (internet), the Transport Layer prepares and separates the raw data (message) into smaller pieces of data for delivery. When received on the other hosts, the Transport Layer reassembles those smaller pieces of data and sends them to the upper layers.

The Application Layer has a lot of protocols that distinguish the function of each data. Email traffic uses SMTP and POP3 protocols, while HTTP and HTTPS are the protocols used for web browsing. Each protocol is formatted differently based on its purpose.

If a different protocol is received on a specific application, then the application will drop the data. If the web server is receiving an SMTP protocol, then the data will be dropped as the web server is expecting to receive an HTTP or HTTPS protocol. The role of the Transport Layer is to ensure that the data is transmitted and delivered to the intended application.


Transport Layer Protocols – TCP and UDP

Every protocol uses a unique decimal number to ensure that the data is sent and received on the intended application as it passes through the network or Internet. The commonly used Transport Layer protocols responsible for message delivery are Transmission Control Protocol (TCP) and User Datagram Protocol (UDP).

TCP is a connection-oriented protocol which means it guarantees the delivery of the message, while UDP is a connectionless protocol that sends the data without error correction. Under the TCP and UDP are port numbers that are used to distinguish the specific type of application. A specific port number is attached when sending the data so that the data will be received exactly to the intended application. The below diagram shows a segment in which the raw data is encapsulated by transport header (source and destination port).

transport layer


Download our Free CCNA Study Guide PDF for complete notes on all the CCNA 200-301 exam topics in one book.

We recommend the Cisco CCNA Gold Bootcamp as your main CCNA training course. It’s the highest rated Cisco course online with an average rating of 4.8 from over 30,000 public reviews and is the gold standard in CCNA training: