Transport Layer Responsibilities (26.1.2)
The transport layer has many responsibilities.
At the transport layer, each set of data flowing between a source application and a destination application is known as a conversation and is tracked separately. It is the responsibility of the transport layer to maintain and track these multiple conversations. As illustrated in Figure 26-2, a host may have multiple applications that are communicating across the network simultaneously.
Figure 26-2 Tracking Individual Conversations
Most networks have a limitation on the amount of data that can be included in a single packet. Therefore, data must be divided into manageable pieces.
It is the transport layer’s responsibility to divide the application data into appropriately sized blocks that are easier to manage and transport. Depending on the transport layer protocol used, the transport layer blocks are called either segments or datagrams. Figure 26-3 illustrates the transport layer using different blocks for each conversation.
Figure 26-3 Segmenting Data and Reassembling Segments
The transport layer protocol also adds header information containing binary data organized into several fields to each block of data. The values in these fields enable various transport layer protocols to perform different functions in managing data communication. For instance, the header information is used by the receiving host to reassemble the blocks of data into a complete data stream for the receiving application layer program, as shown in Figure 26-4.
Figure 26-4 Adding Header Information
The transport layer ensures that even with multiple application running on a device, all applications receive the correct data.
The transport layer must be able to separate and manage multiple communications with different transport requirement needs. To pass data streams to the proper applications, the transport layer identifies the target application using an identifier called a port number (see “Port Numbers” later in this chapter). As illustrated in Figure 26-5, each software process that needs to access the network is assigned a port number unique to that host.
Figure 26-5 Identifying the Applications
Sending some types of data (for example, a streaming video) across a network as one complete communication stream could consume all the available bandwidth. This would prevent other communication conversations from occurring at the same time. It would also make error recovery and retransmission of damaged data difficult.
As shown in Figure 26-6, the transport layer uses segmentation and multiplexing to enable different communication conversations to be interleaved on the same network.
Error checking can be performed on the data in the segment to determine whether the segment was altered during transmission.
Figure 26-6 Conversation Multiplexing
Transport Layer Protocols (26.1.3)
IP is concerned only with the structure, addressing, and routing of packets. IP does not specify how the delivery or transportation of the packets takes place.
Transport layer protocols specify how to transfer messages between hosts and are responsible for managing reliability requirements of a conversation. The transport layer includes the TCP and UDP protocols.
Different applications have different transport reliability requirements. Therefore, TCP/IP provides two transport layer protocols, as shown in Figure 26-7.
Figure 26-7 Transport Layer Protocols