# Transport layer

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/Transport_layer
> Markdown URL: https://mediated.wiki/source/Transport_layer.md
> Source: https://en.wikipedia.org/wiki/Transport_layer
> Source revision: 1356594676
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

In [computer networking](/source/Computer_network), the **transport layer** is an [abstraction layer](/source/Abstraction_layer) in the [Internet protocol suite](/source/Internet_protocol_suite) and the [OSI model](/source/OSI_model). The protocols of this layer provide [end-to-end communication](/source/End-to-end_communication) services for applications. It can provide services such as [connection-oriented communication](/source/Connection-oriented_communication), [reliability](/source/Reliability_(computer_networking)), [flow control](/source/Flow_control_(data)), and [multiplexing](/source/Multiplexing).

The details of implementation and semantics of the transport layer of the [Internet protocol suite](/source/Internet_protocol_suite), which is the foundation of the [Internet](/source/Internet), and the [OSI model](/source/OSI_model) of general networking are different. The protocols in use today in this layer for the Internet all originated in the development of TCP/IP. In the OSI model, the transport layer is often referred to as **Layer 4**, or **L4**,[1] while numbered layers are not used in TCP/IP.

The best-known transport protocol of the Internet protocol suite is the [Transmission Control Protocol](/source/Transmission_Control_Protocol) (TCP). It is used for connection-oriented transmissions, whereas the connectionless [User Datagram Protocol](/source/User_Datagram_Protocol) (UDP) is used for simpler messaging transmissions. TCP is the more complex protocol, due to its [stateful design](/source/Stateful_design), incorporating reliable transmission and data stream services. Together, TCP and UDP comprise essentially all traffic on the Internet and are the only protocols implemented in every major operating system. Additional transport layer protocols that have been defined and implemented include the [Datagram Congestion Control Protocol](/source/Datagram_Congestion_Control_Protocol) (DCCP) and the [Stream Control Transmission Protocol](/source/Stream_Control_Transmission_Protocol) (SCTP).

## Services

Transport layer services are conveyed to an application via a programming interface to the transport layer protocols. The services may include the following features:[2]

