The transport layer is responsible for establishing a temporary communication session between two applications and delivering data between them. Users access the network through network applications that run independently of the operational details of the network in use. An application generates data that is sent from an application on a source host to an application on a destination host, without regard to the destination host type, the type of media over which the data must travel, the path taken by the data, the congestion on a link, or the size of the network. As shown in the figure, the transport layer is the link between the application layer and the lower layers that are responsible for network transmission.
The transport layer accepts data from different applications and passes that data down to the lower layers as manageable pieces that can be multiplexed, or inserted with other data packets, over the media. The transport layer provides for the segmentation of data and the controls necessary to reassemble these segments into the various communication streams. In TCP/IP, these segmentation and reassembly processes can be achieved using two very different transport layer protocols: Transmission Control Protocol (TCP) and User Datagram Protocol (UDP).
The primary responsibilities of transport layer protocols are:
- Tracking the individual communication between applications on the source and destination hosts
- Segmenting data for manageability and reassembling segmented data into streams of application data at the destination
- Identifying the proper application for each communication stream