diff options
| author | mo khan <mo@mokhan.ca> | 2025-09-27 13:02:41 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2025-09-27 13:02:41 -0600 |
| commit | 2b9934ddf600aed8534e297f270daac128a048f5 (patch) | |
| tree | 4f94a71711d7cd393ae749bc5509650e6d83d30a /generated | |
| parent | 5e508ae387e9ca1c7337c48844a80abe0326cafe (diff) | |
remove homework and sample questions
Diffstat (limited to 'generated')
8 files changed, 0 insertions, 1771 deletions
diff --git a/generated/computer-networking-a-top-down-approach-8ed/1.md b/generated/computer-networking-a-top-down-approach-8ed/1.md index b4e8f79..a66c866 100644 --- a/generated/computer-networking-a-top-down-approach-8ed/1.md +++ b/generated/computer-networking-a-top-down-approach-8ed/1.md @@ -911,249 +911,3 @@ Chapters 2 through 6 are the five core chapters of this book. You should notice understand the network services needed to support these applications. We can then, in turn, examine the various ways in which such services might be implemented by a network architecture. Covering applications early thus provides motivation for the remainder of the text. The second half of the book—Chapters 7 and 8—zooms in on two enormously important (and somewhat independent) topics in modern computer networking. In Chapter 7, we examine wireless and mobile networks, including wireless LANs (including WiFi and Bluetooth), Cellular networks (including 4G and 5G), and mobility. Chapter 8, which addresses security in computer networks, first looks at the underpinnings of encryption and network security, and then we examine how the basic theory is being applied in a broad range of Internet contexts. - -# **Homework Problems and Questions** - -# **Chapter 1 Review Questions** - -#### SECTION 1.1 - -- R1. What is the difference between a host and an end system? List several different types of end systems. Is a Web server an end system? -- R2. The word *protocol* is often used to describe diplomatic relations. How does Wikipedia describe diplomatic protocol? -- R3. Why are standards important for protocols? - -#### SECTION 1.2 - -- R4. List four access technologies. Classify each one as home access, enterprise access, or wide-area wireless access. -- R5. Is HFC transmission rate dedicated or shared among users? Are collisions possible in a downstream HFC channel? Why or why not? -- R6. List the available residential access technologies in your city. For each type of access, provide the advertised downstream rate, upstream rate, and monthly price. -- R7. What is the transmission rate of Ethernet LANs? -- R8. What are some of the physical media that Ethernet can run over? -- R9. HFC, DSL, and FTTH are all used for residential access. For each of these access technologies, provide a range of transmission rates and comment on whether the transmission rate is shared or dedicated. -- R10. Describe the most popular wireless Internet access technologies today. Compare and contrast them. - -{91}------------------------------------------------ - -#### SECTION 1.3 - -- R11. Suppose there is exactly one packet switch between a sending host and a receiving host. The transmission rates between the sending host and the switch and between the switch and the receiving host are *R*1 and *R*2, respectively. Assuming that the switch uses store-and-forward packet switching, what is the total end-to-end delay to send a packet of length *L*? (Ignore queuing, propagation delay, and processing delay.) -- R12. What advantage does a circuit-switched network have over a packet-switched network? What advantages does TDM have over FDM in a circuit-switched network? -- R13. Suppose users share a 2 Mbps link. Also suppose each user transmits continuously at 1 Mbps when transmitting, but each user transmits only 20 percent of the time. (See the discussion of statistical multiplexing in Section 1.3.) - - a. When circuit switching is used, how many users can be supported? - - b. For the remainder of this problem, suppose packet switching is used. Why will there be essentially no queuing delay before the link if two or fewer users transmit at the same time? Why will there be a queuing delay if three users transmit at the same time? - - c. Find the probability that a given user is transmitting. - - d. Suppose now there are three users. Find the probability that at any given time, all three users are transmitting simultaneously. Find the fraction of time during which the queue grows. -- R14. Why will two ISPs at the same level of the hierarchy often peer with each other? How does an IXP earn money? -- R15. Some content providers have created their own networks. Describe Google's network. What motivates content providers to create these networks? - -#### SECTION 1.4 - -- R16. Consider sending a packet from a source host to a destination host over a fixed route. List the delay components in the end-to-end delay. Which of these delays are constant and which are variable? -- R17. Visit the Transmission Versus Propagation Delay interactive animation at the companion Web site. Among the rates, propagation delay, and packet sizes available, find a combination for which the sender finishes transmitting before the first bit of the packet reaches the receiver. Find another combination for which the first bit of the packet reaches the receiver before the sender finishes transmitting. -- R18. How long does it take a packet of length 1,000 bytes to propagate over a link of distance 2,500 km, propagation speed 2.5 # 108 m/s, and transmission rate 2 Mbps? More generally, how long does it take a packet of length *L* to propagate over a link of distance *d*, propagation speed *s*, and transmission - -{92}------------------------------------------------ - -- rate *R* bps? Does this delay depend on packet length? Does this delay depend on transmission rate? -- R19. Suppose Host A wants to send a large file to Host B. The path from Host A to Host B has three links, of rates *R*<sup>1</sup> = 500 kbps, *R*<sup>2</sup> = 2 Mbps, and *R*<sup>3</sup> = 1 Mbps. - - a. Assuming no other traffic in the network, what is the throughput for the file transfer? - - b. Suppose the file is 4 million bytes. Dividing the file size by the throughput, roughly how long will it take to transfer the file to Host B? - - c. Repeat (a) and (b), but now with *R*2 reduced to 100 kbps. -- R20. Suppose end system A wants to send a large file to end system B. At a very high level, describe how end system A creates packets from the file. When one of these packets arrives to a router, what information in the packet does the router use to determine the link onto which the packet is forwarded? Why is packet switching in the Internet analogous to driving from one city to another and asking directions along the way? -- R21. Visit the Queuing and Loss interactive animation at the companion Web site. What is the maximum emission rate and the minimum transmission rate? With those rates, what is the traffic intensity? Run the interactive animation with these rates and determine how long it takes for packet loss to occur. Then repeat the experiment a second time and determine again how long it takes for packet loss to occur. Are the values different? Why or why not? - -#### SECTION 1.5 - -- R22. List five tasks that a layer can perform. Is it possible that one (or more) of these tasks could be performed by two (or more) layers? -- R23. What are the five layers in the Internet protocol stack? What are the principal responsibilities of each of these layers? -- R24. What is an application-layer message? A transport-layer segment? A network-layer datagram? A link-layer frame? -- R25. Which layers in the Internet protocol stack does a router process? Which layers does a link-layer switch process? Which layers does a host process? - -#### SECTION 1.6 - -- R26. What is self-replicating malware? -- R27. Describe how a botnet can be created and how it can be used for a DDoS attack. -- R28. Suppose Alice and Bob are sending packets to each other over a computer network. Suppose Trudy positions herself in the network so that she can capture all the packets sent by Alice and send whatever she wants to Bob; she can also capture all the packets sent by Bob and send whatever she wants to Alice. List some of the malicious things Trudy can do from this position. - -{93}------------------------------------------------ - -# **Problems** - -- P1. Design and describe an application-level protocol to be used between an automatic teller machine and a bank's centralized computer. Your protocol should allow a user's card and password to be verified, the account balance (which is maintained at the centralized computer) to be queried, and an account withdrawal to be made (that is, money disbursed to the user). Your protocol entities should be able to handle the all-too-common case in which there is not enough money in the account to cover the withdrawal. Specify your protocol by listing the messages exchanged and the action taken by the automatic teller machine or the bank's centralized computer on transmission and receipt of messages. Sketch the operation of your protocol for the case of a simple withdrawal with no errors, using a diagram similar to that in Figure 1.2. Explicitly state the assumptions made by your protocol about the underlying end-to-end transport service. -- P2. Equation 1.1 gives a formula for the end-to-end delay of sending one packet of length *L* over *N* links of transmission rate *R*. Generalize this formula for sending *P* such packets back-to-back over the *N* links. -- P3. Consider an application that transmits data at a steady rate (for example, the sender generates an *N*-bit unit of data every *k* time units, where *k* is small and fixed). Also, when such an application starts, it will continue running for a relatively long period of time. Answer the following questions, briefly justifying your answer: - - a. Would a packet-switched network or a circuit-switched network be more appropriate for this application? Why? - - b. Suppose that a packet-switched network is used and the only traffic in this network comes from such applications as described above. Furthermore, assume that the sum of the application data rates is less than the capacities of each and every link. Is some form of congestion control needed? Why? -- P4. Consider the circuit-switched network in Figure 1.13. Recall that there are four circuits on each link. Label the four switches A, B, C, and D, going in the clockwise direction. - - a. What is the maximum number of simultaneous connections that can be in progress at any one time in this network? - - b. Suppose that all connections are between switches A and C. What is the maximum number of simultaneous connections that can be in progress? - - c. Suppose we want to make four connections between switches A and C, and another four connections between switches B and D. Can we route these calls through the four links to accommodate all eight connections? - -{94}------------------------------------------------ - -- P5. Review the car-caravan analogy in Section 1.4. Assume a propagation speed of 100 km/hour. - - a. Suppose the caravan travels 175 km, beginning in front of one tollbooth, passing through a second tollbooth, and finishing just after a third tollbooth. What is the end-to-end delay? - - b. Repeat (a), now assuming that there are eight cars in the caravan instead of ten. -- P6. This elementary problem begins to explore propagation delay and transmission delay, two central concepts in data networking. Consider two hosts, A and B, connected by a single link of rate *R* bps. Suppose that the two hosts are separated by *m* meters, and suppose the propagation speed along the link is *s* meters/sec. Host A is to send a packet of size *L* bits to Host B. - - a. Express the propagation delay, *d*prop, in terms of *m* and *s*. - - b. Determine the transmission time of the packet, *d*trans, in terms of *L* and *R*. - - c. Ignoring processing and queuing delays, obtain an expression for the endto-end delay. - - d. Suppose Host A begins to transmit the packet at time *t* = 0. At time *t* = *d*trans, where is the last bit of the packet? - - e. Suppose *d*prop is greater than *d*trans. At time *t* = *d*trans, where is the first bit of the packet? - - f. Suppose *d*prop is less than *d*trans. At time *t* = *d*trans, where is the first bit of the packet? - - g. Suppose *<sup>s</sup>* <sup>=</sup> 2.5 # 108 , *L* = 1500 bytes, and *R* = 10 Mbps. Find the distance *m* so that *d*prop equals *d*trans. -- P7. In this problem, we consider sending real-time voice from Host A to Host B over a packet-switched network (VoIP). Host A converts analog voice to a digital 64 kbps bit stream on the fly. Host A then groups the bits into 56-byte packets. There is one link between Hosts A and B; its transmission rate is 10 Mbps and its propagation delay is 10 msec. As soon as Host A gathers a packet, it sends it to Host B. As soon as Host B receives an entire packet, it converts the packet's bits to an analog signal. How much time elapses from the time a bit is created (from the original analog signal at Host A) until the bit is decoded (as part of the analog signal at Host B)? -- P8. Suppose users share a 10 Mbps link. Also suppose each user requires 200 kbps when transmitting, but each user transmits only 10 percent of the time. (See the discussion of packet switching versus circuit switching in Section 1.3.) - - a. When circuit switching is used, how many users can be supported? - - b. For the remainder of this problem, suppose packet switching is used. Find the probability that a given user is transmitting. - - - -{95}------------------------------------------------ - -- c. Suppose there are 120 users. Find the probability that at any given time, exactly *n* users are transmitting simultaneously. (*Hint*: Use the binomial distribution.) -- d. Find the probability that there are 51 or more users transmitting simultaneously. -- P9. Consider the discussion in Section 1.3 of packet switching versus circuit switching in which an example is provided with a 1 Mbps link. Users are generating data at a rate of 100 kbps when busy, but are busy generating data only with probability *p* = 0.1. Suppose that the 1 Mbps link is replaced by a 1 Gbps link. - - a. What is *N,* the maximum number of users that can be supported simultaneously under circuit switching? - - b. Now consider packet switching and a user population of *M* users. Give a formula (in terms of *p*, *M*, *N*) for the probability that more than *N* users are sending data. -- P10. Consider a packet of length *L* that begins at end system A and travels over three links to a destination end system. These three links are connected by two packet switches. Let *di*, *si,* and *Ri* denote the length, propagation speed, and the transmission rate of link *i,* for *i* = 1, 2, 3. The packet switch delays each packet by *d*proc. Assuming no queuing delays, in terms of *di* , *si* , *Ri,* (*i* = 1, 2, 3), and *L,* what is the total end-to-end delay for the packet? Suppose now the packet is 1,500 bytes, the propagation speed on all three links is 2.5 # 108 m/s, the transmission rates of all three links are 2.5 Mbps, the packet switch processing delay is 3 msec, the length of the first link is 5,000 km, the length of the second link is 4,000 km, and the length of the last link is 1,000 km. For these values, what is the end-to-end delay? -- P11. In the above problem, suppose *R*<sup>1</sup> = *R*<sup>2</sup> = *R*<sup>3</sup> = *R* and *d*proc = 0. Further suppose that the packet switch does not store-and-forward packets but instead immediately transmits each bit it receives before waiting for the entire packet to arrive. What is the end-to-end delay? -- P12. A packet switch receives a packet and determines the outbound link to which the packet should be forwarded. When the packet arrives, one other packet is halfway done being transmitted on this outbound link and four other packets are waiting to be transmitted. Packets are transmitted in order of arrival. Suppose all packets are 1,500 bytes and the link rate is 2.5 Mbps. What is the queuing delay for the packet? More generally, what is the queuing delay when all packets have length *L*, the transmission rate is *R*, *x* bits of the currently-being-transmitted packet have been transmitted, and *n* packets are already in the queue? -- P13. (a) Suppose *N* packets arrive simultaneously to a link at which no packets are currently being transmitted or queued. Each packet is of length *L* and the link has transmission rate *R*. What is the average queuing delay for the *N* packets? - -{96}------------------------------------------------ - -- (b) Now suppose that *N* such packets arrive to the link every *LN/R* seconds. What is the average queuing delay of a packet? -- P14. Consider the queuing delay in a router buffer. Let *I* denote traffic intensity; that is, *I* = *La*/*R*. Suppose that the queuing delay takes the form *IL*/*R* (1 - *I*) for *I* 6 1. - - a. Provide a formula for the total delay, that is, the queuing delay plus the transmission delay. - - b. Plot the total delay as a function of *L/R*. -- P15. Let *a* denote the rate of packets arriving at a link in packets/sec, and let *µ* denote the link's transmission rate in packets/sec. Based on the formula for the total delay (i.e., the queuing delay plus the transmission delay) derived in the previous problem, derive a formula for the total delay in terms of *a* and *µ*. -- P16. Consider a router buffer preceding an outbound link. In this problem, you will use Little's formula, a famous formula from queuing theory. Let *N* denote the average number of packets in the buffer plus the packet being transmitted. Let *a* denote the rate of packets arriving at the link. Let *d* denote the average total delay (i.e., the queuing delay plus the transmission delay) experienced by a packet. Little's formula is *<sup>N</sup>* <sup>=</sup> *<sup>a</sup>* # *<sup>d</sup>*. Suppose that on average, the buffer contains 100 packets, and the average packet queuing delay is 20 msec. The link's transmission rate is 100 packets/sec. Using Little's formula, what is the average packet arrival rate, assuming there is no packet loss? -- P17. a. Generalize Equation 1.2 in Section 1.4.3 for heterogeneous processing rates, transmission rates, and propagation delays. - - b. Repeat (a), but now also suppose that there is an average queuing delay of *d*queue at each node. -- P18. Perform a Traceroute between source and destination on the same continent at three different hours of the day. - - a. Find the average and standard deviation of the round-trip delays at each of the three hours. - - b. Find the number of routers in the path at each of the three hours. Did the paths change during any of the hours? - - c. Try to identify the number of ISP networks that the Traceroute packets pass through from source to destination. Routers with similar names and/ or similar IP addresses should be considered as part of the same ISP. In your experiments, do the largest delays occur at the peering interfaces between adjacent ISPs? - - d. Repeat the above for a source and destination on different continents. Compare the intra-continent and inter-continent results. - - - -{97}------------------------------------------------ - -- P19. Metcalfe's law states the value of a computer network is proportional to the square of the number of connected users of the system. Let n denote the number of users in a computer network. Assuming each user sends one message to each of the other users, how many messages will be sent? Does your answer support Metcalfe's law? -- P20. Consider the throughput example corresponding to Figure 1.20(b). Now suppose that there are *M* client-server pairs rather than 10. Denote *Rs*, *Rc*, and *R* for the rates of the server links, client links, and network link. Assume all other links have abundant capacity and that there is no other traffic in the network besides the traffic generated by the *M* client-server pairs. Derive a general expression for throughput in terms of *Rs*, *Rc*, *R*, and *M*. -- P21. Consider Figure 1.19(b). Now suppose that there are *M* paths between the server and the client. No two paths share any link. Path *k* (*k* = 1, c, *M*) consists of *N* links with transmission rates *R<sup>k</sup>* 1, *R<sup>k</sup>* 2, c, *R<sup>k</sup> <sup>N</sup>*. If the server can only use one path to send data to the client, what is the maximum throughput that the server can achieve? If the server can use all *M* paths to send data, what is the maximum throughput that the server can achieve? -- P22. Consider Figure 1.19(b). Suppose that each link between the server and the client has a packet loss probability *p,* and the packet loss probabilities for these links are independent. What is the probability that a packet (sent by the server) is successfully received by the receiver? If a packet is lost in the path from the server to the client, then the server will re-transmit the packet. On average, how many times will the server re-transmit the packet in order for the client to successfully receive the packet? -- P23. Consider Figure 1.19(a). Assume that we know the bottleneck link along the path from the server to the client is the first link with rate *Rs* bits/sec. Suppose we send a pair of packets back to back from the server to the client, and there is no other traffic on this path. Assume each packet of size *L* bits, and both links have the same propagation delay *d*prop*.* - - a. What is the packet inter-arrival time at the destination? That is, how much time elapses from when the last bit of the first packet arrives until the last bit of the second packet arrives? - - b. Now assume that the second link is the bottleneck link (i.e., *Rc* 6 *Rs*). Is it possible that the second packet queues at the input queue of the second link? Explain. Now suppose that the server sends the second packet *T* seconds after sending the first packet. How large must *T* be to ensure no queuing before the second link? Explain. -- P24. Suppose you would like to urgently deliver 50 terabytes data from Boston to Los Angeles. You have available a 100 Mbps dedicated link for data transfer. Would you prefer to transmit the data via this link or instead use FedEx overnight delivery? Explain. - -{98}------------------------------------------------ - -- P25. Suppose two hosts, A and B, are separated by 20,000 kilometers and are connected by a direct link of *R* = 5 Mbps. Suppose the propagation speed over the link is 2.5 # 108 meters/sec. - - a. Calculate the bandwidth-delay product, *<sup>R</sup>* # *<sup>d</sup>*prop. - - b. Consider sending a file of 800,000 bits from Host A to Host B. Suppose the file is sent continuously as one large message. What is the maximum number of bits that will be in the link at any given time? - - c. Provide an interpretation of the bandwidth-delay product. - - d. What is the width (in meters) of a bit in the link? Is it longer than a football field? - - e. Derive a general expression for the width of a bit in terms of the propagation speed *s,* the transmission rate *R,* and the length of the link *m*. -- P26. Referring to problem P24, suppose we can modify *R*. For what value of *R* is the width of a bit as long as the length of the link? -- P27. Consider problem P24 but now with a link of *R* = 500 Mbps. - - a. Calculate the bandwidth-delay product, *<sup>R</sup>* # *<sup>d</sup>*prop. - - b. Consider sending a file of 800,000 bits from Host A to Host B. Suppose the file is sent continuously as one big message. What is the maximum number of bits that will be in the link at any given time? - - c. What is the width (in meters) of a bit in the link? -- P28. Refer again to problem P24. - - a. How long does it take to send the file, assuming it is sent continuously? - - b. Suppose now the file is broken up into 20 packets with each packet containing 40,000 bits. Suppose that each packet is acknowledged by the receiver and the transmission time of an acknowledgment packet is negligible. Finally, assume that the sender cannot send a packet until the preceding one is acknowledged. How long does it take to send the file? - - c. Compare the results from (a) and (b). -- P29. Suppose there is a 10 Mbps microwave link between a geostationary satellite and its base station on Earth. Every minute the satellite takes a digital photo and sends it to the base station. Assume a propagation speed of 2.4 # 108 meters/sec. - - a. What is the propagation delay of the link? - - b. What is the bandwidth-delay product, *<sup>R</sup>* # *<sup>d</sup>*prop? - - c. Let *x* denote the size of the photo. What is the minimum value of *x* for the microwave link to be continuously transmitting? - -{99}------------------------------------------------ - -- P30. Consider the airline travel analogy in our discussion of layering in Section 1.5, and the addition of headers to protocol data units as they flow down the protocol stack. Is there an equivalent notion of header information that is added to passengers and baggage as they move down the airline protocol stack? -- P31. In modern packet-switched networks, including the Internet, the source host segments long, application-layer messages (for example, an image or a music file) into smaller packets and sends the packets into the network. The receiver then reassembles the packets back into the original message. We refer to this process as *message segmentation*. Figure 1.27 illustrates the end-to-end transport of a message with and without message segmentation. Consider a message that is 106 bits long that is to be sent from source to destination in Figure 1.27. Suppose each link in the figure is 5 Mbps. Ignore propagation, queuing, and processing delays. - - a. Consider sending the message from source to destination *without* message segmentation. How long does it take to move the message from the source host to the first packet switch? Keeping in mind that each switch uses store-and-forward packet switching, what is the total time to move the message from source host to destination host? - - b. Now suppose that the message is segmented into 100 packets, with each packet being 10,000 bits long. How long does it take to move the first packet from source host to the first switch? When the first packet is being sent from the first switch to the second switch, the second packet is being sent from the source host to the first switch. At what time will the second packet be fully received at the first switch? - - c. How long does it take to move the file from source host to destination host when message segmentation is used? Compare this result with your answer in part (a) and comment. - - - -**Figure 1.27** ♦ End-to-end message transport: (a) without message segmentation; (b) with message segmentation - -{100}------------------------------------------------ - -- d. In addition to reducing delay, what are reasons to use message segmentation? -- e. Discuss the drawbacks of message segmentation. -- P32. Experiment with the Message Segmentation interactive animation at the book's Web site. Do the delays in the interactive animation correspond to the delays in the previous problem? How do link propagation delays affect the overall end-to-end delay for packet switching (with message segmentation) and for message switching? -- P33. Consider sending a large file of *F* bits from Host A to Host B. There are three links (and two switches) between A and B, and the links are uncongested (that is, no queuing delays). Host A segments the file into segments of *S* bits each and adds 80 bits of header to each segment, forming packets of *L* = 80 + *S* bits. Each link has a transmission rate of *R* bps. Find the value of *S* that minimizes the delay of moving the file from Host A to Host B. Disregard propagation delay. -- P34. Skype offers a service that allows you to make a phone call from a PC to an ordinary phone. This means that the voice call must pass through both the Internet and through a telephone network. Discuss how this might be done. - -# **Wireshark Lab** - -*"Tell me and I forget. Show me and I remember. Involve me and I understand."* Chinese proverb - -One's understanding of network protocols can often be greatly deepened by seeing them in action and by playing around with them—observing the sequence of messages exchanged between two protocol entities, delving into the details of protocol operation, causing protocols to perform certain actions, and observing these actions and their consequences. This can be done in simulated scenarios or in a real network environment such as the Internet. The interactive animations at the textbook Web site take the first approach. In the Wireshark labs, we'll take the latter approach. You'll run network applications in various scenarios using a computer on your desk, at home, or in a lab. You'll observe the network protocols in your computer, interacting and exchanging messages with protocol entities executing elsewhere in the Internet. Thus, you and your computer will be an integral part of these live labs. You'll observe—and you'll learn—by doing. - -The basic tool for observing the messages exchanged between executing protocol entities is called a **packet sniffer**. As the name suggests, a packet sniffer passively copies (sniffs) messages being sent from and received by your computer; it also displays the contents of the various protocol fields of these captured messages. A screenshot of the Wireshark packet sniffer is shown in Figure 1.28. Wireshark is a - -{101}------------------------------------------------ - - - -**Figure 1.28** ♦ A Wireshark screenshot (Wireshark screenshot reprinted by permission of the Wireshark Foundation.) - -free packet sniffer that runs on Windows, Linux/Unix, and Mac computers. Throughout the textbook, you will find Wireshark labs that allow you to explore a number of the protocols studied in the chapter. In this first Wireshark lab, you'll obtain and install a copy of Wireshark, access a Web site, and capture and examine the protocol messages being exchanged between your Web browser and the Web server. - -You can find full details about this first Wireshark lab (including instructions about how to obtain and install Wireshark) at the Web site www.pearson.com/ cs-resources. - -{102}------------------------------------------------ - -# Leonard Kleinrock - -Leonard Kleinrock is a professor of computer science at the University of California, Los Angeles. In 1969, his computer at UCLA became the first node of the Internet. His creation of the mathematical theory of packet-switching principles in 1961 became the technology behind the Internet. He received his B.E.E. from the City College of New York (CCNY) and his masters and PhD in electrical engineering from MIT. - - - -Courtesy of Leonard Kleinrock - -#### What made you decide to specialize in networking/Internet technology? - -As a PhD student at MIT in 1959, I looked around and found that most of my classmates were doing research in the area of information theory and coding theory that had been established by the great researcher, Claude Shannon. I judged that he had solved most of the important problems already. The research problems that were left were hard and seemed to me to be of lesser consequence. So I decided to launch out in a new area that no one else had yet conceived of. Happily, at MIT I was surrounded by many computers, and it was clear to me that, sooner or later, these machines would need to communicate with each other. At the time, there was no effective way for them to do so and that the solution to this important problem would have impact. I had an approach to this problem and so, for my PhD research, I decided to create a mathematical theory to model, evaluate, design and optimize efficient and reliable data networks. - -#### What was your first job in the computer industry? What did it entail? - -I went to the evening session at CCNY from 1951 to 1957 for my bachelor's degree in electrical engineering. During the day, I worked first as a technician and then as an electrical engineer at a small, industrial electronics firm called *Photobell*. While there, I introduced digital technology to their product line. Essentially, we were using photoelectric devices to detect the presence of certain items (boxes, people, etc.) and the use of a circuit known then as a *bistable multivibrator* was just what we needed to bring digital processing into this field of detection. These circuits happen to be the building blocks for computers, and have come to be known as *flip-flops* or switches in today's vernacular. - -#### What was going through your mind when you sent the first host-to-host message (from UCLA to the Stanford Research Institute)? - -Frankly, we had no idea of the importance of that event. We had not prepared a special message of historic significance, as did so many inventors of the past (Samuel Morse with "What hath God wrought." or Alexander Graham Bell with "Watson, come here! I want you." or Neal Armstrong with "That's one small step for a man, one giant leap for mankind.") Those guys were *smart*! They understood media and public relations. All we wanted to do was to demonstrate our ability to remotely login to the SRI computer. So we typed the "L", - -{103}------------------------------------------------ - -which was correctly received, we typed the "o" which was correctly received, and then we typed the "g" which caused the SRI host computer to crash! So, it turned out that our message was the shortest and perhaps the most prophetic message ever, namely "Lo!" as in "Lo and behold!" - -Earlier that year, I was quoted in a UCLA press release saying that once the network was up and running, it would be possible to gain access to computer utilities from our homes and offices as easily as we gain access to electricity and telephone connectivity. So my vision at that time was that the Internet would be ubiquitous, always on, always available, anyone with any device could connect from any location, and it would be invisible. However, I never anticipated that my 99-year-old mother would use the Internet at the same time that my 5 year-old granddaughter was—and indeed she did! - -#### What is your vision for the future of networking? - -The easy part of the vision is to predict the *infrastructure* itself. I anticipate that we will see considerable deployment of wireless and mobile devices in smart spaces to produce what I like to refer to as the Invisible Internet. This step will enable us to move out from the netherworld of cyberspace to the physical world of smart spaces. Our environments (desks, walls, vehicles, watches, belts, fingernails, bodies and so on) will come alive with technology, through actuators, sensors, logic, processing, storage, cameras, microphones, speakers, displays, and communication. This embedded technology will allow our environment to provide the IP services wherever and whenever we want. When I walk into a room, the room will know I entered. I will be able to communicate with my environment naturally, as in spoken English, haptics, gestures, and eventually through brain-Internet interfaces; my requests will generate replies that present Web pages to me from wall displays, through my eyeglasses, as speech, holograms, and so forth. Looking a bit further out, I see a networking future that includes the following additional key components. I see customized intelligent software agents deployed across the network whose function it is to mine data, act on that data, observe trends, and carry out tasks dynamically and adaptively. I see the deployment of blockchain technology that provides irrefutable, immutable distributed ledgers coupled with reputation systems that provide credibility to the contents and functionality. I see considerably more network traffic generated not so much by humans, but by the embedded devices, the intelligent software agents and the distributed ledgers. I see large collections of self-organizing systems controlling this vast, fast network. I see huge amounts of information flashing across this network instantaneously with this information undergoing enormous processing and filtering. The Invisible Internet will essentially be a pervasive global nervous system . I see all these things and more as we move headlong through the twenty-first century. - -The harder part of the vision is to predict the *applications and services,* which have consistently surprised us in dramatic ways (e-mail, search technologies, the World Wide Web, blogs, peer-to-peer networks, social networks, user generated content, sharing of - -{104}------------------------------------------------ - -music, photos, and videos, etc.). These applications have "come of the blue", sudden, unanticipated and explosive. What a wonderful world for the next generation to explore! - -#### What people have inspired you professionally? - -By far, it was Claude Shannon from MIT, a brilliant researcher who had the ability to relate his mathematical ideas to the physical world in highly intuitive ways. He was a superb member of my PhD thesis committee. - -#### Do you have any advice for students entering the networking/Internet field? - -The Internet and all that it enables is a vast new frontier, continuously full of amazing challenges. There is room for great innovation. Don't be constrained by today's technology. Reach out and imagine what could be and then make it happen. - -{105}------------------------------------------------ diff --git a/generated/computer-networking-a-top-down-approach-8ed/2.md b/generated/computer-networking-a-top-down-approach-8ed/2.md index 72048ab..800d015 100644 --- a/generated/computer-networking-a-top-down-approach-8ed/2.md +++ b/generated/computer-networking-a-top-down-approach-8ed/2.md @@ -1469,302 +1469,3 @@ In Section 2.1, we described the service models that TCP and UDP offer to applic Equipped with knowledge about Internet application structure and applicationlevel protocols, we're now ready to head further down the protocol stack and examine the transport layer in Chapter 3. {190}------------------------------------------------ - -# **Homework Problems and Questions** - -#### **Chapter 2 Review Questions** - -#### SECTION 2.1 - -- R1. List five nonproprietary Internet applications and the application-layer protocols that they use. -- R2. What is the difference between network architecture and application architecture? -- R3. For a communication session between a pair of processes, which process is the client and which is the server? -- R4. For a P2P file-sharing application, do you agree with the statement, "There is no notion of client and server sides of a communication session"? Why or why not? -- R5. What information is used by a process running on one host to identify a process running on another host? -- R6. Suppose you wanted to do a transaction from a remote client to a server as fast as possible. Would you use UDP or TCP? Why? -- R7. Referring to Figure 2.4, we see that none of the applications listed in Figure 2.4 requires both no data loss and timing. Can you conceive of an application that requires no data loss and that is also highly time-sensitive? -- R8. List the four broad classes of services that a transport protocol can provide. For each of the service classes, indicate if either UDP or TCP (or both) provides such a service. -- R9. Recall that TCP can be enhanced with TLS to provide process-to-process security services, including encryption. Does TLS operate at the transport layer or the application layer? If the application developer wants TCP to be enhanced with TLS, what does the developer have to do? - -#### SECTIONS 2.2–2.5 - -- R10. What is meant by a handshaking protocol? -- R11. Why do HTTP, SMTP, and IMAP run on top of TCP rather than on UDP? -- R12. Consider an e-commerce site that wants to keep a purchase record for each of its customers. Describe how this can be done with cookies. -- R13. Describe how Web caching can reduce the delay in receiving a requested object. Will Web caching reduce the delay for all objects requested by a user or for only some of the objects? Why? -- R14. Telnet into a Web server and send a multiline request message. Include in the request message the If-modified-since: header line to force a response message with the 304 Not Modified status code. -- R15. List several popular messaging apps. Do they use the same protocols as SMS? - -{191}------------------------------------------------ - -- R16. Suppose Alice, with a Web-based e-mail account (such as Hotmail or Gmail), sends a message to Bob, who accesses his mail from his mail server using IMAP. Discuss how the message gets from Alice's host to Bob's host. Be sure to list the series of application-layer protocols that are used to move the message between the two hosts. -- R17. Print out the header of an e-mail message you have recently received. How many Received: header lines are there? Analyze each of the header lines in the message. -- R18. What is the HOL blocking issue in HTTP/1.1? How does HTTP/2 attempt to solve it? -- R19. Is it possible for an organization's Web server and mail server to have exactly the same alias for a hostname (for example, foo.com)? What would be the type for the RR that contains the hostname of the mail server? -- R20. Look over your received e-mails, and examine the header of a message sent from a user with a .edu e-mail address. Is it possible to determine from the header the IP address of the host from which the message was sent? Do the same for a message sent from a Gmail account. - -#### SECTION 2.5 - -- R21. In BitTorrent, suppose Alice provides chunks to Bob throughout a 30-second interval. Will Bob necessarily return the favor and provide chunks to Alice in this same interval? Why or why not? -- R22. Consider a new peer Alice that joins BitTorrent without possessing any chunks. Without any chunks, she cannot become a top-four uploader for any of the other peers, since she has nothing to upload. How then will Alice get her first chunk? -- R23. What is an overlay network? Does it include routers? What are the edges in the overlay network? - -#### SECTION 2.6 - -- R24. CDNs typically adopt one of two different server placement philosophies. Name and briefly describe them. -- R25. Besides network-related considerations such as delay, loss, and bandwidth performance, there are other important factors that go into designing a CDN server selection strategy. What are they? - -#### SECTION 2.7 - -R26. In Section 2.7, the UDP server described needed only one socket, whereas the TCP server needed two sockets. Why? If the TCP server were to support *n* simultaneous connections, each from a different client host, how many sockets would the TCP server need? - -{192}------------------------------------------------ - -R27. For the client-server application over TCP described in Section 2.7, why must the server program be executed before the client program? For the client-server application over UDP, why may the client program be executed before the server program? - -# **Problems** - -#### P1. True or false? - -- a. A user requests a Web page that consists of some text and three images. For this page, the client will send one request message and receive four response messages. -- b. Two distinct Web pages (for example, www.mit.edu/research .html and www.mit.edu/students.html) can be sent over the same persistent connection. -- c. With nonpersistent connections between browser and origin server, it is possible for a single TCP segment to carry two distinct HTTP request messages. -- d. The Date: header in the HTTP response message indicates when the object in the response was last modified. -- e. HTTP response messages never have an empty message body. -- P2. SMS, iMessage, Wechat, and WhatsApp are all smartphone real-time messaging systems. After doing some research on the Internet, for each of these systems write one paragraph about the protocols they use. Then write a paragraph explaining how they differ. -- P3. Consider an HTTP client that wants to retrieve a Web document at a given URL. The IP address of the HTTP server is initially unknown. What transport and application-layer protocols besides HTTP are needed in this scenario? -- P4. Consider the following string of ASCII characters that were captured by Wireshark when the browser sent an HTTP GET message (i.e., this is the actual content of an HTTP GET message). The characters *<cr><lf>* are carriage return and line-feed characters (that is, the italized character string *<cr>* in the text below represents the single carriage-return character that was contained at that point in the HTTP header). Answer the following questions, indicating where in the HTTP GET message below you find the answer. - -``` -GET /cs453/index.html HTTP/1.1<cr><lf>Host: gai -a.cs.umass.edu<cr><lf>User-Agent: Mozilla/5.0 ( -Windows;U; Windows NT 5.1; en-US; rv:1.7.2) Gec -ko/20040804 Netscape/7.2 (ax) <cr><lf>Accept:ex -t/xml, application/xml, application/xhtml+xml, text -/html;q=0.9, text/plain;q=0.8,image/png,*/*;q=0.5 -``` - -{193}------------------------------------------------ - -``` -<cr><lf>Accept-Language: en-us,en;q=0.5<cr><lf>Accept- -Encoding: zip,deflate<cr><lf>Accept-Charset: ISO --8859-1,utf-8;q=0.7,*;q=0.7<cr><lf>Keep-Alive: 300<cr> -<lf>Connection:keep-alive<cr><lf><cr><lf> -``` - -- a. What is the URL of the document requested by the browser? -- b. What version of HTTP is the browser running? -- c. Does the browser request a non-persistent or a persistent connection? -- d. What is the IP address of the host on which the browser is running? -- e. What type of browser initiates this message? Why is the browser type needed in an HTTP request message? -- P5. The text below shows the reply sent from the server in response to the HTTP GET message in the question above. Answer the following questions, indicating where in the message below you find the answer. - -``` -HTTP/1.1 200 OK<cr><lf>Date: Tue, 07 Mar 2008 -12:39:45GMT<cr><lf>Server: Apache/2.0.52 (Fedora) -<cr><lf>Last-Modified: Sat, 10 Dec2005 18:27:46 -GMT<cr><lf>ETag: "526c3-f22-a88a4c80"<cr><lf>Accept- -Ranges: bytes<cr><lf>Content-Length: 3874<cr><lf> -Keep-Alive: timeout=max=100<cr><lf>Connection: -Keep-Alive<cr><lf>Content-Type: text/html; charset= -ISO-8859-1<cr><lf><cr><lf><!doctype html public "- -//w3c//dtd html 4.0transitional//en"><lf><html><lf> -<head><lf> <meta http-equiv="Content-Type" -content="text/html; charset=iso-8859-1"><lf> <meta -name="GENERATOR" content="Mozilla/4.79 [en] (Windows NT -5.0; U) Netscape]"><lf> <title>CMPSCI 453 / 591 / -NTU-ST550ASpring 2005 homepage</title><lf></head><lf> -<much more document text following here (not shown)> -``` - -- a. Was the server able to successfully find the document or not? What time was the document reply provided? -- b. When was the document last modified? -- c. How many bytes are there in the document being returned? -- d. What are the first 5 bytes of the document being returned? Did the server agree to a persistent connection? -- P6. Obtain the HTTP/1.1 specification (RFC 2616). Answer the following questions: - - a. Explain the mechanism used for signaling between the client and server to indicate that a persistent connection is being closed. Can the client, the server, or both signal the close of a connection? - -{194}------------------------------------------------ - -- b. What encryption services are provided by HTTP? -- c. Can a client open three or more simultaneous connections with a given server? -- d. Either a server or a client may close a transport connection between them if either one detects the connection has been idle for some time. Is it possible that one side starts closing a connection while the other side is transmitting data via this connection? Explain. -- P7. Suppose within your Web browser you click on a link to obtain a Web page. The IP address for the associated URL is not cached in your local host, so a DNS lookup is necessary to obtain the IP address. Suppose that *n* DNS servers are visited before your host receives the IP address from DNS; the successive visits incur an RTT of RTT1, . . . , RTT*n*. Further suppose that the Web page associated with the link contains exactly one object, consisting of a small amount of HTML text. Let RTT0 denote the RTT between the local host and the server containing the object. Assuming zero transmission time of the object, how much time elapses from when the client clicks on the link until the client receives the object? -- P8. Referring to Problem P7, suppose the HTML file references eight very small objects on the same server. Neglecting transmission times, how much time elapses with - - a. Non-persistent HTTP with no parallel TCP connections? - - b. Non-persistent HTTP with the browser configured for 6 parallel connections? - - c. Persistent HTTP? -- P9. Consider Figure 2.12, for which there is an institutional network connected to the Internet. Suppose that the average object size is 1,000,000 bits and that the average request rate from the institution's browsers to the origin servers is 16 requests per second. Also suppose that the amount of time it takes from when the router on the Internet side of the access link forwards an HTTP request until it receives the response is three seconds on average (see Section 2.2.5). Model the total average response time as the sum of the average access delay (that is, the delay from Internet router to institution router) and the average Internet delay. For the average access delay, use ∆/(1 - ∆b), where ∆ is the average time required to send an object over the access link and b is the arrival rate of objects to the access link. - - a. Find the total average response time. - - b. Now suppose a cache is installed in the institutional LAN. Suppose the miss rate is 0.4. Find the total response time. -- P10. Consider a short, 10-meter link, over which a sender can transmit at a rate of 150 bits/sec in both directions. Suppose that packets containing data are 100,000 bits long, and packets containing only control (e.g., ACK or - -{195}------------------------------------------------ - -- handshaking) are 200 bits long. Assume that *N* parallel connections each get 1/*N* of the link bandwidth. Now consider the HTTP protocol, and suppose that each downloaded object is 100 Kbits long, and that the initial downloaded object contains 10 referenced objects from the same sender. Would parallel downloads via parallel instances of non-persistent HTTP make sense in this case? Now consider persistent HTTP. Do you expect significant gains over the non-persistent case? Justify and explain your answer. -- P11. Consider the scenario introduced in the previous problem. Now suppose that the link is shared by Bob with four other users. Bob uses parallel instances of non-persistent HTTP, and the other four users use non-persistent HTTP without parallel downloads. - - a. Do Bob's parallel connections help him get Web pages more quickly? Why or why not? - - b. If all five users open five parallel instances of non-persistent HTTP, then would Bob's parallel connections still be beneficial? Why or why not? -- P12. Write a simple TCP program for a server that accepts lines of input from a client and prints the lines onto the server's standard output. (You can do this by modifying the TCPServer.py program in the text.) Compile and execute your program. On any other machine that contains a Web browser, set the proxy server in the browser to the host that is running your server program; also configure the port number appropriately. Your browser should now send its GET request messages to your server, and your server should display the messages on its standard output. Use this platform to determine whether your browser generates conditional GET messages for objects that are locally cached. -- P13. Consider sending over HTTP/2 a Web page that consists of one video clip, and five images. Suppose that the video clip is transported as 2000 frames, and each image has three frames. - - a. If all the video frames are sent first without interleaving, how many "frame times" are needed until all five images are sent? - - b. If frames are interleaved, how many frame times are needed until all five images are sent. -- P14. Consider the Web page in problem 13. Now HTTP/2 prioritization is employed. Suppose all the images are given priority over the video clip, and that the first image is given priority over the second image, the second image over the third image, and so on. How many frame times will be needed until the second image is sent? -- P15. What is the difference between MAIL FROM: in SMTP and From: in the mail message itself? -- P16. How does SMTP mark the end of a message body? How about HTTP? Can HTTP use the same method as SMTP to mark the end of a message body? Explain. - -{196}------------------------------------------------ - -P17. Read RFC 5321 for SMTP. What does MTA stand for? Consider the following received spam e-mail (modified from a real spam e-mail). Assuming only the originator of this spam e-mail is malicious and all other hosts are honest, identify the malacious host that has generated this spam e-mail. - -``` -From - Fri Nov 07 13:41:30 2008 -Return-Path: <tennis5@pp33head.com> -Received: from barmail.cs.umass.edu (barmail.cs.umass. -edu -[128.119.240.3]) by cs.umass.edu (8.13.1/8.12.6) for -<hg@cs.umass.edu>; Fri, 7 Nov 2008 13:27:10 -0500 -Received: from asusus-4b96 (localhost [127.0.0.1]) by -barmail.cs.umass.edu (Spam Firewall) for <hg@cs.umass. -edu>; Fri, 7 -Nov 2008 13:27:07 -0500 (EST) -Received: from asusus-4b96 ([58.88.21.177]) by barmail. -cs.umass.edu -for <hg@cs.umass.edu>; Fri, 07 Nov 2008 13:27:07 -0500 -(EST) -Received: from [58.88.21.177] by inbnd55.exchangeddd. -com; Sat, 8 -Nov 2008 01:27:07 +0700 -From: "Jonny" <tennis5@pp33head.com> -To: <hg@cs.umass.edu> -Subject: How to secure your savings -``` - -- P18. a. What is a *whois* database? - - b. Use various whois databases on the Internet to obtain the names of two DNS servers. Indicate which whois databases you used. - - c. Use nslookup on your local host to send DNS queries to three DNS servers: your local DNS server and the two DNS servers you found in part (b). Try querying for Type A, NS, and MX reports. Summarize your findings. - - d. Use nslookup to find a Web server that has multiple IP addresses. Does the Web server of your institution (school or company) have multiple IP addresses? - - e. Use the ARIN whois database to determine the IP address range used by your university. - - f. Describe how an attacker can use whois databases and the nslookup tool to perform reconnaissance on an institution before launching an attack. - - g. Discuss why whois databases should be publicly available. - -{197}------------------------------------------------ - -- P19. In this problem, we use the useful *dig* tool available on Unix and Linux hosts to explore the hierarchy of DNS servers. Recall that in Figure 2.19, a DNS server in the DNS hierarchy delegates a DNS query to a DNS server lower in the hierarchy, by sending back to the DNS client the name of that lower-level DNS server. First read the man page for *dig*, and then answer the following questions. - - a. Starting with a root DNS server (from one of the root servers [a-m]. root-servers.net), initiate a sequence of queries for the IP address for your department's Web server by using *dig.* Show the list of the names of DNS servers in the delegation chain in answering your query. - - b. Repeat part (a) for several popular Web sites, such as google.com, yahoo .com, or amazon.com. -- P20. Suppose you can access the caches in the local DNS servers of your department. Can you propose a way to roughly determine the Web servers (outside your department) that are most popular among the users in your department? Explain. -- P21. Suppose that your department has a local DNS server for all computers in the department. You are an ordinary user (i.e., not a network/system administrator). Can you determine if an external Web site was likely accessed from a computer in your department a couple of seconds ago? Explain. -- P22. Consider distributing a file of *F* = 20 Gbits to *N* peers. The server has an upload rate of *us* = 30 Mbps, and each peer has a download rate of *di* = 2 Mbps and an upload rate of *u*. For *N* = 10, 100, and 1,000 and *u* = 300 Kbps, 700 Kbps, and 2 Mbps, prepare a chart giving the minimum distribution time for each of the combinations of *N* and *u* for both clientserver distribution and P2P distribution. -- P23. Consider distributing a file of *F* bits to *N* peers using a client-server architecture. Assume a fluid model where the server can simultaneously transmit to multiple peers, transmitting to each peer at different rates, as long as the combined rate does not exceed *us*. - - a. Suppose that *us*/*N* … *d*min. Specify a distribution scheme that has a distribution time of *NF*/*us*. - - b. Suppose that *us*/*N* Ú *d*min. Specify a distribution scheme that has a distribution time of *F*/*d*min. - - c. Conclude that the minimum distribution time is in general given by max5*NF*/*us*, *F*/*d*min6. -- P24. Consider distributing a file of *F* bits to *N* peers using a P2P architecture. Assume a fluid model. For simplicity assume that *d*min is very large, so that peer download bandwidth is never a bottleneck. - - a. Suppose that *us* … (*us* + *u*<sup>1</sup> + . . . + *uN*)/*N*. Specify a distribution scheme that has a distribution time of *F*/*us*. - -{198}------------------------------------------------ - -- b. Suppose that *us* Ú (*us* + *u*<sup>1</sup> + . . . + *uN*)/*N*. Specify a distribution scheme that has a distribution time of *NF*/(*us* + *u*<sup>1</sup> + . . . + *uN*). -- c. Conclude that the minimum distribution time is in general given by max5*F*/*us*, *NF*/(*us* + *u*<sup>1</sup> + . . . + *uN*)6. -- P25. Consider an overlay network with *N* active peers, with each pair of peers having an active TCP connection. Additionally, suppose that the TCP connections pass through a total of *M* routers. How many nodes and edges are there in the corresponding overlay network? -- P26. Suppose Bob joins a BitTorrent torrent, but he does not want to upload any data to any other peers (so called free-riding). - - a. Bob claims that he can receive a complete copy of the file that is shared by the swarm. Is Bob's claim possible? Why or why not? - - b. Bob further claims that he can further make his "free-riding" more efficient by using a collection of multiple computers (with distinct IP addresses) in the computer lab in his department. How can he do that? -- P27. Consider a DASH system for which there are *N* video versions (at *N* different rates and qualities) and *N* audio versions (at *N* different rates and qualities). Suppose we want to allow the player to choose at any time any of the *N* video versions and any of the *N* audio versions. - - a. If we create files so that the audio is mixed in with the video, so server sends only one media stream at given time, how many files will the server need to store (each a different URL)? - - b. If the server instead sends the audio and video streams separately and has the client synchronize the streams, how many files will the server need to store? -- P28. Install and compile the Python programs TCPClient and UDPClient on one host and TCPServer and UDPServer on another host. - - a. Suppose you run TCPClient before you run TCPServer. What happens? Why? - - b. Suppose you run UDPClient before you run UDPServer. What happens? Why? - - c. What happens if you use different port numbers for the client and server sides? -- P29. Suppose that in UDPClient.py, after we create the socket, we add the line: clientSocket.bind(('', 5432)) - -Will it become necessary to change UDPServer.py? What are the port numbers for the sockets in UDPClient and UDPServer? What were they before making this change? - -{199}------------------------------------------------ - -- P30. Can you configure your browser to open multiple simultaneous connections to a Web site? What are the advantages and disadvantages of having a large number of simultaneous TCP connections? -- P31. We have seen that Internet TCP sockets treat the data being sent as a byte stream but UDP sockets recognize message boundaries. What are one advantage and one disadvantage of byte-oriented API versus having the API explicitly recognize and preserve application-defined message boundaries? -- P32. What is the Apache Web server? How much does it cost? What functionality does it currently have? You may want to look at Wikipedia to answer this question. - -# **Socket Programming Assignments** - -The Companion Website includes six socket programming assignments. The first four assignments are summarized below. The fifth assignment makes use of the ICMP protocol and is summarized at the end of Chapter 5. It is highly recommended that students complete several, if not all, of these assignments. Students can find full details of these assignments, as well as important snippets of the Python code, at the Web site www.pearsonhighered.com/cs-resources. - -# **Assignment 1: Web Server** - -In this assignment, you will develop a simple Web server in Python that is capable of processing only one request. Specifically, your Web server will (i) create a connection socket when contacted by a client (browser); (ii) receive the HTTP request from this connection; (iii) parse the request to determine the specific file being requested; (iv) get the requested file from the server's file system; (v) create an HTTP response message consisting of the requested file preceded by header lines; and (vi) send the response over the TCP connection to the requesting browser. If a browser requests a file that is not present in your server, your server should return a "404 Not Found" error message. - -In the Companion Website, we provide the skeleton code for your server. Your job is to complete the code, run your server, and then test your server by sending requests from browsers running on different hosts. If you run your server on a host that already has a Web server running on it, then you should use a different port than port 80 for your Web server. - -# **Assignment 2: UDP Pinger** - -In this programming assignment, you will write a client ping program in Python. Your client will send a simple ping message to a server, receive a corresponding pong message back from the server, and determine the delay between when the client - -{200}------------------------------------------------ - -sent the ping message and received the pong message. This delay is called the Round Trip Time (RTT). The functionality provided by the client and server is similar to the functionality provided by standard ping program available in modern operating systems. However, standard ping programs use the Internet Control Message Protocol (ICMP) (which we will study in Chapter 5). Here we will create a nonstandard (but simple!) UDP-based ping program. - -Your ping program is to send 10 ping messages to the target server over UDP. For each message, your client is to determine and print the RTT when the corresponding pong message is returned. Because UDP is an unreliable protocol, a packet sent by the client or server may be lost. For this reason, the client cannot wait indefinitely for a reply to a ping message. You should have the client wait up to one second for a reply from the server; if no reply is received, the client should assume that the packet was lost and print a message accordingly. - -In this assignment, you will be given the complete code for the server (available in the Companion Website). Your job is to write the client code, which will be very similar to the server code. It is recommended that you first study carefully the server code. You can then write your client code, liberally cutting and pasting lines from the server code. - -# **Assignment 3: Mail Client** - -The goal of this programming assignment is to create a simple mail client that sends e-mail to any recipient. Your client will need to establish a TCP connection with a mail server (e.g., a Google mail server), dialogue with the mail server using the SMTP protocol, send an e-mail message to a recipient (e.g., your friend) via the mail server, and finally close the TCP connection with the mail server. - -For this assignment, the Companion Website provides the skeleton code for your client. Your job is to complete the code and test your client by sending e-mail to different user accounts. You may also try sending through different servers (for example, through a Google mail server and through your university mail server). - -# **Assignment 4: Web Proxy** - -In this assignment, you will develop a Web proxy. When your proxy receives an HTTP request for an object from a browser, it generates a new HTTP request for the same object and sends it to the origin server. When the proxy receives the corresponding HTTP response with the object from the origin server, it creates a new HTTP response, including the object, and sends it to the client. - -For this assignment, the Companion Website provides the skeleton code for the proxy server. Your job is to complete the code, and then test it by having different browsers request Web objects via your proxy. - -{201}------------------------------------------------ - -# **Wireshark Lab: HTTP** - -Having gotten our feet wet with the Wireshark packet sniffer in Lab 1, we're now ready to use Wireshark to investigate protocols in operation. In this lab, we'll explore several aspects of the HTTP protocol: the basic GET/reply interaction, HTTP message formats, retrieving large HTML files, retrieving HTML files with embedded URLs, persistent and non-persistent connections, and HTTP authentication and security. - -As is the case with all Wireshark labs, the full description of this lab is available at this book's Web site, www.pearsonhighered.com/cs-resources. - -# **Wireshark Lab: DNS** - -In this lab, we take a closer look at the client side of the DNS, the protocol that translates Internet hostnames to IP addresses. Recall from Section 2.5 that the client's role in the DNS is relatively simple—a client sends a query to its local DNS server and receives a response back. Much can go on under the covers, invisible to the DNS clients, as the hierarchical DNS servers communicate with each other to either recursively or iteratively resolve the client's DNS query. From the DNS client's standpoint, however, the protocol is quite simple—a query is formulated to the local DNS server and a response is received from that server. We observe DNS in action in this lab. - -As is the case with all Wireshark labs, the full description of this lab is available at this book's Web site, www.pearsonhighered.com/cs-resources. - -{202}------------------------------------------------ - -# **Tim Berners-Lee** - -Sir Tim Berners-Lee is known as the inventor of the World Wide Web. In 1989, while working as a fellow at CERN, he proposed an Internet-based distributed information management system including the original version of the HTTP protocol. In the same year he successfully implemented his design on a client and server. He received the 2016 Turing award for "inventing the World Wide Web, the first Web browser, and the fundamental protocols and algorithms allowing the Web to scale." He is the Co-Founder of the World Wide Web Foundation, and currently is a Professorial Fellow of Computer Science at the University of Oxford and a professor at CSAIL at MIT. - - - -Courtesy of Tim Berners-Lee - -#### You originally studied physics. How is networking similar to physics? - -When you study physics, you imagine what rules of behavior on the very small scale could possibly give rise to the large-scale world as we see it. When you design a global system like the Web, you try to invent rules of behavior of Web pages and links and things that could in the large create a large-scale world as we would like it. One is analysis and the other synthesis, but they are very similar. - -#### What influenced you to specialize in networking? - -After my physics degree, the telecommunications research companies seemed to be the most interesting places. The microprocessor had just come out, and telecommunications was switching very fast from hardwired logic to microprocessor-based systems. It was very exciting. - -#### What is the most challenging part of your job? - -When two groups disagree strongly about something, but want in the end to achieve a common goal, finding exactly what they each mean and where the misunderstandings are can be very demanding. The chair of any working group knows that. However, this is what it takes to make progress toward consensus on a large scale. - -{203}------------------------------------------------ - -#### What people have inspired you professionally? - -My parents, who were involved in the early days of computing, gave me a fascination with the whole subject. Mike Sendall and Peggie Rimmer, for whom I worked at various times at CERN are among the people who taught me and encouraged me. I later learned to admire the people, including Vanevar Bush, Doug Englebart, and Ted Nelson, who had had similar dreams in their time but had not had the benefit of the existence for PCs and the Internet to be able to realize it. - -{204}------------------------------------------------ - -{205}------------------------------------------------ diff --git a/generated/computer-networking-a-top-down-approach-8ed/3.md b/generated/computer-networking-a-top-down-approach-8ed/3.md index 3098a12..d7703c9 100644 --- a/generated/computer-networking-a-top-down-approach-8ed/3.md +++ b/generated/computer-networking-a-top-down-approach-8ed/3.md @@ -1494,312 +1494,3 @@ In Section 3.6, we examined congestion control from a broad perspective, and in that try to determine TCP's sending rate rate more quickly than classic TCP, use a delay-based approach or explicit congestion notification from the network (rather than a loss-based approach) to determine TCP's sending rate. We also examined in some depth the impact of TCP connection establishment and slow start on latency. We observed that in many important scenarios, connection establishment and slow start significantly contribute to end-to-end delay. We emphasize once more that while TCP congestion control has evolved over the years, it remains an area of intensive research and will likely continue to evolve in the upcoming years. To wrap up this chapter, in Section 3.8, we studied recent developments in implementing many of the transport layer's functions—reliable data transfer, congestion control, connection establishment, and more—in the application layer using the QUIC protocol. In Chapter 1, we said that a computer network can be partitioned into the "network edge" and the "network core." The network edge covers everything that happens in the end systems. Having now covered the application layer and the transport layer, our discussion of the network edge is complete. It is time to explore the network core! This journey begins in the next two chapters, where we'll study the network layer, and continues into Chapter 6, where we'll study the link layer. - -# **Homework Problems and Questions** - -# **Chapter 3 Review Questions** - -SECTIONS 3.1–3.3 - -- R1. Suppose the network layer provides the following service. The network layer in the source host accepts a segment of maximum size 1,200 bytes and a destination host address from the transport layer. The network layer then guarantees to deliver the segment to the transport layer at the destination host. Suppose many network application processes can be running at the destination host. - - a. Design the simplest possible transport-layer protocol that will get application data to the desired process at the destination host. Assume the operating system in the destination host has assigned a 4-byte port number to each running application process. - - b. Modify this protocol so that it provides a "return address" to the destination process. - - c. In your protocols, does the transport layer "have to do anything" in the core of the computer network? - -{309}------------------------------------------------ - -- R2. Consider a planet where everyone belongs to a family of six, every family lives in its own house, each house has a unique address, and each person in a given house has a unique name. Suppose this planet has a mail service that delivers letters from source house to destination house. The mail service requires that (1) the letter be in an envelope, and that (2) the address of the destination house (and nothing more) be clearly written on the envelope. Suppose each family has a delegate family member who collects and distributes letters for the other family members. The letters do not necessarily provide any indication of the recipients of the letters. - - a. Using the solution to Problem R1 above as inspiration, describe a protocol that the delegates can use to deliver letters from a sending family member to a receiving family member. - - b. In your protocol, does the mail service ever have to open the envelope and examine the letter in order to provide its service? -- R3. Consider a TCP connection between Host A and Host B. Suppose that the TCP segments traveling from Host A to Host B have source port number *x* and destination port number *y*. What are the source and destination port numbers for the segments traveling from Host B to Host A? -- R4. Describe why an application developer might choose to run an application over UDP rather than TCP. -- R5. Why is it that voice and video traffic is often sent over TCP rather than UDP in today's Internet? (*Hint*: The answer we are looking for has nothing to do with TCP's congestion-control mechanism.) -- R6. Is it possible for an application to enjoy reliable data transfer even when the application runs over UDP? If so, how? -- R7. Suppose a process in Host C has a UDP socket with port number 6789. Suppose both Host A and Host B each send a UDP segment to Host C with destination port number 6789. Will both of these segments be directed to the same socket at Host C? If so, how will the process at Host C know that these two segments originated from two different hosts? -- R8. Suppose that a Web server runs in Host C on port 80. Suppose this Web server uses persistent connections, and is currently receiving requests from two different Hosts, A and B. Are all of the requests being sent through the same socket at Host C? If they are being passed through different sockets, do both of the sockets have port 80? Discuss and explain. - -#### SECTION 3.4 - -- R9. In our rdt protocols, why did we need to introduce sequence numbers? -- R10. In our rdt protocols, why did we need to introduce timers? - -{310}------------------------------------------------ - -- R11. Suppose that the roundtrip delay between sender and receiver is constant and known to the sender. Would a timer still be necessary in protocol rdt 3.0, assuming that packets can be lost? Explain. -- R12. Visit the Go-Back-N interactive animation at the companion Web site. - - a. Have the source send five packets, and then pause the animation before any of the five packets reach the destination. Then kill the first packet and resume the animation. Describe what happens. - - b. Repeat the experiment, but now let the first packet reach the destination and kill the first acknowledgment. Describe again what happens. - - c. Finally, try sending six packets. What happens? -- R13. Repeat R12, but now with the Selective Repeat interactive animation. How are Selective Repeat and Go-Back-N different? - -#### SECTION 3.5 - -#### R14. True or false? - -- a. Host A is sending Host B a large file over a TCP connection. Assume Host B has no data to send Host A. Host B will not send acknowledgments to Host A because Host B cannot piggyback the acknowledgments on data. -- b. The size of the TCP rwnd never changes throughout the duration of the connection. -- c. Suppose Host A is sending Host B a large file over a TCP connection. The number of unacknowledged bytes that A sends cannot exceed the size of the receive buffer. -- d. Suppose Host A is sending a large file to Host B over a TCP connection. If the sequence number for a segment of this connection is *m*, then the sequence number for the subsequent segment will necessarily be *m* + 1. -- e. The TCP segment has a field in its header for rwnd. -- f. Suppose that the last SampleRTT in a TCP connection is equal to 1 sec. The current value of TimeoutInterval for the connection will necessarily be Ú 1 sec. -- g. Suppose Host A sends one segment with sequence number 38 and 4 bytes of data over a TCP connection to Host B. In this same segment, the acknowledgment number is necessarily 42. -- R15. Suppose Host A sends two TCP segments back to back to Host B over a TCP connection. The first segment has sequence number 90; the second has sequence number 110. - - a. How much data is in the first segment? - - b. Suppose that the first segment is lost but the second segment arrives at B. In the acknowledgment that Host B sends to Host A, what will be the acknowledgment number? - -{311}------------------------------------------------ - -R16. Consider the Telnet example discussed in Section 3.5. A few seconds after the user types the letter 'C,' the user types the letter 'R.' After typing the letter 'R,' how many segments are sent, and what is put in the sequence number and acknowledgment fields of the segments? - -#### SECTION 3.7 - -- R17. Suppose two TCP connections are present over some bottleneck link of rate *R* bps. Both connections have a huge file to send (in the same direction over the bottleneck link). The transmissions of the files start at the same time. What transmission rate would TCP like to give to each of the connections? -- R18. True or false? Consider congestion control in TCP. When the timer expires at the sender, the value of ssthresh is set to one half of its previous value. -- R19. In the discussion of TCP splitting in the sidebar in Section 3.7, it was claimed that the response time with TCP splitting is approximately <sup>4</sup> # RTTFE <sup>+</sup> RTTBE <sup>+</sup> processing time. Justify this claim. - -# **Problems** - -- P1. Suppose Client A initiates a Telnet session with Server S. At about the same time, Client B also initiates a Telnet session with Server S. Provide possible source and destination port numbers for - - a. The segments sent from A to S. - - b. The segments sent from B to S. - - c. The segments sent from S to A. - - d. The segments sent from S to B. - - e. If A and B are different hosts, is it possible that the source port number in the segments from A to S is the same as that from B to S? - - f. How about if they are the same host? -- P2. Consider Figure 3.5. What are the source and destination port values in the segments flowing from the server back to the clients' processes? What are the IP addresses in the network-layer datagrams carrying the transport-layer segments? -- P3. UDP and TCP use 1s complement for their checksums. Suppose you have the following three 8-bit bytes: 01010011, 01100110, 01110100. What is the 1s complement of the sum of these 8-bit bytes? (Note that although UDP and TCP use 16-bit words in computing the checksum, for this problem you are being asked to consider 8-bit sums.) Show all work. Why is it that UDP takes the 1s complement of the sum; that is, why not just use the sum? With the 1s complement scheme, how does the receiver detect errors? Is it possible that a 1-bit error will go undetected? How about a 2-bit error? - -{312}------------------------------------------------ - -- P4. a. Suppose you have the following 2 bytes: 01011100 and 01100101. What is the 1s complement of the sum of these 2 bytes? - - b. Suppose you have the following 2 bytes: 11011010 and 01100101. What is the 1s complement of the sum of these 2 bytes? - - c. For the bytes in part (a), give an example where one bit is flipped in each of the 2 bytes and yet the 1s complement doesn't change. -- P5. Suppose that the UDP receiver computes the Internet checksum for the received UDP segment and finds that it matches the value carried in the checksum field. Can the receiver be absolutely certain that no bit errors have occurred? Explain. -- P6. Consider our motivation for correcting protocol rdt2.1. Show that the receiver, shown in Figure 3.60, when operating with the sender shown in Figure 3.11, can lead the sender and receiver to enter into a deadlock state, where each is waiting for an event that will never occur. -- P7. In protocol rdt3.0, the ACK packets flowing from the receiver to the sender do not have sequence numbers (although they do have an ACK field that contains the sequence number of the packet they are acknowledging). Why is it that our ACK packets do not require sequence numbers? - - - -**Figure 3.60** ♦ An incorrect receiver for protocol rdt 2.1 - -{313}------------------------------------------------ - -- P8. Draw the FSM for the receiver side of protocol rdt3.0. -- P9. Give a trace of the operation of protocol rdt3.0 when data packets and acknowledgment packets are garbled. Your trace should be similar to that used in Figure 3.16. -- P10. Consider a channel that can lose packets but has a maximum delay that is known. Modify protocol rdt2.1 to include sender timeout and retransmit. Informally argue why your protocol can communicate correctly over this channel. -- P11. Consider the rdt2.2 receiver in Figure 3.14, and the creation of a new packet in the self-transition (i.e., the transition from the state back to itself) in the Wait-for-0-from-below and the Wait-for-1-from-below states: sndpkt=make\_pkt(ACK,1,checksum) and sndpkt=make\_ pkt(ACK,0,checksum). Would the protocol work correctly if this action were removed from the self-transition in the Wait-for-1-from-below state? Justify your answer. What if this event were removed from the self-transition in the Wait-for-0-from-below state? [*Hint*: In this latter case, consider what would happen if the first sender-to-receiver packet were corrupted.] -- P12. The sender side of rdt3.0 simply ignores (that is, takes no action on) all received packets that are either in error or have the wrong value in the acknum field of an acknowledgment packet. Suppose that in such circumstances, rdt3.0 were simply to retransmit the current data packet. Would the protocol still work? (*Hint*: Consider what would happen if there were only bit errors; there are no packet losses but premature timeouts can occur. Consider how many times the *n*th packet is sent, in the limit as *n* approaches infinity.) -- P13. Consider the rdt 3.0 protocol. Draw a diagram showing that if the network connection between the sender and receiver can reorder messages (that is, that two messages propagating in the medium between the sender and receiver can be reordered), then the alternating-bit protocol will not work correctly (make sure you clearly identify the sense in which it will not work correctly). Your diagram should have the sender on the left and the receiver on the right, with the time axis running down the page, showing data (D) and acknowledgment (A) message exchange. Make sure you indicate the sequence number associated with any data or acknowledgment segment. -- P14. Consider a reliable data transfer protocol that uses only negative acknowledgments. Suppose the sender sends data only infrequently. Would a NAK-only protocol be preferable to a protocol that uses ACKs? Why? Now suppose the sender has a lot of data to send and the end-to-end connection experiences few losses. In this second case, would a NAK-only protocol be preferable to a protocol that uses ACKs? Why? - -{314}------------------------------------------------ - -- P15. Consider the cross-country example shown in Figure 3.17. How big would the window size have to be for the channel utilization to be greater than 98 percent? Suppose that the size of a packet is 1,500 bytes, including both header fields and data. -- P16. Suppose an application uses rdt 3.0 as its transport layer protocol. As the stop-and-wait protocol has very low channel utilization (shown in the crosscountry example), the designers of this application let the receiver keep sending back a number (more than two) of alternating ACK 0 and ACK 1 even if the corresponding data have not arrived at the receiver. Would this application design increase the channel utilization? Why? Are there any potential problems with this approach? Explain. -- P17. Consider two network entities, A and B, which are connected by a perfect bi-directional channel (i.e., any message sent will be received correctly; the channel will not corrupt, lose, or re-order packets). A and B are to deliver data messages to each other in an alternating manner: First, A must deliver a message to B, then B must deliver a message to A, then A must deliver a message to B and so on. If an entity is in a state where it should not attempt to deliver a message to the other side, and there is an event like rdt\_ send(data) call from above that attempts to pass data down for transmission to the other side, this call from above can simply be ignored with a call to rdt\_unable\_to\_send(data), which informs the higher layer that it is currently not able to send data. [Note: This simplifying assumption is made so you don't have to worry about buffering data.] - - Draw a FSM specification for this protocol (one FSM for A, and one FSM for B!). Note that you do not have to worry about a reliability mechanism here; the main point of this question is to create a FSM specification that reflects the synchronized behavior of the two entities. You should use the following events and actions that have the same meaning as protocol rdt1.0 in Figure 3.9: rdt\_send(data), packet = make\_pkt(data), udt\_ send(packet), rdt\_rcv(packet), extract (packet,data), deliver\_data(data). Make sure your protocol reflects the strict alternation of sending between A and B. Also, make sure to indicate the initial states for A and B in your FSM descriptions. - -P18. In the generic SR protocol that we studied in Section 3.4.4, the sender transmits a message as soon as it is available (if it is in the window) without waiting for an acknowledgment. Suppose now that we want an SR protocol that sends messages two at a time. That is, the sender will send a pair of messages and will send the next pair of messages only when it knows that both messages in the first pair have been received correctly. - - Suppose that the channel may lose messages but will not corrupt or reorder messages. Design an error-control protocol for the unidirectional reliable - -{315}------------------------------------------------ - -- transfer of messages. Give an FSM description of the sender and receiver. Describe the format of the packets sent between sender and receiver, and vice versa. If you use any procedure calls other than those in Section 3.4 (for example, udt\_send(), start\_timer(), rdt\_rcv(), and so on), clearly state their actions. Give an example (a timeline trace of sender and receiver) showing how your protocol recovers from a lost packet. -- P19. Consider a scenario in which Host A wants to simultaneously send packets to Hosts B and C. A is connected to B and C via a broadcast channel—a packet sent by A is carried by the channel to both B and C. Suppose that the broadcast channel connecting A, B, and C can independently lose and corrupt packets (and so, for example, a packet sent from A might be correctly received by B, but not by C). Design a stop-and-wait-like error-control protocol for reliably transferring packets from A to B and C, such that A will not get new data from the upper layer until it knows that both B and C have correctly received the current packet. Give FSM descriptions of A and C. (*Hint:* The FSM for B should be essentially the same as for C.) Also, give a description of the packet format(s) used. -- P20. Consider a scenario in which Host A and Host B want to send messages to Host C. Hosts A and C are connected by a channel that can lose and corrupt (but not reorder) messages. Hosts B and C are connected by another channel (independent of the channel connecting A and C) with the same properties. The transport layer at Host C should alternate in delivering messages from A and B to the layer above (that is, it should first deliver the data from a packet from A, then the data from a packet from B, and so on). Design a stop-andwait-like error-control protocol for reliably transferring packets from A and B to C, with alternating delivery at C as described above. Give FSM descriptions of A and C. (*Hint:* The FSM for B should be essentially the same as for A.) Also, give a description of the packet format(s) used. -- P21. Suppose we have two network entities, A and B. B has a supply of data messages that will be sent to A according to the following conventions. When A gets a request from the layer above to get the next data (D) message from B, A must send a request (R) message to B on the A-to-B channel. Only when B receives an R message can it send a data (D) message back to A on the B-to-A channel. A should deliver exactly one copy of each D message to the layer above. R messages can be lost (but not corrupted) in the A-to-B channel; D messages, once sent, are always delivered correctly. The delay along both channels is unknown and variable. - - Design (give an FSM description of) a protocol that incorporates the appropriate mechanisms to compensate for the loss-prone A-to-B channel and implements message passing to the layer above at entity A, as discussed above. Use only those mechanisms that are absolutely necessary. - -{316}------------------------------------------------ - -- P22. Consider the GBN protocol with a sender window size of 4 and a sequence number range of 1,024. Suppose that at time *t*, the next in-order packet that the receiver is expecting has a sequence number of *k*. Assume that the medium does not reorder messages. Answer the following questions: - - a. What are the possible sets of sequence numbers inside the sender's window at time *t*? Justify your answer. - - b. What are all possible values of the ACK field in all possible messages currently propagating back to the sender at time *t*? Justify your answer. -- P23. Consider the GBN and SR protocols. Suppose the sequence number space is of size *k*. What is the largest allowable sender window that will avoid the occurrence of problems such as that in Figure 3.27 for each of these protocols? -- P24. Answer true or false to the following questions and briefly justify your answer: - - a. With the SR protocol, it is possible for the sender to receive an ACK for a packet that falls outside of its current window. - - b. With GBN, it is possible for the sender to receive an ACK for a packet that falls outside of its current window. - - c. The alternating-bit protocol is the same as the SR protocol with a sender and receiver window size of 1. - - d. The alternating-bit protocol is the same as the GBN protocol with a sender and receiver window size of 1. -- P25. We have said that an application may choose UDP for a transport protocol because UDP offers finer application control (than TCP) of what data is sent in a segment and when. - - Why does an application have more control of what data is sent in a segment? Why does an application have more control on when the segment is sent? -- P26. Consider transferring an enormous file of *L* bytes from Host A to Host B. Assume an MSS of 536 bytes. - - a. What is the maximum value of *L* such that TCP sequence numbers are not exhausted? Recall that the TCP sequence number field has 4 bytes. - - b. For the *L* you obtain in (a), find how long it takes to transmit the file. Assume that a total of 66 bytes of transport, network, and data-link header are added to each segment before the resulting packet is sent out over a 155 Mbps link. Ignore flow control and congestion control so A can pump out the segments back to back and continuously. -- P27. Host A and B are communicating over a TCP connection, and Host B has already received from A all bytes up through byte 126. Suppose Host A then sends two segments to Host B back-to-back. The first and second - -{317}------------------------------------------------ - -segments contain 80 and 40 bytes of data, respectively. In the first segment, the sequence number is 127, the source port number is 302, and the destination port number is 80. Host B sends an acknowledgment whenever it receives a segment from Host A. - -- a. In the second segment sent from Host A to B, what are the sequence number, source port number, and destination port number? -- b. If the first segment arrives before the second segment, in the acknowledgment of the first arriving segment, what is the acknowledgment number, the source port number, and the destination port number? -- c. If the second segment arrives before the first segment, in the acknowledgment of the first arriving segment, what is the acknowledgment number? -- d. Suppose the two segments sent by A arrive in order at B. The first acknowledgment is lost and the second acknowledgment arrives after the first timeout interval. Draw a timing diagram, showing these segments and all other segments and acknowledgments sent. (Assume there is no additional packet loss.) For each segment in your figure, provide the sequence number and the number of bytes of data; for each acknowledgment that you add, provide the acknowledgment number. -- P28. Host A and B are directly connected with a 100 Mbps link. There is one TCP connection between the two hosts, and Host A is sending to Host B an enormous file over this connection. Host A can send its application data into its TCP socket at a rate as high as 120 Mbps but Host B can read out of its TCP receive buffer at a maximum rate of 50 Mbps. Describe the effect of TCP flow control. -- P29. SYN cookies were discussed in Section 3.5.6. - - a. Why is it necessary for the server to use a special initial sequence number in the SYNACK? - - b. Suppose an attacker knows that a target host uses SYN cookies. Can the attacker create half-open or fully open connections by simply sending an ACK packet to the target? Why or why not? - - c. Suppose an attacker collects a large amount of initial sequence numbers sent by the server. Can the attacker cause the server to create many fully open connections by sending ACKs with those initial sequence numbers? Why? -- P30. Consider the network shown in Scenario 2 in Section 3.6.1. Suppose both sending hosts A and B have some fixed timeout values. - - a. Argue that increasing the size of the finite buffer of the router might possibly decrease the throughput (lout). - - b. Now suppose both hosts dynamically adjust their timeout values (like what TCP does) based on the buffering delay at the router. Would increasing the buffer size help to increase the throughput? Why? - -{318}------------------------------------------------ - -- P31. Suppose that the five measured SampleRTT values (see Section 3.5.3) are 106 ms, 120 ms, 140 ms, 90 ms, and 115 ms. Compute the EstimatedRTT after each of these SampleRTT values is obtained, using a value of α = 0.125 and assuming that the value of EstimatedRTT was 100 ms just before the first of these five samples were obtained. Compute also the DevRTT after each sample is obtained, assuming a value of β = 0.25 and assuming the value of DevRTT was 5 ms just before the first of these five samples was obtained. Last, compute the TCP TimeoutInterval after each of these samples is obtained. -- P32. Consider the TCP procedure for estimating RTT. Suppose that α = 0.1. Let SampleRTT1 be the most recent sample RTT, let SampleRTT2 be the next most recent sample RTT, and so on. - - a. For a given TCP connection, suppose four acknowledgments have been returned with corresponding sample RTTs: SampleRTT4, SampleRTT3, SampleRTT2, and SampleRTT1. Express EstimatedRTT in terms of the four sample RTTs. - - b. Generalize your formula for *n* sample RTTs. - - c. For the formula in part (b) let *n* approach infinity. Comment on why this averaging procedure is called an exponential moving average. -- P33. In Section 3.5.3, we discussed TCP's estimation of RTT. Why do you think TCP avoids measuring the SampleRTT for retransmitted segments? -- P34. What is the relationship between the variable SendBase in Section 3.5.4 and the variable LastByteRcvd in Section 3.5.5? -- P35. What is the relationship between the variable LastByteRcvd in Section 3.5.5 and the variable y in Section 3.5.4? -- P36. In Section 3.5.4, we saw that TCP waits until it has received three duplicate ACKs before performing a fast retransmit. Why do you think the TCP designers chose not to perform a fast retransmit after the first duplicate ACK for a segment is received? -- P37. Compare GBN, SR, and TCP (no delayed ACK). Assume that the timeout values for all three protocols are sufficiently long such that five consecutive data segments and their corresponding ACKs can be received (if not lost in the channel) by the receiving host (Host B) and the sending host (Host A) respectively. Suppose Host A sends five data segments to Host B, and the second segment (sent from A) is lost. In the end, all five data segments have been correctly received by Host B. - - a. How many segments has Host A sent in total and how many ACKs has Host B sent in total? What are their sequence numbers? Answer this question for all three protocols. - -{319}------------------------------------------------ - -- b. If the timeout values for all three protocol are much longer than 5 RTT, then which protocol successfully delivers all five data segments in shortest time interval? -- P38. In our description of TCP in Figure 3.53, the value of the threshold, ssthresh, is set as ssthresh=cwnd/2 in several places and ssthresh value is referred to as being set to half the window size when a loss event occurred. Must the rate at which the sender is sending when the loss event occurred be approximately equal to cwnd segments per RTT? Explain your answer. If your answer is no, can you suggest a different manner in which ssthresh should be set? -- P39. Consider Figure 3.46(b). If l′in increases beyond *R*/2, can lout increase beyond *R*/3? Explain. Now consider Figure 3.46(c). If l′in increases beyond *R*/2, can lout increase beyond R/4 under the assumption that a packet will be forwarded twice on average from the router to the receiver? Explain. -- P40. Consider Figure 3.61. Assuming TCP Reno is the protocol experiencing the behavior shown above, answer the following questions. In all cases, you should provide a short discussion justifying your answer. - - a. Identify the intervals of time when TCP slow start is operating. - - b. Identify the intervals of time when TCP congestion avoidance is operating. - - c. After the 16th transmission round, is segment loss detected by a triple duplicate ACK or by a timeout? - - d. After the 22nd transmission round, is segment loss detected by a triple duplicate ACK or by a timeout? - - - -**Figure 3.61** ♦ TCP window size as a function of time - - - -{320}------------------------------------------------ - -- e. What is the initial value of ssthresh at the first transmission round? -- f. What is the value of ssthresh at the 18th transmission round? -- g. What is the value of ssthresh at the 24th transmission round? -- h. During what transmission round is the 70th segment sent? -- i. Assuming a packet loss is detected after the 26th round by the receipt of a triple duplicate ACK, what will be the values of the congestion window size and of ssthresh? -- j. Suppose TCP Tahoe is used (instead of TCP Reno), and assume that triple duplicate ACKs are received at the 16th round. What are the ssthresh and the congestion window size at the 19th round? -- k. Again suppose TCP Tahoe is used, and there is a timeout event at 22nd round. How many packets have been sent out from 17th round till 22nd round, inclusive? -- P41. Refer to Figure 3.55, which illustrates the convergence of TCP's AIMD algorithm. Suppose that instead of a multiplicative decrease, TCP decreased the window size by a constant amount. Would the resulting AIAD algorithm converge to an equal share algorithm? Justify your answer using a diagram similar to Figure 3.55. -- P42. In Section 3.5.4, we discussed the doubling of the timeout interval after a timeout event. This mechanism is a form of congestion control. Why does TCP need a window-based congestion-control mechanism (as studied in Section 3.7) in addition to this doubling-timeout-interval mechanism? -- P43. Host A is sending an enormous file to Host B over a TCP connection. Over this connection there is never any packet loss and the timers never expire. Denote the transmission rate of the link connecting Host A to the Internet by *R* bps. Suppose that the process in Host A is capable of sending data into its TCP socket at a rate *S* bps, where *<sup>S</sup>* <sup>=</sup> <sup>10</sup> # *<sup>R</sup>*. Further suppose that the TCP receive buffer is large enough to hold the entire file, and the send buffer can hold only one percent of the file. What would prevent the process in Host A from continuously passing data to its TCP socket at rate *S* bps? TCP flow control? TCP congestion control? Or something else? Elaborate. -- P44. Consider sending a large file from a host to another over a TCP connection that has no loss. - - a. Suppose TCP uses AIMD for its congestion control without slow start. Assuming cwnd increases by 1 MSS every time a batch of ACKs is received and assuming approximately constant round-trip times, how long does it take for cwnd increase from 6 MSS to 12 MSS (assuming no loss events)? - - b. What is the average throughput (in terms of MSS and RTT) for this connection up through time = 6 RTT? - -{321}------------------------------------------------ - -- P45. Consider Figure 3.54. Suppose that at *t* 3, the sending rate at which congestion loss next occurs drops to 0.75\**W*max (unbeknownst to the TCP senders, of course). Show the evolution of both TCP Reno and TCP CUBIC for two more rounds each *(Hint: note that the times at which TCP Reno and TCP CUBIC react to congestion loss may not be the same anymore).* -- P46. Consider Figure 3.54 again. Suppose that at *t* 3, the sending rate at which congestion loss next occurs increases to 1.5\**W*max*.* Show the evolution of both TCP Reno and TCP CUBIC for at two more rounds each *(Hint: see the hint in P45).* -- P47. Recall the macroscopic description of TCP throughput. In the period of time from when the connection's rate varies from *W*/(2 ? RTT) to *W/RTT*, only one packet is lost (at the very end of the period). - - a. Show that the loss rate (fraction of packets lost) is equal to - -$$L = loss rate = \frac{1}{\frac{3}{8} W^2 + \frac{3}{4} W}$$ - -b. Use the result above to show that if a connection has loss rate *L*, then its average rate is approximately given by - -$$\approx \frac{1.22 \cdot MSS}{RTT \sqrt{L}}$$ - -- P48. Consider that only a single TCP (Reno) connection uses one 10 Mbps link which does not buffer any data. Suppose that this link is the only congested link between the sending and receiving hosts. Assume that the TCP sender has a huge file to send to the receiver, and the receiver's receive buffer is much larger than the congestion window. We also make the following assumptions: each TCP segment size is 1,500 bytes; the two-way propagation delay of this connection is 150 msec; and this TCP connection is always in congestion avoidance phase, that is, ignore slow start. - - a. What is the maximum window size (in segments) that this TCP connection can achieve? - - b. What is the average window size (in segments) and average throughput (in bps) of this TCP connection? - - c. How long would it take for this TCP connection to reach its maximum window again after recovering from a packet loss? -- P49. Consider the scenario described in the previous problem. Suppose that the 10 Mbps link can buffer a finite number of segments. Argue that in order for the link to always be busy sending data, we would like to choose a buffer size that is at least the product of the link speed *C* and the two-way propagation delay between the sender and the receiver. - -{322}------------------------------------------------ - -- P50. Repeat Problem 46, but replacing the 10 Mbps link with a 10 Gbps link. Note that in your answer to part c, you will realize that it takes a very long time for the congestion window size to reach its maximum window size after recovering from a packet loss. Sketch a solution to solve this problem. -- P51. Let *T* (measured by RTT) denote the time interval that a TCP connection takes to increase its congestion window size from *W/2* to *W*, where *W* is the maximum congestion window size. Argue that T is a function of TCP's average throughput. -- P52. Consider a simplified TCP's AIMD algorithm where the congestion window size is measured in number of segments, not in bytes. In additive increase, the congestion window size increases by one segment in each RTT. In multiplicative decrease, the congestion window size decreases by half (if the result is not an integer, round down to the nearest integer). Suppose that two TCP connections, C1 and C2, share a single congested link of speed 30 segments per second. Assume that both C1 and C2 are in the congestion avoidance phase. Connection C1's RTT is 50 msec and connection C2's RTT is 100 msec. Assume that when the data rate in the link exceeds the link's speed, all TCP connections experience data segment loss. - - a. If both C1 and C2 at time t0 have a congestion window of 10 segments, what are their congestion window sizes after 1000 msec? - - b. In the long run, will these two connections get the same share of the bandwidth of the congested link? Explain. -- P53. Consider the network described in the previous problem. Now suppose that the two TCP connections, C1 and C2, have the same RTT of 100 msec. Suppose that at time t0, C1's congestion window size is 15 segments but C2's congestion window size is 10 segments. - - a. What are their congestion window sizes after 2200 msec? - - b. In the long run, will these two connections get about the same share of the bandwidth of the congested link? - - c. We say that two connections are synchronized, if both connections reach their maximum window sizes at the same time and reach their minimum window sizes at the same time. In the long run, will these two connections get synchronized eventually? If so, what are their maximum window sizes? - - d. Will this synchronization help to improve the utilization of the shared link? Why? Sketch some idea to break this synchronization. -- P54. Consider a modification to TCP's congestion control algorithm. Instead of additive increase, we can use multiplicative increase. A TCP sender increases its window size by a small positive constant *a* (0 6 *a* 6 1) whenever it receives a valid ACK. Find the functional relationship between loss rate L - -{323}------------------------------------------------ - -- and maximum congestion window W. Argue that for this modified TCP, regardless of TCP's average throughput, a TCP connection always spends the same amount of time to increase its congestion window size from *W/2* to *W*. -- P55. In our discussion of TCP futures in Section 3.7, we noted that to achieve a throughput of 10 Gbps, TCP could only tolerate a segment loss probability of <sup>2</sup> # <sup>10</sup>-<sup>10</sup> (or equivalently, one loss event for every 5,000,000,000 segments). Show the derivation for the values of 2 # <sup>10</sup>-<sup>10</sup> (1 out of 5,000,000) for the RTT and MSS values given in Section 3.7. If TCP needed to support a 100 Gbps connection, what would the tolerable loss be? -- P56. In our discussion of TCP congestion control in Section 3.7, we implicitly assumed that the TCP sender always had data to send. Consider now the case that the TCP sender sends a large amount of data and then goes idle (since it has no more data to send) at *t* 1. TCP remains idle for a relatively long period of time and then wants to send more data at *t* 2. What are the advantages and disadvantages of having TCP use the cwnd and ssthresh values from *t* 1 when starting to send data at *t* 2? What alternative would you recommend? Why? -- P57. In this problem, we investigate whether either UDP or TCP provides a degree of end-point authentication. - - a. Consider a server that receives a request within a UDP packet and responds to that request within a UDP packet (for example, as done by a DNS server). If a client with IP address X spoofs its address with address Y, where will the server send its response? - - b. Suppose a server receives a SYN with IP source address Y, and after responding with a SYNACK, receives an ACK with IP source address Y with the correct acknowledgment number. Assuming the server chooses a random initial sequence number and there is no "man-in-the-middle," can the server be certain that the client is indeed at Y (and not at some other address X that is spoofing Y)? -- P58. In this problem, we consider the delay introduced by the TCP slow-start phase. Consider a client and a Web server directly connected by one link of rate *R*. Suppose the client wants to retrieve an object whose size is exactly equal to 15 *S*, where *S* is the maximum segment size (MSS). Denote the round-trip time between client and server as RTT (assumed to be constant). Ignoring protocol headers, determine the time to retrieve the object (including TCP connection establishment) when - -a. -$$4 S/R > S/R + RTT > 2S/R$$ - -b. -$$S/R + RTT > 4 S/R$$ - -c. *S*/*R* 7 *RTT*. - -{324}------------------------------------------------ - -# **Programming Assignments** - -# **Implementing a Reliable Transport Protocol** - -In this laboratory programming assignment, you will be writing the sending and receiving transport-level code for implementing a simple reliable data transfer protocol. There are two versions of this lab, the alternating-bit-protocol version and the GBN version. This lab should be fun—your implementation will differ very little from what would be required in a real-world situation. - -Since you probably don't have standalone machines (with an OS that you can modify), your code will have to execute in a simulated hardware/software environment. However, the programming interface provided to your routines—the code that would call your entities from above and from below—is very close to what is done in an actual UNIX environment. (Indeed, the software interfaces described in this programming assignment are much more realistic than the infinite loop senders and receivers that many texts describe.) Stopping and starting timers are also simulated, and timer interrupts will cause your timer handling routine to be activated. - -The full lab assignment, as well as code you will need to compile with your own code, are available at this book's Web site: www.pearsonhighered.com/cs-resources. - -# **Wireshark Lab: Exploring TCP** - -In this lab, you'll use your Web browser to access a file from a Web server. As in earlier Wireshark labs, you'll use Wireshark to capture the packets arriving at your computer. Unlike earlier labs, you'll *also* be able to download a Wireshark-readable packet trace from the Web server from which you downloaded the file. In this server trace, you'll find the packets that were generated by your own access of the Web server. You'll analyze the client- and server-side traces to explore aspects of TCP. In particular, you'll evaluate the performance of the TCP connection between your computer and the Web server. You'll trace TCP's window behavior, and infer packet loss, retransmission, flow control and congestion control behavior, and estimated roundtrip time. - -As is the case with all Wireshark labs, the full description of this lab is available at this book's Web site, www.pearsonhighered.com/cs-resources. - -# **Wireshark Lab: Exploring UDP** - -In this short lab, you'll do a packet capture and analysis of your favorite application that uses UDP (for example, DNS or a multimedia application such as Skype). As we learned in Section 3.3, UDP is a simple, no-frills transport protocol. In this lab, you'll investigate the header fields in the UDP segment as well as the checksum calculation. - -As is the case with all Wireshark labs, the full description of this lab is available at this book's Web site, www.pearsonhighered.com/cs-resources. - -{325}------------------------------------------------ - -#### **AN INTERVIEW WITH...** - -# Van Jacobson - -Van Jacobson works at Google and was previously a Research Fellow at PARC. Prior to that, he was co-founder and Chief Scientist of Packet Design. Before that, he was Chief Scientist at Cisco. Before joining Cisco, he was head of the Network Research Group at Lawrence Berkeley National Laboratory and taught at UC Berkeley and Stanford. Van received the ACM SIGCOMM Award in 2001 for outstanding lifetime contribution to the field of communication networks and the IEEE Kobayashi Award in 2002 for "contributing to the understanding of network congestion and developing congestion control mechanisms that enabled the successful scaling of the Internet". He was elected to the U.S. National Academy of Engineering in 2004. - - - -# Courtesy of Van Jacobson - -#### Please describe one or two of the most exciting projects you have worked on during your career. What were the biggest challenges? - -School teaches us lots of ways to find answers. In every interesting problem I've worked on, the challenge has been finding the right question. When Mike Karels and I started looking at TCP congestion, we spent months staring at protocol and packet traces asking "Why is it failing?". One day in Mike's office, one of us said "The reason I can't figure out why it fails is because I don't understand how it ever worked to begin with." That turned out to be the right question and it forced us to figure out the "ack clocking" that makes TCP work. After that, the rest was easy. - -#### More generally, where do you see the future of networking and the Internet? - -For most people, the Web is the Internet. Networking geeks smile politely since we know the Web is an application running over the Internet but what if they're right? The Internet is about enabling conversations between pairs of hosts. The Web is about distributed information production and consumption. "Information propagation" is a very general view of communication of which "pairwise conversation" is a tiny subset. We need to move into the larger tent. Networking today deals with broadcast media (radios, PONs, etc.) by pretending it's a point-to-point wire. That's massively inefficient. Terabits-per-second of data are being exchanged all over the World via thumb drives or smart phones but we don't know how to treat that as "networking". ISPs are busily setting up caches and CDNs to scalably distribute video and audio. Caching is a necessary part of the solution but there's no part of today's networking—from Information, Queuing or Traffic Theory down to the Internet protocol - -{326}------------------------------------------------ - -specs—that tells us how to engineer and deploy it. I think and hope that over the next few years, networking will evolve to embrace the much larger vision of communication that underlies the Web. - -#### What people inspired you professionally? - -When I was in grad school, Richard Feynman visited and gave a colloquium. He talked about a piece of Quantum theory that I'd been struggling with all semester and his explanation was so simple and lucid that what had been incomprehensible gibberish to me became obvious and inevitable. That ability to see and convey the simplicity that underlies our complex world seems to me a rare and wonderful gift. - -#### What are your recommendations for students who want careers in computer science and networking? - -It's a wonderful field—computers and networking have probably had more impact on society than any invention since the book. Networking is fundamentally about connecting stuff, and studying it helps you make intellectual connections: Ant foraging & Bee dances demonstrate protocol design better than RFCs, traffic jams or people leaving a packed stadium are the essence of congestion, and students finding flights back to school in a post-Thanksgiving blizzard are the core of dynamic routing. If you're interested in lots of stuff and want to have an impact, it's hard to imagine a better field. - -{327}------------------------------------------------ diff --git a/generated/computer-networking-a-top-down-approach-8ed/4.md b/generated/computer-networking-a-top-down-approach-8ed/4.md index 9216ee9..ea9b882 100644 --- a/generated/computer-networking-a-top-down-approach-8ed/4.md +++ b/generated/computer-networking-a-top-down-approach-8ed/4.md @@ -868,238 +868,3 @@ RFC 1958 deliberately includes only two references, both of which are "fundament In this chapter, we've covered the **data plane** functions of the network layer—the *perrouter* functions that determine how packets arriving on one of a router's input links are forwarded to one of that router's output links. We began by taking a detailed look at the internal operations of a router, studying input and output port functionality and destinationbased forwarding, a router's internal switching mechanism, packet queue management and more. We covered both traditional IP forwarding (where forwarding is based on a datagram's destination address) and generalized forwarding (where forwarding and other functions may be performed using values in several different fields in the datagram's header) and seen the versatility of the latter approach. We also studied the IPv4 and IPv6 protocols in detail, and Internet addressing, which we found to be much deeper, subtler, and more interesting than we might have expected. We completed our study of the network-layer data plane with a study of middleboxes, and a broad discussion of Internet architecture. With our newfound understanding of the network-layer's data plane, we're now ready to dive into the network layer's control plane in Chapter 5! - -# **Homework Problems and Questions** - -# **Chapter 4 Review Questions** - -#### SECTION 4.1 - -- R1. Let's review some of the terminology used in this textbook. Recall that the name of a transport-layer packet is *segment* and that the name of a link-layer packet is *frame*. What is the name of a network-layer packet? Recall that both routers and link-layer switches are called *packet switches*. What is the fundamental difference between a router and link-layer switch? -- R2. We noted that network layer functionality can be broadly divided into data plane functionality and control plane functionality. What are the main functions of the data plane? Of the control plane? -- R3. We made a distinction between the forwarding function and the routing function performed in the network layer. What are the key differences between routing and forwarding? -- R4. What is the role of the forwarding table within a router? -- R5. We said that a network layer's service model "defines the characteristics of end-to-end transport of packets between sending and receiving hosts." What is the service model of the Internet's network layer? What guarantees are made by the Internet's service model regarding the host-to-host delivery of datagrams? - -#### SECTION 4.2 - -R6. In Section 4.2, we saw that a router typically consists of input ports, output ports, a switching fabric and a routing processor. Which of these are implemented in - -{389}------------------------------------------------ - -- hardware and which are implemented in software? Why? Returning to the notion of the network layer's data plane and control plane, which are implemented in hardware and which are implemented in software? Why? -- R7. Discuss why each input port in a high-speed router stores a shadow copy of the forwarding table. -- R8. What is meant by destination-based forwarding? How does this differ from generalized forwarding (assuming you've read Section 4.4, which of the two approaches are adopted by Software-Defined Networking)? -- R9. Suppose that an arriving packet matches two or more entries in a router's forwarding table. With traditional destination-based forwarding, what rule does a router apply to determine which of these rules should be applied to determine the output port to which the arriving packet should be switched? -- R10. Three types of switching fabrics are discussed in Section 4.2. List and briefly describe each type. Which, if any, can send multiple packets across the fabric in parallel? -- R11. Describe how packet loss can occur at input ports. Describe how packet loss at input ports can be eliminated (without using infinite buffers). -- R12. Describe how packet loss can occur at output ports. Can this loss be prevented by increasing the switch fabric speed? -- R13. What is HOL blocking? Does it occur in input ports or output ports? -- R14. In Section 4.2, we studied FIFO, Priority, Round Robin (RR), and Weighted Fair Queueing (WFQ) packet scheduling disciplines? Which of these queueing disciplines ensure that all packets depart in the order in which they arrived? -- R15. Give an example showing why a network operator might want one class of packets to be given priority over another class of packets. -- R16. What is an essential different between RR and WFQ packet scheduling? Is there a case (*Hint:* Consider the WFQ weights) where RR and WFQ will behave exactly the same? - -#### SECTION 4.3 - -- R17. Suppose Host A sends Host B a TCP segment encapsulated in an IP datagram. When Host B receives the datagram, how does the network layer in Host B know it should pass the segment (that is, the payload of the datagram) to TCP rather than to UDP or to some other upper-layer protocol? -- R18. What field in the IP header can be used to ensure that a packet is forwarded through no more than *N* routers? -- R19. Recall that we saw the Internet checksum being used in both transport-layer segment (in UDP and TCP headers, Figures 3.7 and 3.29 respectively) and in network-layer datagrams (IP header, Figure 4.17). Now consider a transport - -{390}------------------------------------------------ - -- layer segment encapsulated in an IP datagram. Are the checksums in the segment header and datagram header computed over any common bytes in the IP datagram? Explain your answer. -- R20. When a large datagram is fragmented into multiple smaller datagrams, where are these smaller datagrams reassembled into a single larger datagram? -- R21. Do routers have IP addresses? If so, how many? -- R22. What is the 32-bit binary equivalent of the IP address 223.1.3.27? -- R23. Visit a host that uses DHCP to obtain its IP address, network mask, default router, and IP address of its local DNS server. List these values. -- R24. Suppose there are three routers between a source host and a destination host. Ignoring fragmentation, an IP datagram sent from the source host to the destination host will travel over how many interfaces? How many forwarding tables will be indexed to move the datagram from the source to the destination? -- R25. Suppose an application generates chunks of 40 bytes of data every 20 msec, and each chunk gets encapsulated in a TCP segment and then an IP datagram. What percentage of each datagram will be overhead, and what percentage will be application data? -- R26. Suppose you purchase a wireless router and connect it to your cable modem. Also suppose that your ISP dynamically assigns your connected device (that is, your wireless router) one IP address. Also suppose that you have five PCs at home that use 802.11 to wirelessly connect to your wireless router. How are IP addresses assigned to the five PCs? Does the wireless router use NAT? Why or why not? -- R27. What is meant by the term "route aggregation"? Why is it useful for a router to perform route aggregation? -- R28. What is meant by a "plug-and-play" or "zeroconf" protocol? -- R29. What is a private network address? Should a datagram with a private network address ever be present in the larger public Internet? Explain. -- R30. Compare and contrast the IPv4 and the IPv6 header fields. Do they have any fields in common? -- R31. It has been said that when IPv6 tunnels through IPv4 routers, IPv6 treats the IPv4 tunnels as link-layer protocols. Do you agree with this statement? Why or why not? - -#### SECTION 4.4 - -- R32. How does generalized forwarding differ from destination-based forwarding? -- R33. What is the difference between a forwarding table that we encountered in destination-based forwarding in Section 4.1 and OpenFlow's flow table that we encountered in Section 4.4? - -{391}------------------------------------------------ - -- R34. What is meant by the "match plus action" operation of a router or switch? In the case of destination-based forwarding packet switch, what is matched and what is the action taken? In the case of an SDN, name three fields that can be matched, and three actions that can be taken. -- R35. Name three header fields in an IP datagram that can be "matched" in Open-Flow 1.0 generalized forwarding. What are three IP datagram header fields that *cannot* be "matched" in OpenFlow? - -# **Problems** - -- P1. Consider the network below. - - a. Show the forwarding table in router A, such that all traffic destined to host H3 is forwarded through interface 3. - - b. Can you write down a forwarding table in router A, such that all traffic from H1 destined to host H3 is forwarded through interface 3, while all traffic from H2 destined to host H3 is forwarded through interface 4? (*Hint:* This is a trick question.) - - - -- P2. Suppose two packets arrive to two different input ports of a router at exactly the same time. Also suppose there are no other packets anywhere in the router. - - a. Suppose the two packets are to be forwarded to two different output ports. Is it possible to forward the two packets through the switch fabric at the same time when the fabric uses a shared bus? - - b. Suppose the two packets are to be forwarded to two different output ports. Is it possible to forward the two packets through the switch fabric at the same time when the fabric uses switching via memory? - - c. Suppose the two packets are to be forwarded to the same output port. Is it possible to forward the two packets through the switch fabric at the same time when the fabric uses a crossbar? - -{392}------------------------------------------------ - -- P3. In Section 4.2.4, it was said that if *R\_switch* is *N* times faster than *R\_line*, then only negligible queuing will occur at the input ports, even if all the packets are to be forwarded to the same output port. Now suppose that *R\_switch = R\_line*, but all packets are to be forwarded to different output ports. Let *D* be the time to transmit a packet. As a function of *D*, what is the maximum input queuing delay for a packet for the (a) memory, (b) bus, and (c) crossbar switching fabrics? -- P4. Consider the switch shown below. Suppose that all datagrams have the same fixed length, that the switch operates in a slotted, synchronous manner, and that in one time slot a datagram can be transferred from an input port to an output port. The switch fabric is a crossbar so that at most one datagram can be transferred to a given output port in a time slot, but different output ports can receive datagrams from different input ports in a single time slot. What is the minimal number of time slots needed to transfer the packets shown from input ports to their output ports, assuming any input queue scheduling order you want (i.e., it need not have HOL blocking)? What is the largest number of slots needed, assuming the worst-case scheduling order you can devise, assuming that a non-empty input queue is never idle? - - - -- P5. Suppose that the WEQ scheduling policy is applied to a buffer that supports three classes, and suppose the weights are 0.5, 0.25, and 0.25 for the three classes. - - a. Suppose that each class has a large number of packets in the buffer. In what sequence might the three classes be served in order to achieve the WFQ weights? (For round robin scheduling, a natural sequence is 123123123 . . .). - - b. Suppose that classes 1 and 2 have a large number of packets in the buffer, and there are no class 3 packets in the buffer. In what sequence might the three classes be served in to achieve the WFQ weights? - -{393}------------------------------------------------ - - - - - -- a. Assuming FIFO service, indicate the time at which packets 2 through 12 each leave the queue. For each packet, what is the delay between its arrival and the beginning of the slot in which it is transmitted? What is the average of this delay over all 12 packets? -- b. Now assume a priority service, and assume that odd-numbered packets are high priority, and even-numbered packets are low priority. Indicate the time at which packets 2 through 12 each leave the queue. For each packet, what is the delay between its arrival and the beginning of the slot in which it is transmitted? What is the average of this delay over all 12 packets? -- c. Now assume round robin service. Assume that packets 1, 2, 3, 6, 11, and 12 are from class 1, and packets 4, 5, 7, 8, 9, and 10 are from class 2. Indicate the time at which packets 2 through 12 each leave the queue. For each packet, what is the delay between its arrival and its departure? What is the average delay over all 12 packets? -- d. Now assume weighted fair queueing (WFQ) service. Assume that oddnumbered packets are from class 1, and even-numbered packets are from class 2. Class 1 has a WFQ weight of 2, while class 2 has a WFQ weight of 1. Note that it may not be possible to achieve an idealized WFQ schedule as described in the text, so indicate why you have chosen the particular packet to go into service at each time slot. For each packet what is the delay between its arrival and its departure? What is the average delay over all 12 packets? -- e. What do you notice about the average delay in all four cases (FIFO, RR, priority, and WFQ)? - -{394}------------------------------------------------ - -- P7. Consider again the figure for P6. - - a. Assume a priority service, with packets 1, 4, 5, 6, and 11 being highpriority packets. The remaining packets are low priority. Indicate the slots in which packets 2 through 12 each leave the queue. - - b. Now suppose that round robin service is used, with packets 1, 4, 5, 6, and 11 belonging to one class of traffic, and the remaining packets belonging to the second class of traffic. Indicate the slots in which packets 2 through 12 each leave the queue. - - c. Now suppose that WFQ service is used, with packets 1, 4, 5, 6, and 11 belonging to one class of traffic, and the remaining packets belonging to the second class of traffic. Class 1 has a WFQ weight of 1, while class 2 has a WFQ weight of 2 (note that these weights are different than in the previous question). Indicate the slots in which packets 2 through 12 each leave the queue. See also the caveat in the question above regarding WFQ service. -- P8. Consider a datagram network using 32-bit host addresses. Suppose a router has four links, numbered 0 through 3, and packets are to be forwarded to the link interfaces as follows: - -| Destination Address Range | Link Interface | -|---------------------------------------------------------------------------------------|----------------| -| 11100000 00000000 00000000 00000000<br>through<br>11100000 00111111 11111111 11111111 | 0 | -| 11100000 01000000 00000000 00000000<br>through<br>11100000 01000000 11111111 11111111 | 1 | -| 11100000 01000001 00000000 00000000<br>through<br>11100001 01111111 11111111 11111111 | 2 | -| otherwise | 3 | - -- a. Provide a forwarding table that has five entries, uses longest prefix matching, and forwards packets to the correct link interfaces. -- b. Describe how your forwarding table determines the appropriate link interface for datagrams with destination addresses: - -11001000 10010001 01010001 01010101 11100001 01000000 11000011 00111100 11100001 10000000 00010001 01110111 - -{395}------------------------------------------------ - -P9. Consider a datagram network using 8-bit host addresses. Suppose a router uses longest prefix matching and has the following forwarding table: - -| Prefix Match | Interface | -|--------------|-----------| -| 00 | 0 | -| 010 | 1 | -| 011 | 2 | -| 10 | 2 | -| 11 | 3 | - - For each of the four interfaces, give the associated range of destination host addresses and the number of addresses in the range. - -P10. Consider a datagram network using 8-bit host addresses. Suppose a router uses longest prefix matching and has the following forwarding table: - -| Prefix Match | Interface | -|--------------|-----------| -| 1 | 0 | -| 10 | 1 | -| 111 | 2 | -| otherwise | 3 | - - For each of the four interfaces, give the associated range of destination host addresses and the number of addresses in the range. - -- P11. Consider a router that interconnects three subnets: Subnet 1, Subnet 2, and Subnet 3. Suppose all of the interfaces in each of these three subnets are required to have the prefix 223.1.17/24. Also suppose that Subnet 1 is required to support at least 60 interfaces, Subnet 2 is to support at least 90 interfaces, and Subnet 3 is to support at least 12 interfaces. Provide three network addresses (of the form a.b.c.d/x) that satisfy these constraints. -- P12. In Section 4.2.2, an example forwarding table (using longest prefix matching) is given. Rewrite this forwarding table using the a.b.c.d/x notation instead of the binary string notation. -- P13. In Problem P8, you are asked to provide a forwarding table (using longest prefix matching). Rewrite this forwarding table using the a.b.c.d/x notation instead of the binary string notation. -- P14. Consider a subnet with prefix 128.119.40.128/26. Give an example of one IP address (of form xxx.xxx.xxx.xxx) that can be assigned to this network. - -{396}------------------------------------------------ - -- Suppose an ISP owns the block of addresses of the form 128.119.40.64/26. Suppose it wants to create four subnets from this block, with each block having the same number of IP addresses. What are the prefixes (of form a.b.c.d/x) for the four subnets? -- P15. Consider the topology shown in Figure 4.20. Denote the three subnets with hosts (starting clockwise at 12:00) as Networks A, B, and C. Denote the subnets without hosts as Networks D, E, and F. - - a. Assign network addresses to each of these six subnets, with the following constraints: All addresses must be allocated from 214.97.254/23; Subnet A should have enough addresses to support 250 interfaces; Subnet B should have enough addresses to support 120 interfaces; and Subnet C should have enough addresses to support 120 interfaces. Of course, subnets D, E and F should each be able to support two interfaces. For each subnet, the assignment should take the form a.b.c.d/x or a.b.c.d/x – e.f.g.h/y. - - b. Using your answer to part (a), provide the forwarding tables (using longest prefix matching) for each of the three routers. -- P16. Use the whois service at the American Registry for Internet Numbers (http://www.arin.net/whois) to determine the IP address blocks for three universities. Can the whois services be used to determine with certainty the geographical location of a specific IP address? Use www.maxmind.com to determine the locations of the Web servers at each of these universities. -- P17. Suppose datagrams are limited to 1,500 bytes (including header) between source Host A and destination Host B. Assuming a 20-byte IP header, how many datagrams would be required to send an MP3 consisting of 5 million bytes? Explain how you computed your answer. -- P18. Consider the network setup in Figure 4.25. Suppose that the ISP instead assigns the router the address 24.34.112.235 and that the network address of the home network is 192.168.1/24. - - a. Assign addresses to all interfaces in the home network. - - b. Suppose each host has two ongoing TCP connections, all to port 80 at host 128.119.40.86. Provide the six corresponding entries in the NAT translation table. -- P19. Suppose you are interested in detecting the number of hosts behind a NAT. You observe that the IP layer stamps an identification number sequentially on each IP packet. The identification number of the first IP packet generated by a host is a random number, and the identification numbers of the subsequent IP packets are sequentially assigned. Assume all IP packets generated by hosts behind the NAT are sent to the outside world. - - a. Based on this observation, and assuming you can sniff all packets sent by the NAT to the outside, can you outline a simple technique that detects the number of unique hosts behind a NAT? Justify your answer. - -{397}------------------------------------------------ - -- b. If the identification numbers are not sequentially assigned but randomly assigned, would your technique work? Justify your answer. -- P20. In this problem, we'll explore the impact of NATs on P2P applications. Suppose a peer with username Arnold discovers through querying that a peer with username Bernard has a file it wants to download. Also suppose that Bernard and Arnold are both behind a NAT. Try to devise a technique that will allow Arnold to establish a TCP connection with Bernard without application-specific NAT configuration. If you have difficulty devising such a technique, discuss why. -- P21. Consider the SDN OpenFlow network shown in Figure 4.30. Suppose that the desired forwarding behavior for datagrams arriving at s2 is as follows: - - any datagrams arriving on input port 1 from hosts h5 or h6 that are destined to hosts h1 or h2 should be forwarded over output port 2; - - any datagrams arriving on input port 2 from hosts h1 or h2 that are destined to hosts h5 or h6 should be forwarded over output port 1; - - any arriving datagrams on input ports 1 or 2 and destined to hosts h3 or h4 should be delivered to the host specified; - - hosts h3 and h4 should be able to send datagrams to each other. - -Specify the flow table entries in s2 that implement this forwarding behavior. - -- P22. Consider again the SDN OpenFlow network shown in Figure 4.30. Suppose that the desired forwarding behavior for datagrams arriving from hosts h3 or h4 at s2 is as follows: - - any datagrams arriving from host h3 and destined for h1, h2, h5 or h6 should be forwarded in a clockwise direction in the network; - - any datagrams arriving from host h4 and destined for h1, h2, h5 or h6 should be forwarded in a counter-clockwise direction in the network. - -Specify the flow table entries in s2 that implement this forwarding behavior. - -- P23. Consider again the scenario from P21 above. Give the flow tables entries at packet switches s1 and s3, such that any arriving datagrams with a source address of h3 or h4 are routed to the destination hosts specified in the destination address field in the IP datagram. (*Hint:* Your forwarding table rules should include the cases that an arriving datagram is destined for a directly attached host or should be forwarded to a neighboring router for eventual host delivery there.) -- P24. Consider again the SDN OpenFlow network shown in Figure 4.30. Suppose we want switch s2 to function as a firewall. Specify the flow table in s2 that implements the following firewall behaviors (specify a different flow table for each of the four firewalling behaviors below) for delivery of datagrams - -{398}------------------------------------------------ - -destined to h3 and h4. You do not need to specify the forwarding behavior in s2 that forwards traffic to other routers. - -- Only traffic arriving from hosts h1 and h6 should be delivered to hosts h3 or h4 (i.e., that arriving traffic from hosts h2 and h5 is blocked). -- Only TCP traffic is allowed to be delivered to hosts h3 or h4 (i.e., that UDP traffic is blocked). -- Only traffic destined to h3 is to be delivered (i.e., all traffic to h4 is blocked). -- Only UDP traffic from h1 and destined to h3 is to be delivered. All other traffic is blocked. -- P25. Consider the Internet protocol stack in Figures 1.23 and 4.31. Would you consider the ICMP protocol to be a network-layer protocol or a transportlayer protocol? Justify your answer. - -# **Wireshark Lab: IP** - -In the Web site for this textbook, www.pearsonhighered.com/cs-resources, you'll find a Wireshark lab assignment that examines the operation of the IP protocol, and the IP datagram format in particular. - -{399}------------------------------------------------ - -# **Vinton G. Cerf** - -Vinton G. Cerf has served as Vice President and Chief Internet Evangelist for Google since 2005. He served for over 15 years at MCI in various positions, ending up his tenure there as Senior Vice President for Technology Strategy. He is widely known as the co-designer of the TCP/IP protocols and the architecture of the Internet. During his time from 1976 to 1982 at the US Department of Defense Advanced Research Projects Agency (DARPA), he played a key role leading the development of Internet and Internet-related packet communication and security techniques. He received the US Presidential Medal of Freedom in 2005 and the US National Medal of Technology in 1997. He holds a BS in Mathematics from Stanford University and an MS and PhD in computer science from UCLA. - - - -Courtesy of Vinton G. Cerf - -#### What brought you to specialize in networking? - -I was working as a programmer at UCLA in the late 1960s. My job was supported by the US Defense Advanced Research Projects Agency (called ARPA then and DARPA now). I was working in the laboratory of Professor Leonard Kleinrock in the Network Measurement Center of the newly created ARPANet. The first node of the ARPANet was installed at UCLA on September 1, 1969. I was responsible for programming a computer that was used to capture performance information about the ARPANet and to report this information back for comparison with mathematical models and predictions of the performance of the network. - -Several of the other graduate students and I were made responsible for working on the so-called host-level protocols of the ARPAnet—the procedures and formats that would allow many different kinds of computers on the network to interact with each other. It was a fascinating exploration into a new world (for me) of distributed computing and communication. - -#### Did you imagine that IP would become as pervasive as it is today when you first designed the protocol? - -When Bob Kahn and I first worked on this in 1973, I think we were mostly very focused on the central question: How can we make heterogeneous packet networks interoperate with one another, assuming we cannot actually change the networks themselves? We hoped that we could find a way to permit an arbitrary collection of packet-switched networks to be interconnected in a transparent fashion, so that host computers could communicate end-toend without having to do any translations in between. I think we knew that we were dealing - -{400}------------------------------------------------ - -with powerful and expandable technology, but I doubt we had a clear image of what the world would be like with billions of computers all interlinked on the Internet. - -#### What do you now envision for the future of networking and the Internet? What major challenges/obstacles do you think lie ahead in their development? - -I believe the Internet itself and networks in general will continue to proliferate. There are already billions of Internet-enabled devices on the Internet, including appliances like cell phones, refrigerators, personal digital assistants, home servers, televisions, as well as the usual array of laptops, servers, and so on. Big challenges include support for mobility, battery life, capacity of the access links to the network, and ability to scale the optical core of the network in an unlimited fashion. The interplanetary extension of the Internet is a project that is well underway at NASA and other space agencies. We still need to add IPv6 [128 bit] addressing to the original IPv4 [32-bit addresses] packet format. The list is long! - -#### Who has inspired you professionally? - -My colleague Bob Kahn; my thesis advisor, Gerald Estrin; my best friend, Steve Crocker (we met in high school and he introduced me to computers in 1960!); and the thousands of engineers who continue to evolve the Internet today. - -#### Do you have any advice for students entering the networking/Internet field? - -Think outside the limitations of existing systems—imagine what might be possible; but then do the hard work of figuring out how to get there from the current state of affairs. Dare to dream. The "Internet of Things" is the next big phase of Internet expansion. Safety, security, privacy, reliability, and autonomy all need attention. The interplanetary extension of the terrestrial Internet started as a speculative design but is becoming a reality. It may take decades to implement this, mission by mission, but to paraphrase: "A man's reach should exceed his grasp, or what are the heavens for?" - -{401}------------------------------------------------ diff --git a/generated/computer-networking-a-top-down-approach-8ed/5.md b/generated/computer-networking-a-top-down-approach-8ed/5.md index fe4d352..8f1e83e 100644 --- a/generated/computer-networking-a-top-down-approach-8ed/5.md +++ b/generated/computer-networking-a-top-down-approach-8ed/5.md @@ -984,197 +984,3 @@ We learned that there are two broad approaches towards building a control plane: these algorithms find application in both per-router control and in SDN control. These algorithms are the basis for two widely deployed Internet routing protocols, OSPF and BGP, that we covered in Sections 5.3 and 5.4. We covered the SDN approach to the network-layer control plane in Section 5.5, investigating SDN network-control applications, the SDN controller, and the OpenFlow protocol for communicating between the controller and SDN-controlled devices. In Sections 5.6 and 5.7, we covered some of the nuts and bolts of managing an IP network: ICMP (the Internet Control Message Protocol) and network management using SNMP and NETCONF/YANG. Having completed our study of the network layer, our journey now takes us one step further down the protocol stack, namely, to the link layer. Like the network layer, the link layer is part of each and every network-connected device. But we will see in the next chapter that the link layer has the much more localized task of moving packets between nodes on the same link or LAN. Although this task may appear on the surface to be rather simple compared with that of the network layer's tasks, we will see that the link layer involves a number of important and fascinating issues that can keep us busy for a long time. - -# **Homework Problems and Questions** - -# **Chapter 5 Review Questions** - -#### SECTION 5.1 - -- R1. What is meant by a control plane that is based on per-router control? In such cases, when we say the network control and data planes are implemented "monolithically," what do we mean? -- R2. What is meant by a control plane that is based on logically centralized control? In such cases, are the data plane and the control plane implemented within the same device or in separate devices? Explain. - -#### SECTION 5.2 - -- R3. Compare and contrast the properties of a centralized and a distributed routing algorithm. Give an example of a routing protocol that takes a centralized and a decentralized approach. -- R4. Compare and contrast link-state and distance-vector routing algorithms. -- R5. What is the "count to infinity" problem in distance vector routing? -- R6. Is it necessary that every autonomous system use the same intra-AS routing algorithm? Why or why not? - -#### SECTIONS 5.3–5.4 - -- R7. Why are different inter-AS and intra-AS protocols used in the Internet? -- R8. True or false: When an OSPF route sends its link state information, it is sent only to those nodes directly attached neighbors. Explain. - -{462}------------------------------------------------ - -- R9. What is meant by an *area* in an OSPF autonomous system? Why was the concept of an area introduced? -- R10. Define and contrast the following terms: *subnet, prefix*, and *BGP route*. -- R11. How does BGP use the NEXT-HOP attribute? How does it use the AS-PATH attribute? -- R12. Describe how a network administrator of an upper-tier ISP can implement policy when configuring BGP. -- R13. True or false: When a BGP router receives an advertised path from its neighbor, it must add its own identity to the received path and then send that new path on to all of its neighbors. Explain. - -#### SECTION 5.5 - -- R14. Describe the main role of the communication layer, the network-wide statemanagement layer, and the network-control application layer in an SDN controller. -- R15. Suppose you wanted to implement a new routing protocol in the SDN control plane. At which layer would you implement that protocol? Explain. -- R16. What types of messages flow across an SDN controller's northbound and southbound APIs? Who is the recipient of these messages sent from the controller across the southbound interface, and who sends messages to the controller across the northbound interface? -- R17. Describe the purpose of two types of OpenFlow messages (of your choosing) that are sent from a controlled device to the controller. Describe the purpose of two types of Openflow messages (of your choosing) that are send from the controller to a controlled device. -- R18. What is the purpose of the service abstraction layer in the OpenDaylight SDN controller? - -#### SECTIONS 5.6–5.7 - -- R19. Names four different types of ICMP messages -- R20. What two types of ICMP messages are received at the sending host executing the *Traceroute* program? -- R21. Define the following terms in the context of SNMP: *managing server, managed device, network management agent and MIB.* -- R22. What are the purposes of the SNMP *GetRequest* and *SetRequest* messages? -- R23. What is the purpose of the SNMP trap message? - -{463}------------------------------------------------ - -# **Problems** - -- P1. Looking at Figure 5.3, enumerate the paths from *y* to *u* that do not contain any loops. -- P2. Repeat Problem P1 for paths from *x* to *z, z* to *u*, and *z* to *w*. -- P3. Consider the following network. With the indicated link costs, use Dijkstra's shortest-path algorithm to compute the shortest path from *x* to all network nodes. Show how the algorithm works by computing a table similar to Table 5.1. - - - - - -- P4. Consider the network shown in Problem P3. Using Dijkstra's algorithm, and showing your work using a table similar to Table 5.1, do the following: - - a. Compute the shortest path from *t* to all network nodes. - - b. Compute the shortest path from *u* to all network nodes. - - c. Compute the shortest path from *v* to all network nodes. - - d. Compute the shortest path from *w* to all network nodes. - - e. Compute the shortest path from *y* to all network nodes. - - f. Compute the shortest path from *z* to all network nodes. -- P5. Consider the network shown below, and assume that each node initially knows the costs to each of its neighbors. Consider the distance-vector algorithm and show the distance table entries at node *z*. - - - -{464}------------------------------------------------ - -- P6. Consider a general topology (that is, not the specific network shown above) and a synchronous version of the distance-vector algorithm. Suppose that at each iteration, a node exchanges its distance vectors with its neighbors and receives their distance vectors. Assuming that the algorithm begins with each node knowing only the costs to its immediate neighbors, what is the maximum number of iterations required before the distributed algorithm converges? Justify your answer. -- P7. Consider the network fragment shown below. *x* has only two attached neighbors, *w* and *y*. *w* has a minimum-cost path to destination *u* (not shown) of 5, and *y* has a minimum-cost path to *u* of 6. The complete paths from *w* and *y* to *u* (and between *w* and *y*) are not shown. All link costs in the network have strictly positive integer values. - - - -- a. Give *x*'s distance vector for destinations *w, y,* and *u*. -- b. Give a link-cost change for either *c*(*x,w*) or *c*(*x,y*) such that *x* will inform its neighbors of a new minimum-cost path to *u* as a result of executing the distance-vector algorithm. -- c. Give a link-cost change for either *c*(*x,w*) or *c*(*x,y*) such that *x* will *not* inform its neighbors of a new minimum-cost path to *u* as a result of executing the distance-vector algorithm. -- P8. Consider the three-node topology shown in Figure 5.6. Rather than having the link costs shown in Figure 5.6, the link costs are *c*(*x,y*) = 3, *c*(*y,z*) = 6, *c*(*z,x*) = 4. Compute the distance tables after the initialization step and after each iteration of a synchronous version of the distance-vector algorithm (as we did in our earlier discussion of Figure 5.6). -- P9. Consider the count-to-infinity problem in the distance vector routing. Will the count-to-infinity problem occur if we decrease the cost of a link? Why? How about if we connect two nodes which do not have a link? -- P10. Argue that for the distance-vector algorithm in Figure 5.6, each value in the distance vector *D*(*x*) is non-increasing and will eventually stabilize in a finite number of steps. -- P11. Consider Figure 5.7. Suppose there is another router *w*, connected to router *y* and *z*. The costs of all links are given as follows: *c*(*x,y*) = 4, *c*(*x,z*) = 50, *c*(*y,w*) = 1, *c*(*z,w*) = 1, *c*(*y,z*) = 3. Suppose that poisoned reverse is used in the distance-vector routing algorithm. - -{465}------------------------------------------------ - -- a. When the distance vector routing is stabilized, router *w*, *y*, and *z* inform their distances to *x* to each other. What distance values do they tell each other? -- b. Now suppose that the link cost between *x* and *y* increases to 60. Will there be a count-to-infinity problem even if poisoned reverse is used? Why or why not? If there is a count-to-infinity problem, then how many iterations are needed for the distance-vector routing to reach a stable state again? Justify your answer. -- c. How do you modify *c*(*y,z*) such that there is no count-to-infinity problem at all if *c*(*y,x*) changes from 4 to 60? -- P12. Describe how loops in paths can be detected in BGP. -- P13. Will a BGP router always choose the loop-free route with the shortest ASpath length? Justify your answer. -- P14. Consider the network shown below. Suppose AS3 and AS2 are running OSPF for their intra-AS routing protocol. Suppose AS1 and AS4 are running RIP for their intra-AS routing protocol. Suppose eBGP and iBGP are used for the inter-AS routing protocol. Initially suppose there is *no* physical link between AS2 and AS4. - - a. Router 3c learns about prefix *x* from which routing protocol: OSPF, RIP, eBGP, or iBGP? - - b. Router 3a learns about *x* from which routing protocol? - - c. Router 1c learns about *x* from which routing protocol? - - d. Router 1d learns about *x* from which routing protocol? - - - -{466}------------------------------------------------ - -- P15. Referring to the previous problem, once router 1d learns about *x* it will put an entry (*x*, *I*) in its forwarding table. - - a. Will *I* be equal to *I*1 or *I*2 for this entry? Explain why in one sentence. - - b. Now suppose that there is a physical link between AS2 and AS4, shown by the dotted line. Suppose router 1d learns that *x* is accessible via AS2 as well as via AS3. Will *I* be set to *I*1 or *I*2? Explain why in one sentence. - - c. Now suppose there is another AS, called AS5, which lies on the path between AS2 and AS4 (not shown in diagram). Suppose router 1d learns that *x* is accessible via AS2 AS5 AS4 as well as via AS3 AS4. Will *I* be set to *I*1 or *I*2? Explain why in one sentence. -- P16. Consider the following network. ISP B provides national backbone service to regional ISP A. ISP C provides national backbone service to regional ISP D. Each ISP consists of one AS. B and C peer with each other in two places using BGP. Consider traffic going from A to D. B would prefer to hand that traffic over to C on the West Coast (so that C would have to absorb the cost of carrying the traffic cross-country), while C would prefer to get the traffic via its East Coast peering point with B (so that B would have carried the traffic across the country). What BGP mechanism might C use, so that B would hand over A-to-D traffic at its East Coast peering point? To answer this question, you will need to dig into the BGP specification. - - - -{467}------------------------------------------------ - -P17. In Figure 5.13, consider the path information that reaches stub networks W, X, and Y. Based on the information available at W and X, what are their respective views of the network topology? Justify your answer. The topology view at Y is shown below. - - - -- P18. Consider Figure 5.13. B would never forward traffic destined to Y via X based on BGP routing. But there are some very popular applications for which data packets go to X first and then flow to Y. Identify one such application, and describe how data packets follow a path not given by BGP routing. -- P19. In Figure 5.13, suppose that there is another stub network V that is a customer of ISP A. Suppose that B and C have a peering relationship, and A is a customer of both B and C. Suppose that A would like to have the traffic destined to W to come from B only, and the traffic destined to V from either B or C. How should A advertise its routes to B and C? What AS routes does C receive? -- P20. Suppose ASs X and Z are not directly connected but instead are connected by AS Y. Further suppose that X has a peering agreement with Y, and that Y has a peering agreement with Z. Finally, suppose that Z wants to transit all of Y's traffic but does not want to transit X's traffic. Does BGP allow Z to implement this policy? -- P21. Consider the two ways in which communication occurs between a managing entity and a managed device: request-response mode and trapping. What are the pros and cons of these two approaches, in terms of (1) overhead, (2) notification time when exceptional events occur, and (3) robustness with respect to lost messages between the managing entity and the device? -- P22. In Section 5.7, we saw that it was preferable to transport SNMP messages in unreliable UDP datagrams. Why do you think the designers of SNMP chose UDP rather than TCP as the transport protocol of choice for SNMP? - -# **Socket Programming Assignment 5: ICMP Ping** - -At the end of Chapter 2, there are four socket programming assignments. Here you will find a fifth assignment which employs ICMP, a protocol discussed in this chapter. - -{468}------------------------------------------------ - -Ping is a popular networking application used to test from a remote location whether a particular host is up and reachable. It is also often used to measure latency between the client host and the target host. It works by sending ICMP "echo request" packets (i.e., ping packets) to the target host and listening for ICMP "echo response" replies (i.e., pong packets). Ping measures the RRT, records packet loss, and calculates a statistical summary of multiple ping-pong exchanges (the minimum, mean, max, and standard deviation of the round-trip times). - -In this lab, you will write your own Ping application in Python. Your application will use ICMP. But in order to keep your program simple, you will not exactly follow the official specification in RFC 1739. Note that you will only need to write the client side of the program, as the functionality needed on the server side is built into almost all operating systems. You can find full details of this assignment, as well as important snippets of the Python code, at the Web site http://www.pearsonhighered. com/cs-resources. - -# **Programming Assignment: Routing** - -In this programming assignment, you will be writing a "distributed" set of procedures that implements a distributed asynchronous distance-vector routing for the network shown below. - -You are to write the following routines that will "execute" asynchronously within the emulated environment provided for this assignment. For node 0, you will write the routines: - - - -• *rtinit0()*. This routine will be called once at the beginning of the emulation. *rtinit0()* has no arguments. It should initialize your distance table in node 0 to reflect the direct costs of 1, 3, and 7 to nodes 1, 2, and 3, respectively. In the figure above, all links are bidirectional and the costs in both directions are identical. After initializing the distance table and any other data structures needed by your node 0 routines, it should then send its directly connected neighbors (in this case, 1, 2, and 3) the cost of its minimum-cost paths to all other network nodes. - -{469}------------------------------------------------ - -This minimum-cost information is sent to neighboring nodes in a routing update packet by calling the routine *tolayer2(),* as described in the full assignment. The format of the routing update packet is also described in the full assignment. - -• *rtupdate0(struct rtpkt \*rcvdpkt)*. This routine will be called when node 0 receives a routing packet that was sent to it by one of its directly connected neighbors. The parameter *\*rcvdpkt* is a pointer to the packet that was received. *rtupdate0()* is the "heart" of the distance-vector algorithm. The values it receives in a routing update packet from some other node *i* contain *i'*s current shortest-path costs to all other network nodes. *rtupdate0()* uses these received values to update its own distance table (as specified by the distance-vector algorithm). If its own minimum cost to another node changes as a result of the update, node 0 informs its directly connected neighbors of this change in minimum cost by sending them a routing packet. Recall that in the distance-vector algorithm, only directly connected nodes will exchange routing packets. Thus, nodes 1 and 2 will communicate with each other, but nodes 1 and 3 will not communicate with each other. - -Similar routines are defined for nodes 1, 2, and 3. Thus, you will write eight procedures in all: *rtinit0(), rtinit1(), rtinit2(), rtinit3(), rtupdate0(), rtupdate1(), rtupdate2(),* and *rtupdate3().* These routines will together implement a distributed, asynchronous computation of the distance tables for the topology and costs shown in the figure on the preceding page. - -You can find the full details of the programming assignment, as well as C code that you will need to create the simulated hardware/software environment, at http:// www.pearsonhighered.com/cs-resource. A Java version of the assignment is also available. - -# **Wireshark Lab: ICMP** - -In the Web site for this textbook, www.pearsonhighered.com/cs-resources, you'll find a Wireshark lab assignment that examines the use of the ICMP protocol in the ping and traceroute commands. - -{470}------------------------------------------------ - -# Jennifer Rexford - -Jennifer Rexford is a Professor in the Computer Science department at Princeton University. Her research has the broad goal of making computer networks easier to design and manage, with particular emphasis on programmable neworks. From 1996–2004, she was a member of the Network Management and Performance department at AT&T Labs–Research. While at AT&T, she designed techniques and tools for network measurement, traffic engineering, and router configuration that were deployed in AT&T's backbone network. Jennifer is co-author of the book "Web Protocols and Practice: Networking Protocols, Caching, and Traffic Measurement," published by Addison-Wesley in May 2001. She served as the chair of ACM SIGCOMM from 2003 to 2007. She received her BSE degree in electrical engineering from Princeton University in 1991, and her PhD degree in electrical engineering and computer science from the University of Michigan in 1996. Jennifer was the 2004 winner of ACM's Grace Murray Hopper Award for outstanding young computer professional, the ACM Athena Lecturer Award (2016), the NCWIT Harrold and Notkin Research and Graduate Mentoring Award (2017), the ACM SIGCOMM award for lifetime contributions (2018), and the IEEE Internet Award (2019). She is an ACM Fellow (2008), an IEEE Fellow (2018), and the National Academy of Engineering (2014). - - - -Courtesy of Jennifer Rexford - -#### Please describe one or two of the most exciting projects you have worked on during your career. What were the biggest challenges? - -When I was a researcher at AT&T, a group of us designed a new way to manage routing in Internet Service Provider backbone networks. Traditionally, network operators configure each router individually, and these routers run distributed protocols to compute paths through the network. We believed that network management would be simpler and more flexible if network operators could exercise direct control over how routers forward traffic based on a network-wide view of the topology and traffic. The Routing Control Platform (RCP) we designed and built could compute the routes for all of AT&T's - -{471}------------------------------------------------ - -backbone on a single commodity computer, and could control legacy routers without modification. To me, this project was exciting because we had a provocative idea, a working system, and ultimately a real deployment in an operational network. Fast forward a few years, and software-defined networking (SDN) has become a mainstream technology, and standard protocols (like standard protocols (like OpenFlow) and languages (like P4) have made it much easier to tell the underlying switches what to do. - -#### How do you think software-defined networking should evolve in the future? - -In a major break from the past, the software controlling network devices can be created by many different programmers, not just at companies selling network equipment. Yet, unlike the applications running on a server or a smart phone, SDN applications must work together to handle the same traffic. Network operators do not want to perform load balancing on some traffic and routing on other traffic; instead, they want to perform load balancing and routing, together, on the same traffic. Future SDN platforms should offer good programming abstractions for composing independently written multiple applications together. More broadly, good programming abstractions can make it easier to create applications, without having to worry about low-level details like flow table entries, traffic counters, bit patterns in packet headers, and so on. Also, while an SDN controller is logically centralized, the network still consists of a distributed collection of devices. Future programmable networks should offer good abstractions for updating a distributed set of devices, so network administrators can reason about what happens to packets in flight while the devices are updated. Programming abstractions for programmable network is an exciting area for interdisciplinary research between computer networking, distributed systems, and programming languages, with a real chance for practical impact in the years ahead. - -#### Where do you see the future of networking and the Internet? - -Networking is an exciting field because the applications and the underlying technologies change all the time. We are always reinventing ourselves! Who would have predicted even ten years ago the dominance of smart phones, allowing mobile users to access existing applications as well as new location-based services? The emergence of cloud computing is fundamentally changing the relationship between users and the applications they run, and networked sensors and actuators (the "Internet of Things") are enabling a wealth of new applications (and security vulnerabilities!). The pace of innovation is truly inspiring. - -The underlying network is a crucial component in all of these innovations. Yet, the network is notoriously "in the way"—limiting performance, compromising reliability, constraining applications, and complicating the deployment and management of services. We should strive to make the network of the future as invisible as the air we breathe, so it never stands in the way of new ideas and valuable services. To do this, we need to raise the level of abstraction above individual network devices and protocols (and their attendant acronyms!), so we can reason about the network and the user's high-level goals as a whole. - -{472}------------------------------------------------ - -#### What people inspired you professionally? - -I've long been inspired by Sally Floyd who worked for many years at the International Computer Science Institute. Her research was always purposeful, focusing on the important challenges facing the Internet. She dug deeply into hard questions until she understood the problem and the space of solutions completely, and she devoted serious energy into "making things happen," such as pushing her ideas into protocol standards and network equipment. Also, she gave back to the community, through professional service in numerous standards and research organizations and by creating tools (such as the widely used ns-2 and ns-3 simulators) that enable other researchers to succeed. She retired in 2009, and passed away in 2019, but her influence on the field will be felt for years to come. - -#### What are your recommendations for students who want careers in computer science and networking? - -Networking is an inherently interdisciplinary field. Applying techniques from other discipline's breakthroughs in networking come from such diverse areas as queuing theory, game theory, control theory, distributed systems, network optimization, programming languages, machine learning, algorithms, data structures, and so on. I think that becoming conversant in a related field, or collaborating closely with experts in those fields, is a wonderful way to put networking on a stronger foundation, so we can learn how to build networks that are worthy of society's trust. Beyond the theoretical disciplines, networking is exciting because we create real artifacts that real people use. Mastering how to design and build systems—by gaining experience in operating systems, computer architecture, and so on—is another fantastic way to amplify your knowledge of networking to help make the world a better place. - -{473}------------------------------------------------ diff --git a/generated/computer-networking-a-top-down-approach-8ed/6.md b/generated/computer-networking-a-top-down-approach-8ed/6.md index fbf329f..37901a6 100644 --- a/generated/computer-networking-a-top-down-approach-8ed/6.md +++ b/generated/computer-networking-a-top-down-approach-8ed/6.md @@ -1004,187 +1004,3 @@ of network-layer routing to interconnect these local nodes. We also learned how We ended our study of the link layer by focusing on how MPLS networks provide link-layer services when they interconnect IP routers and an overview of the network designs for today's massive data centers. We wrapped up this chapter (and indeed the first five chapters) by identifying the many protocols that are needed to fetch a simple Web page. Having covered the link layer, *our journey down the protocol stack is now ove*r! Certainly, the physical layer lies below the link layer, but the details of the physical layer are probably best left for another course (e.g., in communication theory, rather than computer networking). We have, however, touched upon several aspects of the physical layer in this chapter and in Chapter 1 (our discussion of physical media in Section 1.2). We'll consider the physical layer again when we study wireless link characteristics in the next chapter. Although our journey down the protocol stack is over, our study of computer networking is not yet at an end. In the following three chapters, we cover wireless networking, network security, and multimedia networking. These four topics do not fit conveniently into any one layer; indeed, each topic crosscuts many layers. Understanding these topics (billed as advanced topics in some networking texts) thus requires a firm foundation in all layers of the protocol stack—a foundation that our study of the link layer has now completed! - -# **Homework Problems and Questions** - -# **Chapter 6 Review Questions** - -#### SECTIONS 6.1–6.2 - -- R1. Consider the transportation analogy in Section 6.1.1. If the passenger is analagous to a datagram, what is analogous to the link layer frame? -- R2. If all the links in the Internet were to provide reliable delivery service, would the TCP reliable delivery service be redundant? Why or why not? -- R3. What are some of the possible services that a link-layer protocol can offer to the network layer? Which of these link-layer services have corresponding services in IP? In TCP? - -#### SECTION 6.3 - -- R4. Suppose two nodes start to transmit at the same time a packet of length *L* over a broadcast channel of rate *R*. Denote the propagation delay between the two nodes as *d*prop. Will there be a collision if *d*prop 6 *L*/*R*? Why or why not? -- R5. In Section 6.3, we listed four desirable characteristics of a broadcast channel. Which of these characteristics does slotted ALOHA have? Which of these characteristics does token passing have? - -{544}------------------------------------------------ - -- R6. In CSMA/CD, after the fifth collision, what is the probability that a node chooses *K* = 4? The result *K* = 4 corresponds to a delay of how many seconds on a 10 Mbps Ethernet? -- R7. Describe polling and token-passing protocols using the analogy of cocktail party interactions. -- R8. Why would the token-ring protocol be inefficient if a LAN had a very large perimeter? - -#### SECTION 6.4 - -- R9. How big is the MAC address space? The IPv4 address space? The IPv6 address space? -- R10. Suppose nodes A, B, and C each attach to the same broadcast LAN (through their adapters). If A sends thousands of IP datagrams to B with each encapsulating frame addressed to the MAC address of B, will C's adapter process these frames? If so, will C's adapter pass the IP datagrams in these frames to the network layer C? How would your answers change if A sends frames with the MAC broadcast address? -- R11. Why is an ARP query sent within a broadcast frame? Why is an ARP response sent within a frame with a specific destination MAC address? -- R12. For the network in Figure 6.19, the router has two ARP modules, each with its own ARP table. Is it possible that the same MAC address appears in both tables? -- R13. Compare the frame structures for 10BASE-T, 100BASE-T, and Gigabit Ethernet. How do they differ? -- R14. Consider Figure 6.15. How many subnetworks are there, in the addressing sense of Section 4.3? -- R15. What is the maximum number of VLANs that can be configured on a switch supporting the 802.1Q protocol? Why? -- R16. Suppose that *N* switches supporting *K* VLAN groups are to be connected via a trunking protocol. How many ports are needed to connect the switches? Justify your answer. - -# **Problems** - -- P1. Suppose the information content of a packet is the bit pattern 1110 0110 1001 0101 and an even parity scheme is being used. What would the value of the field containing the parity bits be for the case of a two-dimensional parity scheme? Your answer should be such that a minimum-length checksum field is used. -- P2. Show (give an example other than the one in Figure 6.5) that two-dimensional parity checks can correct and detect a single bit error. Show (give an example of) a double-bit error that can be detected but not corrected. - -{545}------------------------------------------------ - -- P3. Suppose the information portion of a packet (*D* in Figure 6.3) contains 10 bytes consisting of the 8-bit unsigned binary ASCII representation of string "Internet." Compute the Internet checksum for this data. -- P4. Consider the previous problem, but instead suppose these 10 bytes contain - - a. the binary representation of the numbers 1 through 10. - - b. the ASCII representation of the letters B through K (uppercase). - - c. the ASCII representation of the letters b through k (lowercase). - - d. Compute the Internet checksum for this data. -- P5. Consider the 5-bit generator, G = 10011, and suppose that D has the value 1010101010. What is the value of R? -- P6. Consider the previous problem, but suppose that *D* has the value - - a. 1000100101. - - b. 0101101010. - - c. 0110100011. -- P7. In this problem, we explore some of the properties of the CRC. For the generator G (= 1001) given in Section 6.2.3, answer the following questions. - - a. Why can it detect any single bit error in data D? - - b. Can the above G detect any odd number of bit errors? Why? -- P8. In Section 6.3, we provided an outline of the derivation of the efficiency of slotted ALOHA. In this problem we'll complete the derivation. - - a. Recall that when there are *N* active nodes, the efficiency of slotted ALOHA is *Np*(1 - *p*) *N*-1 . Find the value of *p* that maximizes this expression. - - b. Using the value of *p* found in (a), find the efficiency of slotted ALOHA by letting *N* approach infinity. *Hint*: (1 - 1/*N*) *<sup>N</sup>* approaches 1/*e* as *N* approaches infinity. -- P9. Show that the maximum efficiency of pure ALOHA is 1/(2*e*). *Note*: This problem is easy if you have completed the problem above! -- P10. Consider two nodes, A and B, that use the slotted ALOHA protocol to contend for a channel. Suppose node A has more data to transmit than node B, and node A's retransmission probability *pA* is greater than node B's retransmission probability, *pB.* - - a. Provide a formula for node A's average throughput. What is the total efficiency of the protocol with these two nodes? - - b. If *pA* = 2*pB*, is node A's average throughput twice as large as that of node B? Why or why not? If not, how can you choose *pA* and *pB* to make that happen? - -{546}------------------------------------------------ - -- c. In general, suppose there are *N* nodes, among which node A has retransmission probability *2p* and all other nodes have retransmission probability *p.* Provide expressions to compute the average throughputs of node A and of any other node. -- P11. Suppose four active nodes—nodes A, B, C and D—are competing for access to a channel using slotted ALOHA. Assume each node has an infinite number of packets to send. Each node attempts to transmit in each slot with probability *p*. The first slot is numbered slot 1, the second slot is numbered slot 2, and so on. - - a. What is the probability that node A succeeds for the first time in slot 4? - - b. What is the probability that some node (either A, B, C or D) succeeds in slot 5? - - c. What is the probability that the first success occurs in slot 4? - - d. What is the efficiency of this four-node system? -- P12. Graph the efficiency of slotted ALOHA and pure ALOHA as a function of *p* for the following values of *N*: - - a. *N* = 10. - - b. *N* = 30. - - c. *N* = 50. -- P13. Consider a broadcast channel with *N* nodes and a transmission rate of *R* bps. Suppose the broadcast channel uses polling (with an additional polling node) for multiple access. Suppose the amount of time from when a node completes transmission until the subsequent node is permitted to transmit (that is, the polling delay) is *d*poll. Suppose that within a polling round, a given node is allowed to transmit at most *Q* bits. What is the maximum throughput of the broadcast channel? -- P14. Consider three LANs interconnected by two routers, as shown in Figure 6.33. - - a. Assign IP addresses to all of the interfaces. For Subnet 1 use addresses of the form 192.168.1.xxx; for Subnet 2 uses addresses of the form 192.168.2.xxx; and for Subnet 3 use addresses of the form 192.168.3.xxx. - - b. Assign MAC addresses to all of the adapters. - - c. Consider sending an IP datagram from Host E to Host B. Suppose all of the ARP tables are up to date. Enumerate all the steps, as done for the single-router example in Section 6.4.1. - - d. Repeat (c), now assuming that the ARP table in the sending host is empty (and the other tables are up to date). -- P15. Consider Figure 6.33. Now we replace the router between subnets 1 and 2 with a switch S1, and label the router between subnets 2 and 3 as R1. - -{547}------------------------------------------------ - - - -**Figure 6.33** ♦ Three subnets, interconnected by routers - -- a. Consider sending an IP datagram from Host E to Host F. Will Host E ask router R1 to help forward the datagram? Why? In the Ethernet frame containing the IP datagram, what are the source and destination IP and MAC addresses? -- b. Suppose E would like to send an IP datagram to B, and assume that E's ARP cache does not contain B's MAC address. Will E perform an ARP query to find B's MAC address? Why? In the Ethernet frame (containing the IP datagram destined to B) that is delivered to router R1, what are the source and destination IP and MAC addresses? -- c. Suppose Host A would like to send an IP datagram to Host B, and neither A's ARP cache contains B's MAC address nor does B's ARP cache contain A's MAC address. Further suppose that the switch S1's forwarding table contains entries for Host B and router R1 only. Thus, A will broadcast an ARP request message. What actions will switch S1 perform once it receives the ARP request message? Will router R1 also receive this ARP request message? If so, will R1 forward the message to Subnet 3? Once Host B receives this ARP request message, it will send back to Host A an ARP response message. But will it send an ARP query message to ask for A's MAC address? Why? What will switch S1 do once it receives an ARP response message from Host B? -- P16. Consider the previous problem, but suppose now that the router between subnets 2 and 3 is replaced by a switch. Answer questions (a)–(c) in the previous problem in this new context. - -{548}------------------------------------------------ - -- P17. Recall that with the CSMA/CD protocol, the adapter waits *<sup>K</sup>* # 512 bit times after a collision, where *K* is drawn randomly. For *K* = 100, how long does the adapter wait until returning to Step 2 for a 100 Mbps broadcast channel? For a 1 Gbps broadcast channel? -- P18. Suppose nodes A and B are on the same 10 Mbps broadcast channel, and the propagation delay between the two nodes is 325 bit times. Suppose CSMA/ CD and Ethernet packets are used for this broadcast channel. Suppose node A begins transmitting a frame and, before it finishes, node B begins transmitting a frame. Can A finish transmitting before it detects that B has transmitted? Why or why not? If the answer is yes, then A incorrectly believes that its frame was successfully transmitted without a collision. *Hint*: Suppose at time *t* = 0 bits, A begins transmitting a frame. In the worst case, A transmits a minimum-sized frame of 512 + 64 bit times. So A would finish transmitting the frame at *t* = 512 + 64 bit times. Thus, the answer is no, if B's signal reaches A before bit time *t* = 512 + 64 bits. In the worst case, when does B's signal reach A? -- P19. Suppose nodes A and B are on the same 10 Mbps broadcast channel, and the propagation delay between the two nodes is 245 bit times. Suppose A and B send Ethernet frames at the same time, the frames collide, and then A and B choose different values of *K* in the CSMA/CD algorithm. Assuming no other nodes are active, can the retransmissions from A and B collide? For our purposes, it suffices to work out the following example. Suppose A and B begin transmission at *t* = 0 bit times. They both detect collisions at *t* = 245 t bit times. Suppose *KA* = 0 and *KB* = 1. At what time does B schedule its retransmission? At what time does A begin transmission? (*Note*: The nodes must wait for an idle channel after returning to Step 2—see protocol.) At what time does A's signal reach B? Does B refrain from transmitting at its scheduled time? -- P20. In this problem, you will derive the efficiency of a CSMA/CD-like multiple access protocol. In this protocol, time is slotted and all adapters are synchronized to the slots. Unlike slotted ALOHA, however, the length of a slot (in seconds) is much less than a frame time (the time to transmit a frame). Let *S* be the length of a slot. Suppose all frames are of constant length *L* = *kRS*, where *R* is the transmission rate of the channel and *k* is a large integer. Suppose there are *N* nodes, each with an infinite number of frames to send. We also assume that *d*prop 6 *S*, so that all nodes can detect a collision before the end of a slot time. The protocol is as follows: - - If, for a given slot, no node has possession of the channel, all nodes contend for the channel; in particular, each node transmits in the slot with probability *p*. If exactly one node transmits in the slot, that node takes possession of the channel for the subsequent *k* - 1 slots and transmits its entire frame. - -{549}------------------------------------------------ - -• If some node has possession of the channel, all other nodes refrain from transmitting until the node that possesses the channel has finished transmitting its frame. Once this node has transmitted its frame, all nodes contend for the channel. - - Note that the channel alternates between two states: the productive state, which lasts exactly *k* slots, and the nonproductive state, which lasts for a random number of slots. Clearly, the channel efficiency is the ratio of *k*/(*k* + *x*), where *x* is the expected number of consecutive unproductive slots. - -- a. For fixed *N* and *p*, determine the efficiency of this protocol. -- b. For fixed *N*, determine the *p* that maximizes the efficiency. -- c. Using the *p* (which is a function of *N*) found in (b), determine the efficiency as *N* approaches infinity. -- d. Show that this efficiency approaches 1 as the frame length becomes large. -- P21. Consider Figure 6.33 in problem P14. Provide MAC addresses and IP addresses for the interfaces at Host A, both routers, and Host F. Suppose Host A sends a datagram to Host F. Give the source and destination MAC addresses in the frame encapsulating this IP datagram as the frame is transmitted *(i)* from A to the left router, *(ii)* from the left router to the right router, *(iii)* from the right router to F. Also give the source and destination IP addresses in the IP datagram encapsulated within the frame at each of these points in time. -- P22. Suppose now that the leftmost router in Figure 6.33 is replaced by a switch. Hosts A, B, C, and D and the right router are all star-connected into this switch. Give the source and destination MAC addresses in the frame encapsulating this IP datagram as the frame is transmitted *(i)* from A to the switch, *(ii)* from the switch to the right router, *(iii)* from the right router to F. Also give the source and destination IP addresses in the IP datagram encapsulated within the frame at each of these points in time. -- P23. Consider Figure 6.15. Suppose that all links are 1 Gbps. What is the maximum total aggregate throughput that can be achieved among the 9 hosts and 2 servers in this network? You can assume that any host or server can send to any other host or server. Why? -- P24. Suppose the three departmental switches in Figure 6.15 are replaced by hubs. All links are 1 Gbps. Now answer the questions posed in problem P23. -- P25. Suppose that *all* the switches in Figure 6.15 are replaced by hubs. All links are 1 Gbps. Now answer the questions posed in problem P23. -- P26. Let's consider the operation of a learning switch in the context of a network in which 6 nodes labeled A through F are star connected into an Ethernet switch. Suppose that *(i)* B sends a frame to E, *(ii)* E replies with a frame to B, *(iii)* A sends a frame to B, *(iv)* B replies with a frame to A. The switch table - -{550}------------------------------------------------ - -- is initially empty. Show the state of the switch table before and after each of these events. For each of these events, identify the link(s) on which the transmitted frame will be forwarded, and briefly justify your answers. -- P27. In this problem, we explore the use of small packets for Voice-over-IP applications. One of the drawbacks of a small packet size is that a large fraction of link bandwidth is consumed by overhead bytes. To this end, suppose that the packet consists of *P* bytes and 5 bytes of header. - - a. Consider sending a digitally encoded voice source directly. Suppose the source is encoded at a constant rate of 128 kbps. Assume each packet is entirely filled before the source sends the packet into the network. The time required to fill a packet is the **packetization delay**. In terms of *L*, determine the packetization delay in milliseconds. - - b. Packetization delays greater than 20 msec can cause a noticeable and unpleasant echo. Determine the packetization delay for *L* = 1,500 bytes (roughly corresponding to a maximum-sized Ethernet packet) and for *L* = 50 (corresponding to an ATM packet). - - c. Calculate the store-and-forward delay at a single switch for a link rate of *R* = 622 Mbps for *L* = 1,500 bytes, and for *L* = 50 bytes. - - d. Comment on the advantages of using a small packet size. -- P28. Consider the single switch VLAN in Figure 6.25, and assume an external router is connected to switch port 1. Assign IP addresses to the EE and CS hosts and router interface. Trace the steps taken at both the network layer and the link layer to transfer an IP datagram from an EE host to a CS host (*Hint:* Reread the discussion of Figure 6.19 in the text). -- P29. Consider the MPLS network shown in Figure 6.29, and suppose that routers R5 and R6 are now MPLS enabled. Suppose that we want to perform traffic engineering so that packets from R6 destined for A are switched to A via R6-R4-R3-R1, and packets from R5 destined for A are switched via R5-R4-R2-R1. Show the MPLS tables in R5 and R6, as well as the modified table in R4, that would make this possible. -- P30. Consider again the same scenario as in the previous problem, but suppose that packets from R6 destined for D are switched via R6-R4-R3, while packets from R5 destined to D are switched via R4-R2-R1-R3. Show the MPLS tables in all routers that would make this possible. -- P31. In this problem, you will put together much of what you have learned about Internet protocols. Suppose you walk into a room, connect to Ethernet, and want to download a Web page. What are all the protocol steps that take place, starting from powering on your PC to getting the Web page? Assume there is nothing in our DNS or browser caches when you power on your PC. - -{551}------------------------------------------------ - -- (*Hint:* The steps include the use of Ethernet, DHCP, ARP, DNS, TCP, and HTTP protocols.) Explicitly indicate in your steps how you obtain the IP and MAC addresses of a gateway router. -- P32. Consider the data center network with hierarchical topology in Figure 6.30. Suppose now there are 80 pairs of flows, with ten flows between the first and ninth rack, ten flows between the second and tenth rack, and so on. Further suppose that all links in the network are 10 Gbps, except for the links between hosts and TOR switches, which are 1 Gbps. - - a. Each flow has the same data rate; determine the maximum rate of a flow. - - b. For the same traffic pattern, determine the maximum rate of a flow for the highly interconnected topology in Figure 6.31. - - c. Now suppose there is a similar traffic pattern, but involving 20 hosts on each rack and 160 pairs of flows. Determine the maximum flow rates for the two topologies. -- P33. Consider the hierarchical network in Figure 6.30 and suppose that the data center needs to support e-mail and video distribution among other applications. Suppose four racks of servers are reserved for e-mail and four racks are reserved for video. For each of the applications, all four racks must lie below a single tier-2 switch since the tier-2 to tier-1 links do not have sufficient bandwidth to support the intra-application traffic. For the e-mail application, suppose that for 99.9 percent of the time only three racks are used, and that the video application has identical usage patterns. - - a. For what fraction of time does the e-mail application need to use a fourth rack? How about for the video application? - - b. Assuming e-mail usage and video usage are independent, for what fraction of time do (equivalently, what is the probability that) both applications need their fourth rack? - - c. Suppose that it is acceptable for an application to have a shortage of servers for 0.001 percent of time or less (causing rare periods of performance degradation for users). Discuss how the topology in Figure 6.31 can be used so that only seven racks are collectively assigned to the two applications (assuming that the topology can support all the traffic). - -# **Wireshark Labs: 802.11 Ethernet** - -At the Companion website for this textbook, http://www.pearsonhighered.com/ cs-resources/, you'll find a Wireshark lab that examines the operation of the IEEE 802.3 protocol and the Wireshark frame format. A second Wireshark lab examines packet traces taken in a home network scenario. - -{552}------------------------------------------------ - -# Albert Greenberg - -Albert Greenberg is Microsoft Corporate Vice President for Azure Networking. He leads development for the Azure Networking team, which is responsible for networking R&D at Microsoft - within and across data centers and edge sites; global terrestrial and subsea networks; optical networking; FPGA and SmartNIC offloads; access and hybrid cloud networking; host networking and network virtualization; application load balancers and network virtual appliances; network services and analytics; security services; container networking; content distribution networks; edge networking including application acceleration and 5G, and first party networks. To meet the challenges of agility and quality that comes with cloud scale, his team has developed and embraced custom hardware, machine learning, and open source. Albert moved to Microsoft in 2007 to innovate on Cloud and bring networking to the host (network virtualization), ideas that appeared, among many, in his VL2 paper, and which underly Cloud networking today. - -Prior to joining Microsoft, Albert worked at Bell Labs and AT&T Labs as an AT&T Fellow. He helped build the systems and tools that run AT&T's networks, and pioneered the architecture and systems at the foundations of software-defined networking. He holds an AB in Mathematics from Dartmouth College and a PhD in Computer Science from the University of Washington. - -Albert is a member of the National Academy of Engineering, and an ACM Fellow. He has received the IEEE Koji Kobayashi Computer and Communication Award, ACM Sigcomm Award, and ACM Sigcomm and Sigmetrics Test of Time paper awards. Albert and wife Kathryn are proud parents of four daughters. He grew up in New Orleans. While the Seattle Seahawks are his team, he cannot shake his fondness for the Saints. - - - -{553}------------------------------------------------ - -#### What brought you to specialize in networking? - -I've always liked solving real-world problems, and also liked mathematics. I've found that the field of networking has lots of room and scope to do both. That mix was very appealing to me. While working on a PhD at the University of Washington, I benefited from the influence of Ed Lazowska on the systems side, and Richard Ladner and Martin Tompa on the mathematical and theoretical side. One of my MS course projects was to get two machines from the *same* vendor to talk to each other. Now it seems you can't *stop* machines from communicating! - -#### Do you have any advice for students entering the networking/Internet field? - -The face of networking is changing. It's becoming a very diverse, inclusive and open environment. I mean that in two ways. First, we will see far much more diversity among our network developers and researchers, including women and other underrepresented groups in technology. I'm proud of the diversity and inclusivity of the team at Microsoft, and my earlier teams at AT&T. Diversity makes us more resilient, better able to adapt to change, and makes our decisions better. Second, one can bring a diversity of technical skills and interests to networking. Those interests might be in architecture, programming languages, optics, formal methods, data science, AI, or in fault tolerant and reliable system design. Open source systems are having enormous impact. SONiC, a Linux-based an open source initiative for networking operating systems, is a great example. Read this book, and bring your whole set of skills, experience and knowledge set to creating the networks of the future. SDN and Disaggregation brings diversity and openness. So exciting. - -#### Can you describe one or two of the most exciting projects you have worked on during your career? What were the biggest challenges? - -The cloud is by far the biggest thing to come along in a long time. The challenges there are head and shoulders above other system challenges I've worked on, in part because the cloud incorporate so many aspects of systems. Cloud scenarios stretch tremendously the challenge of networking. Traditional networking technology is only part of it; in practice today there's operating systems and distributed systems, architecture, performance, security, reliability, machine learning, data science, and management–the whole stack. If we used to think of these individual areas as "gardens", we can think of the cloud as a "farm" made up of all of these wonderful gardens. And the operational concerns of designing, monitoring and managing an ultra-reliable global-scale system are crucial, as the cloud provides critically important infrastructure for government, industry, education and more. All of that has to be rock solid; it needs to be secure; it needs to be trustworthy. Software is, of course, key to effectively monitoring and managing such a massive cloud. Here, SDN plays the central role in managing and provisioning at scale, creating, in essence, a software-defined data center. Software allows us to also innovate rapidly. - -{554}------------------------------------------------ - -#### How do you envision the future of networking and the Internet? What major challenges/ obstacles do you think lie ahead in their development, particularly in the areas of data center networking, and edge networks? - -I've already talked about Cloud, and we are just say 10% into its evolution. Yet, it's clear that the division of work in the end-to-end system will be an increasingly important issue. How much computation and storage will happen in the application and at the end-host? How much will happen in cloud components at the network's "edge", at or near the end host or container? And how much will happen in the data centers themselves. How will all of this be orchestrated? We'll see cloud computing being pushed closer to the edge and we'll see "horizontal" growth–a richer end-to-end computing/data/networking ecosystem– not just growth, say within a data center. This will be an area of great innovation. 5G wireless will be an important part of this mix. - -#### Who has inspired you professionally? - -I've learned a tremendous amount, at both Microsoft and AT&T, from customers and from the live site. Interacting with engineers inspires me, for their passion for dev and dev-ops of the entire lifecycle (invention to development to deployment to ultimate decommission) of operational services and systems. These are the people who know architecture and systems from end to end, inside out. They're great to work with and have so much insight, experience and knowledge to share, whether that be Microsoft's Azure Cloud or earlier in my career AT&T's networks. I've also loved working with the researchers who have established some of the principles underlying the design and management of these at-scale systems. - -{555}------------------------------------------------ diff --git a/generated/computer-networking-a-top-down-approach-8ed/7.md b/generated/computer-networking-a-top-down-approach-8ed/7.md index 3d98209..2b736a6 100644 --- a/generated/computer-networking-a-top-down-approach-8ed/7.md +++ b/generated/computer-networking-a-top-down-approach-8ed/7.md @@ -964,154 +964,3 @@ We began this chapter with an introduction to wireless and mobile networks, draw Mobile IP standard. Finally, we considered the impact of wireless links and mobility on transport-layer protocols and networked applications in Section 7.7. Although we have devoted an entire chapter to the study of wireless and mobile networks, an entire book (or more) would be required to fully explore this exciting and rapidly expanding field. We encourage you to delve more deeply into this field by consulting the many references provided in this chapter. - -# **Homework Problems and Questions** - -# **Chapter 7 Review Questions** - -#### SECTION 7.1 - -- R1. What does it mean for a wireless network to be operating in "infrastructure mode"? If the network is not in infrastructure mode, what mode of operation is it in, and what is the difference between that mode of operation and infrastructure mode? -- R2. What are the four types of wireless networks identified in our taxonomy in Section 7.1? Which of these types of wireless networks have you used? - -#### SECTION 7.2 - -- R3. What are the differences between the following types of wireless channel impairments: path loss, multipath propagation, interference from other sources? -- R4. As a mobile node gets farther and farther away from a base station, what are two actions that a base station could take to ensure that the loss probability of a transmitted frame does not increase? - -#### SECTION 7.3 - -- R5. Describe the role of the beacon frames in 802.11. -- R6. True or false: Before an 802.11 station transmits a data frame, it must first send an RTS frame and receive a corresponding CTS frame. -- R7. Why are acknowledgments used in 802.11 but not in wired Ethernet? -- R8. True or false: Ethernet and 802.11 use the same frame structure. -- R9. Describe how the RTS threshold works. -- R10. Suppose the IEEE 802.11 RTS and CTS frames were as long as the standard DATA and ACK frames. Would there be any advantage to using the CTS and RTS frames? Why or why not? -- R11. Section 7.3.4 discusses 802.11 mobility, in which a wireless station moves from one BSS to another within the same subnet. When the APs are interconnected with a switch, an AP may need to send a frame with a spoofed MAC address to get the switch to forward the frame properly. Why? - -{622}------------------------------------------------ - -- R12. What are the differences between a master device in a Bluetooth network and a base station in an 802.11 network? -- R13. What is the role of the base station in 4G/5G cellular architecture? With which other 4G/5G network elements (mobile device, MME, HSS, Serving Gateway Router, PDN Gateway Router) does it *directly* communicate with in the control plane? In the data plane? -- R14. What is an International Mobile Subscriber Identity (IMSI)? -- R15. What is the role of the Home Subscriber Service (HSS) in 4G/5G cellular architecture? With which other 4G/5G network elements (mobile device, base station, MME, Serving Gateway Router, PDN Gateway Router) does it *directly* communicate with in the control plane? In the data plane? -- R16. What is the role of the Mobility Management Entity (MME) in 4G/5G cellular architecture? With which other 4G/5G network elements (mobile device, base station, HSS, Serving Gateway Router, PDN Gateway Router) does it *directly* communicate with in the control plane? In the data plane? -- R17. Describe the purpose of two tunnels in the data plane of the 4G/5G cellular architecture. When a mobile device is attached to its own home network, at which 4G/5G network element (mobile device, base station, HSS, MME, Serving Gateway Router, PDN Gateway Router) does each end of each of the two tunnels terminate? -- R18. What are the three sublayers in the link layer in the LTE protocol stack? Briefly describe their functions. -- R19. Does the LTE wireless access network use FDMA, TDMA, or both? Explain your answer. -- R20. Describe the two possible sleep modes of a 4G/5G mobile device. In each of these sleep modes, will the mobile device remain associated with the same base station between the time it goes to sleep and the time it wakes up and first sends/receives a new datagram? -- R21. What is meant by a "visited network" and a "home network" in 4G/5G cellular architecture? -- R22. List three important differences between 4G and 5G cellular networks. - -#### SECTION 7.5 - -- R23. What does it mean that a mobile device is said to be "roaming?" -- R24. What is meant by "hand over" of a network device? -- R25. What is the difference between direct and indirect routing of datagrams to/ from a roaming mobile host? -- R26. What does "triangle routing" mean? - -{623}------------------------------------------------ - -#### SECTION 7.6 - -- R27. Describe the similarity and differences in tunnel configuration when a mobile device is resident in its home network, versus when it is roaming in a visited network. -- R28. When a mobile device is handed over from one base station to another in a 4G/5G network, which network element makes the decision to initiate that handover? Which network element chooses the target base station to which the mobile device will be handed over? -- R29. Describe how and when the forwarding path of datagrams entering the visited network and destined to the mobile device changes before, during, and after hand over. -- R30. Consider the following elements of the Mobile IP architecture: the home network, foreign network permanent IP address, home agent, foreign agent, data plane forwarding, Access Point (AP), and WLANs at the network edge. What are the closest equivalent elements in the 4G/5G cellular network architecture? - -#### SECTION 7.7 - -R31. What are three approaches that can be used to avoid having a single wireless link degrade the performance of an end-to-end transport-layer TCP connection? - -# **Problems** - -- P1. Consider the single-sender CDMA example in Figure 7.5. What would be the sender's output (for the 2 data bits shown) if the sender's CDMA code were (1, -1, 1, -1, 1, 1, 1, -1)? -- P2. Consider sender 2 in Figure 7.6. What is the sender's output to the channel (before it is added to the signal from sender 1), Z2 *<sup>i</sup>*,*<sup>m</sup>*? -- P3. Suppose that the receiver in Figure 7.6 wanted to receive the data being sent by sender 2. Show (by calculation) that the receiver is indeed able to recover sender 2's data from the aggregate channel signal by using sender 2's code. -- P4. For the two-sender, two-receiver example, give an example of two CDMA codes containing 1 and 21 values that do not allow the two receivers to extract the original transmitted bits from the two CDMA senders. -- P5. Suppose there are two ISPs providing WiFi access in a particular café, with each ISP operating its own AP and having its own IP address block. - - a. Further suppose that by accident, each ISP has configured its AP to operate over channel 11. Will the 802.11 protocol completely break down in this situation? Discuss what happens when two stations, each associated with a different ISP, attempt to transmit at the same time. - - b. Now suppose that one AP operates over channel 1 and the other over channel 11. How do your answers change? - -{624}------------------------------------------------ - -- P6. In step 4 of the CSMA/CA protocol, a station that successfully transmits a frame begins the CSMA/CA protocol for a second frame at step 2, rather than at step 1. What rationale might the designers of CSMA/CA have had in mind by having such a station not transmit the second frame immediately (if the channel is sensed idle)? -- P7. Suppose an 802.11b station is configured to always reserve the channel with the RTS/CTS sequence. Suppose this station suddenly wants to transmit 1,500 bytes of data, and all other stations are idle at this time. As a function of SIFS and DIFS, and ignoring propagation delay and assuming no bit errors, calculate the time required to transmit the frame and receive the acknowledgment. -- P8. Consider the scenario shown in Figure 7.31, in which there are four wireless nodes, A, B, C, and D. The radio coverage of the four nodes is shown via the shaded ovals; all nodes share the same frequency. When A transmits, it can only be heard/received by B; when B transmits, both A and C can hear/ receive from B; when C transmits, both B and D can hear/receive from C; when D transmits, only C can hear/receive from D. -- Suppose now that each node has an infinite supply of messages that it wants to send to each of the other nodes. If a message's destination is not an immediate neighbor, then the message must be relayed. For example, if A wants to send to D, a message from A must first be sent to B, which then sends the message to C, which then sends the message to D. Time is slotted, with a message transmission time taking exactly one time slot, e.g., as in slotted Aloha. During a slot, a node can do one of the following: (*i*) send a message, (*ii*) receive a message (if exactly one message is being sent to it), (*iii*) remain silent. As always, if a node hears two or more simultaneous transmissions, a collision occurs and none of the transmitted messages are received successfully. You can assume here that there are no bit-level errors, and thus if exactly one message is sent, it will be received correctly by those within the transmission radius of the sender. - - a. Suppose now that an omniscient controller (i.e., a controller that knows the state of every node in the network) can command each node to do whatever it (the omniscient controller) wishes, that is, to send a message, to receive a - - - -**Figure 7.31** ♦ Scenario for problem P8 - -{625}------------------------------------------------ - -- message, or to remain silent. Given this omniscient controller, what is the maximum rate at which a data message can be transferred from C to A, given that there are no other messages between any other source/destination pairs? -- b. Suppose now that A sends messages to B, and D sends messages to C. What is the combined maximum rate at which data messages can flow from A to B and from D to C? -- c. Suppose now that A sends messages to B, and C sends messages to D. What is the combined maximum rate at which data messages can flow from A to B and from C to D? -- d. Suppose now that the wireless links are replaced by wired links. Repeat questions (a) through (c) again in this wired scenario. -- e. Now suppose we are again in the wireless scenario, and that for every data message sent from source to destination, the destination will send an ACK message back to the source (e.g., as in TCP). Also suppose that each ACK message takes up one slot. Repeat questions (a)–(c) above for this scenario. -- P9. Describe the format of the Bluetooth frame. You will have to do some reading outside of the text to find this information. Is there anything in the frame format that inherently limits the number of active nodes in an network to eight active nodes? Explain. -- P10. Consider the following idealized LTE scenario. The downstream channel (see Figure 7.22) is slotted in time, across F frequencies. There are four nodes, A, B, C, and D, reachable from the base station at rates of 10 Mbps, 5 Mbps, 2.5 Mbps, and 1 Mbps, respectively, on the downstream channel. These rates assume that the base station utilizes all time slots available on all F frequencies to send to just one station. The base station has an infinite amount of data to send to each of the nodes, and can send to any one of these four nodes using any of the F frequencies during any time slot in the downstream sub-frame. - - a. What is the maximum rate at which the base station can send to the nodes, assuming it can send to any node it chooses during each time slot? Is your solution fair? Explain and define what you mean by "fair." - - b. If there is a fairness requirement that each node must receive an equal amount of data during each one second interval, what is the average transmission rate by the base station (to all nodes) during the downstream sub-frame? Explain how you arrived at your answer. - - c. Suppose that the fairness criterion is that any node can receive at most twice as much data as any other node during the sub-frame. What is the average transmission rate by the base station (to all nodes) during the subframe? Explain how you arrived at your answer. -- P11. In Section 7.5, one proposed solution that allowed mobile users to maintain their IP addresses as they moved among foreign networks was to have a foreign network advertise a highly specific route to the mobile user and use the existing - -{626}------------------------------------------------ - -routing infrastructure to propagate this information throughout the network. We identified scalability as one concern. Suppose that when a mobile user moves from one network to another, the new foreign network advertises a specific route to the mobile user, and the old foreign network withdraws its route. Consider how routing information propagates in a distance-vector algorithm (particularly for the case of interdomain routing among networks that span the globe). - -- a. Will other routers be able to route datagrams immediately to the new foreign network as soon as the foreign network begins advertising its route? -- b. Is it possible for different routers to believe that different foreign networks contain the mobile user? -- c. Discuss the timescale over which other routers in the network will eventually learn the path to the mobile users. -- P12. In 4G/5G networks, what effect will handoff have on end-to-end delays of datagrams between the source and destination? -- P13. Consider a mobile device that powers on and attaches to an LTE visited network *A*, and assume that indirect routing to the mobile device from its home network *H* is being used. Subsequently, while roaming, the device moves out of range of visited network *A* and moves into range of an LTE visited network *B*. You will design a handover process from a base station *BS.A* in visited network *A* to a base station *BS.B* in visited network *B*. Sketch the series of steps that would need to be taken, taking care to identify the network elements involved (and the networks to which they belong), to accomplish this handover. Assume that following handover, the tunnel from the home network to the visited network will terminate in visiting network *B*. -- P14. Consider again the scenario in Problem P13. But now assume that the tunnel from home network *H* to visited network *A* will continue to be used. That is, visited network *A* will serve as an anchor point following handover. (Aside: this is actually the process used for routing circuit-switched voice calls to a roaming mobile phone in 2G GSM networks.) In this case, additional tunnel(s) will need to be built to reach the mobile device in its resident visited network *B*. Once again, sketch the series of steps that would need to be taken, taking care to identify the network elements involved (and the networks to which they belong), to accomplish this handover. - -What are one advantage and one disadvantage of this approach over the approach taken in your solution to Problem P13? - -# **Wireshark Lab: WiFi** - -At the Web site for this textbook, www.pearsonhighered.com/cs-resources, also mirrored on the instructors' website, http://gaia.cs.umass.edu/kurose\_ross, you'll find a Wireshark lab for this chapter that captures and studies the 802.11 frames exchanged between a wireless laptop and an access point. - -{627}------------------------------------------------ - -# Deborah Estrin - -Deborah Estrin is a Professor of Computer Science and Associate Dean for Impact at Cornell Tech in New York City and a Professor of Public Health at Weill Cornell Medical College. She received her Ph.D. (1985) in Computer Science from M.I.T. and her B.S. (1980) from UC Berkeley. Estrin's early research focused on the design of network protocols, including multicast and inter-domain routing. In 2002 Estrin founded the NSF-funded Science and Technology Center at UCLA, Center for Embedded Networked Sensing (CENS http://cens.ucla.edu.). CENS launched new areas of multi-disciplinary computer systems research from sensor networks for environmental monitoring, to participatory sensing and mobile health. As described in her 2013 TEDMED talk, she explores how individuals can benefit from the pervasive data byproducts of digital and IoT interactions for health and life management. Professor Estrin is an elected member of the American Academy of Arts and Sciences (2007), the National Academy of Engineering (2009), and the National Academy of Medicine (2019). She is a Fellow of the IEEE, ACM, and AAAS. She was selected as the first ACM-W Athena Lecturer (2006), awarded the Anita Borg Institute's Women of Vision Award for Innovation (2007), inducted into the WITI hall of fame (2008), received honorary doctorates from EPFL (2008) and Uppsala University (2011), and was selected as a MacArthur Fellow (2018). - - - -Courtesy of Deborah Estrin - -#### Please describe a few of the most exciting projects you have worked on during your career. What were the biggest challenges? - -In the mid-90s at USC and ISI, I had the great fortune to work with the likes of Steve Deering, Mark Handley, and Van Jacobson on the design of multicast routing protocols (in particular, PIM). I tried to carry many of the architectural design lessons from multicast into the design of ecological monitoring arrays, where for the first time I really began to take applications and multidisciplinary research seriously. The need for jointly innovating in the social and technological space is what interests me so much about my latest area of research, mobile health. The challenges in multicast routing, environmental sensing and - -{628}------------------------------------------------ - -mobile health are as diverse as the problem domains, but what they have in common is the need to keep our eyes open to whether we have the problem definition right as we iterate between design and deployment, prototype and pilot. None of these are problems that could be solved solely analytically, or with simulation or even in constructed laboratory experiments. They challenged our ability to retain clean architectures in the presence of messy problems and contexts, and they required extensive collaboration. - -#### What changes and innovations do you see happening in wireless networks and mobility in the future? - -In a prior edition of this interview I said that I have never put much faith into predicting the future, but I did go on to speculate that we might see the end of feature phones (i.e., those that are not programmable and are used only for voice and text messaging) as smart phones become more and more powerful and the primary point of Internet access for many—and now not so many years later that is clearly the case. I also predicted that we would see the continued proliferation of embedded SIMs by which all sorts of devices have the ability to communicate via the cellular network at low data rates. While that has occurred, we see many devices and "Internet of Things" that use embedded WiFi and other lower power, shorter range, forms of connectivity to local hubs. I did not anticipate at that time the emergence of a large consumer wearables market or interactive voice agents like Siri and Alexa. By the time the next edition is published I expect broad proliferation of personal applications that leverage data from IoT and other digital traces. - -#### Where do you see the future of networking and the Internet? - -Again I think it's useful to look both back and forward. Previously I commented that the efforts in named data and software-defined networking would emerge to create a more manageable, evolvable, and richer infrastructure and more generally represent moving the role of architecture higher up in the stack. In the beginnings of the Internet, architecture was layer 4 and below, with applications being more siloed/monolithic, sitting on top. Now data and analytics dominate transport. The adoption of SDN (which I was really happy to see introduced into the 7th edition of this book) has been well beyond what I ever anticipated. That said, new challenges have emerged from higher up in the stack. Machine Learning based systems and services favor scale, particularly when they rely on continuous consumer engagement (clicks) for financial viability. The resulting information ecosystem has become far more monolithic than in earlier decades. This is a challenge for networking, the Internet, and frankly our society. - -{629}------------------------------------------------ - -#### What people inspired you professionally? - -There are three people who come to mind. First, Dave Clark, the secret sauce and undersung hero of the Internet community. I was lucky to be around in the early days to see him act as the "organizing principle" of the IAB and Internet governance; the priest of rough consensus and running code. Second, Scott Shenker, for his intellectual brilliance, integrity, and persistence. I strive for, but rarely attain, his clarity in defining problems and solutions. He is always the first person I e-mail for advice on matters large and small. Third, my sister Judy Estrin, who had the creativity and commitment to spend the first half of her career bringing ideas and concepts to market; and now has the courage to study, write, and advise on how to rebuild it to support a healthier democracy. - -#### What are your recommendations for students who want careers in computer science and networking? - -First, build a strong foundation in your academic work, balanced with any and every realworld work experience you can get. As you look for a working environment, seek opportunities in problem areas you really care about and with smart teams that you can learn from and work with to build things that matter. - -{630}------------------------------------------------ - -{631}------------------------------------------------ diff --git a/generated/computer-networking-a-top-down-approach-8ed/8.md b/generated/computer-networking-a-top-down-approach-8ed/8.md index 5f83ca3..f4cef15 100644 --- a/generated/computer-networking-a-top-down-approach-8ed/8.md +++ b/generated/computer-networking-a-top-down-approach-8ed/8.md @@ -1231,156 +1231,3 @@ In Sections 8.5 through 8.8 we examined several security networking protocols th Armed with the techniques covered in Sections 8.2 through 8.8, Bob and Alice can communicate securely. But confidentiality is only a small part of the network security picture. As we learned in Section 8.9, increasingly, the focus in network security has been on securing the network infrastructure against a potential onslaught by the bad guys. In the latter part of this chapter, we thus covered firewalls and IDS systems which inspect packets entering and leaving an organization's network. {704}------------------------------------------------ - -# **Homework Problems and Questions** - -#### **Chapter 8 Review Problems** - -#### SECTION 8.1 - -- R1. What are the differences between message confidentiality and message integrity? Can you have confidentiality without integrity? Can you have integrity without confidentiality? Justify your answer. -- R2. Internet entities (routers, switches, DNS servers, Web servers, user end systems, and so on) often need to communicate securely. Give three specific example pairs of Internet entities that may want secure communication. - -#### SECTION 8.2 - -- R3. From a service perspective, what is an important difference between a symmetric-key system and a public-key system? -- R4. Suppose that an intruder has an encrypted message as well as the decrypted version of that message. Can the intruder mount a ciphertext-only attack, a known-plaintext attack, or a chosen-plaintext attack? -- R5. Consider an 8-bit block cipher. How many possible input blocks does this cipher have? How many possible mappings are there? If we view each mapping as a key, then how many possible keys does this cipher have? -- R6. Suppose *N* people want to communicate with each of *N* 1 other people using symmetric key encryption. All communication between any two people, *i* and *j*, is visible to all other people in this group of *N*, and no other person in this group should be able to decode their communication. How many keys are required in the system as a whole? Now suppose that public key encryption is used. How many keys are required in this case? -- R7. Suppose *n* = 10,000, *a* = 10,023, and *b* = 10,004. Use an identity of modular arithmetic to calculate in your head (*<sup>a</sup>*# *b*) mod *n*. -- R8. Suppose you want to encrypt the message 10101111 by encrypting the decimal number that corresponds to the message. What is the decimal number? - -#### SECTIONS 8.3–8.4 - -- R9. In what way does a hash provide a better message integrity check than a checksum (such as the Internet checksum)? -- R10. Can you "decrypt" a hash of a message to get the original message? Explain your answer. - -{705}------------------------------------------------ - -- R11. Consider a variation of the MAC algorithm (Figure 8.9) where the sender sends (*m*, *H*(*m*) + *s*), where *H*(*m*) + *s* is the concatenation of *H*(*m*) and *s*. Is this variation flawed? Why or why not? -- R12. What does it mean for a signed document to be verifiable and nonforgeable? -- R13. In what way does the public-key encrypted message hash provide a better digital signature than the public-key encrypted message? -- R14. Suppose certifier.com creates a certificate for foo.com. Typically, the entire certificate would be encrypted with certifier.com's public key. True or false? -- R15. Suppose Alice has a message that she is ready to send to anyone who asks. Thousands of people want to obtain Alice's message, but each wants to be sure of the integrity of the message. In this context, do you think a MACbased or a digital-signature-based integrity scheme is more suitable? Why? -- R16. What is the purpose of a nonce in an end-point authentication protocol? -- R17. What does it mean to say that a nonce is a once-in-a-lifetime value? In whose lifetime? -- R18. Is the message integrity scheme based on HMAC susceptible to playback attacks? If so, how can a nonce be incorporated into the scheme to remove this susceptibility? - -#### SECTIONS 8.5–8.8 - -- R19. Suppose that Bob receives a PGP message from Alice. How does Bob know for sure that Alice created the message (rather than, say, Trudy)? Does PGP use a MAC for message integrity? -- R20. In the TLS record, there is a field for TLS sequence numbers. True or false? -- R21. What is the purpose of the random nonces in the TLS handshake? -- R22. Suppose an TLS session employs a block cipher with CBC. True or false: The server sends to the client the IV in the clear. -- R23. Suppose Bob initiates a TCP connection to Trudy who is pretending to be Alice. During the handshake, Trudy sends Bob Alice's certificate. In what step of the TLS handshake algorithm will Bob discover that he is not communicating with Alice? -- R24. Consider sending a stream of packets from Host A to Host B using IPsec. Typically, a new SA will be established for each packet sent in the stream. True or false? -- R25. Suppose that TCP is being run over IPsec between headquarters and the branch office in Figure 8.28. If TCP retransmits the same packet, then the two corresponding packets sent by R1 packets will have the same sequence number in the ESP header. True or false? - -{706}------------------------------------------------ - -- R26. An IKE SA and an IPsec SA are the same thing. True or false? -- R27. Consider WEP for 802.11. Suppose that the data is 10101100 and the keystream is 1111000. What is the resulting ciphertext? - -#### SECTION 8.9 - -- R28. Stateful packet filters maintain two data structures. Name them and briefly describe what they do. -- R29. Consider a traditional (stateless) packet filter. This packet filter may filter packets based on TCP flag bits as well as other header fields. True or false? -- R30. In a traditional packet filter, each interface can have its own access control list. True or false? -- R31. Why must an application gateway work in conjunction with a router filter to be effective? -- R32. Signature-based IDSs and IPSs inspect into the payloads of TCP and UDP segments. True or false? - -# **Problems** - -- P1. Using the monoalphabetic cipher in Figure 8.3, encode the message "This is an easy problem." Decode the message "rmij'u uamu xyj." -- P2. Show that Trudy's known-plaintext attack, in which she knows the (ciphertext, plaintext) translation pairs for seven letters, reduces the number of possible substitutions to be checked in the example in Section 8.2.1 by approximately 109. -- P3. Consider the polyalphabetic system shown in Figure 8.4. Will a chosenplaintext attack that is able to get the plaintext encoding of the message "The quick brown fox jumps over the lazy dog." be sufficient to decode all messages? Why or why not? -- P4. Consider the block cipher in Figure 8.5. Suppose that each block cipher *Ti* simply reverses the order of the eight input bits (so that, for example, 11110000 becomes 00001111). Further suppose that the 64-bit scrambler does not modify any bits (so that the output value of the *m*th bit is equal to the input value of the *m*th bit). (a) With *n* = 3 and the original 64-bit input equal to 10100000 repeated eight times, what is the value of the output? (b) Repeat part (a) but now change the last bit of the original 64-bit input from a 0 to a 1. (c) Repeat parts (a) and (b) but now suppose that the 64-bit scrambler inverses the order of the 64 bits. -- P5. Consider the block cipher in Figure 8.5. For a given "key" Alice and Bob would need to keep eight tables, each 8 bits by 8 bits. For Alice (or Bob) to store all eight tables, how many bits of storage are necessary? How does this number compare with the number of bits required for a full-table 64-bit block cipher? - -{707}------------------------------------------------ - -- P6. Consider the 3-bit block cipher in Table 8.1. Suppose the plaintext is 100100100. (a) Initially assume that CBC is not used. What is the resulting ciphertext? (b) Suppose Trudy sniffs the ciphertext. Assuming she knows that a 3-bit block cipher without CBC is being employed (but doesn't know the specific cipher), what can she surmise? (c) Now suppose that CBC is used with IV = 111. What is the resulting ciphertext? -- P7. (a) Using RSA, choose *p* = 3 and *q* = 11, and encode the word "dog" by encrypting each letter separately. Apply the decryption algorithm to the encrypted version to recover the original plaintext message. (b) Repeat part (a) but now encrypt "dog" as one message *m*. -- P8. Consider RSA with *p* = 5 and *q* = 11. - - a. What are *n* and *z*? - - b. Let *e* be 3. Why is this an acceptable choice for *e*? - - c. Find *d* such that *de* = 1 (mod *z*) and *d* 6 160. - - d. Encrypt the message *m* = 8 using the key (*n*, *e*). Let *c* denote the corresponding ciphertext. Show all work. *Hint:* To simplify the calculations, use the fact: - -$$[(a \bmod n) \cdot (b \bmod n)] \bmod n = (a \cdot b) \bmod n$$ - -- P9. In this problem, we explore the Diffie-Hellman (DH) public-key encryption algorithm, which allows two entities to agree on a shared key. The DH algorithm makes use of a large prime number *p* and another large number *g* less than *p*. Both *p* and *g* are made public (so that an attacker would know them). In DH, Alice and Bob each independently choose secret keys, *SA* and *SB*, respectively. Alice then computes her public key, *TA*, by raising *g* to *SA* and then taking mod *p*. Bob similarly computes his own public key *TB* by raising *g* to *SB* and then taking mod *p*. Alice and Bob then exchange their public keys over the Internet. Alice then calculates the shared secret key *S* by raising *TB* to *SA* and then taking mod *p*. Similarly, Bob calculates the shared key *S*′ by raising *TA* to *SB* and then taking mod *p*. - - a. Prove that, in general, Alice and Bob obtain the same symmetric key, that is, prove *S* = *S*′. - - b. With *p* = 11 and *g* = 2, suppose Alice and Bob choose private keys *SA* = 5 and *SB* = 12, respectively. Calculate Alice's and Bob's public keys, *TA* and *TB*. Show all work. - - c. Following up on part (b), now calculate *S* as the shared symmetric key. Show all work. - - d. Provide a timing diagram that shows how Diffie-Hellman can be attacked by a man-in-the-middle. The timing diagram should have three vertical lines, one for Alice, one for Bob, and one for the attacker Trudy. - -{708}------------------------------------------------ - -- P10. Suppose Alice wants to communicate with Bob using symmetric key cryptography using a session key *KS*. In Section 8.2, we learned how public-key cryptography can be used to distribute the session key from Alice to Bob. In this problem, we explore how the session key can be distributed—without public key cryptography—using a key distribution center (KDC). The KDC is a server that shares a unique secret symmetric key with each registered user. For Alice and Bob, denote these keys by *KA*@*KDC* and *KB*@*KDC*. Design a scheme that uses the KDC to distribute *KS* to Alice and Bob. Your scheme should use three messages to distribute the session key: a message from Alice to the KDC; a message from the KDC to Alice; and finally a message from Alice to Bob. The first message is *KA*@*KDC* (*A*, *B*). Using the notation, *KA*@*KDC*, *KB*@*KDC, S, A,* and *B* answer the following questions. - - a. What is the second message? - - b. What is the third message? -- P11. Compute a third message, different from the two messages in Figure 8.8, that has the same checksum as the messages in Figure 8.8. -- P12. Suppose Alice and Bob share two secret keys: an authentication key *S1* and a symmetric encryption key *S2*. Augment Figure 8.9 so that both integrity and confidentiality are provided. -- P13. In the BitTorrent P2P file distribution protocol (see Chapter 2), the seed breaks the file into blocks, and the peers redistribute the blocks to each other. Without any protection, an attacker can easily wreak havoc in a torrent by masquerading as a benevolent peer and sending bogus blocks to a small subset of peers in the torrent. These unsuspecting peers then redistribute the bogus blocks to other peers, which in turn redistribute the bogus blocks to even more peers. Thus, it is critical for BitTorrent to have a mechanism that allows a peer to verify the integrity of a block, so that it doesn't redistribute bogus blocks. Assume that when a peer joins a torrent, it initially gets a .torrent file from a *fully* trusted source. Describe a simple scheme that allows peers to verify the integrity of blocks. -- P14. The OSPF routing protocol uses a MAC rather than digital signatures to provide message integrity. Why do you think a MAC was chosen over digital signatures? -- P15. Consider our authentication protocol in Figure 8.18 in which Alice authenticates herself to Bob, which we saw works well (i.e., we found no flaws in it). Now suppose that while Alice is authenticating herself to Bob, Bob must authenticate himself to Alice. Give a scenario by which Trudy, pretending to be Alice, can now authenticate herself to Bob as Alice. (*Hint*: Consider that the sequence of operations of the protocol, one with Trudy initiating and one with Bob initiating, can be arbitrarily interleaved. Pay particular attention to the fact that both Bob and Alice will use a nonce, and that if care is not taken, the same nonce can be used maliciously.) - -{709}------------------------------------------------ - -- P16. A natural question is whether we can use a nonce and public key cryptography to solve the end-point authentication problem in Section 8.4. Consider the following natural protocol: (1) Alice sends the message "I am Alice" to Bob. (2) Bob chooses a nonce, *R*, and sends it to Alice. (3) Alice uses her *private* key to encrypt the nonce and sends the resulting value to Bob. (4) Bob applies Alice's public key to the received message. Thus, Bob computes *R* and authenticates Alice. - - a. Diagram this protocol, using the notation for public and private keys employed in the textbook. - - b. Suppose that certificates are not used. Describe how Trudy can become a "woman-in-the-middle" by intercepting Alice's messages and then pretending to be Alice to Bob. -- P17. Figure 8.21 shows the operations that Alice must perform with PGP to provide confidentiality, authentication, and integrity. Diagram the corresponding operations that Bob must perform on the package received from Alice. -- P18. Suppose Alice wants to send an e-mail to Bob. Bob has a public-private key pair (*K*<sup>B</sup> <sup>+</sup>, *K*<sup>B</sup> -), and Alice has Bob's certificate. But Alice does not have a public, private key pair. Alice and Bob (and the entire world) share the same hash function H(# ). - - a. In this situation, is it possible to design a scheme so that Bob can verify that Alice created the message? If so, show how with a block diagram for Alice and Bob. - - b. Is it possible to design a scheme that provides confidentiality for sending the message from Alice to Bob? If so, show how with a block diagram for Alice and Bob. -- P19. Consider the Wireshark output below for a portion of an SSL session. - - a. Is Wireshark packet 112 sent by the client or server? - - b. What is the server's IP address and port number? - - c. Assuming no loss and no retransmissions, what will be the sequence number of the next TCP segment sent by the client? - - d. How many SSL records does Wireshark packet 112 contain? - - e. Does packet 112 contain a Master Secret or an Encrypted Master Secret or neither? - - f. Assuming that the handshake type field is 1 byte and each length field is 3 bytes, what are the values of the first and last bytes of the Master Secret (or Encrypted Master Secret)? - - g. The client encrypted handshake message takes into account how many SSL records? - - h. The server encrypted handshake message takes into account how many SSL records? - -{710}------------------------------------------------ - -P20. In Section 8.6.1, it is shown that without sequence numbers, Trudy (a womanin-the middle) can wreak havoc in a TLS session by interchanging TCP segments. Can Trudy do something similar by deleting a TCP segment? What does she need to do to succeed at the deletion attack? What effect will it have? - - - -(Wireshark screenshot reprinted by permission of the Wireshark Foundation.) - -- P21. Suppose Alice and Bob are communicating over a TLS session. Suppose an attacker, who does not have any of the shared keys, inserts a bogus TCP segment into a packet stream with correct TCP checksum and sequence numbers (and correct IP addresses and port numbers). Will TLS at the receiving side accept the bogus packet and pass the payload to the receiving application? Why or why not? -- P22. The following true/false questions pertain to Figure 8.28. - - a. When a host in 172.16.1/24 sends a datagram to an Amazon.com server, the router R1 will encrypt the datagram using IPsec. - -{711}------------------------------------------------ - -- b. When a host in 172.16.1/24 sends a datagram to a host in 172.16.2/24, the router R1 will change the source and destination address of the IP datagram. -- c. Suppose a host in 172.16.1/24 initiates a TCP connection to a Web server in 172.16.2/24. As part of this connection, all datagrams sent by R1 will have protocol number 50 in the left-most IPv4 header field. -- d. Consider sending a TCP segment from a host in 172.16.1/24 to a host in 172.16.2/24. Suppose the acknowledgment for this segment gets lost, so that TCP resends the segment. Because IPsec uses sequence numbers, R1 will not resend the TCP segment. -- P23. Consider the example in Figure 8.28. Suppose Trudy is a woman-in-themiddle, who can insert datagrams into the stream of datagrams going from R1 and R2. As part of a replay attack, Trudy sends a duplicate copy of one of the datagrams sent from R1 to R2. Will R2 decrypt the duplicate datagram and forward it into the branch-office network? If not, describe in detail how R2 detects the duplicate datagram. -- P24. Provide a filter table and a connection table for a stateful firewall that is as restrictive as possible but accomplishes the following: - - a. Allows all internal users to establish Telnet sessions with external hosts. - - b. Allows external users to surf the company Web site at 222.22.0.12. - - c. But otherwise blocks all inbound and outbound traffic. -- The internal network is 222.22/16. In your solution, suppose that the connection table is currently caching three connections, all from inside to outside. You'll need to invent appropriate IP addresses and port numbers. -- P25. Suppose Alice wants to visit the Web site activist.com using a TOR-like service. This service uses two non-colluding proxy servers, Proxy1 and Proxy2. Alice first obtains the certificates (each containing a public key) for Proxy1 and Proxy2 from some central server. Denote *K*<sup>1</sup> <sup>+</sup>( ), *K*<sup>2</sup> <sup>+</sup>( ), *K*<sup>1</sup> -( ), and *K*<sup>2</sup> -( ) for the encryption/decryption with public and private RSA keys. - - a. Using a timing diagram, provide a protocol (as simple as possible) that enables Alice to establish a shared session key *S*1 with Proxy1. Denote *S*1(*m*) for encryption/decryption of data *m* with the shared key *S*1. - - b. Using a timing diagram, provide a protocol (as simple as possible) that allows Alice to establish a shared session key *S*2 with Proxy2 *without revealing her IP address to Proxy2*. - - c. Assume now that shared keys *S*1 and *S*2 are now established. Using a timing diagram, provide a protocol (as simple as possible and *not using public-key cryptography*) that allows Alice to request an html page from activist.com *without revealing her IP address to Proxy2* and *without revealing to Proxy1 which site she is visiting*. Your diagram should end with an HTTP request arriving at activist.com. - -{712}------------------------------------------------ - -# **Wireshark Lab: SSL** - -In this lab (available from the book Web site), we investigate the Secure Sockets Layer (SSL) protocol. Recall from Section 8.6 that SSL is used for securing a TCP connection, and that it is extensively used in practice for secure Internet transactions. In this lab, we will focus on the SSL records sent over the TCP connection. We will attempt to delineate and classify each of the records, with a goal of understanding the why and how for each record. We investigate the various SSL record types as well as the fields in the SSL messages. We do so by analyzing a trace of the SSL records sent between your host and an e-commerce server. - -# **IPsec Lab** - -In this lab (available from the book Web site), we will explore how to create IPsec SAs between linux boxes. You can do the first part of the lab with two ordinary linux boxes, each with one Ethernet adapter. But for the second part of the lab, you will need four linux boxes, two of which having two Ethernet adapters. In the second half of the lab, you will create IPsec SAs using the ESP protocol in the tunnel mode. You will do this by first manually creating the SAs, and then by having IKE create the SAs. - -{713}------------------------------------------------ |
