计算机网络原理习题答案
更新时间:2024-06-10 11:58:01 阅读量: 综合文库 文档下载
Review Questions Section 2.1
1) List five non-proprietary(非专有的) Internet applications and the
application-layer protocols that they use. 列举五种非专用的英特网应用以及它们所使用的应用层协议。
applications e-mail WEB streaming multimedia file transfer remote terminal access
protocols SMTP HTTP HTTP ,RTP FTP Telnet 2) For a communication session(会议) between two hosts, which host is the
client and which is the server?
对俩主机之间的通信会话,哪个主机是客户机,哪个主机是服务器?
The process which initiates(发起) the communication is the client; the process that waits to be contacted is the server.
3) What information is used by a process running on one host to identify a process running on another host?
运行在一台主机上的进程使用什么信息标识运行在另一台主机上的进程?
The IP address of the destination host and the port number of the destination socket.
3) List the various network-application user agents that you use on a daily
basis.
列举你每天都会使用的网络应用程序用户代理。 Web browser E-mail application user agent File Transfer user agent P2p user agent
audio/video user agent
5) Referring to Figure 2.1-2, we see that not none of applications listed in the table require both \application that requires no data loss and that is also highly time sensitive? 参见图2.1-2,我们可以看到表中所列举的应用没有一个既要求没有数据丢失又要求定时。你能设想出一个应用,既既要求没有数据丢失又要求定时吗?
There are no good examples of an application that requires no data loss and timing.
Sections 2.2-2.5
6) 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.
7) Why do HTTP, FTP, SMTP, POP3 and IMAP run on top of TCP rather than UDP? 为什么HTTP,FTP,SMTP,POP3 和 IMAP 都运行在TCP 协议而不是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.
8) Consider an e-commerce site that wants to keep a purchase record for each of its customers. Describe how this can be done with HTTP authentication. (认证)Describe how this can be done with cookies.
考虑一个电子商务网站需要保留每一个客户的购买记录,描述如何使用HTTP认证;描述这是如何用cookies来实现的。
When the user first visits the site, the site returns a cookie number. This cookie number is stored on the user’s host and is managed by the browser. During each subsequent visit (and purchase), the browser sends the cookie number back to the site. Thus the site knows when this user (more precisely, this browser) is visiting the site.
9) What is the difference between persistent HTTP with pipelining(持久HTTP 流水线) and persistent HTTP without pipelining(没有流水线的持久HTTP连接)? Which of the two is used by HTTP/1.1?
In persistent HTTP without pipelining, the browser first waits to receive a HTTP response from the server before issuing a new HTTP request. In persistent HTTP with pipelining, the browser issues requests as soon as it has a need to do so, without waiting for response messages from the server.
persistent HTTP with pipelining is used by HTTP/1.1。
10) Telnet into a Web server and send a muli-line 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.
用Telnet 向 web 服务器发送一条多行的请求报文。在该请求报文中包含If-modified-since: 首部行,迫使响应报文中出现304 Not Modified 状态码。
11) Why is it said that FTP sends control information \(频带外的) 为什么说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.
12) Suppose Alice with a Web-based e-mail account (such as Yahoo! mail or Hotmail) 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.
假设Alice使用一个基于web的电子邮件账户向Bob 发送邮件,而Bob使用POP3 协议访问他的邮件服务器来获取邮件。讨论信息是如何从Alice 的主机到Bob的主机的。一定要列出在两台主机间移动信息所用的应用层协议。
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.
13) Suppose that you send an e-mail message whose only data is a Microsoft Excel attachment. What might the header lines (including MIME lines) look like?
假定你发送一封电子邮件,唯一的数据就是一个表格附件。可能的首部行(包含MIME行)是什么样的?
From: 123@xxx.com To: 456@yyy.com Subject: hello
MIME-Version: 1.0
Content-Transfer-Encoding: base64 Content-Type: Application/MS-Excel
14) Print out the header of a message that you have recently received. How many Recieved: header lines are there? Analyze each of the header lines in the message.
打印出你最近收到的报文的首部,在Received中,首部行有多少行?分析该报文首部行的每一行。
15) From a user's perspective, what is the difference between the download-and-delete mode and the download-and-keep mode in POP3? 从用户的观点来看,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 (office PC, home PC, etc.).
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 (including very old messages).
16) Redraw Figure 2.5-4 for when all queries from the local nameserver are iterative.
重绘时,从本地域名服务器所有查询迭代图2.5-4。
17) Each Internet host will have at least one local name server and one
authoratative name server. What role does each of these servers have in DNS? 每一台英特网主机都至少有一个本地域名服务器和一个权威域名服务器。这两种服务器在域名解析中起什么作用?
A host authoritative name server provides the official translation of a hostname to an IP address (among other things). A host local name server is a proxy(代理服务器) to the DNS system: the host first queries its local name server for a mapping; the local name server then obtains the mapping on the behalf of(代表) the querying host.
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
正在阅读:
计算机网络原理习题答案06-10
《小屁孩日记 - 二年级趣事多》阅读题04-15
镇江市丹徒新城城东新村一期建设工程项目可行性研究报告01-21
小猫贝贝作文400字07-09
2017年最新存量房屋买卖合同范本03-25
计算机辅助设计试题11-26
垃圾房管理协议-模板01-08
读《隐姓埋名三十年》有感02-12
第一次月考作文600字03-21
- 多层物业服务方案
- (审判实务)习惯法与少数民族地区民间纠纷解决问题(孙 潋)
- 人教版新课标六年级下册语文全册教案
- 词语打卡
- photoshop实习报告
- 钢结构设计原理综合测试2
- 2014年期末练习题
- 高中数学中的逆向思维解题方法探讨
- 名师原创 全国通用2014-2015学年高二寒假作业 政治(一)Word版
- 北航《建筑结构检测鉴定与加固》在线作业三
- XX县卫生监督所工程建设项目可行性研究报告
- 小学四年级观察作文经典评语
- 浅谈110KV变电站电气一次设计-程泉焱(1)
- 安全员考试题库
- 国家电网公司变电运维管理规定(试行)
- 义务教育课程标准稿征求意见提纲
- 教学秘书面试技巧
- 钢结构工程施工组织设计
- 水利工程概论论文
- 09届九年级数学第四次模拟试卷
- 习题
- 计算机网络
- 原理
- 答案
- 模糊思维与英语教学-精品文档
- 新世纪大学英语综合教程2课文翻译及课后答案完整版
- 2017年电大中国传统文化概观复习资料及答案
- 南小依法治校工作基本情况及主要经验与成效
- 论新民主主义革命统一战线历史经验
- 最详细的洗煤厂安全事故应急救援预案
- 证券投资学试题(10)-金融学综合
- 神木方言研究
- 2016公务员考试行测真题 - 图文
- 计算机工程与科学学院2017届优秀毕业生评选细则
- 珍爱生命规范行为远离三违安全知识竞赛复习题doc
- 农业产业结构调整存在的问题及对策
- 2017年人教版培智生活语文上册教案
- 1005班化学分析期中试卷(样卷)
- 2019版高中语文 第二单元 诗言志单元写作学案 语文版必修4
- 浅谈高速公路施工企业的机械设备管理
- 水利局开展廉政风险防控管理工作实施方案
- 201702批次财务管理学 ( 第1次 )
- 农村初中教师队伍专业对口率偏低的成因及对策
- 先秦时期青铜器纹饰种类、演变