- [Connection-oriented communication](/source/Connection-oriented_communication):[3] It is normally easier for an application to interpret a connection as a [data stream](/source/Data_stream) rather than having to deal with the underlying connection-less models, such as the [datagram](/source/Datagram) model of the [User Datagram Protocol](/source/User_Datagram_Protocol) (UDP) and of the [Internet Protocol](/source/Internet_Protocol) (IP).
- Same order delivery: The network layer doesn't generally guarantee that packets of data will arrive in the same order that they were sent, but often this is a desirable feature. This is usually done through the use of segment numbering, with the receiver passing them to the application in order. This can cause [head-of-line blocking](/source/Head-of-line_blocking).
- [Reliability](/source/Reliability_(computer_networking)): Packets may be lost during transport due to [network congestion](/source/Network_congestion) and errors. By means of an [error detection code](/source/Error_detection_code), such as a [checksum](/source/Checksum), the transport protocol may check that the data is not corrupted, and verify correct receipt by sending an [ACK](/source/Acknowledgement_(data_networks)) or [NACK](/source/NACK) message to the sender. [Automatic repeat request](/source/Automatic_repeat_request) schemes may be used to retransmit lost or corrupted data.
- [Flow control](/source/Flow_control_(data)): The rate of data transmission between two nodes must sometimes be managed to prevent a fast sender from transmitting more data than can be supported by the receiving [data buffer](/source/Data_buffer), causing a buffer overrun. This can also be used to improve efficiency by reducing [buffer underrun](/source/Buffer_underrun).
- [Congestion avoidance](/source/Congestion_avoidance): [Congestion control](/source/Congestion_control) can control traffic entry into a telecommunications network, so as to avoid [congestive collapse](/source/Congestive_collapse) by attempting to avoid oversubscription of any of the processing or [link](/source/Data_link) capabilities of the intermediate nodes and networks and taking resource reducing steps, such as reducing the rate of sending [packets](/source/Packet_(information_technology)). For example, [automatic repeat requests](/source/Automatic_repeat_request) may keep the network in a congested state; this situation can be avoided by adding congestion avoidance to the flow control, including [slow start](/source/TCP_congestion_control#Slow_start). This keeps the bandwidth consumption at a low level in the beginning of the transmission, or after packet retransmission.
- [Multiplexing](/source/Multiplexing): [Ports](/source/TCP_and_UDP_port) can provide multiple endpoints on a single node. For example, the name on a postal address is a kind of multiplexing and distinguishes between different recipients of the same location. Computer applications will each listen for information on their own ports, which enables the use of more than one [network service](/source/Network_service) at the same time. It is part of the transport layer in the [TCP/IP model](/source/TCP/IP_model), but of the [session layer](/source/Session_layer) in the OSI model.

## Analysis

The transport layer is responsible for delivering data to the appropriate application process on the host computers. This involves [statistical multiplexing](/source/Statistical_multiplexing) of data from different application processes, i.e., forming data segments, and adding source and destination port numbers in the header of each transport layer data segment. Together with the source and destination IP address, the port numbers constitute a [network socket](/source/Network_socket), i.e., an identification address of the process-to-process communication. In the OSI model, this function is supported by the [session layer](/source/Session_layer).

Some transport layer protocols, for example TCP, but not UDP, support [virtual circuits](/source/Virtual_circuit), i.e., provide [connection-oriented communication](/source/Connection-oriented_communication) over an underlying packet-oriented [datagram](/source/Datagram) network. A byte stream is delivered while hiding the packet mode communication for the application processes. This involves connection establishment, dividing of the data stream into packets called segments, segment numbering and reordering of out-of-order data.

Finally, some transport layer protocols, for example TCP, but not UDP, provide end-to-end reliable communication, i.e., [error recovery](/source/Error_recovery) by means of [error detecting code](/source/Error_detecting_code) and [automatic repeat request](/source/Automatic_repeat_request) (ARQ) protocol. The ARQ protocol also provides [flow control](/source/Flow_control_(data)), which may be combined with [congestion avoidance](/source/Congestion_avoidance).

UDP is a very simple protocol and does not provide virtual circuits, nor reliable communication, delegating these functions to the [application](/source/Application_software) program. UDP packets are called [datagrams](/source/Datagram), rather than segments.

TCP is used for many protocols, including [HTTP](/source/HTTP) web browsing and email transfer. UDP may be used for [multicasting](/source/Multicast) and [broadcasting](/source/Broadcasting_(networking)), since retransmissions are not possible to a large number of hosts. UDP typically gives higher [throughput](/source/Throughput) and shorter latency and is therefore often used for real-time multimedia communication, where packet loss occasionally can be accepted, for example, IP-TV and IP-telephony, and for online computer games.

Many non-IP-based networks, such as [X.25](/source/X.25), [Frame Relay](/source/Frame_Relay) and [ATM](/source/Asynchronous_Transfer_Mode), implement connection-oriented communication at the network or data link layer rather than the transport layer. In X.25, in telephone network modems and in wireless communication systems, reliable node-to-node communication is implemented at lower protocol layers.

The OSI connection-mode transport layer protocol specification defines five classes of transport protocols: *TP0*, providing the least error recovery, to *TP4*, which is designed for less reliable networks.

Due to [protocol ossification](/source/Protocol_ossification), TCP and UDP are the only widely used transport protocols on the Internet.[4] To avoid [middlebox](/source/Middlebox) intolerance, new transport protocols may mimic the [wire image](/source/Wire_image_(networking)) of a tolerated protocol, or [be encapsulated](/source/Encapsulation_(networking)) in UDP, accepting some overhead (e.g., due to outer checksums made redundant by inner integrity checks).[5] [QUIC](/source/QUIC) takes the latter approach, rebuilding reliable stream transport on top of UDP.[6]

## Protocols

This list shows some protocols that are commonly placed in the transport layers of the [Internet protocol suite](/source/Internet_protocol_suite), the [OSI protocol suite](/source/OSI_protocols), [NetWare](/source/NetWare)'s [IPX/SPX](/source/IPX/SPX), [AppleTalk](/source/AppleTalk), and [Fibre Channel](/source/Fibre_Channel).

- ATP, [AppleTalk Transaction Protocol](/source/AppleTalk)
- CUDP, [Cyclic UDP](/source/Cyclic_UDP)[7]
- DCCP, [Datagram Congestion Control Protocol](/source/Datagram_Congestion_Control_Protocol)
- FCP, [Fibre Channel Protocol](/source/Fibre_Channel_Protocol)
- IL, [IL Protocol](/source/IL_Protocol)
- MPTCP, [Multipath TCP](/source/Multipath_TCP)
- NORM, [NACK-Oriented Reliable Multicast](/source/NACK-Oriented_Reliable_Multicast)
- [QUIC](/source/QUIC)
- RDP, [Reliable Data Protocol](/source/Reliable_Data_Protocol)
- RUDP, [Reliable User Datagram Protocol](/source/Reliable_User_Datagram_Protocol)
- SCTP, [Stream Control Transmission Protocol](/source/Stream_Control_Transmission_Protocol)
- SPX, [Sequenced Packet Exchange](/source/IPX/SPX)
- SST, [Structured Stream Transport](/source/Structured_Stream_Transport)
- TCP, [Transmission Control Protocol](/source/Transmission_Control_Protocol)
- UDP, [User Datagram Protocol](/source/User_Datagram_Protocol)
- [UDP-Lite](/source/UDP-Lite)
- μTP, [Micro Transport Protocol](/source/Micro_Transport_Protocol)

### Comparison of Internet transport layer protocols

Feature UDP UDP-Lite TCP Multipath TCP SCTP DCCP RUDP[a] Packet header size 8 bytes 8 bytes 20–60 bytes 50–90 bytes 12 bytes[b] 12 or 16 bytes 14+ bytes Typical data-packet overhead 8 bytes 8 bytes 20 bytes ?? bytes 44–48+ bytes[c] 12 or 16 bytes 14 bytes Transport-layer packet entity Datagram Datagram Segment Segment Datagram Datagram Datagram Connection-oriented Reliable transport Unreliable transport Preserve message boundary Delivery Unordered Unordered Ordered Ordered Ordered / Unordered Unordered Unordered Data checksum [d] Checksum size 16 bits 16 bits 16 bits 16 bits 32 bits 16 bits 16 bits Partial checksum Path MTU Flow control Congestion control Explicit Congestion Notification Multiple streams Multi-homing Bundling / Nagle

1. RUDP is not officially standardized. There have been no standard-related developments since 1999.

1. Excluding data chunk headers and overhead chunks. Without embedded chunks, an SCTP packet is essentially useless.

1. Counted as follows: 12 bytes SCTP header + 16 bytes DATA chunk header or 20 bytes I-DATA chunk header + 16+ bytes SACK chunk. Additional non-data chunks (e.g., AUTH) or headers for additional data chunks, which might easily increase the overhead by 50 bytes or more, are not counted.

1. Optional in IPv4 but compulsory in IPv6.[10]

### Comparison of OSI transport protocols

ISO/IEC 8073/ITU-T Recommendation X.224, "Information Technology - Open Systems Interconnection - Protocol for providing the connection-mode transport service", defines five classes of connection-mode transport protocols designated class 0 (TP0) to class 4 (TP4). Class 0 contains no error recovery and was designed for use on network layers that provide error-free connections. Class 4 is closest to TCP, although TCP contains functions, such as the graceful close, which OSI assigns to the session layer. All OSI connection-mode protocol classes provide expedited data and preservation of record boundaries. Detailed characteristics of the classes are shown in the following table:[8]

Service TP0 TP1 TP2 TP3 TP4 Connection-oriented network Connectionless network Concatenation and separation Segmentation and reassembly Error recovery Reinitiate connection (if an excessive number of PDUs are unacknowledged) Multiplexing and demultiplexing over a single virtual circuit Explicit flow control Retransmission on timeout Reliable Transport Service

There is also a connectionless transport protocol, specified by ISO/IEC 8602/ITU-T Recommendation X.234.[9]

## References

1. ["Introducing the Internet Protocol Suite"](https://docs.oracle.com/cd/E19455-01/806-0916/6ja85398m/index.html). *System Administration Guide, Volume 3*

1. ["Transport Layer"](http://103.47.12.35/bitstream/handle/1/4881/659.pdf?sequence=1&isAllowed=y). *Galgotias University*

1. Heena, Khera. ["Data Communication and networking"](http://103.47.12.35/bitstream/handle/1/4881/659.pdf?sequence=1&isAllowed=y). *Galgotias University*. p. 9.

1. Papastergiou et al. 2017, pp. 620–621.

1. Papastergiou et al. 2017, pp. 623–624.

1. Corbet 2018.

1. Brian C. Smith, ["Cyclic-UDP: A Priority-Driven Best-Effort Protocol"](https://www.cs.cornell.edu/zeno/Papers/cyclicudp.pdf), retrieved 2020-02-23

1. ["ITU-T Recommendation X.224 (11/1995) ISO/IEC 8073"](http://www.itu.int/rec/T-REC-X.224-199511-I/en/). *Itu.int*. Retrieved 2017-01-17.

1. ["ITU-T Recommendation X.234 (07/1994) ISO/IEC 8602"](http://www.itu.int/rec/T-REC-X.234-199407-I/en/). *Itu.int*. Retrieved 2017-01-17.

1. ["RFC 8200"](https://datatracker.ietf.org/doc/html/rfc8200). Retrieved 2025-06-15. Unlike IPv4, the default behavior when UDP packets are originated by an IPv6 node is that the UDP checksum is not optional.

## Bibliography

- Corbet, Jonathan (29 January 2018). ["QUIC as a solution to protocol ossification"](https://lwn.net/Articles/745590/). *[LWN.net](/source/LWN.net)*
- Papastergiou, Giorgos; Fairhurst, Gorry; Ros, David; Brunstrom, Anna; Grinnemo, Karl-Johan; Hurtig, Per; Khademi, Naeem; Tüxen, Michael; Welzl, Michael; Damjanovic, Dragana; Mangiante, Simone (2017). "De-Ossifying the Internet Transport Layer: A Survey and Future Perspectives". *[IEEE Communications Surveys & Tutorials](/source/IEEE_Communications_Surveys_%26_Tutorials)*. **19**: 619–639. [doi:10.1109/COMST.2016.2626780](https://doi.org/10.1109/COMST.2016.2626780). [hdl:2164/8317](https://hdl.handle.net/2164/8317). [S2CID 1846371](https://api.semanticscholar.org/CorpusID:1846371)

---
Adapted from the Wikipedia article [Transport layer](https://en.wikipedia.org/wiki/Transport_layer) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/Transport_layer?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
