计网-第二章作业

发布时间 : 星期二 文章计网-第二章作业更新完毕开始阅读

Chapter 2

注:括弧之中红色标注为与课本习题对应的编号 2.1,2.2节后作业:

1. (R2)For a communication session between a pair of processes, which process isthe client and

which is the server? 答:

The process is always-on host called the server.

The process which initiates the communication is the client.

2. (R3)What is the difference between network architecture and applicationarchitecture?

答:

Network architecture refers to the organization of the communication process into layers.

Application architecture, on the other hand, is designed by an application developer and dicates the broad structure of the application.

3. (R4)What information is used by a process running on one host to identify aprocess running

on another host? 答:

The IP address of the destination host and the port number of the destination socket.

4. (R7)Suppose you wanted to do a transaction from a remote client to a server asfast as possible.

Would you use UDP or TCP? Why? 答:

We would use UDP. With UDP, the transaction can be completed in one roundtrip time – the client sends the transaction request into a UDP socket, and the server sends the reply back to the client’s UDP socket. With TCP, a minimum of two RTTs are needed – one to set-up the TCP connection, and another for the client to send the request, and for the server to send back the reply.

5. (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. 答:

(1) Reliable Data Transfer: TCP provides a reliable byte-stream between client and server but

UDP does not.

(2) Throughput: A guarantee that a certain value for throughput will be maintained; Neither. (3) Timing: A guarantee that data will be delivered within a specified amount of time;

Neither.

(4) Security: Neither.

6. (R9)Why do HTTP, FTP, SMTP, and POP3 run on top of TCP rather than onUDP?

答:

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.

7. (R11)What is meant by a handshaking protocol?

答:

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.

2.3,2.4节后作业

8. (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 usingPOP3. Discuss how the message gets from Alice's host to Bob's host. Be sureto list the series of application-layer protocols that are used to move the message between the two hosts. 答:

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.

9. (R17)From a user's perspective, what is the difference between the download-and-delete

mode and the download-and-keep mode in POP3? 答:

With download and delete, after a user retrieves its messages from a POP server, the messages are deleted. This poses a problem for the nomadic user, who may want to access the messages from many different machines. In the download and keep configuration, messages are not deleted after the user retrieves the messages. This can also be inconvenient, as each time the user retrieves the stored messages from a new machine, all of non-deleted messages will be transferred to the new machine.

10. (R18)Is it possible for an organization's Web server and mail server to have exactlythe 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? 答:

Yes, an organization’s mail server and Web server can have the same alias for a host name. The MX record is used to map the mail server’s host name to its IP address.

11. (R19)Why is it said that FTP sends control information \

答:

FTP uses two parallel TCP connections, one connection for sending control information 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.

2.5,2.6节后作业 12. (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 fourresponse messages. b. Two distinct Web pages (for example, www.mit.edu/research.Htmlandwww.mit.edu/students. html) can be sent over the same persistent connection.

c. With nonpersistent connections between browser and origin server, it ispossible for a single TCP segment to carry two distinct HTTP requestmessages.

d. The Date: header in the HTTP response message indicates when theobject in the response was last modified. 答: a. F b. T c. F d. F

13. (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 aDNS lookup is necessary to obtain the IP address. Suppose that n DNSservers are visited before your host receives the

IP address from DNS; thesuccessive visits incur an RTT of RTT1,...,RTTn. Further suppose that theWeb page associated with the link contains exactly one object, consisting of asmall amount of HTML text. Let RTT0 denote the RTT between the local hostand the server containing the object. Assuming zero transmission time of theobject, how much time elapses from when the client clicks on the link untilthe client receives the object? 答:

The time to get IP address is RTT1+RTT2+……+RTTn, once the IP address is known, the response time is 2RTT0+RTT1+……+RTTn.

14. (P8)Referring to Problem P7, suppose the HTML file references three very smallobjects on

the same server. Neglecting transmission times, how much timeelapses with a. Non-persistent HTTP with no parallel TCP connections? b. Non-persistent HTTP with parallel connections? c. Persistent HTTP (with pipelining)? 答:

a. RTT1+RTT2+……+RTTn+2RTT0+3×2RTT0=8RTT0+RTT1+……+RTTn. b. RTT1+RTT2+……+RTTn+2RTT0+2RTT0=4RTT0+RTT1+……+RTTn. c. RTT1+RTT2+……+RTTn+2RTT0+RTT0=3RTT0+RTT1+……+RTTn.

2.7,2.8节后作业

15. (P9)Consider Figure2.12, 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 institution’s browsers to the origin servers is 10 requests per second. Also suppose that the amount of time it takes from when the routers 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.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-△β), 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 a cache is installed in institution LAN. Suppose the hit rate is 0.6. Find the

total response time.

答:

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 : △=(900000 bits)/(15000000bits/sec)=0.06sec

The traffic intensity on the link is ( 10requests/sec)(0.06msec/request )=0.6 The average access delay is ( 0.06sec )/( 1-0.6 )=0.15sec

The total average response time is therefore 0.6sec+2sec=2.15sec. b. The average access delay is ( 0.06sec )/( 1-0.6×0.4 )=0.0456sec

With cache and the hit rate is 0.6 , when miss the cache the average response time is 0.0456sec+2sec=2.0456sec

联系合同范文客服:xxxxx#qq.com(#替换为@)