当前位置:首页 > 西安理工大学网络复习之课后题
第一章
3.什么是客户机程序?什么是服务器程序?一个服务器程序请求和接收来自客户机程序的服务吗? 答:联网的程序通常包括两部分,每一个运行在不同的主机上,互相通信。发起通信的程序是客户机程序。接受客户端请求并提供服务的是服务器程序。一般是客户机程序请求和接收来自服务器程序的服务。
A:A networking program usually has two programs, each running on a different host, communicating with each other. The program that initiates the communication is the client. Typically, the client program requests and receives services from the server program. 4.什么事因特网提供给其应用程序的两类服务?这些服务的每一类都有哪些特征?
答:互联网向其应用提供两种服务:面向连接的(TCP)和面向无连接的(UDP)。每一种互联网应用采取其中的一种。 ? 面向连接服务的原理特征:
① 在都没有发送数据之前2个端系统先进性“握手”。 ② 提供可靠的数据传送。也就是说,连接的一方将所有的应用数据有序且无差错的传送到连接的另一方。
③ 提供流量控制。也就是确报链接的任何一方不会过快的发送过量的分组而淹没另一方。
④ 提供用塞控制。即管理应用发送进网络的数据量,帮助防止互联网进入迟滞状态。 ? 无连接的服务特征
① 没有握手;
② 没有可靠数据传送的保证; ③ 没有流量控制或者拥塞控制;
A:The Internet provides its applications a connection-oriented
service (TCP) and a connectionless service (UDP). Each Internet application makes use of one these two services. The two services will be discussed in detail in Chapter 3.
? Some of the principle characteristics of the connection-oriented
service are:
? Two end-systems first “handshake” before either starts to send application data to the other.
? Provides reliable data transfer, i.e., all application data sent by one side of the connection arrives at the other side of the connection in order and without any gaps.
? Provides flow control, i.e., it makes sure that neither end of a connection overwhelms the buffers in the other end of the connection by sending to many packets to fast. ? Provides congestion control, i.e., regulates the amount of data that an application can send into the network, helping to prevent the Internet from entering a state of grid lock.
? The principle characteristics of connectionless service are:
? No handshaking
? No guarantees of reliable data transfer
1
? No flow control or congestion control
5.有人说,流量控制和拥塞控制是等价的。这对于英特网的面向连接的面向连接服务正确吗?流量控制和拥塞控制的 目标相同吗?
答:流量控制和用塞控制是面向不同的对象的不同控制机理。流量控制确保连接的任何一方不会因为对方发的过快而被另一方淹没。用塞控制是用来管理应用发送进网络的数据总量,帮助防止互联网核心(路由器的缓冲区)发色好难过拥塞。
A:Flow control and congestion control are two distinct control
mechanisms with distinct objectives. Flow control makes sure that neither end of a connection overwhelms the buffers in the other end of the connection by sending to many packets to fast. Congestion control regulates the amount of data that an application can send into the network, helping to prevent congestion in the network core (i.e., in the buffers in the network routers).
6.简明,总体的描述因特网的面向链接服务是如何提供可靠传输的?
答:面向连接的服务通过使用确认,重传提供可靠的数据传送。当连接的一方没用收到他发送的分组确认时,他会重新发送这个分组。
A:The Internet’s connection-oriented service provides reliable data transfer by using acknowledgements and retransmissions. When one side of the connection doesn’t receive an acknowledgement (from the other side of the connection) for a packet it transmitted, it retransmits the packet. 9.假定在发送主机和接收主机间只有一组交换机。发送主机和交换机之间以及交换机和接收主机之间的传输速率分别是R1和R2。假设该交换机使用存储转发分组交换方式,发送一个长度为L分组的端到端总时延是什么?(忽略排队时延,传播时延和处理时延。)
A:At time t0 the sending host begins to transmit. At time t1 = L/R1, the sending host completes transmission and the entire packet is received at the router (no propagation delay). Because the router has the entire packet at time t1, it can begin to transmit the packet to the receiving host at time t1. At time t2 = t1 + L/R2, the router completes transmission and the entire packet is received at the receiving host (again, no propagation delay). Thus, the end-to-end delay is L/R1 + L/R2.
19.考虑从某发送主机跨越一条固定路由向某接收主机发送一系列分组。列出一个分组的端到端时延中的延时组成成分。这些时延中的哪些时延是固定的?哪些是变化的?
答:时延由处理时延,传输时延,传播时延,和排队时延组成。所有的这些
2
时延除了排队时延剩下都是固定的。
第二章
11.考虑一个电子商务网站需要保留每一个用户的购买记录。描述如何使用HTTP鉴别来完成该功能?如何使用cookies来完成该功能?
答:p66当用户第一次访问一个站点,,这个站点返回一个cookie号码。这个cookie码被存储在用户主机上并有浏览器管理。在随后的每次访问(和购买)中,浏览器将这个cookie码会送该站点。这样当用户访问该站点时,都会被该站点知道。
12.待流水线的持久连接和不待流水线的持久连接有什么区别?HTTP1.1使用的哪一种协议?
答:在非流水线的HTTP持久连接中,客户机只能在接收到服务器发来的前一个响应侯才能发送请求。流水线的HTTP持久连接中,浏览器不用等服务器的相响应信息。HTTP/1.1的默认模式使用了流水线的持久连接。 ? 习题
4.考虑一个HTTP 客户机要以给定的URL获取一个Web界面。该HTTP服务器的IP地址开始并不知道;具有URL的Web文档中内嵌一个GIF图像,它存放在同一台服务器作为原始文档。在这种情况下,除了HTTP服务器外,还需要什么应用层和运输层协议?
答:Application layer protocols: DNS and HTTP ;
Transport layer protocols: UDP for DNS; TCP for HTTP. 6.假定你在浏览器中点击一条超链接获得Web界面。假定相关的URL的IP 地 址没有缓存在本地主机上,因此有必要进行DNS查询获得IP地址。如果主机从DNS得到IP地址之前,已经访问了N个DNS服务器;相继产生的RTT依次为RTT1,RTT2,.....,RTTn。进一步假设于链路相关的Web界面只包含一个对象,即少量的HTML文本。令RTT0表示本地主机和包含对象的服务器之间的RTT值。假定该对象传输时间为零,则从客户机点击该链接到它接收到该对象需要多少时间?
答:
7.参照习题6,假定在同一服务器上HTML文件索引了三个非常小的对象。忽略发送时间,在下列情形需要多少时间: a. 没有并行TCP链接的非持续HTTP? b. 有并行连接的非持续HTTP? c. 有流水线的持久HTTP?
11.阅读POP3的RFC,即RFC1939.UIDL POP3命令的目的是什么? 答:UIDL是统一识别码列表的缩写。当一个POP3客户端发出一个UIDL命令,服务器端返回存储在用户邮箱里的所有邮件的唯一邮件识别码。这个命令对下载并保留方式有用。通过保留上次收取的邮件的列表信息,客户能够使用UIDL命令来确定在服务器上的哪些邮件是已经被阅读过的。
A:UIDL abbreviates “unique-ID listing”. When a POP3 client issues
3
the UIDL command, the server responds with the unique message ID for all of the messages present in the users mailbox. This command is useful for “download and keep”. By keeping a file that lists the messages retrieved in earlier sessions, the client can use the UIDL command to determine which messages on the server have already been seen.
第三章
1.考虑下在主机A和主机B之间有一条TCP链接。假设从主机A传送到主机B的TCP报文段的源端口号是x,二目的端口号是y。那么对于从主机B传送到主机A 的TCP报文段而言,源端口号和目的端口号分别是多少?
答:Source port number y and destination port number x.
2.请阐述应用程序开发者为什么更倾向于选择UDP上运行应用程序而不是在TCP上运行的原因?
答:An application developer may not want its application to use TCP’s congestion control, which can throttle the application’s sending rate at times of congestion. Often, designers of IP telephony and IP videoconference applications choose to run their applications over UDP because they want to avoid TCP’s congestion control. Also, some applications do not need the reliable data transfer provided by TCP. 3.当应用程序运行在UDP上时,某应用程序是否能够得到可靠的数据传输?如果能如何实现?
答: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. 6.画出rdt3.0协议中接收方的有限状态机(FSM)的图。
7.画出在数据分组和确认分组发生混淆的情况下,rdt3.0协议的操作的轨迹。你画的轨迹应当类似于图3-16中使用的图。
14.在3.4.4节中学习的一般选择重传(SR)协议中,发送方只要可用(如果报文在窗口中),就会不等待确认而重传报文。现在假设我们现在需要一个选择重传(SR)协议,一次发出一对报文,而且只有在知道第一对报文正确到达后才发送第二对报文。
假设信道中可能会丢失报文,但报文不会发生差错和失序。请设计一个差错控制协议实现报文的单向可靠传输。画出发送方和接收方的有限状态机描述。给出发送方和接收方之间两个方向发送的报文格式。如果你使用了不同于3.4节
4
共分享92篇相关文档