In
computer networking, the
Transport Layer is a group of methods and protocols within a layered architecture of network components within which it is responsible for encapsulating application data blocks into data units (
datagrams,
segments) suitable for transfer to the network infrastructure for transmission to the destination host, or managing the reverse transaction by abstracting network datagrams and delivering their payload to an application. Thus the protocols of the Transport Layer establish a direct, virtual host-to-host communications transport medium for applications and therefore also referred to as
transport protocols.
Transport layers are contained in both the TCP/IP model (RFC 1122),[1] which is the foundation of the Internet, and the Open Systems Interconnection (OSI) model of general networking. The definitions of the Transport Layer are slightly different in these two models. This article primarily refers to the TCP/IP model. See also the OSI model definition of the Transport Layer.
The most well-known transport protocol is the Transmission Control Protocol (TCP). It lent its name to the title of the entire Internet Protocol Suite, TCP/IP. 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. Other prominent protocols in this group are the Datagram Congestion Control Protocol (DCCP) and the Stream Control Transmission Protocol (SCTP).
The Transport Layer is responsible for delivering data to the appropriate application process on the host computers. This involves statistical multiplexing of data from different application processes, i.e. forming data packets, and adding source and destination port numbers in the header of each Transport Layer data packet. Together with the source and destination IP address, the port numbers constitutes a 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.