Key Terms 469 protocol stack A set of related communications protocols that operate together and, as a group, address communication at some or all of the seven layers of the OSI refer- ence model. Not every protocol stack covers each layer of the model, and often a single protocol in the stack addresses a number of layers at once. TCP/IP is a typical protocol stack. routed protocol Any network protocol that provides enough information in its net- work layer address to allow a packet to be forwarded from one host to another host based on the addressing scheme. router A network-layer device that uses one or more metrics to determine the optimal path along which network traffic should be forwarded. Routers forward packets from one network to another based on network-layer information contained in routing updates. Occasionally called a gateway (although this definition of gateway is becoming increasingly outdated). Routing Information Protocol (RIP) An IGP supplied with UNIX BSD systems. The most common IGP in the Internet. RIP uses hop count as a routing metric. routing metric A method by which a routing algorithm determines that one route is better than another. This information is stored in routing tables and is sent in routing updates. Metrics include bandwidth, communication cost, delay, hop count, load, MTU, path cost, and reliability. Sometimes simply called a metric. routing protocol A protocol that accomplishes routing through the implementation of a specific routing algorithm. Examples of routing protocols are IGRP, OSPF, and RIP. routing table A table stored in a router or some other internetworking device that keeps track of routes to particular network destinations and, in some cases, metrics associated with those routes. subnet address A portion of an IP address that is specified as the subnetwork by the subnet mask. subnet mask A 32-bit address mask used in IP to indicate the bits of an IP address that are used for the subnet address. Sometimes simply called a mask. subnetwork 1. In IP networks, a network sharing a particular subnet address. Sub- networks are networks arbitrarily segmented by a network administrator to provide a multilevel, hierarchical routing structure while shielding the subnetwork from the addressing complexity of attached networks. Sometimes called a subnet. 2. In OSI net- works, a collection of ESs and ISs under the control of a single administrative domain and using a single network access protocol. 1102.book Page 469 Tuesday, May 20, 2003 2:53 PM 470 Chapter 8: Routing Fundamentals and Subnets Check Your Understanding Complete all the review questions to test your understanding of the topics and con- cepts in this chapter. Answers are listed in Appendix C, “Check Your Understanding Answer Key.” 1. How many bits are in an IP address? A. 16 B. 32 C. 64 D. None of the above 2. What is the maximum value of each octet in an IP address? A. 28 B. 255 C. 256 D. None of the above 3. The network number plays what part in an IP address? A. It specifies the network to which the host belongs. B. It specifies the identity of the computer on the network. C. It specifies which node on the subnetwork is being addressed. D. It specifies which networks the device can communicate with. 4. The host number plays what part in an IP address? A. It designates the identity of the computer on the network. B. It designates which node on the subnetwork is being addressed. C. It designates the network to which the host belongs. D. It designates which hosts the device can communicate with. 5. What is the decimal equivalent of the binary number 101101? A. 32 B. 35 C. 45 D. 44 1102.book Page 470 Tuesday, May 20, 2003 2:53 PM Check Your Understanding 471 6. Convert the decimal number 192.5.34.11 to its binary form. A. 11000000.00000101.00100010.00001011 B. 11000101.01010111.00011000.10111000 C. 01001011.10010011.00111001.00110111 D. 11000000.00001010.01000010.00001011 7. Convert the binary IP address 11000000.00000101.00100010.00001011 to its decimal form. A. 190.4.34.11 B. 192.4.34.10 C. 192.4.32.11 D. None of the above 8. What portion of the Class B address 154.19.2.7 is the network address? A. 154 B. 154.19 C. 154.19.2 D. 154.19.2.7 9. What portion of the IP address 129.219.51.18 represents the network? A. 129.219 B. 129 C. 14.1 D. 1 10. Which of the following addresses is an example of a broadcast address on the network 123.10.0.0 with a subnet mask of 255.255.0.0? A. 123.255.255.255 B. 123.10.255.255 C. 123.13.0.0 D. 123.1.1.1 1102.book Page 471 Tuesday, May 20, 2003 2:53 PM 472 Chapter 8: Routing Fundamentals and Subnets 11. How many host addresses can be used in a Class C network? A. 253 B. 254 C. 255 D. 256 12. How many subnets can a Class B network have? A. 16 B. 256 C. 128 D. None of the above 13. What is the minimum number of bits that can be borrowed to form a subnet? A. 1 B. 2 C. 4 D. None of the above 14. What is the primary reason for using subnets? A. To reduce the size of the collision domain B. To increase the number of host addresses C. To reduce the size of the broadcast domain D. None of the above 15. How many bits are in a subnet mask? A. 16 B. 32 C. 64 D. None of the above 16. Performing the Boolean function as a router would on the IP addresses 131.8.2.5 and 255.0.0.0, what is the network/subnetwork address? A. 131.8.1.0 B. 131.8.0.0 C. 131.8.2.0 D. None of the above 1102.book Page 472 Tuesday, May 20, 2003 2:53 PM Check Your Understanding 473 17. How many bits can be borrowed to create a subnet for a Class C network? A. 2 B. 4 C. 6 D. None of the above 18. With a Class C address of 197.15.22.31 and a subnet mask of 255.255.255.224, how many bits have been borrowed to create a subnet? A. 1 B. 2 C. 3 D. None of the above 19. Performing the Boolean function as a router would on the IP addresses 172.16.2.120 and 255.255.255.0, what is the subnet address? A. 172.0.0.0 B. 172.16.0.0 C. 172.16.2.0 D. None of the above 20. Which of the following best describes one function of Layer 3, the network layer, in the OSI model? A. It is responsible for reliable network communication between nodes. B. It is concerned with physical addressing and network topology. C. It determines which is the best path for traffic to take through the network. D. It manages data exchange between presentation layer entities. 21. What function allows routers to evaluate available routes to a destination and to establish the preferred handling of a packet? A. Data linkage B. Path determination C. SDLC interface protocol D. Frame Relay 1102.book Page 473 Tuesday, May 20, 2003 2:53 PM 474 Chapter 8: Routing Fundamentals and Subnets 22. How does the network layer forward packets from the source to the destination? A. By using an IP routing table B. By using ARP responses C. By referring to a name server D. By referring to the bridge 23. What are the two parts of a network layer address that routers use to forward traffic through a network? A. Network address and host address B. Network address and MAC address C. Host address and MAC address D. MAC address and subnet mask 1102.book Page 474 Tuesday, May 20, 2003 2:53 PM 1102.book Page 475 Tuesday, May 20, 2003 2:53 PM Objectives Upon completion of this chapter, you will be able to ■ Describe the functions of the TCP/IP transport layer ■ Describe flow control ■ Describe the processes of establishing a connection between peer systems ■ Describe windowing ■ Describe acknowledgment ■ Identify and describe transport layer protocols ■ Describe the Transmission Control Protocol (TCP) header format and port numbers ■ Describe the User Datagram Protocol (UDP) header format and port numbers 1102.book Page 476 Tuesday, May 20, 2003 2:53 PM Chapter 9 TCP/IP Transport and Application Layer The transport layer uses the services provided by the network layer, such as best-path selection and logical addressing, to provide end-to-end communication between source and destination. This chapter describes how the transport layer regulates the flow of information from source to destination reliably and accurately. The primary characteristics of the transport layer are discussed, including the following: ■ The transport layer data stream is a logical connection between the endpoints of a network. ■ End-to-end control and reliability are provided by sliding windows, sequencing numbers, and acknowledgments. ■ Layer 4 protocols TCP and UDP use port numbers to keep track of different conver- sations that cross the network at the same time, and to pass information to the upper layers. The primary characteristics of the TCP/IP application layer include the following: ■ End-user applications reside at this layer. ■ Commonly used applications include NFS, DNS, ARP, rlogin, talk, FTP, NTP, and traceroute. Please be sure to look at this chapter’s associated e-Lab Activities, Videos, and Photo- Zooms that you will find on the CD-ROM accompanying this book. These CD elements are designed to supplement the material and reinforce the concepts introduced in this chapter. 1102.book Page 477 Tuesday, May 20, 2003 2:53 PM 478 Chapter 9: TCP/IP Transport and Application Layer Understanding the TCP/IP Transport Layer The phrase “quality of service” often is used to describe the purpose of Layer 4, the transport layer. UDP, which is covered later, also operates at Layer 4 and provides con- nectionless transport services. However, the primary protocol operating at this layer is connection-oriented TCP. Its main function is to transport and regulate the flow of information from source to destination reliably and accurately. The primary duties of the transport layer are to provide end-to-end control, to provide flow control via slid- ing windows, and to ensure reliability via sequencing numbers and acknowledgments. To understand reliability and flow control, think of a person who speaks really fast. In conversation, the listener might need to ask this person to repeat some words if they are not understood (for reliability) and to speak slowly, so the listener can catch the words (flow control), as shown in Figure 9-1. Figure 9-1 Transport Layer Analogies The transport layer provides transport services from the source host to the destina- tion host. It constitutes a logical connection between the endpoints of the network. Transport services segment and reassemble data that is sent by several upper-layer applications onto the same transport layer data stream. This transport layer data stream provides end-to-end transport services. The transport layer data stream is a logical connection between the endpoints of a net- work. The transport layer defines end-to-end connectivity between host applications. Figure 9-2 illustrates the transport layer. 1102.book Page 478 Tuesday, May 20, 2003 2:53 PM . 11 000000.0000 010 1.0 010 0 010 .000 010 11 B. 11 00 010 1. 010 1 011 1.00 011 000 .10 111 000 C. 010 010 11. 10 010 011 .0 011 10 01. 0 011 011 1 D. 11 000000.000 010 10. 010 00 010 .000 010 11 7. Convert the binary IP address 11 000000.0000 010 1.0 010 0 010 .000 010 11. on the network 12 3 .10 .0.0 with a subnet mask of 25 5 .25 5.0.0? A. 12 3 .25 5 .25 5 .25 5 B. 12 3 .10 .25 5 .25 5 C. 12 3 .13 .0.0 D. 12 3 .1. 1 .1 110 2. book Page 4 71 Tuesday, May 20 , 20 03 2: 53 PM 4 72 Chapter 8: Routing. network address? A. 15 4 B. 15 4 .19 C. 15 4 .19 .2 D. 15 4 .19 .2. 7 9. What portion of the IP address 12 9. 21 9 . 51. 18 represents the network? A. 12 9. 21 9 B. 12 9 C. 14 .1 D. 1 10. Which of the following addresses