计算机网络原理习题讲解
更新时间:2024-04-05 23:18:01 阅读量: 综合文库 文档下载
Chapter I
1. What is the difference between a host and an end system? List the types of end systems. Is a
Web server an end system?
2. What is a client program? What is a server program? Does a server program request and
receive services from a client program?
3. List six access technologies. Classify each one as residential access, company access, or
mobile access.
4. Dial-up modems, HFC, and DSL are all used for residential access. For each of these access
technologies, provide a range of transmission rates and comment on whether the transmission rate is shared or dedicated.
5. Describe the most popular wireless Internet access technologies today. Compare and
contrast them.
6. What advantage does a circuit-switched network have over a packet-switched network?
What advantages does TDM have over FDM in a circuit-switched network?
7. Consider sending a packet from a source host to a destination host over a fixed route. List the
delay components in the end-to-end delay. Which of these delays are constant and which are variable?
8. How long does it take a packet of length 2,000 bytes to propagate over a link of distance
2,000 km, propagation speed 2?10 m/s, and transmission rate 2 Mbps? More generally, how long does it take a packet of length L to propagate over a link of distance d, propagation speed s, and transmission rate R bps? Does this delay depend on packet length? Does this delay depend on transmission rate?
9. What are the five layers in the Internet protocol stack? What are the principal responsibilities
of each of these layers?
10. Which layers in the Internet protocol stack does a router process? Which layers does a
link-layer switch process? Which layers does a host process?
11. What is an application-layer message? A transport-layer segment? A network-layer datagram?
A link-layer frame?
12. This elementary problem begins to explore propagation delay and transmission delay, two
central concepts in data networking. Consider two hosts, A and B, connected by a single link of rate R bps. Suppose that the two hosts are separated by m meters, and suppose the propagation speed along the link is s meters/sec. Host A is to send a packet of size L bits to Host B. a. Express the propagation delay, dprop, in terms of m and s.
b. Determine the transmission time of the packet,dtrans, in terms of L and R.
c. Ignoring processing and queuing delays, obtain an expression for the end-to-end delay. d. Suppose Host A begins to transmit the packet at time t = 0. At time t?dtrans,where is the last bit of the packet?
8e. Suppose dprop is greater than dtrans. At time t = dtrans,where is the first bit of the packet?
f. Suppose dprop is less than dtrans. At time t = dtrans, where is the first bit of the packet? g. Suppose s?2.5?10, L = 100bits, and R = 28 kbps. Find the distance m so that dprop equals dtrans.
13. In modern packet-switched networks, the source host segments long, application-layer
messages (for example, an image or a music file) into smaller packets and sends the packets into the network. The receiver then reassembles the packets back into the original message. We refer to this process as message segmentation. Figure 1.24 illustrates the end-to-end transport of a message with and without message segmentation. Consider a message that is
88?106 bits long that is to be sent from source to destination in Figure 1.24. Suppose each
link in the figure is 2 Mbps. Ignore propagation, queuing, and processing delays.
a. Consider sending the message from source to destination without message segmentation. How long does it take to move the message from the source host to the first packet switch? Keeping in mind that each switch uses store-and-forward packet switching, what is the total time to move the message from source host to destination host?
b. Now suppose that the message is segmented into 4,000 packets, with each packet being 2,000 bits long. How long does it take to move the first packet from source host to the first switch? When the first packet is being sent from the first switch to the second switch, the second packet is being sent from the source host to the first switch. At what time will the second packet be fully received at the first switch?
c. How long does it take to move the file from source host to destination host when message segmentation is used? Compare this result with your answer in part (a) and comment. d. Discuss the drawbacks of message segmentation. 14. 下列说法中,正确的是( )。
A.在较小范围内布置的一定是局域网,币在较大范围内布置的一定是广域网
B.城域网是连接广域网而覆盖园区的网络
C.城域网是为淘汰局域网和广域网而提出的一种网络技术
D.局域网是基于广播技术发展起来的网络,广域网是基于交换技术发展起来的向络 解答:D。
通常而言,局域网的覆盖范围较小,而广域网的覆盖范围较大,但这并不绝对。有时候在一个不大的范围内采用广域网,这取决于应用的需要和是否采用单一网络等多种因素。特别是局域网技术的进步,使得其覆盖范围越来越大,达到几十千米的范围。 城域网是利用广域网技术、满足一定区域需求的一种网络,事实上,城域网的范围弹性非常大。
最初的局域网采用广播技术,这种技术一直被沿用,而广域网最初使用的是交换技术,也一直被沿用。 ?
15. 相对于o⒏的7层参考模型的低4层,TCP/IP协议集内对应的层次有( )。 A.传输层、互联网层、网络接口层和物理层 B.传输层、互联网层、网络接口层 C.传输层、互联网层、ATM层和物理层 D.传输层、网络层、数据链路蜃和物理层 解答:B。
根据TCP/P分层模型可知,其对应OSI低4层的分别是传输层、互联网层、网络接口层。 16. 在C/S模式的网络中,最恰当的是( )。
A.客户机提出请求,服务器响应请求、进行处理并返回结果 B.服务器有时可以同时为多个客户机服务
C.客户机可以将服务器的资源各份在本地,以避免向服务器请求服务 D.服务器永远是网络的瓶颈 解答:A。
根据C/S模式的定义,选项A描述了C/S模式的基本工作流程。服务器必须总能而不是有 时可以同时为多个客户机服务,否则网络就没有了存在的价值。 由于服务器的资源太庞大,而且很多资源因为知识产权、保密、管理复杂等一系列的原因, 使客户机不可能都把服务器的资源备份到本地。
从表面上看,服务器可能是网络的瓶颈, 但事实上:在多数情况下网络的主要瓶颈不在服务器,而在通信线路。
17. 比较分组交换与报文交换,说明分组交换优越的原因。
解答:报文交换网络与分组交换的原理都是:将用户数据加上源地址、自的地址、长度、校验码等辅助信息封装成PDU,发送给下一个节点。下一个节点收到后先暂存报文,待输出线路空闲时再转发给下一个节点,重复这一过程直到到达目的节点。每个PDU可单独选择到达目的节点的路径。这种方式也称为存储―转发方式。
两者的不同之处是:分组交换所生成的PDU的长度较短,而且是固定的;而报文交换的PDU的长度不是固定的。正是这一差别,使得分组交换具有独特的优点:缓冲区易于管理;分组的平均延迟更小,网络中占用的平均缓冲区更少;更易标准化;更适合应用。所以现在的主流网络基本上都可以看成是分组交换网络。 18. 单顶选择题
【1】第一个分组交换网是(A)。
A.ARPAnet B.X.25 C.以太网 D.Internet
【2】在大多数网络中,数据链路层都是用请求重发已损坏了帧的办法来解决发送出错问题。如果一个帧被损坏的概率是p,而且确认信息不会丢失,则发送一帧的平均发送次数是( d )
A.1+p B. I-p C.1/(1+p) D. 1/(1-p)
【3】物理层的电气特性规定的特性包括( b )
A.接插件的形式 B.信号的电压值 C.电缆的长度 D.各引脚的功能 【4】网卡是完成( b )的功能。
A.物理层 B.数据链路层 C.物理层和数据链路层 D.数据链路层和网络层 【5】通信子网不包括( d )。
A.物理层 B.数据链路层 C.网络层 D.传输层
【6】当数据由端系统A传至端系统B时,不参与数据封装工作的是( a )。 A.物理层 B.数据链路层 C.应用层 D.表示层 【7】RFC是()。(重庆大学2007年试题)
A.因特网标准的形式 B.一种网络协议 C.一种网络文件格式 D.一种网络技术
解析:所有的因特网标准都是以RFC的形式在因特网上发表。RFC(reguest for comments)的意思就是“请求评论”。所有的RFC文档都可以从因特网上免费下载。但应注意,并非所有的RFC文档都是因特网标准,只有一小部分RFC文档最后才能变成因特网标准。RFC接收到时间的先后从小到大编上序号(即RFCxxxx,这里xxxx是阿拉伯数字)。一个RFC文档更新后就使用一个新的编号,并在文档中指出原来老编号的RFC文档已成为陈旧的。简言之,RFC是因特网标准的形式。所以选项A为正确答案。 答案:A
【8】在OSI的七层模型中,工作在第三层以上的网间连接设备是( )。(华中科技大学2003年试题)
A.集线器 B.网关 C.网桥 D.中继器
解析:集线器属于LAN与大型机以及LAN与WAN的互连。
网挢工作于数据链数据通信系统中的基础设备,应用于OSI参考模型第一层。集线器的设计目标主要是优化网络布线结构,简化网络管理,主要功能是对接收到的信号进行再生整形放大,以扩大网络的传输距离,同时把所有节点集中在以它为中心的结点上。
网关亦称网间协议转换器,工作于OSI/RM的传输层、会话层、表示层和应用层。网关不仅具有路由器的全部功能,同时还可以完成因操作系统差异引起的通信协议之间的转换。网关可用于LAN-LAN、路层。它要求两个互连网络在数据链路层以上采用相同或兼容的网络协议。
中继器是最简单的网络互连设备,主要完成物理层的功能,负责在两个结点的物理层上按位传递信息,完成信号的复制、调整和放大功能,以此来延长网络的长度。它位于0SI参考模型中物理层。
由此可知,网关工作于OSI/RM的传输层、会话层、表示层和应用层。所以选项B为正确答案。 答案:B
【9】在OSI七层结构模型中,处于数据链路层于传输层之间的是( )(华中科技大学2003年试题)
A. 物理层 B. 网络层 C. 会话层 D. 表示层
解析:OSI/RM网络结构模型将计算机网络体系结构的通信协议规定为物理层、数据链路层、网络层、传输层、会话层、表示层、应用层,共七层。因此,网络层处于数据链路层与传输层之间。所以选项B为正确答案。 答案:B
【10】完成路径选择功能是在OSI参考模型的( )。(华中科技大学2003年试题) A.物理层 B.数据链路层 C.网络层 D.传输层
解析:物理层:主要是利用物理传输介质为数据链路层提供物理连接,以便透明地传递比特流。 数据链路层:分为MAC和LLC,传送以帧为单位的数据,采用差错控制,流量控制方法。 网络层:实现路由选择、拥塞控制和网络互连功能,使用TCP和UDP协议。 传输层:是向用户提供可靠的端到端服务,透明地传送报文,使用TCP协议。 由此可知,网络层具有路径选择的功能。所以选项C为正确答案。 答案:C
【11】在TCP/IP协议簇的层次中,解决计算机之间通信问题是在( )。(华中科技大学2003年试题)
A.网络接口层 B.网际层 C.传输层 D.应用层 解析:TCP/IP协议族把整个协议分成四个层次:
(1)网络接口层:负责接收P数据报,并把该数据报发送到相应的网络上。从理论上讲,该层不是TCP/IP协议的组成部分,但它是TCP/IP协议的基础,是各种网络与TCP/IP协议的接口。 .
(2)网络层(也叫网际层):网络层解决了计算机到计算机通信的问题。因特网在该层的协议主要有网络互联协议IP、网间控制报文协议ICMP、地址解析协议ARP等。
(3)传输层:传输层提供一个应用程序到另一个应用程序之间端到端的通信。因特网在该层的协议主要有传输控制协议TCP、用户数据报协议UDP等。
(4)应用层:是TCP/IP协议的最高层,与0sI参考模型的上三层的功能类似。因特网在该层的协议主要有文件传输协议FTP、远程终端访问协议Telnet、简单邮件传输协议sMTP和域名服务协议DNS等。由此可知,网际层解决了计算机到计算机通信的问题。所以选项B为正确答案。 答案:B
【12】TCP/IP参考模型的网际层用于实现地址转换的协议有( )。 A.ARP B.ICMP C. UDP D.TCP
解析:ARP地址解析协议就是主机在发送帧前,将目标IP地址转换成目标MAC地址的过程。ARP协议的基本功能就是通过目标设备的IP地址,查询目标设备的MAC地址,以保证通信的顺利进行。所以选项A正确。
ICMP协议是TCP/IP协议集中的一个子协议,属于网络层协议,主要用于在主机与路由器之间传递控制信息,包括报告错误、交换受限控制和状态信息等。因此,ICMP协议不具备地址转换功能,排除选项B。
用户数据报协议(UDP)是ISO参考模型中一种无连接的传输层协议,提供面向事务的简单不可靠信息传送服务。UDP协议基本上是IP协议与上层协议的接口。由此可知,UDP不具备地址转换功能,排除选项C。
TCP是面向连接的传输层协议,,它提供的是一种虚电路方式的运输服务。因此,排除选项D。
19. 简述面向连接服务于面向非连接服务的特点。
解析:面向连接服务是电话系统服务模式的抽象。每一次完整的数据传输都必须经过建立连接、数据传输和终止连接三个过程。
无连接服务是邮政系统服务模式的抽象。在无连接服务的情况下,两个实体之间的通信不需要先建立好一个连接,因此其下层的有关资源不需要事先进行预定保留。这些资源将在数据传输时动态地进行分配。
答案:面向连接服务的特点是,在数据交换之前,必须先建立连接。当数据交换结束后,则应终止这个连接。在数据传输过程中,各数据报地址不需要携带目的地址,而是使用连接号。接收到的数据与发送方的数据在内容和顺序上是一致的。~
无连接服务的特点,每个报文带有完整的目的地址,每个报文在系统中独立传送。无连接服务不能保证报文到达的先后顺序,先发送煦报文不一定先到。无连接服务不保证报文传输的可靠性。
Chapter 2
1. For a communication session between a pair of processes, which process is the client and
which is the server?
2. What is the difference between network architecture and application architecture?
3. What information is used by a process running on one host to identify a process running on
another host?
4. Suppose you wanted to do a transaction from a remote client to a server as fast as possible.
Would you use UDP or TCP? Why?
5. 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. 6. Why do HTTP, FTP, SMTP, and POP3 run on top of TCP rather than on UDP? 7. What is meant by a handshaking protocol?
8. 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.
9. From a user's perspective, what is the difference between the download-and-delete mode
and the download-and-keep mode in POP3?
10. Is it possible for an organization's Web server and mail server to have exactly the 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?
11. Why is it said that FTP sends control information \12. 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/students. html) can be sent over the same persistent connection.
c. With nonpersistent connections 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.
13. 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 a DNS lookup 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 an RTT of RTT1,...,RTTn. Further suppose that the Web page associated with the link contains exactly one object, consisting of 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?
14. Referring to Problem P7, suppose the HTML file references three very small objects on the
same server. Neglecting transmission times, how much time elapses with a. Non-persistent HTTP with no parallel TCP connections? b. Non-persistent HTTP with parallel connections? c. Persistent HTIP?
通知
第二次试验
时间:11月8日,上午10:00 ~ 12:00 地点:九教北401 试验内容:《实验指南》实验四、实验五、实验六; 参考GBN源代码资料存储在:
? 邮箱:net_class_test@sina.cn ? 密码:123456abcd
Chapter 3
1. (教材R3)Describe why an application developer might choose to run an application over
UDP rather than TCP.
A: 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.
2. (教材R4)Why is it that voice and video traffic is often sent over TCP rather than UDP in
today's Internet. (Hint: The answer we are looking for has nothing to do with TCP's congestion-control mechanism.)
A: Since most firewalls are configured to block UDP traffic, using TCP for video and voice traffic lets the traffic though the firewalls.
3. (教材R5)Is it possible for an application to enjoy reliable data transfer even when the
application runs over UDP? If so, how?
A: 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.
4. (教材R6)Consider a TCP connection between Host A and Host B. Suppose that the TCP
segments traveling from Host A to Host B have source port number X and destination port number y. What are the source and destination port numbers for the segments traveling from Host B to Host A?
A: Source port number y and destination port number x.
5. (教材R7)Suppose a process in Host C has a UDP socket with port number 6789. Suppose
both Host A and Host B each send a UDP segment to Host C with destination port number 6789. Will both of these segments be directed to the same socket at Host C? If so, how will the process at Host C know that these two segments originated from two different hosts?
A: Yes, both segments will be directed to the same socket. For each received segment, at the socket interface, the operating system will provide the process with the IP addresses to determine the origins of the individual segments.
6. (教材R9)In our rdt protocols, why did we need to introduce sequence numbers?
A: Sequence numbers are required for a receiver to find out whether an arriving packet contains new data or is a retransmission.
7. (教材10)In our rdt protocols, why did we need to introduce timers?
A: To handle losses in the channel. If the ACK for a transmitted packet is not received within the duration of the timer for the packet, the packet (or its ACK or NACK) is assumed to have been lost. Hence, the packet is retransmitted.
8. (教材R14)Suppose Host A sends two TCP segments back to back to Host B over a TCP
connection. The first segment has sequence number 90; the second has sequence number 110.
a. How much data is in the first segment?
b. Suppose that the first segment is lost but the second segment arrives at B. In the acknowledgment that Host B sends to Host A, what will be the acknowledgment number?
A: a) 20 bytes b) ack number = 90
9. (教材R15)True or false?
a. The size of the TCP RcvWindow never changes throughout the duration of the connection. b. Suppose Host A is sending Host B a large file over a TCP connection. The number of
unacknowledged bytes that A sends cannot exceed the size of the receive buffer.
c. Host A is sending Host B a large file over a TCP connection. Assume Host B has no data to send Host A. Host B will not send acknowledgments to Host A because Host B cannot piggyback the acknowledgmens on data.
d. The TCP segment has a field in its header for RcvWindow.
e. Suppose Host A is sending a large file to Host B over a TCP connection. If the sequence number for a segment of this connection is m, then the sequence number for the subsequent segment will necessarily be m + 1.
f. Suppose that the last SampleRTT in a TCP connection is equal to 1 sec. The current value of Timeoutrnterval for the connection will necessarily be>1 sec.
g. Suppose Host A sends one segment with sequence number 38 and 4 bytes of data over a TCP connection to Host B. In this same segment the acknowledgment number is necessarily 42.
A: a) false; b) false; need consider retransmit packet
c) false; d) true; e) false; f) false; g) false;
10. (教材P1)Suppose client A initiates a Telnet session with Server S. At about the same time,
client B also initiates a Telnet session with Server S. Provide possible source and destination port numbers for
a. The segments sent from A to S. b. The segments sent from B to S. c. The segments sent from S to A. d. The segments sent from S to B.
e. If A and B are different hosts, is it possible that the source port number in the segments from A to S is the same as that from B to S? f. How about if they are the same host? A:
11. (教材P2)Consider Figure 3.5. What are the source and destination port values in the
segments flowing from the server back to the clients' processes? What are the IP addresses in the network-layer datagram carrying the transport-layer segments?
A: Suppose the IP addresses of the hosts A, B, and C are a, b, c, respectively. (Note that a,b,c are distinct.)
? To host A: Source port =80, source IP address = b, dest port = 26145, dest IP address = a ? To host C, left process: Source port =80, source IP address = b, dest port = 7532, dest IP
address = c
? To host C, right process: Source port =80, source IP address = b, dest port = 26145, dest
IP address = c 12. (教材P19)Answer true or false to the following questions and briefly justify your answer: a. With the SR protocol, it is possible for the sender to receive an ACK for a packet that falls outside of its current window
b. With GBN, it is possible for the sender to receive an ACK for a packet that falls outside of its current window.
c. The alternating-bit protocol is the same as the SR protocol with a sender and receiver window size of 1.
d. The alternating-bit protocol is the same as the GBN protocol with a sender and receiver window size of 1.
Answer:
a) True. Suppose the sender has a window size of 3 and sends packets 1, 2, 3 at t0 . At t1
(t1 > t0) the receiver ACKS 1, 2, 3. At t2 (t2 > t1) the sender times out and resends 1, 2, 3. At t3 the receiver receives the duplicates and re-acknowledges 1, 2, 3. At t4 the sender receives the ACKs that the receiver sent at t1 and advances its window to 4, 5, 6. At t5 the sender receives the ACKs 1, 2, 3 the receiver sent at t2 . These ACKs are outside its window.
b) True. By essentially the same scenario as in (a). c) True.
d) True. Note that with a window size of 1, SR, GBN, and the alternating bit protocol are
functionally equivalent. The window size of 1 precludes the possibility of out-of-order packets (within the window). A cumulative ACK is just an ordinary ACK in this situation, since it can only refer to the single packet within the window.
13. (教材P24)Host A and B are communicating over a TCP connection, and Host B has already
received from A all bytes up through byte 358. Suppose Host A then sends two segments to Host B back-to-back. The first and second segments contain 50 and 80 bytes of data, respectively. In the first segment, the sequence number is 359, the source port number is 1028, and the destination port number is 80. Host B sends an acknowledgement whenever it receives a segment from Host A.
a. In the second segment sent from Host A to B, what are the sequence number, source port number, and destination port number?
b. If the first segment arrives before the second segment, in the acknowledgement of the first arriving segment, what is the acknowledgment number, the source port number, and the destination port number?
c. If the second segment arrives before the first segment, in the acknowledgement of the first arriving segment, what is the acknowledgment number?
d. Suppose the two segments sent by A arrive in order at B. The first acknowledgement is lost and the second acknowledgement arrives after the first timeout interval. Draw a timing diagram, showing these segments and all other segments and acknowledgements sent. (Assume there is no additional packet loss.) For each segment in your figure, provide the sequence number and the number of bytes of data; for each acknowledgement that you add, provide the acknowledgement number.
Answer:
a) In the second segment from Host A to B, the sequence number is 409, source port
number is 1028 and destination port number is 80.
b) If the first segment arrives before the second, in the acknowledgement of the first
arriving segment, the acknowledgement number is 409, the source port number is 80 and the destination port number is 1028.
c) If the second segment arrives before the first segment, in the acknowledgement of
the first arriving segment, the acknowledgement number is 359, indicating that it is still waiting for bytes 359 and onwards. d)
14. (教材P25)Host A and B are directly connected with a 200 Mbps link. There is one TCP
connection between the two hosts, and Host A is sending to Host B an enormous file over this connection. Host A can send application data into the link at 100 Mbps but Host B can read out of its TCP receive buffer at a maximum rate of 50 Mbps. Describe the effect of TCP flow control.
Answer: Host A sends data into the receive buffer faster than Host B can remove data from the buffer. The receive buffer fills up at a rate of roughly 50Mbps. When the buffer is full, Host B signals to Host A to stop sending data by setting RcvWindow = 0. Host A then stops sending until it receives a TCP segment with RcvWindow > 0. Host A will thus repeatedly stop and start sending as a function of the RcvWindow values it receives from Host B. On average, the long-term rate at which Host A sends data to Host B as part of this connection is no more than 50Mbps.
15. (教材P30)In Section 3.5.4, we saw that TCP waits until it has received three duplicate ACKs
before performing a fast retransmit. Why do you think the TCP designers chose not to perform a fast retransmit after the first duplicate ACK for a segment is received?
Answer: Suppose packets n, n+1, and n+2 are sent, and that packet n is received and ACKed. If packets n+1 and n+2 are reordered along the end-to-end-path (i.e., are received in the order n+2, n+1) then the receipt of packet n+2 will generate a duplicate ack for n and would trigger a retransmission under a policy of waiting only for second duplicate ACK for retransmission. By waiting for a triple duplicate ACK, it must be the case that two???three packets after packet n are correctly received, while n+1 was not received. The designers of the triple duplicate ACK scheme probably felt that waiting for two packets (rather than 1) was the right tradeoff between triggering a quick retransmission when needed, but not retransmitting prematurely in the face of packet reordering.
16. (教材P34)Consider the following plot of TCP window size as a function of time.
Assuming TCP Reno is the protocol experiencing the behavior shown above, answer the following questions. In all cases, you should provide a short discussion justifying your answer. a. Identify the intervals of time when TCP slow start is operating.
b. Identify the intervals of time when TCP congestion avoidance is operating.
c. After the 16th transmission round, is segment loss detected by a triple duplicate ACK or by a timeout?
d. After the 22nd transmission round, is segment loss detected by a triple duplicate ACK or by a timeout?
e. What is the initial value of Threshold at the first transmission round? f. What is the value of Threshold at the 18th transmission round? g. What is the value of Threshold at the 24th transmission round? h. During what transmission round is the 70th segment sent?
i. Assuming a packet loss is detected after the 26th round by the receipt of a triple duplicate ACK, what will be the values of the congestion window size and of Threshold?
Answer:
a) TCP slowstart is operating in the intervals [1,6] and [23,26]
b) TCP congestion advoidance is operating in the intervals [6,16] and [17,22]
c) After the 16th transmission round, packet loss is recognized by a triple duplicate ACK. If
there was a timeout, the congestion window size would have dropped to 1.
d) After the 22nd transmission round, segment loss is detected due to timeout, and hence
the congestion window size is set to 1.
e) The threshold is initially 32, since it is at this window size that slowtart stops and
congestion avoidance begins.
f) The threshold is set to half the value of the congestion window when packet loss is
detected. When loss is detected during transmission round 16, the congestion windows size is 42. Hence the threshold is 21 during the 18th transmission round.
g) The threshold is set to half the value of the congestion window when packet loss is
detected. When timer out event occurred during transmission round 23, the congestion windows size is 26. Hence the threshold is 13 during the 24th transmission round.
h) During the 1st transmission round, packet 1 is sent; packet 2-3 are sent in the 2nd
transmission round; packets 4-7 are sent in the 3rd transmission round; packets 8-15 are sent in the 4th transmission round; packets 15-31 are sent in the 5th transmission round; packets 32-63 are sent in the 6th transmission round; packets 64 – 96 are sent in the 7th transmission round. Thus packet 70 is sent in the 7th transmission round.
i) The congestion window and threshold will be set to half the current value of the
congestion window (8) when the loss occurred. Thus the new values of the threshold and window will be 4.
17. (教材P38)Host A is sending an enormous file to Host B over a TCP connection. Over this
connection there is never any packet loss and the timers never expire. Denote the transmission rate of the link connecting Host A to the Internet by R bps. Suppose that the process in Host A is capable of sending data into its TCP socket at a rate S bps, where S = 10*R. Further suppose that the TCP receive buffer is large enough to hold the entire file, and the send buffer can hold only one percent of the file. What would prevent the process in Host A from continuously passing data to its TCP socket at rate S bps? TCP flow control? TCP congestion control? Or something else? Elaborate.
Answer: In this problem, there is no danger in overflowing the receiver since the receiver’s receive buffer can hold the entire file. Also, because there is no loss and acknowledgements are returned before timers expire, TCP congestion control does not throttle the sender. However, the process in host A will not continuously pass data to the socket because the send buffer will quickly fill up. Once the send buffer becomes full, the process will pass data at an average rate or R << S.
18. 在TCP协议中,为了使通信不致发生混乱,引入了所谓套接字的概念,这里,套接字由( )
和IP地址两部分组成。
A。端口号 B.域名 C。接口 D。物理地址
解析:端口号和IP地址合起来,称为套接字,套接字可以在全网范围内唯一标识一个端口。在TCP协议中,一条连接两端的套接字就可以唯一标识该连接了。所以选项A为正确答案。 答案:A
19. 面向连接的传输有三个过程:连接建立、( )和连接释放。 A.连接请求 B。连接应答 C。数据传输 D。数据共享
解析:面向连接服务具有连接建立、数据传输和连接释放这三个阶段。所以选项C为正确答案。 答案:C
20. 试述UDP和TCP协议的主要特点及它们的使用场合。(华中科技大学2003年试题)
解析:用户数据报协议是对IP协议组的扩充,它增加了一种机制,发送方使用这种机制可以区分一台计算机上的多个接收者。每个UDP报文除了包含某用户进程发送数据外,还有报文目的端口的编号和报文源端口的编号,从而使UDP的这种扩充,在两个用户进程之间的递送数据报成为可能。
TCP提供的是一种可靠的数据流服务。当传送受差错干扰的数据,或基础网络故障,或网络负荷太重而使网络基本传输系统(无连接报文递交系统)不能正常工作时,就需要通过TCP这样的协议来保证通信的可靠。
答案:UDP是一个简单的面向数据报的传输层协议。应用进程的每个输出操作都产生一个UDP数据报,并组装成一份待发送的IP数据报中发送。UDP提供不可靠、无连接的数据报服务,它把应用程序传给IP层的数据发送出去,但是并不保证它们能到达目的地。因此,uDP通常用于不要求可靠传输的场合,另外也常用于客户机/服务器模式中。
TCP协议被用来在一个不可靠的互联网中为应用程序提供可靠的端点间的字节流服务。所有TCP连接都是全双工和点对点的,因而TCP不支持广播和组播的功能。TCP实体间以“段”为单位进行数据交换。为实现可靠的数据传输服务,TCP提供了对段的检错、应答、重传和排序的功能,提供了可靠地建立连接和拆除连接的方法,还提供了流量控制和阻塞控制的机制。TCP适用于传输大量重要数据的场合。
21. 在使用TCP协议传送数据时,如果有一个确认报文段丢失了,也不一定会引起对方数据的
重传。试说明为什么?
解析:本题考查的是TCP重传机制。
TCP连接的一个重要的特性就是为上层服务提供了一个可靠的数据流。由于TCP是建立在不可靠的IP层的基础之上的,因此就必然涉及报文丢失的问题,这样,报文的重传就成了保证数据可靠到达的一个重要机制。这方面TCP采取了超时重传的策略,对每个TCP连接都维护一个计时器,每发送一个报文:就设置一次计时器,只要计时器设置的重传时间已到但仍然没有收到相应的确认信息,就重传这一报文。
答案:对方还未来得及重传,就收到了对更高序号的确认,相当于对连同被丢失确认的报文段一并确认。
22. 在连续ARQ协议中,设编号用3位,而发送窗口WT=8,试找出一种情况,使得在此情况下协议不能正常工作。
解答:发送端: 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0
接收端: 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0
当发送方发送0~7数据帧,因发送窗口已满,发送暂停,接收方收到所有数据帧,并对每一个帧都发送确认帧,若所有的确认帧都没有到达发送方,经过发送方计时器控制的超时后,发送方会再次发送之前的8个数据帧,而接收方收到这8个帧却无法判断是新的数据帧或是重传的数据帧。
23. 在选择重传ARQ协议中,设编号用3位。再设发送窗口WT=6,而接收窗口WR=3。试找出
一种情况,使得在此情况下协议不能正常工作。 解答:发送端:0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0
接收端:0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0
Chapter 4
1. (R2,答案R3)What is the difference between routing and forwarding?
2. (R3,答案R2)What are the two most important network-layer functions in a datagram
network? What are the three most important network-layer functions in a virtual-circuit network?
3. (R4,答案R4)Do the routers in both datagram networks and virtual-circuit networks use
forwarding tables? If so, describe the forwarding tables for both classes of networks. 4. (R6,答案R9)Describe how packet loss can occur at input ports. Describe how packet loss
at input ports can be eliminated (without using infinite buffers). 5. 6. 7. 8. 9.
(R9,答案R10)Describe how packet loss can occur at output ports.
(R11,答案R11)What is HOL blocking? Does it occur in input ports or output ports? (R12,答案R13)What is the 32-bit binary equivalent of the IP address 223.1.3.27? (R13,答案R?)Do routers have IP addresses? If so, how many?
(R22,答案R23)Is it necessary that every autonomous system use the same intra-AS routing algorithm? Why or why not?
10. (R24,答案R24)Consider Figure 4.35. Starting with the original table in D, suppose that D
receives from A the following advertisement:
Will the table in D change? If so how?
11. (R27,答案R22)Why are different inter-AS and intra-AS protocols used in the Internet? 12. (P8,答案P8,但具体值不对)Consider a datagram network using 32-bit host addresses.
Suppose a router has five links, numbered 0 through 4, and packets are to be forwarded to the link interfaces as follows:
Destination Address Range Link Interface
11100000 00000000 00000000 00000000
Through 0 11100000 00000000 11111111 11111111
11100000 00000001 00000000 00000000
Through 1
11100000 00000001 11111111 11111111
11100000 00000010 00000000 00000000
Through 2
11100000 11111111 11111111 11111111
11100001 00000000 00000000 00000000
Through 3
11100001 11111111 11111111 11111111
Otherwise 4
a. Provide a forwarding table that has five entries, uses longest prefix matching, and forwards packets to the correct link interfaces.
Prefix Match Link Interface 11100000 00000000 0 11100000 00000001 1 11100000 2 11100001 3 Otherwise 4
b. Describe how your forwarding table determines the appropriate link interface for datagrams with destination addresses:
11001000 10010001 01010001 01010101 11100000 10101101 11000011 00111100 11100001 10000000 00010001 01110111
13. (P9,答案P9)Consider a datagram network using 8 bit host addresses. Suppose a router
uses longest prefix matching and has the following forwarding table: Prefix Match 00 01 10 11 Interface 0 1 2 3 For each of the four interfaces, give the associated range of destination host addresses and the number of addresses in the range.
(14、15、16可选讲)
14. (P11,答案P11,但值不对)Consider a router that interconnects three subnets: Subnet 1,
Subnet 2, and Subnet 3. Suppose all of the interfaces in each of these three subnets are required to have the prefix 220.2.240/20. Also suppose that Subnet 1 is required to support up to 2000 interfaces, and Subnets 2 and 3 are each required to support up to 1000 interfaces. Provide three network addresses (of the form a.b.c.d/x) that satisfy these constraints.
总共的地址空间包括232-20=212=4096
220.2.240.0/20 = 11011100 00000010 11110000 00000000 Subnet 1需要2000个IP,因此分配
220.2.240.0/21= 11011100 00000010 11110000 00000000
Subnet 2和3需要1000个IP,因此将剩下的/21均分为两个/22 Subnet 2:220.2.248.0/22 = 11011100 00000010 11111000 00000000 Subnet 3:220.2.252.0/22 = 11011100 00000010 11111100 00000000
15. (P14,答案P14)Consider a subnet with prefix 101.101.101.64/26. Give an example of one
IP address (of form xxx.xxx.xxx.xxx) that can be assigned to this network. Suppose an ISP owns the block of addresses of the form 101.101.128/17. Suppose it wants to create four subnets from this block, with each block having the same number of IP addresses. What are the prefixes (of form a.b.c.d/x) for the four subnets? 16. (P15,答案P15,好题,分得很细致)Consider the topology shown in Figure 4.17. Denote
the three subnets with hosts (starting clockwise at l2:00) as Networks A, B, and C. Denote the subnets without hosts as Networks D, E, and F.
a. Assign network addresses to each of these six subnets, with the following constraints: All addresses must be allocated from 214.97.254/23; Subnet A should have enough addresses to support 250 interfaces; Subnet B should have enough addresses to support 120 interfaces; and Subnet C should have enough addresses to support 120 interfaces. Of course, subnets D, E and F should each be able to support two interfaces. For each subnet, the assignment should take the form a.b.c.d/x or a.b.c.d/x - e.f.g.h/y.
b. Using your answer to part (a), provide the forwarding tables (using longest prefix matching) for each of the three routers. 17. (P22,答案P22)Consider the following network. With the indicated link costs, use Dijkstra's
shortest-path algorithm to compute the shortest path from x to all network nodes. Show how the algorithm works by computing a table similar to Table 4.3.
18. (P24,答案P24)Consider the network shown below, and assume that each node initially
knows the costs to each of its neighbors. Consider the distance-vector algorithm and show the distance table entries at node z.
19. (P25,答案P26)Consider the network fragment shown below. x has only two attached
neighbors, w and y. w has a minimum-cost path to destination u (not shown) of 5,and y has a minimum-cost path to u of 6. The complete paths from w and y to u (and between w and y) are not shown. All link costs in the network have strictly positive integer values.
a. Give x's distance vector for destinations w, y, and u.
b. Give a link-cost change for either c(x,w) or c(x,y) such that x will inform its neighbors of a new minimum-cost path to u as a result of executing the distance-vector algorithm.
c. Give a link-cost change for either c(x,w) or c(x,y) such that x will not inform its neighbors of a new minimum-cost path to u as a result of executing the distance-vector algorithm.
Chapter 5
1. (R1,参考答案R2)What are some of the possible services that a link-layer protocol can
offer to the network layer? Which of these link-layer services have corresponding services in IP? In TCP?
2. (R2,参考答案R1)If all the links in the Internet were to provide reliable delivery service,
would the TCP reliable delivery service be redundant? Why or why not? 3. (R7,参考答案R8)Suppose nodes A, B, and C each attach to the same broadcast LAN
(through their adapters). If A sends thousands of IP datagrams to B with each encapsulating frame addressed to the MAC address of B, will C's adapter process these frames? If so, will C's adapter pass the IP datagrams in these frames to the network layer C? How would your answers change if A sends frames with the MAC broadcast address? 4. (R8,参考答案R7)How big is the MAC address space? The IPv4 address space? The IPv6
address space?
5. (R9,参考答案R9)Why is an ARP query sent within a broadcast frame? Why is an ARP
response sent within a frame with a specific destination MAC address? 6. (R11,参考答案R13)In CSMA/CD, after the fifth collision, what is the probability that a
node chooses K = 4? The result K = 4 corresponds to a delay of how many seconds on a 10 Mbps Ethernet? 7. (P1,参考答案P1,值不一致)Suppose the information content of a packet is the bit pattern
1110110010001010 and an even parity scheme is being used. What would the value of the field containing the parity bits be for the case of a two-dimensional parity scheme? Your answer should be such that a minimum-length checksum field is used. 8. (P5,参考答案P5)Consider the 4-bit generator, G, shown in Figure 5.8, and suppose that D
has the value 11111010. What is the value of R?
9. (P6,参考答案P6)Consider the previous problem, but suppose that D has the value a. 10010001. b. 10100011. c. 01010101 10. (P12,参考答案P12)Consider three LANs interconnected by two routers, as shown in
Figure 5.38.
a. Redraw the diagram to include adapters.
b. Assign IP addresses to all of the interfaces. For Subnet I use addresses of the form 111.111.111.xxx; for Subnet 2 uses addresses of the form 122.122.122.xxx; and for Subnet 3 use addresses of the form 133.133.133.xxx. c. Assign MAC addresses to all of the adapters.
d. Consider sending an IP datagram from Host A to Host F. Suppose all of the ARP tables are up to date. Enumerate all the steps, as done for the single-router example in Section 5.4.2. e. Repeat (d), now assuming that the ARP table in the sending host is empty(and the other tables are up to date).
11. (P15,参考答案P16)Suppose nodes A and B are on the same 10 Mbps Ethernet bus, and
the propagation delay between the two nodes is 225 bit times. Suppose A and B send frames at the same time, the frames collide, and then A and B choose different values of K in the CSMA/CD algorithm. Assuming no other nodes are active, can the retransmissions from A and B collide? For our purposes, it suffices to work out the following example. Suppose A and B begin transmission at t = 0 bit times. They both detect collisions at t = 225 bit times. They
finish transmitting a jam signal at t = 225 + 48 = 273 bit times. Suppose KA?0 and
KB?1, At what time does B schedule its retransmission? At what time does A begin
transmission? (Note: The nodes must wait for an idle channel after returning to Step 2-see protocol.) At what time does A's signal reach B? Does B refrain from transmitting at its scheduled time?
12. (P16,参考答案P15)Suppose nodes A and B are on the same 10 Mbps Ethernet bus, and
the propagation delay between the two nodes is 225 bit times. Suppose node A begins transmitting a frame and, before it finishes, node B begins transmitting a frame. Can A finish transmitting before it detects that B has transmitted? Why or why not? If the answer is yes, then A incorrectly believes that its frame was successfully transmitted without a collision. Hint: Suppose at time t = 0 bit times, A begins transmitting a frame. In the worst case, A transmits a minimum-sized frame of 512 + 64 bit times. So A would finish transmitting the frame at t = 512 + 64 bit times. Thus, the answer is no, if B's signal reaches A before bit time t
= 512 + 64 bits. In the worst case, when does B's signal reach A?
13. (P19,参考答案P19)Suppose two nodes, A and B, are attached to opposite ends of a 900
m cable, and that they each have one frame of 1,000 bits (including all headers and preambles) to send to each other. Both nodes attempt to transmit at time t = 0. Suppose there are four repeaters between A and B, each inserting a 20-bit delay. Assume the transmission rate is 10Mbps, and CSMA/CD with backoff intervals of multiples of 512 bits is used. After the first collision, A draws K = 0 and B draws K = 1 in the exponential backoff protocol. Ignore the jam signal and the 96-bit time delay.
a. What is the one-way propagation delay (including repeater delays) between A and B in seconds? Assume that the signal propagation speed is 2?10 m/sec.
b. At what time (in seconds) is A s packet completely delivered at B?
c. Now suppose that only A has a packet to send and that the repeaters are replaced with switches. Suppose that each switch has a 20-bit processing delay in addition to a store-and-forward delay. At what time, in seconds, is A’s packet delivered at B?
8
正在阅读:
计算机网络原理习题讲解04-05
微软SQL2000 SP4集成安装版 v3.0 BY 少轻狂 支持WIN1007-07
读书小报之名人读书故事手抄报02-16
第十届飞思卡尔参赛题目及相关要求08-26
基于Android平台Beatplane游戏开发 - 图文03-11
心灵之花02-18
基础会计实训习题答案06-10
2022专转本语文真题04-12
服务三农金融服务方案(初定)04-26
合理利用垃圾,变废为宝doc06-17
- 多层物业服务方案
- (审判实务)习惯法与少数民族地区民间纠纷解决问题(孙 潋)
- 人教版新课标六年级下册语文全册教案
- 词语打卡
- photoshop实习报告
- 钢结构设计原理综合测试2
- 2014年期末练习题
- 高中数学中的逆向思维解题方法探讨
- 名师原创 全国通用2014-2015学年高二寒假作业 政治(一)Word版
- 北航《建筑结构检测鉴定与加固》在线作业三
- XX县卫生监督所工程建设项目可行性研究报告
- 小学四年级观察作文经典评语
- 浅谈110KV变电站电气一次设计-程泉焱(1)
- 安全员考试题库
- 国家电网公司变电运维管理规定(试行)
- 义务教育课程标准稿征求意见提纲
- 教学秘书面试技巧
- 钢结构工程施工组织设计
- 水利工程概论论文
- 09届九年级数学第四次模拟试卷
- 习题
- 计算机网络
- 讲解
- 原理
- “安全责任大反思大讨论”发言稿
- 小学生必背古诗词75首抽测试题
- 研究课题:高中生常见的心理问题
- 电气安全管理制度
- 在全县工业经济工作推进会上的讲话
- 主题班会:自己的事情自己做
- 大学物理简明教程课后习题加答案
- 最新2018 九年级化学上册实验探究专题复习
- xx综合医院项目商业计划书
- 建造合同执行中问题思考
- 浅谈石园幼儿园党员干部实现党组织服务功能途径的研究和与实践 -
- 病原生物与免疫学基础授课计划编制说明
- 09年专利代理人资格考试科目一及参考答案
- 基于 NET的学生宿舍管理系统设计 - 图文
- 实验室安全知识习题(9)多选
- 数学推理计算
- 电工电子课后答案
- 科学发展观学习材料目录
- 上海市各区2017-2018年高三英语一模汇编 - -语法填空-老师版(已
- (目录)2018-2023年中国玻璃、陶瓷制品生产专用设备行业发展趋