REVIEW FOR CHAPTER 2 R1. List five nonproprietary Internet applications and the application-layer protocols that they use. Answer: The Web: HTTP; file transfer: FTP; remote login: Telnet; Network News: NNTP; e-mail: SMTP. Video conference: RTP R2. For a communication session between a pair of processes, which process is the client and which is the sever? • Ans: • The process which initiates the communication is the client; the process that waits to be contacted is the server. R3: What is the different between network architecture and application architecture? Answer: Network architecture refers to the organization of the communication process into layers (e.g., the five-layer Internet architecture). Application architecture, on the other hand, is designed by an application developer and dictates the broad structure of the application (e.g., clientserver or P2P). R4 What information is used by a process running on one host to identify a process running on another host? Answer: The IP address of the destination host and the port number of the destination socket. R5 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? Answer: No. As stated in the text, all communication sessions have a client side and a server side. In a P2P file-sharing application, the peer that is receiving a file is typically the client and the peer that is sending the file is typically the server. R6. 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 timesensitive. • Ans: network games • network multimedia applications with high quality requirements • R9. Why do HTTP, FTP, SMTP, POP3 and IMAP run on top of TCP rather than UDP? • Answer: • 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. R10. Recall that TCP can be enhanced with SSL to provide process-to-process security services, including encryption. Does SSL operate at the transport layer or the application layer? If the application developer wants TCP to be enhanced with SSL, what does the developer have to do? • Ans: • SSL operates at the application layer. The SSL socket takes unencrypted data from the application layer, encrypts it and then passes it to the TCP socket. If the application developer wants TCP to be enhanced with SSL, he/she has to include the SSL code in the application. R11 What is meant by a handshaking protocol? Answer: A protocol uses handshaking if the two communicating entities first exchange control packets before sending data to each other. SMTP uses handshaking at the application layer whereas HTTP does not. R15 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 POP3. 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. Answer: Message is sent from Alice’s host to her mail server over HTTP. Alice’s mail server then sends the message to Bob’s mail server over SMTP. Bob then transfers the message from his mail server to his host over POP3. R16 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 . Answer: skipped R19. Why is it said that FTP sends control information “outof-band”? • Ans: 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. R20 Consider a new peer Alice who 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? Answer: Alice will get her first chunk as a result of she being selected by one of her neighbors as a result of an “optimistic unchoke,” for sending out chunks to her. 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/student.html )can be sent over the same persistent connection. C. With nonpersistent connection 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. Answer: a) F b) T c) F d) F P4. 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? b. What encryption services are provided by HTTP? • ANS.: • A. Persistent connections are discussed in section 8 of RFC 2616 Sections 8.1.2 and 8.1.2.1 of the RFC indicate that either the client or the server can indicate to the other that it is going to close the persistent connection. It does so by including the including the connection-token "close" in the Connection-header field of the http request/reply. • • B. HTTP does not provide any encryption services P7. Suppose within your web browser you click on a link to obtain a web page. Suppose that the IP address for the associated URL is not cached in your local host, so that 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 a RTT of RTT1 , ..., RTTN . Further suppose that web page associated with the link contains exactly one object, 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 • ANS.: • The total amount of time to get the IP address is • RTT1 +RTT2 +… +RTTN . • Once the IP address is known, RTT0 elapses to set up the TCP connection and another • RTT0 elapses to request and receive the small object. The total response time is • 2RTT0 +RTT1 +RTT2 +… +RTTN P8. Referring to question (7), suppose the page contains three very small objects. 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 pipeline. (d) persistent HTTP without pipeline • Ans: a) RTT1 +… + RTTN +2RTT0 +3*2RTT0 =8*RTT0 +RTT1 +… + RTTN b) RTT1 +… + RTTN +2RTT0 + 2RTT0 = 4*RTT0 + RTT1 +… + RTTN c) RTT1 +… + RTTN +2RTT0 +RTT0 =3*RTT0 +RTT1 +… + RTT0 • Find the total average origin response time servers b. Now suppose a cache is installed in the institution LAN. Suppose the hit rate is 0.6. Find the total response time. a. public Internet 15 Mbps access link institutional network 10 Mbps LAN institutional cache a. Answer: The time to transmit an object of size L over a link or rate R is L/R. 6 L / R 900,000bits / 15*10 bps 0.06( s ) The arrival rate of objects to the access link is 10 objects/second. Thus the average access delay is 0.06/(1-0.06*10)=0.15 (S) The total average response time is 0.15+2=2.15 seconds Answer: Since the hit rate is 0.6, the traffic on access link is reduced to (1-0.6)=0.4. The arrival rate of objects to the access link is 4 objects/s. Thus the average access delay is 0.06/(1-0.06*4)=0.079 (s). The total average response time for the cache-missing objects is 2.079(s). Therefore we have the total average response time is 0.6*0+0.4*2.079=0.83(s) b. P16 Consider distributing a file of F=5 Gbits to N peers. The server has an upload rate of us=20Mbps, and each peer has a download rate of di=1Mbps and an upload rate of u. For N=10,100, and 1,000 and u=100Kbps, 250Kbps,and 500Kbps,prepare a chart giving the minimum distribution time for each of the combinations of N and u for both client-server distribution and P2P distribution. Answer: For calculating the minimum distribution time for clientserver distribution, we use the following formula: Similarly, for calculating the minimum distribution time for P2P distribution, we use the following formula N DP 2 P max{F / us , F / d min , NF / (us ui )} i 1 F 5Gbits 5*1024 Mbits us 20 Mbits, d min d i 1Mbits CS N u 10 100 1000 100 Kbps 5120 25600 256000 250 Kbps 5120 25600 256000 500 Kbps 5120 25600 256000 P2P N u 10 100 1000 100 Kbps 5120 17066.7 42666.7 250 Kbps 5120 11377.8 18963.5 500 Kbps 5120 7314.3 9846.2 P17 Consider distributing a file of F bits to N peers using a P2P architecture. Assume a fluid model. For simplicity assume that dmin is very large, so that peer download bandwidth is never a bottleneck. A. suppose that us (us u1 ... uN ) / N . Specify a distribution scheme that has a distribution time of F/us B. suppose that us (us u1 ... uN ) / N .Specify a distribution scheme that has a distribution time of F/(us+u1+…+uN) • Ans: • Assume that u= • Thus: 1 ⋯ , DP 2 P max{F / us , NF / u} • A. • By assumption: us u / N • Divide the file into N parts, with the ith part having size (ui/(u-us))F. The server transmits the ith part to peer i at rate ri = (ui/(u-us)) us. Note that r1 + r2 + ….. + rN = us, so that the aggregate server rate does not exceed the link rate of the server. Also have each peer I forward the bits it receives to each of the N-1 peers at rate ri. The aggregate forwarding rate by peer i is (N-1)ri. We have ui ( N 1) ri ( N 1) us ui u us In this distribution scheme, peer i receives bits at an aggregate rate of ri rj us j i Thus, each peer receives the file in F/us. • B. • By assumption: us u / N ui let : ri N 1 u us us N 1 rN 1 N • In this distribution scheme, the file is broken into N+1 parts. The server sends bits from the ith part to the ith peer (i = 1, …., N) at rate ri. Each peer i forwards the bits arriving at rate ri to each of the other N-1 peers. Additionally, the server sends bits from the (N+1) st part at rate rN+1 to each of the N peers. The peers do not forward the bits from the (N+1)st part. N • The aggregate send rate of the server is ri NrN 1 u s i 1 • Thus, the server’s send rate does not exceed its link rate. The aggregate send rate of peer i is (N-1)ri=ui • Thus, each peer’s send rate does not exceed its link rate. In this distribution scheme, peer i receives bits at an aggregate rate of ri rN 1 rj u / N j i Suppose you open a startup company “starwar” and want to set up your company network. Your network has the following serve rs: 1. DNS server: “dns1.starwar.com” with IP as “128.119.12.40” 2. Web server: “starwar.com” with two IP as “128.119.12.55” a nd “128.119.12.56”. The web server also has a name as “www.st arwar.com”. 3. Email server: “galaxy.starwar.com” with IP as “128.119.12.60” Your company’s email address is “username@starwar.com”. 1). What resource records (RRs) do you need to provide to the u pper-level “.com” DNS server? (2 points) 2). What RRs do you need to put in your company’s DNS server ? (3 points) • 1) • (starwar.com, dns1.starwar.com, NS) • (dns1.starwar.com, 128.119.12.40, A) • 2) • (galaxy.starwar.com,128.119.12.60,A) • (starwar.com, galaxy.starwar.com, MX) • (www.starwar.com,starwar.com,CNAME) • (starwar.com,128.119.12.55,A) • (starwar.com,128.119.12.56,A)