The main responsibility of the transport layer is to receive the messages from the application layer and prepare them for transmission over the network. To carry out this responsibility, the transport layer provides the following three major functions: (i) linkage to the application layer via an addressing scheme to identify various appli- cations that it serves; (ii) segmentation of large messages into smaller segments for effi cient transportation in the network, and reassembly of these segments at the destination to recreate the original message; and (iii) establish an end-to-end virtual connection between the originating machine and the destination machine. The last two functions are necessary when a connection-oriented, reliable delivery is desired. In the connectionless mode, the last two functions are not supported. More on the connectionless versus connection-oriented will be available a little later.
To provide the functions above, a number of protocols have been standardized. Earlier architectures, such as IBM’s Systems Network Architecture (SNA), ITU-T’s X.25, and Novell’s IPX/SPX, had all transport layer protocols. However, due to the popularity of the Internet, the TCP, originally developed in early 1970s for the ARPANET, has become the dominant, most common transport layer protocol in the industry. TCP is a connection oriented reliable protocol. For applications appro- priate for connectionless delivery of their messages, User Datagram Protocol (UDP) is used in the Internet. Both TCP and UDP use the IP, a network layer protocol to send their messages to their counterparts in the destination devices. The combination of TCP and IP together with its associated protocols in other layers is typically called the TCP/IP protocol suite.
Port Numbers
A transport layer protocol may serve more than one application layer protocol, and therefore there is a need to identify these application protocols when a message is received from the network layer protocol. This is accomplished by assigning a port
TCP and UDP have two fi elds allocated for this purpose: the fi rst identifi es the source port number and the other is for the destination port number. The port numbers for the application protocols in the destination, which is typically a server, are assigned by ICANN. For example, 80 is used for HTTP and 21 is used for SMTP. Table 3.4 shows the port numbers assigned by ICANN for some popular applications. The port num- bers for the originating client are generated sequentially by the client’s computer.
Segmentation and Reassembly
The second major responsibility of the transport layer is to divide a long message into smaller fragments to be transported on the network from the originating device to the destination device. This function is supported by TCP, but not by UDP. The sizes of the segments are typically determined via the negotiation between the source and destination devices. When a message is segmented, each piece is numbered sequentially within the message so that the transport layer protocol in the destination can put together these pieces in the right order by examining the sequence numbers. The total process is called segmentation and reassembly. To speed up this complex transport layer function, many implementations offl oad this function onto the hard- ware providing data link layer and physical layer functions. This offl oading is called Transport Segmentation Offl oad.
Data (variable length) Options and padding
Urgent pointer Checksum Window Control bits E C N Reserved Data offset Acknowledgment number Sequence number Destination port Source port 2-bytes 2-bytes
FIGURE 3.9 Format of TCP messages.
Data (variable length)
Checksum Length
Destination port Source port
2-bytes 2-bytes
Message Delivery
The next and last major responsibility of the transport layer has to do with the delivery of the message to the destination. In message delivery, the transport layer protocols provide two drastically opposite methods for delivery: connection-oriented versus connectionless oriented. In the connection-oriented case, which is used by TCP, the source device fi rst sends a control message to the destination to inquire and make sure that the destination TCP is available and ready to accept the messages.
When the destination responds affi rmatively, a virtual connection is established between the source and destination devices at the transport layer. During this set-up process, the information about the capabilities of the device such as the maximum data link layer message size are included in the control messages exchanged. This size information will be used in the segmentation process. Only after this exchange has taken place, can the messages be delivered through this virtual connection. In a connection-oriented delivery, after a message has been delivered to the destination, an acknowledgement must be sent back to the originating device to acknowledge that the message was received. There is also a fl ow control mechanism embedded in this type of delivery to make sure that the destination device is not overwhelmed with more messages than it can process in time.
In a connectionless delivery, which is used by the UDP, there is no priory virtual circuit is established. As soon as the transport layer receives the messages from the application layer, it immediately forwards the message to its destination (via the network layer protocol, of course). In this type of delivery, the destination transport layer protocol never acknowledges the receipt of a message. This is why sometimes this type is called a send-and-pray method. Therefore, UDP is a relatively small and simple protocol (only 8 bytes containing only four fi elds).
TABLE 3.4
Port Numbers (Server Side) for Some Popular Protocols
Ports Protocols Applications
21 FTP File transfer
22 SSH Secure Shell (remote login)
23 Telnet Terminal emulation
25 SMTP E-mail
53 DNS Domain names
67 BOOTP IP number Assignment
80 HTTP Web 110 POP3 E-mail 143 IMAP E-mail 161 SNMP Network management 179 BGP Routing 520 RIP Routing 547 DHCP Automatic assignment of IP addresses
Which delivery message to be used (thus which protocol, TCP or UDP) depends on the need of the application layer protocol for a reliable underlying delivery mechanism. This is the case for HTTP and SMTP. However, some applications may tolerate errors, therefore a simple delivery without any acknowledgement, fl ow control, and so on would be suffi cient. Voice is one such traffi c. We will see later that several commonly used control messages that are usually small, such as Domain Name System (DNS) protocol, Dynamic Host Control Protocol (DHCP), and Simple Network Management Protocol (SNMP) are in this category.
Other Transport Layer Protocols
Although the TCP provides a reliable delivery of the messages end-to-end, some newer applications such as VoIP and streaming multimedia require different avail- ability, reliability, and timeliness values form the transport layer protocols. Delivery of messages within a certain time period may be very important for certain applica- tions so that a smooth output, without interruption, can be obtained by the users. To address these issues, additional transport layer protocols were developed. These types of protocols all rely on the concept of “service classes,” where services are ranked based on their requirements. The term quality of service (QoS) is defi ned for this purpose. For example, the e-mail application is given a lower priority, whereas a VoIP service is given a high priority due to its real-time requirement. Some examples of these kind of transport layer protocols are the Resource Reservation Protocol (RSVP), Real-Time Streaming Protocol (RTSP), and Real-Time Transport Protocol (RTP). They are all used in conjunction with TCP and/or UDP. RSVP is used to set up virtual connections (by reserving resources in the network) for general real-time applications, whereas RTSP is used to set up virtual circuits for real-time multimedia applications to enable controlled delivery of streamed multimedia data. RTP is typi- cally used to transport messages over UDP by simply placing a timestamp on each segment of the message. In the case of VoIP applications, the Session Initiation Protocol (SIP) is used between communicating devices as a signaling protocol for connection establishment, which includes user location detection, session establish- ment, and session negotiation. Table 3.5 provides a summary of these protocols that ride on top of TPC or UDP.