Xem mẫu

C H A P T E R 6 Fundamentals of TCP and UDP The Transmission Control Protocol (TCP) and User Datagram Protocol (UDP) are the two most popular TCP/IP transport layer protocols. These TCP/IP protocols define a variety of functions considered to be OSI transport layer, or Layer 4, features. Some of the functions relate to things you see every day—for instance, when you open multiple web browsers on your PC, how does your PC know which browser to put the next web page in? When a web server sends you 500 IP packets containing the various parts of a web page, and 1 packet has errors, how does your PC recover the lost data? This chapter covers how TCP and UDP perform these two functions, along with the other functions performed by the transport layer. “Do I Know This Already?” Quiz The purpose of the “Do I Know This Already?” quiz is to help you decide whether you really need to read the entire chapter. If you already intend to read the entire chapter, you do not necessarily need to answer these questions now. The ten-question quiz, derived from the major sections in “Foundation Topics” portion of the chapter, helps you determine how to spend your limited study time. Table 6-1 outlines the major topics discussed in this chapter and the “Do I Know This Already?” quiz questions that correspond to those topics. Table 6-1 “Do I Know This Already?” Foundation Topics Section-to-Question Mapping Foundations Topics Section Typical Features of OSI Layer 4 The Transmission Control Protocol The User Datagram Protocol Questions Covered in This Section 4 1–3, 5–8, 10 9 CAUTION The goal of self-assessment is to gauge your mastery of the topics in this chapter. If you do not know the answer to a question or are only partially sure of the answer, you should mark this question wrong for purposes of the self-assessment. Giving yourself credit for an answer that you correctly guess skews your self-assessment results and might provide you with a false sense of security. 146 Chapter 6: Fundamentals of TCP and UDP 1. Which of the following protocols are connection-oriented? a. Frame Relay b. TCP c. IP d. UDP e. Ethernet 2. Which of the following protocols are reliable? a. Frame Relay b. TCP c. IP d. UDP e. Ethernet 3. PC1 is using TCP, has a window of 4, and sends four segments numbered 2, 3, 4, and 5 to PC2. PC2 replies with an acknowledgment number 5. What should PC1 do next? a. Increase its window to five segments b. Increase its window by five more segments, for a total of nine c. Send segment 6 d. Resend segment 5 e. Resend segments 2 through 5 4. Which of the following are not features of a protocol that is considered to match OSI Layer 4? a. Error recovery b. Flow control c. Segmenting of application data d. Conversion from binary to ASCII 5. Which of the following flow-control methods let the receiver tell the sender how much data the sender is allowed to send before the sender must wait for an acknowledgment? a. Buffering b. Acknowledgments c. Windowing d. Congestion notification e. Congestion avoidance “Do I Know This Already?” Quiz 147 6. Which of the following header fields identifies which TCP/IP application gets data received by the computer? a. Ethernet Type b. 802.3 DSAP c. SNAP Protocol Type d. IP Protocol Field e. TCP Port Number f. UDP Port Number g. Application ID h. Congestion Avoidance 7. Which of the TCP connection-establishment flows sets both the SYN and ACK flags in the TCP header? a. First segment b. Second segment c. Third segment d. Fourth segment e. Fifth segment 8. Which of the following is not a typical function of TCP? a. Windowing b. Error recovery c. Multiplexing d. Routing e. Encryption f. Ordered data transfer 9. Which of the following functions is performed by TCP and UDP? a. Windowing b. Error recovery c. Multiplexing d. Routing e. Encryption f. Ordered data transfer 148 Chapter 6: Fundamentals of TCP and UDP 10. Data that includes the Layer 4 protocol header, and data given to Layer 4 by the upper layers, not including any headers and trailers from Layers 1 to 3, is called what? a. Bits b. Chunk c. Segment d. Packet e. Frame f. L5PDU g. L4PDU h. L3PDU i. L2PDU The answers to the “Do I Know This Already?” quiz are found in Appendix A, “Answers to the ‘Do I Know This Already?’ Quizzes and Q&A Sections.” The suggested choices for your next step are as follows: 8 or less overall score—Read the entire chapter. This includes the “Foundation Topics” and “Foundation Summary” sections and the Q&A section. 9 or 10 overall score—If you want more review on these topics, skip to the “Foundation Summary” section and then go to the Q&A section. Otherwise, move to the next chapter. Typical Features of OSI Layer 4 149 Foundation Topics As in the last two chapters, this chapter starts with a general discussion of the functions of an OSI layer—in this case, Layer 4, the transport layer. Two specific transport layer protocols—the Transmission Control Protocol (TCP) and the User Datagram Protocol (UDP) are covered later in the chapter. This chapter covers OSI Layer 4 concepts, but mostly through an examination of the TCP and UDP protocols. So, this chapter briefly introduces OSI transport layer details and then dives right into how TCP works. Typical Features of OSI Layer 4 The transport layer (Layer 4) defines several functions, the most important of which are error recovery and flow control. Routers discard packets for many reasons, including bit errors, congestion and instances in which no correct routes are known. As you have read already, most data-link protocols notice errors but then discard frames that have errors. The OSI transport layer might provide for retransmission (error recovery) and help to avoid congestion (flow control)—or it might not. It really just depends on the particular protocol. However, if error recovery or flow control is performed with the more modern protocol suites, the functions typically are performed with a Layer 4 protocol. OSI Layer 4 includes some other features as well. Table 6-2 summarizes the main features of the OSI transport layer. You will read about the specific implementation of these protocols in the sections about TCP and UDP. Table 6-2 OSI Transport Layer Features Feature Connection-oriented or connectionless Error recovery Reliability Flow control Segmenting application data Explanation Defines whether the protocol establishes some correlation between two endpoints before any user data is allowed to be transferred (connection oriented), or not (connectionless). The process of noticing errored or lost segments and causing them to be resent. Another term for error recovery. Processes that control the rates at which data is transferred between two endpoints. Application layer protocols may need to send large chunks of data— much larger than can fit inside one IP packet. The transport layer is responsible for segmenting the larger data into pieces, called segments, that can fit inside a packet. ... - tailieumienphi.vn
nguon tai.lieu . vn