计算机网络原理习题答案(2)

2019-04-09 10:30

18) Is it possible that an organization's Web server and mail server have exactly the same alias(别名) for a hostname (e.g., foo.com)? What would be the \

一个机构的web服务器和邮件服务器可以有有完全相同的主机别名吗?包含了邮件服务器的主机名的RR有什么样的类型?

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

19) Use nslookup to find a Web server that has multiple IP addresses. Does the Web server of your institution (school, company, etc.) have multiple IP addresses?

使用nslookup找到一个Web服务器有多个IP地址。贵机构的Web服务器(如学校,公司,等)是否有多个IP地址?

My insititution doesn’t have multiple IP address. Sections 2.6-2.9

20) The UDP server described in Section 2.7 only needed one socket, whereas the TCP server described in Section 2.6 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?

2.7节描述的UDP服务器仅需要一个套接字,而2.6节描述的TCP服务器则需要两个套接字。为什么?如果TCP服务器要支持n个并行连接,且每个连接都来自不同的客户机主机,那么TCP服务器需要多少个套接字?

With the UDP server, there is no welcoming socket, and all data from different clients enters the server through this one socket. With the TCP server, there is a welcoming socket, and each time a client initiates(发起) a connection to the server, a new socket is created. Thus, to support n simultaneous connections, the server would need n+1 sockets.

21) For the client-server application over TCP described in Section 2.6, why must the server program be executed before the client program? For the client-server application over UDP described in Section 2.7, why may the client program be executed before the server program?

在2.6节所描述的运行于TCP上的客户机-服务器应用程序,为什么服务器程序要先于客户机程序运行?在2.7节描述的运行于UDP上的客户机-服务器应用程序,为什么客户机程序要先于服务器程序运行?

For the TCP application, as soon as the client is executed, it attempts to initiate a

TCP connection with the server. If the TCP server is not running, then the client will fail to make a connection.

For the UDP application, the client does not initiate connections (or attempt to communicate with the UDP server) immediately upon execution

PROBLEMS

1) True or false.

a) Suppose a user requests a Web page that consists of some text and two

images. For this page the client will send one request message and recieve three response messages? 假设一个用户请求一个网页,包含一些文本和两个图像。这个页面的客户端将发送一个请求消息和接收三个响应消息? F

b) True or false. Two distinct Web pages (e.g.,

www.mit.edu/research.html and www.mit.edu/students.html) can be sent over the same persistent connection? 真或假。两种截然不同的网页(例如,www.mit.edu / research.html和www.mit.edu / students.html)可发送相同的持久连接? T

c) With non-persistent connections between browser and origin server, it is possible for a single TCP segment to carry two distinct HTTP request messages? 浏览器和源服务器之间的非持久连接,它有可能为一个单一的TCP段进行两个不同的HTTP请求消息? F

d) The Date: header in the HTTP response message indicates when the object in the response was last modified? 日期: 在HTTP响应消息头指示的最后修订在响应对象时? F

2) Read RFC 959 for FTP. List all of the client commands that are supported by the RFC.

FTP阅读RFC 959。列出所有的客户端支持的命令是由RFC。

Access control commands:

USER, PASS, ACT, CWD, CDUP, SMNT, REIN, QUIT.

Transfer parameter(参数) commands: PORT, PASV, TYPE STRU, MODE.

Service commands:

RETR, STOR, STOU, APPE, ALLO, REST, RNFR, RNTO, ABOR, DELE, RMD, MRD, PWD, LIST, NLST, SITE, SYST, STAT, HELP, NOOP.

3) Read RFC 1700. What are the well-known port numbers for the \transfer protocol\ 阅读RFC 1700中。什么是“简单文件传输协议”(SFTP)众所周知的端口号?对于“新闻联播transfoer协议”(NNTP)?

4) 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.

假定在你的浏览器中,你点击一个超链接来获得一个web页面。假定相关的URL的IP地址没有缓存在你的本地主机上,因此必须进行DNS查询以获得IP地址。假设你的主机从DNS获得IP地址之前,已经访问了n个DNS服务器,相继产生的RTT依次为RTT1,~RTTn。进一步假设,与连接相关的web网页只含有一个对象,即少量的HTML文本。让RTT0表示本地主机和包含对象的服务器之间的RTT。假设对象传输时间为0,从客户点击连接到接收到对象需要多长时间?

The total amount of time to get the IP address is

RTT1?RTT2???RTTn.

Once the IP address is known, RTTO elapses to set up the TCP connection and another RTTO elapses to request and receive the small object. The total response time is

2RTTo?RTT1?RTT2???RTTn

4) Referring to question (4), 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 pipelining. 提到的问题(4),假设该页面包含三个非常小的物体。忽略的传输时间,间隔时间多长(一)非持久的HTTP没有并行的TCP连接,(b)与并行连接的非持久的HTTP,(c)与持久HTTP流水线。

a)

RTT1???RTTn?2RTTo?3?2RTTo

?8RToT?RT1T???RTTn.

b)

RTT1???RTTn?2RTTo?2RTTo

?4RToT?RT1T???RTnT.

c)

RTT1???RTTn?2RTTo?RTTo

?3RTTo?RTT1???RTTn

6) Two HTTP request methods are GET and POST. Are there any other methods in HTTP/1.0? If so, what are they used for? How about HTTP/1.1 ?

两个HTTP请求方法是GET和POST。在HTTP/1.0是否有任何其他的方法?如果是这样,它们是什么使用?关于HTTP/1.1的怎么样?

7) 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.java program in the text.) Compile and execute your program. On any other machine which contains a Web browser, set the proxy server in the browser to the machine in which your server program is running; 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


计算机网络原理习题答案(2).doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:应急救援管理制度汇编

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: