Transport Layer

Transport Layer

T TRANSPORT LAYER INTRODUCTION The Internet has evolved into an extremely large complex system and has changed many important aspects of our lives. Like any complex engineering system, the design of the Internet is carried out in a modular way, where each main functional module is called a ‘‘layer.’’ One of the layering structures often used is the five-layer model con- sisting of the physical layer, the link layer, the network Figure 1. Internet protocol stack. layer, the transport layer, and the application layer.1 See Fig. 1 for a simple illustration. The sending and receiving computers each run analo- gous stacks, with data being passed down the stack from the processes running on one host. For example, a computer sending application, and then up the receiver’s stack to the may be sending several files generated by filling in web receiving application. The physical layer is the part that forms,whileatthesametimesendinge-mails.Thenet- actually moves information from one place to another, such work layer only cares about sending a stream of data out of as by varying voltages on wires or generating electromag- the computer. Therefore, the transport layer needs to netic waves. The application layer is the part with which aggregate data from different applications into a single users interact, such as the hypertext transport protocol stream before passing it to the network layer. This is (HTTP) used to browse the Web, or the simple mail transfer called multiplexing. Similarly, when the computer protocol (SMTP) used to send e-mail. receives data from the outside, the transport layer is again Each layer consists of protocols to specify such things as responsible for distributing that data to different applica- the data format, the procedure for exchanging data, the tions—such as a web browser or e-mail client—in a process allocation of resources, and the actions that need to be taken called demultiplexing. Figure 1 also shows the data direc- in different circumstances. This protocol can be implemen- tions for multiplexing (sending) and demultiplexing ted in either software or hardware or both. This article (receiving). concerns transport layer protocols and their associated algo- Multiplexing is achieved by dividing flows of data from rithms, mainly focusing on the wireline Internet but also the application into (one or more) short packets, also called discussing some other types of networks such as wireless segments. Packets from different flows can then be inter- ones. leaved as they are sent to the network layer. Demultiplex- The transport layer manages the end-to-end transpor- ing is achieved by allocating each communication flow a tation of packets across a network. Its role is to connect unique identifier. The sender marks each packet with its application processes running on end hosts as seamlessly as flow’s identifier, and the receiver separates incoming possible, as if the two end applications were connected by a packets into flows based on their identifiers. In the Inter- reliable dedicated link, thus making the network ‘‘invisi- net, these identifiers consist of transport layer port num- ble.’’ To do this, it must manage several nonidealities of real bers, and additionally the network layer addresses of the networks: shared links, data loss and duplication, conten- sender and receiver and a number identifying the trans- tion for resources, and variability of delay. By examining port layer protocol being used. Even before a flow is these functionalities in turn, we will provide a brief intro- started, a ‘‘well-known’’ port number can be used to iden- duction to this important layer, including its functions and tify which process on the receiver the sender is attempting implementation, with an emphasis on the underlying ideas to contact; for example, Web servers are ‘‘well known’’ to and fundamentals. We will also discuss possible directions use port 80. for the future evolution of the transport layer and suggest Multiplexing and demultiplexing is one of the most some further reading. fundamental tasks of the transport layer. Other functions are required by some applications but not by all, and so different transport layer protocols provide different subsets MULTIPLEXING: MANAGING LINK SHARING of the possible services. However, essentially all transport layer protocols perform at least multiplexing and demulti- One basic function of the transport layer is multiplexing plexing. and demultiplexing. Usually there are multiple application There are two dominant types of transport layer protocol used in the Internet. One is UDP (User Datagram Protocol), 1There are also some other ways of defining these layers; e.g., the and the other is TCP (Transmission Control Protocol). The standard OSI (open systems interconnection) reference model former provides unreliable and connectionless service to defines seven layers with the session layer and the presentation the upper layers, whereas the latter generates reliable and layer added. connection-based service. 1 Wiley Encyclopedia of Computer Science and Engineering, edited by Benjamin Wah. Copyright # 2008 John Wiley & Sons, Inc. 2 TRANSPORT LAYER UDP: Multiplexing Only for packet loss include transient routing loops, congestion of a resource, or physical errors that were not successfully UDP is a very simple protocol. It is called connectionless corrected by the physical or link layer. because all UDP packets are treated independently by the This problem is very similar to that faced by the link transport layer, rather than being part of an ongoing flow.2 layer. The difference is that the link layer operates over a Besides minor error checking, UDP essentially only does single unreliable physical link to make it appear reliable to multiplexing and demultiplexing. It does not provide any the network layer, whereas the transport layer operates guarantee that packets will be received in the order they are over an entire unreliable network to make it appear reliable sent, or even that they will be received at all. It also does not to the application. For this reason, the algorithms employed control its transmission rate. In fact, the rationale behind at the transport layer are very similar to those employed at the design of UDP is to let applications have more control the link layer, and they will be reviewed briefly here. over the data sending process and to reduce the delay ARQ (Automatic Repeat-reQuest) is the basic mechan- associated with setting up a connection. These features ism to deal with data corruption. When the receiver receives are desirable for certain delay-sensitive applications such a correct data packet, it will send out a positive acknowl- as streaming video and Internet telephony. In general, edgment (ACK); when it detects an error, it will send out a applications that can tolerate certain data loss/corruption negative acknowledgment (NAK). but are sensitive to delay would choose to use UDP. Because physically corrupted packets are usually dis- carded by the link layer, the transport layer will not directly TCP: Reliable Connection-Oriented Transport observe that a packet has been lost, and hence, many trans- In contrast to UDP, TCP provides a connection-oriented port layer protocols do not explicitly implement NAKs. A service, which means that it sends data as a stream of notable exception is multicast transport protocols. Multicast related packets, making concepts such as the order of pack- protocols allow the sender to send a single packet, which is ets meaningful. In particular, TCP provides reliable service replicated inside the network to reach multiple receivers, to upper layer applications, ensuring that the packets are possiblynumberinginthethousands.IfeachsentanACKfor correctly received and in the order in which they are sent. every packet, the receiver would be flooded. If instead recei- At the start of a connection, TCP uses a three-way vers send NAKs only when they believe packets are missing, handshake to establish a connection between sender and the network load is greatly reduced. TCP implicitly regards receiver, in which they agree on what protocol parameters ACKs for three or more out-of-order packets (resulting in to use. This process takes 1.5 round-trip times (one side ‘‘duplicate ACKs’’) as forming a NAK. sends a SYNchronize packet, the other replies with a SYN An interesting problem immediately develops. If the and an ACKnowledge packet, and the first confirms with an sender only sends the next packet when it is sure the first ACK), which is an overhead avoided by UDP. one is received correctly, the system will be very inefficient. TCP receives data from the application as a single In that case, the sender would only be able to send one packet stream, e.g., a large file, and segments it into a sequence every round-trip time (the time it takes for a packet to reach of packets. It tries to use large packets to minimize over- the destination and the ACK to return), whereas the time head, but there is a maximum size that the network can taken to send a packet is usually much smaller than the carry efficiently, called the MTU (maximum transfer unit). round-trip time. This is especially true for today’s high-speed TCP is responsible for choosing the correct size, in a process networks. For example, consider a 1 Gbit/s (1,000,000,000 called path MTU discovery. In contrast, UDP is given data bits per second) connection between two hosts that are already segmented into packets, and so it is the applica- separated by 1500 km and therefore have a round-trip tion’s responsibility to observe MTU restrictions. distance of 3000 km. Sending a packet of size 10 kbit takes TCP is the most common transport protocol in the only 10 ms (ten microseconds), whereas the round-trip time Internet; measurements show that it accounds for about cannot be smaller than the physical distance divided by the 80% of the traffic (1).

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    8 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us