Sei sulla pagina 1di 5

CS 352 Fall 2006 Homework 1 Chapters 2 & 3

Questions Chapter 2

Q.10 (TCP vs. UDP) Why do HTTP, FTP, SMTP, POP3, and IMAP run on top of TCP rather than on UDP? Q.15 (FTP) Why is it said that FTP sends control information out-of-band? P.7 (HTTP/DNS) Referring to Problem 61, suppose the HTML file references three very small objects on the same server. Neglecting transmission times, how much time elapses with a. Nonpersistent HTTP with no parallel TCP connections? b. Nonpersistent HTTP with parallel connections? c. Persistent HTTP with pipelining? P.9 (Caching/Delay) Consider Figure 2.11, for which there is an institutional network connected to the Internet. Suppose that the average object size is 900,000 bits and that the average request rate from the institutions browsers to the origin servers is 1.5 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] two seconds on average (see Section 2.2.6). 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 - ), where is the average time required to send an object over the access link and is the arrival rate of objects to the access link. a. Find the total average response time. b. Now suppose that a cache is installed in the institutional LAN. Suppose the hit rate is 0.4. Find the total response time. P.15 (Overlay Networks) Suppose there are N active peers in the Gnutella network, and each pair of peers has 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?

1 See the appendix for a copy of question 6.


All content is taken from Computer Networking: A Top-Down Approach Featuring The Internet, 3rd Edition by Kurose and Ross 1

Questions Chapter 3

Q.3 (TCP Reliability) Is it possible for an application to enjoy reliable data transfer even when the application runs over UDP? If so, how? Q.5 (Sequence Numbers) 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?Q.7 (TCP Congestion Control) 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 is the transmission rate that TCP would like to give to each of the connections? Q.7 (TCP Congestion Control) 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 same bottleneck link). The transmissions of the files start at the same time. What is the transmission rate that TCP would like to give to each of the connections? P.6 (FSM/Timeouts) Draw the FSM for the receiver side of protocol rdt3.0. P.16 (Go-Back-N) Consider the GBN protocol with a sender window size of 3 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 senders 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 send at time t? Justify your answer. P.37 (TCP/HTTP) True or false? a. If a Web page consists of exactly one object, then nonpersistent and persistent connections have exactly the same response-time performance. b. Consider sending one object of size O from server to browser over TCP. If O>S, where S is the maximum segment size, then the server will stall at least once. c. Suppose a Web page consists of 10 objects, each of size O bits. For persistent HTTP, the RTT portion of the response time is 20 RTT. d. Suppose a Web page consist of 10 objects, each of size O bits. For nonpersistent HTTP with five parallel connections, the RTT portion of the response time is 12 RTT.

All content is taken from Computer Networking: A Top-Down Approach Featuring The Internet, 3rd Edition by Kurose and Ross 2

Solutions Chapter 2

Q.10 (TCP vs. UDP) The applications associated with those protocols require that all application data be received in the correct order and without gaps. TCP provides this service whereas UDP does not. Q.15 (FTP) FTP uses two parallel TCP connections, one connection for sending control information (such as a request to transfer a file) and another connection for actually transferring the file. Because the control information is not sent over the same connection that the file is sent over, FTP sends control information out of band. P.7 (DNS) a. RTT1 + + RTTn + 2RTT0 + 32RTT0 = 8RTT0 + RTT1 + + RTTn. b. RTT1 + + RTTn + 2RTT0 + 2RTT0 = 4RTT0 + RTT1 + + RTTn. c. RTT1 + + RTTn + 2RTT0 + RTT0 = 3RTT0 + RTT1 + + RTTn. P.9 (Caching/Delay) a. The time to transmit an object of size L over a link or rate R is L/R. The average time is the average size of the object divided by R: = (900,000 bits)/(1,500,000 bits/sec) = .6 sec The traffic intensity on the link is (1.5 requests/sec)(.6 msec/request) = .9. Thus, the average access delay is (.6 sec)/(1 - .9) = 6 seconds. The total average response time is therefore 6 sec + 2 sec = 8 sec. b. The traffic intensity on the access link is reduced by 40% since the 40% of the requests are satisfied within the institutional network. Thus the average access delay is (.6 sec)/[1 (.6)(.9)] = 1.2 seconds. The response time is approximately zero if the request is satisfied by the cache (which happens with probability .4); the average response time is 1.2 sec + 2 sec = 3.2 sec for cache misses (which happens 60% of the time). So the average response time is (.4)(0 sec) + (.6)(3.2 sec) = 1.92 seconds. Thus the average response time is reduced from 8 sec to 1.92 sec.

P.15 (Overlay Networks) There are N nodes in the overlay network. There are N(N-1)/2 edges.

All content is taken from Computer Networking: A Top-Down Approach Featuring The Internet, 3rd Edition by Kurose and Ross 3

Solutions Chapter 3

Q.3 (TCP Reliability) Yes. The application developer can put reliable data transfer into the application layer protocol. This would require a significant amount of work and debugging, however. Q.5 (Sequence Numbers) a. 20 bytes b. ACK number = 90 Q.7 (TCP Congestion Control) R/2 P.6 (FSM/Timeouts) The sender side of protocol rdt3.0 differs from the sender side of protocol 2.2 in that timeouts have been added. We have seen that the introduction of timeouts adds the possibility of duplicate packets into the sender-to-receiver data stream. However, the receiver in protocol rdt.2.2 can already handle duplicate packets. (Receiver-side duplicates in rdt 2.2 would arise if the receiver sent an ACK that was lost, and the sender then retransmitted the old data). Hence the receiver in protocol rdt2.2 will also work as the receiver in protocol rdt 3.0. P.16 (Go-Back-N) a. Here we have a window size of N=3. Suppose the receiver has received packet k-1, and has ACKed that and all other preceeding packets. If all of these ACK's have been received by sender, then sender's window is [k, k+N-1]. Suppose next that none of the ACKs have been received at the sender. In this second case, the sender's window contains k-1 and the N packets up to and including k-1. The sender's window is thus [k-N,k-1]. By these arguments, the senders window is of size 3 and begins somewhere in the range [k-N,k]. b. If the receiver is waiting for packet k, then it has received (and ACKed) packet k-1 and the N-1 packets before that. If none of those N ACKs have been yet received by the sender, then ACK messages with values of [k-N,k-1] may still be propagating back. Because the sender has sent packets [k-N, k-1], it must be the case that the sender has already received an ACK for k-N-1. Once the receiver has sent an ACK for k-N-1 it will never send an ACK that is less that k-N-1. Thus the range of in-flight ACK values can range from k-N-1 to k-1. P.37 (TCP/HTTP) a. T b. T c. F d. F

All content is taken from Computer Networking: A Top-Down Approach Featuring The Internet, 3rd Edition by Kurose and Ross 4

Appendix
P2.6 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 look-up 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 RTT of RTT1,. . ., RTTn. 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?

All content is taken from Computer Networking: A Top-Down Approach Featuring The Internet, 3rd Edition by Kurose and Ross 5

Potrebbero piacerti anche