Search

Transport Layer (Layer 4)

 

The Transport Layer is the fourth layer of the TCP/IP protocol stack from the bottom. The TCP/IP model transport layer's (layer 4) functions are similar to the transport layer (layer 4) of the OSI model.

transport-layer.jpg

Transport layer protocols (Transmission Control Protocol (TCP)/User Datagram Protocol (UDP)) encapsulates the data from the upper layer (Application layer) with a Transport layer header during outgoing transmission. A graphical representation of Transport layer encapsulation is shown below.

transport-layer-encapsulation.jpg

The Network layer (Layer 3) is responsible for the delivery of IP datagrams over the network, but Network layer does not recognize any relationship between the IP datagram packets and its related Application. The Transport Layer (Layer 4) is responsible for end-to-end delivery (or Application-to-Application delivery) of data over a network. Transport layer identifies the communicating Applications by using transport layer (layer 4) addressing system called as Port numbers (or layer 4 addresses).

The Transport layer includes two major protocols Transmission Control Protocol (TCP) and User Datagram Protocol (UDP). The main functions of Transport layer are explained below.

Functions of Transport Layer

1 - Transport Layer provides an interface for network applications to access the network.

2 - Transport Layer provides interface for accepting data from different applications on the source computer and sending that data to the recipient applications on different destination computers (Multiplexing). Similarly on the destination computer, the incoming data from different remote computers need to be directed to the correct applications for that data was meant for (De-multiplexing).

3 - Transport layer treats each packet independently for final delivery, because each packet for final delivery belongs to different Applications on different destination computers.

4 - Transport layer has protocol/mechanisms for loss-free delivery of data to destination applications.

5 - Transport layer provides mechanisms for error checking, flow control, and re-transmission of lost data. Two major protocols at the Transport layer, Transmission Control Protocol (TCP) and User Datagram Protocol (UDP), work differently to achieve these goals.

Transmission Control Protocol (TCP):  TCP is a reliable protocol. TCP provides extensive error control and flow control to ensure the successful delivery of data. TCP (Transmission Control Protocol) requires connection establishment between two communicating computers. A connection is a single logical path from source to destination. TCP is called as a connection-oriented protocol.

User Datagram Protocol (UDP): UDP is not a reliable protocol. There are no error checking/data retransmission features for UDP. UDP is designed for data transmission requirements where extensive control features are not necessary. UDP (User Datagram Protocol) is a streaming protocol, which does not assure data integrity. UDP (User Datagram Protocol) does not require connection establishment. User Datagram Protocol (UDP) is called as a connectionless protocol.

6 - TCP (Transmission Control Protocol) and UDP (User Datagram Protocol) identifies communicating Applications by using Port numbers. Port numbers are 16-bit numbers, found at Transmission Control Protocol (TCP)/User Datagram Protocol (UDP) header.

Following image shows a brief comparison between Transport layer (layer 4) protocols, TCP and UDP.

transport-layer-protocols-tcp-vs-udp.jpg

Click the following link to see a comparison and difference between TCP and UDP. In coming lessons, we will look deeper how these protocols achieve the goals listed above.

To get more wider view about different layers of TCP/IP protocol stack and how they operate together, please visit and learn below lessons in order.

You have learned what is the function of Transport Layer in TCP/IP protocol suite and what are the major protocols at Transport Layer. The major protocols at Transport Layer are Transmission Control Protocol (TCP) and User Datagram Protocol (UDP). Click "Next" to continue.

Related Tutorials
Introduction to TCP/IP, Features of TCP/IP, TCP/IP History, What is RFC (Request for Comments)
What is PDU (Protocol Data Unit)
How data is moved through different layers of OSI model at sending and receiving computers
Names of data packets at different layers of OSI model
Why OSI model failed
Four Layers of original TCP/IP model, Functions of four layers of TCP/IP model
Five layered TCP/IP model
Comparison between four layered TCP/IP model and five layered TCP/IP model
Protocols/Standards at various layers of TCP/IP model
Comparison between TCP/IP and OSI models
How data is moved through different layers of TCP/IP model at sending and receiving computers
TCP/IP Encapsulation and Decapsulation
Physical Layer (Layer 1)
Datalink Layer (Layer 2)
Ethernet Frame Format
What is MAC address or Layer 2 address or physical address
Network Layer (Layer 3)
IPv4 Protocol, IPv4 header and fields of IPv4 header
IPv4 addresses, IPv4 Address Classes, IPv4 Address Classifications
Transport Layer (Layer 4)
Application Layer (Layer 5)