Transport layer
This article may be too technical for most readers to understand. (March 2025) |

| Internet protocol suite |
|---|
| Application layer |
| Transport layer |
| Internet layer |
| Link layer |
In computer networking, the transport layer is an abstraction layer in the Internet protocol suite and the OSI model. The protocols of this layer provide end-to-end communication services for applications.[1]: §1.1.3 It can provide services such as connection-oriented communication, reliability, flow control, and multiplexing.
The details of implementation and semantics of the transport layer of the Internet protocol suite,[1] which is the foundation of the Internet, and the 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,[2] while numbered layers are not used in TCP/IP.
The best-known transport protocol of the Internet protocol suite is the Transmission Control Protocol (TCP). It is used for connection-oriented transmissions, whereas the connectionless User Datagram Protocol (UDP) is used for simpler messaging transmissions. TCP is the more complex protocol, due to its 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 (DCCP) and the Stream Control Transmission Protocol (SCTP).
| OSI model by layer |
|---|
Services
[edit]Transport layer services are conveyed to an application via a programming interface to the transport layer protocols. The services may include the following features:[4]
- Connection-oriented communication:[5] It is normally easier for an application to interpret a connection as a data stream rather than having to deal with the underlying connection-less models, such as the datagram model of the User Datagram Protocol (UDP) and of the 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.
- Reliability: Packets may be lost during transport due to network congestion and errors. By means of an error detection code, such as a checksum, the transport protocol may check that the data is not corrupted, and verify correct receipt by sending an ACK or NACK message to the sender. Automatic repeat request schemes may be used to retransmit lost or corrupted data.
- Flow control: 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, causing a buffer overrun. This can also be used to improve efficiency by reducing buffer underrun.
- Congestion avoidance: Congestion control can control traffic entry into a telecommunications network, so as to avoid congestive collapse by attempting to avoid oversubscription of any of the processing or link capabilities of the intermediate nodes and networks and taking resource reducing steps, such as reducing the rate of sending packets. For example, automatic repeat requests may keep the network in a congested state; this situation can be avoided by adding congestion avoidance to the flow control, including slow start. This keeps the bandwidth consumption at a low level in the beginning of the transmission, or after packet retransmission.
- Multiplexing: Ports 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 at the same time. It is part of the transport layer in the TCP/IP model, but of the session layer in the OSI model.
Analysis
[edit]In the Internet protocol suite, transport-layer protocols provide communication between application programs running on different hosts. TCP uses port numbers to identify application services and to multiplex distinct flows between hosts; UDP similarly defines source and destination port fields, with the destination port interpreted in the context of a particular Internet destination address.[6][7] A socket address combines an Internet address with a transport-layer port; in TCP, a connection is identified by a pair of sockets.[8]
TCP provides a connection-oriented, reliable, in-order byte-stream service. The application byte stream is carried over the network in TCP segments, each sent as an IP datagram; TCP reliability is based on sequence numbers, checksums, acknowledgments, and retransmission of lost or corrupted segments.[6][9] TCP also includes flow-control mechanisms based on advertised windows, and TCP endpoints are required to implement basic congestion-control algorithms such as slow start, congestion avoidance, and exponential backoff of retransmission timeouts.[10]
UDP provides a minimal, connectionless, message-oriented transport service. RFC 768 describes UDP as providing a procedure for application programs to send messages with a minimum of protocol mechanism, without guarantees of delivery or duplicate protection; applications that require ordered, reliable streams of data are directed to use TCP instead.[7] RFC 8085 similarly describes UDP as a minimal, unreliable, best-effort message-passing transport, and notes that applications using UDP may need to implement additional mechanisms for reliability, congestion control, checksums, or other functions depending on their use case.[11]
UDP is also commonly used for multicast and broadcast applications, but such uses complicate congestion control, flow control, and reliability because a sender may transmit to many receivers over heterogeneous paths. The IETF has defined reliable multicast frameworks and building blocks, so reliability is not impossible for multicast applications; rather, it is not provided by UDP itself and must be supplied by the application or by additional protocols.[12]
The OSI connection-mode transport protocol specification defines five classes of transport protocol, designated class 0 (TP0) through class 4 (TP4). Class 0 provides no error recovery and was designed for use over network services that provide error-free connections, while class 4 includes error recovery and can operate over less reliable network services.[13]
Due to protocol ossification, TCP and UDP have been described as the only widely used transport protocols on the Internet. To avoid middlebox intolerance, new transport protocols may mimic the wire image of a tolerated protocol, or be encapsulated in UDP, accepting some overhead.[14] QUIC follows the latter approach: the QUIC specification defines it as a UDP-based transport protocol whose packets are carried in UDP datagrams, while QUIC itself provides connections, streams, reliable delivery, flow control, and congestion control.[15]
Protocols
[edit]This list shows some protocols that are commonly placed in the transport layers of the Internet protocol suite, the OSI protocol suite, NetWare's IPX/SPX, AppleTalk, and Fibre Channel.
- ATP, AppleTalk Transaction Protocol
- CUDP, Cyclic UDP[16]
- DCCP, Datagram Congestion Control Protocol
- FCP, Fibre Channel Protocol
- IL, IL Protocol
- MPTCP, Multipath TCP
- NORM, NACK-Oriented Reliable Multicast
- QUIC
- RDP, Reliable Data Protocol
- RUDP, Reliable User Datagram Protocol
- SCTP, Stream Control Transmission Protocol
- SPX, Sequenced Packet Exchange
- SST, Structured Stream Transport
- TCP, Transmission Control Protocol
- UDP, User Datagram Protocol
- UDP-Lite
- μTP, Micro Transport Protocol
Comparison of Internet transport layer protocols
[edit]| 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 | No | No | Yes | Yes | Yes | Yes | Yes |
| Reliable transport | No | No | Yes | Yes | Yes | No | Yes |
| Unreliable transport | Yes | Yes | No | No | Yes | Yes | Yes |
| Preserve message boundary | Yes | Yes | No | No | Yes | Yes | Yes |
| Delivery | Unordered | Unordered | Ordered | Ordered | Ordered / Unordered | Unordered | Unordered |
| Data checksum | Optional[d] | Yes | Yes | Yes | Yes | Yes | Optional |
| Checksum size | 16 bits | 16 bits | 16 bits | 16 bits | 32 bits | 16 bits | 16 bits |
| Partial checksum | No | Yes | No | No | No | Yes | No |
| Path MTU | No | No | Yes | Yes | Yes | Yes | ? |
| Flow control | No | No | Yes | Yes | Yes | No | Yes |
| Congestion control | No | No | Yes | Yes | Yes | Yes | ? |
| Explicit Congestion Notification | No | No | Yes | Yes | Yes | Yes | ? |
| Multiple streams | No | No | No | No | Yes | No | No |
| Multi-homing | No | No | No | Yes | Yes | No | No |
| Bundling / Nagle | No | No | Yes | Yes | Yes | No | ? |
- ↑ RUDP is not officially standardized. There have been no standard-related developments since 1999.
- ↑ Excluding data chunk headers and overhead chunks. Without embedded chunks, an SCTP packet is essentially useless.
- ↑ 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.
- ↑ Optional in IPv4 but compulsory in IPv6.[17]
Comparison of OSI transport protocols
[edit]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:[18]
| Service | TP0 | TP1 | TP2 | TP3 | TP4 |
|---|---|---|---|---|---|
| Connection-oriented network | Yes | Yes | Yes | Yes | Yes |
| Connectionless network | No | No | No | No | Yes |
| Concatenation and separation | No | Yes | Yes | Yes | Yes |
| Segmentation and reassembly | Yes | Yes | Yes | Yes | Yes |
| Error recovery | No | Yes | No | Yes | Yes |
| Reinitiate connection (if an excessive number of PDUs are unacknowledged) | No | Yes | No | Yes | No |
| Multiplexing and demultiplexing over a single virtual circuit | No | No | Yes | Yes | Yes |
| Explicit flow control | No | No | Yes | Yes | Yes |
| Retransmission on timeout | No | No | No | No | Yes |
| Reliable Transport Service | No | Yes | No | Yes | Yes |
There is also a connectionless transport protocol, specified by ISO/IEC 8602/ITU-T Recommendation X.234.[19]
References
[edit]- 1 2 R. Braden, ed. (October 1989). Requirements for Internet Hosts -- Communication Layers. Network Working Group. doi:10.17487/RFC1122. STD 3. RFC 1122. Internet Standard 3. Updated by RFC 1349, 4379, 5884, 6093, 6298, 6633, 6864, 8029 and 9293.
- ↑ "Introducing the Internet Protocol Suite". System Administration Guide, Volume 3.
- ↑ "X.225 : Information technology – Open Systems Interconnection – Connection-oriented Session protocol: Protocol specification". Archived from the original on February 1, 2021. Retrieved March 10, 2023.
- ↑ "Transport Layer" (PDF). Galgotias University.
- ↑ Heena, Khera. "Data Communication and networking" (PDF). Galgotias University. p. 9.
- 1 2 Eddy, W. (August 2022). Transmission Control Protocol (TCP). IETF. sec. 2.2. doi:10.17487/RFC9293. RFC 9293.
- 1 2 Postel, J. (August 1980). User Datagram Protocol. IETF. doi:10.17487/RFC0768. RFC 768.
- ↑ Eddy, W. (August 2022). Transmission Control Protocol (TCP). IETF. sec. 4. doi:10.17487/RFC9293. RFC 9293.
- ↑ Eddy, W. (August 2022). Transmission Control Protocol (TCP). IETF. sec. 3.8. doi:10.17487/RFC9293. RFC 9293.
- ↑ Eddy, W. (August 2022). Transmission Control Protocol (TCP). IETF. sec. 3.8.2. doi:10.17487/RFC9293. RFC 9293.
- ↑ Eggert, L.; Fairhurst, G.; Shepherd, G. (March 2017). UDP Usage Guidelines. IETF. sec. 1. doi:10.17487/RFC8085. RFC 8085.
- ↑ Eggert, L.; Fairhurst, G.; Shepherd, G. (March 2017). UDP Usage Guidelines. IETF. sec. 4. doi:10.17487/RFC8085. RFC 8085.
- ↑ Information technology — Open Systems Interconnection — Protocol for providing the connection-mode transport service (Report). International Telecommunication Union. November 1995. ITU-T Recommendation X.224; ISO/IEC 8073:1995. Retrieved July 3, 2026.
- ↑ Papastergiou et al. 2017, p. 620-624.
- ↑ Iyengar, J.; Thomson, M. (May 2021). QUIC: A UDP-Based Multiplexed and Secure Transport. IETF. sec. 1. doi:10.17487/RFC9000. RFC 9000.
- ↑ Brian C. Smith, Cyclic-UDP: A Priority-Driven Best-Effort Protocol (PDF), retrieved February 23, 2020
- ↑ "RFC 8200". Retrieved June 15, 2025.
Unlike IPv4, the default behavior when UDP packets are originated by an IPv6 node is that the UDP checksum is not optional.
- ↑ "ITU-T Recommendation X.224 (11/1995) ISO/IEC 8073". Itu.int. Retrieved January 17, 2017.
- ↑ "ITU-T Recommendation X.234 (07/1994) ISO/IEC 8602". Itu.int. Retrieved January 17, 2017.
Bibliography
[edit]- Corbet, Jonathan (January 29, 2018). "QUIC as a solution to protocol ossification". 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. 19: 619–639. doi:10.1109/COMST.2016.2626780. hdl:2164/8317. S2CID 1846371.