欢迎光临散文网 会员登陆 & 注册

《计算机网络》习题及答案

2023-01-16 20:41 作者:莎莉娜的仙子伊布  | 我要投稿

注:本教材为詹姆斯的《计算机网络-自顶向下方法》,谢希仁教材可供参考。

第一章

一. 填空题(共3题,30分)

1. (填空题, 10分)

End systems access to the Internet through its (          ).


  • 正确答案:

     ISP


    2. (填空题, 10分)

    (       ) defines the format and the order of messages exchanged between two or more communicating entities, as well as the actions taken on the transmission and/or receipt of a message or other event.

  • 正确答案:

     Protocol


    3. (填空题, 10分)

    (  ) means that the switch must receive the entire packet before it can begin to transmit the first bit of the packet onto the outbound link.
  • 正确答案:

    Store-and-forward transmission


    二. 计算题(共1题,70分)

    4. (计算题, 70分)

    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 term 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?

    e. 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*108, L=100 bits, and R=28 kbps. Find the distance m so that dprop equals dtrans.

    正确答案:



第二章

一. 判断题(共4题,20分)

1. (判断题, 5分)With nonpersistent connections between browser and origin server, it is possible for a single TCP segment to carry two distinct HTTP request messages.

  • A. 对

  • B. 错

正确答案: 错

2. (判断题, 5分)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.

  • A. 对

  • B. 错

正确答案: 错

3. (判断题, 5分)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.

  • A. 对

  • B. 错

正确答案: 对


4. (判断题, 5分)TheDate: header in the HTTP response message indicates when the object on the response was last modified.

  • A. 对

  • B. 错

正确答案: 错


二. 分析题(共2题,66分)

5. (分析题, 24分)The text below show the reply sent from the server in response the to the HTTP GET message in the question above. Answer the following questions, indicating where in the message below you find the answer.



HTTP/1.1 200 OK<cr><lf>

Date: Tue, 07 Mar 2006 12:39:45GMT<cr><lf>

Server: Apache/2.0.52 (Fedora) <cr><lf>

Last-Modified: Sat, 10 Dec 2005 18:27:46GMT<cr><lf>

ETag: “526c3-f22-a88a4c80” <cr><lf>

Accept-Ranges: bytes<cr><lf>

Content-Length: 3874<cr><lf>

Keep-Alive: timeout=max=100<cr><lf>

Connection: Keep-Alive<cr><lf>

Content-Type: text/html; charset=ISO-8859-1<cr><lf>

<cr><lf>

<!doctype html public “-//w3c//dtd html 4.0 transitional//en”><lf>Mhtml><lf><head><lf> <meta http-equiv=”Content-type” content=”text/html; charset=iso-8859-1”><lf> <meta name=”GENERATOR” content=”Mozilla/4.79 [en] (Windows NT 5.0; U) netscape]”><lf> <title>CMPSCI 453/ 591/ NTU-St550A Spring 2005 homepage</title><lf></head?<lf><much more document text following here (not shown)>


a. Was the server able to successfully find the document or not? What time was the document reply provided?

b. How many bytes are there in the document being returned?

c. What are the first 5 bytes of the document being returned? Did the server agree to a persistent connection?

d. When was the document last modified?


  • 正确答案:

  • a. (8 points) 

        The status code of 200 and the phrase OK indicate that the server was able to locate the document successfully. 

        The reply was provided on Tuesday, 07 Mar 2006 12:39:45 Greenwich Mean Time.


    b. (4 points) There are 3874 bytes in the document being returned.


    c. (8 points) The first five bytes of the returned document are : <!doc

        Yes, the server agreed to a persistent connection.


    d. (4 points) The document index.html was last modified on Saturday 10 Dec 2005 18:27:46 GMT.



6. (分析题, 16分)Consider the following string of ASCII characters that were captured by Ethereal when the browser sent an HTTP GET message (i.e, this is the actual content of an HTTP GET message). The character  <cr> <lf> are carriage return and line-feed characters. Answer the following questions, indicating where in the HTTP GET message below you find the answer.



GET  /cs453/index.html  HTTP/1.1<cr><lf>

Host: gaia.cs.umass.edu<cr><lf>

User-Agent: Mozilla/5.0(Windows;U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax) <cr><lf>

Accept:ext/xml, application/xml, application/xhtml+xml, text/html; q=0.9, text/plain; q=0.8, image/png, */*; q=0.5<cr><lf>

Accept-Language: en-us,en; q=0.5<cr><lf>

Accept-Encoding: zip,deflate<cr><lf>

Accept-charset: ISO-8859-1, utf-8;q=0.7,*; q=0.7<cr><lf>

Keep-Alive: 300<cr><lf>

Connection: keep-alive<cr><lf>

<cr><lf>


a. Does the browser request a non-persistent or a persistent connection?

b. What is the URL of the document requested by the browser?

c. What version of HTTP is the browser running?

d. What is the IP address of the host on which the browser is running?

  • 正确答案:

  • a. (4 points) The browser is requesting a persistent connection

    b. (4 points) The document request was http://gaia.cs.umass.edu/cs453/index.html.

    c. (4 points) The browser is running HTTP version 1.1

    d. (4 points) This is a trick question. We cannot get it.

三. 简答题(共2题,66分)

7. (简答题, 10分)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?

  • 正确答案:

  • The total amount of time to get the IP address is

    RTT1+RTT2+……+RTTn.     (3 points)

    Once the IP address is known, RTT0 elapses to set up the TCP connection and another RTT0 elapses to request and receive the small object.    (3 points)


    The total response time is

    2 RTT0+RTT1+RTT2+……+RTTn.    (4 points)

8. (简答题, 16分)Referring to Problem above, 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 parallel connections?

b. Non-persistent HTTP with no parallel TCP connections?

c. Persistent HTTP?

  • 正确答案:

  • a. (4 points) 4RTT0+RTT1+RTT2+……+RTTn

    b. (4 points) 8RTT0+RTT1+RTT2+……+RTTn

    c.  (8 points) Without pipeling: 5RTT0+RTT1+RTT2+……+RTTn

        With pipeling: 3RTT0+RTT1+RTT2+……+RTTn

四. 分录题(共1题,14分)

9. (分录题, 14分)

Consider accessing your e-mail with POP3.

  • 正确答案:

  • (1)

    (8 points)

    C: dele 1

    C: retr 2

    S: blah blah …

    S: …………blah

    S: .

    C: dele 2

    C: quit

    S: +OK POP3 server signing off

  • (2)

    (6 points)

    C: retr 2

    S: blah blah …

    S: …………blah

    S: .

    C: quit

    S: +OK POP3 server signing off

第三章


一. 判断题(共7题,21分)

1. (判断题, 3分)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.

  • A. 对

  • B. 错

正确答案: 错


2. (判断题, 3分)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 acknowledgments on data.

  • A. 对

  • B. 错

正确答案: 错


3. (判断题, 3分)Suppose that the last SampleRTT in a TCP connection is equal to 1 sec. The current value ofTimeoutInterval for the connection will necessarily be ≧1 sec.

  • A. 对

  • B. 错

正确答案: 错


4. (判断题, 3分)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.

  • A. 对

  • B. 错

正确答案: 对


5. (判断题, 3分)The size of the TCP RcvWindow never changes throughout the duration of the connection.

  • A. 对

  • B. 错

正确答案: 错


6. (判断题, 3分)The TCP segment has a field in its header for RcvWindow.

  • A. 对

  • B. 错

正确答案: 对


7. (判断题, 3分)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. 对

  • B. 错

正确答案: 错


二. 分析题(共1题,33分)

8. (分析题, 33分)Host A and B are communicating over a TCP connection, and Host B has already received from A all bytes up through byte 248. Suppose Host A then sends two segments to Host B back-to-back. The first and second segments contain 40 and 60 bytes of data, respectively. In the first segment, the sequence number is 249, the source port number is 503, 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 second segment arrives before the first segment, in the acknowledgement of the first arriving segment, what is the acknowledgment number?

c.  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?

d.  Suppose the two segments sent by A arrive in order at B. The first acknowledgment 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.

  • 正确答案:

  • a. (6 points) The sequence number is 289, source port number is 503 and destination port number is 80.


    b. (5 points) If the second segment arrives before the first segment, in the acknowledgement of the first arriving segment, the acknowledgement number is 249, indicating that it is still waiting for bytes 249 and onwards.


    c. (6 points) If the first segment arrives before the second, in the acknowledgement of the first arriving segment, the acknowledgement number is 289, the source port number is 80 and the destination port number is 503.


    d. (16 points)

三. 计算题(共2题,46分)

9. (计算题, 10分)

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. 20 bytes

    b. ack number = 90

    10. (计算题, 36分)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.       What is the value of Threshold at the 18th transmission round?

b.       What is the value of Threshold at the 24th transmission round?

c.       Identify the intervals of time when TCP slow start is operating.

d.       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?

e.       After the 16th transmission round, is segment loss detected by a triple duplicate ACK or by a timeout?

f.        After the 22nd transmission round, is segment loss detected by a triple duplicate ACK or by a timeout?

g.       Identify the intervals of time when TCP congestion avoidance is operating.

h.       What is the initial value of Threshold at the first transmission round?

i.        During what transmission round is the 70th segment sent?

  • 正确答案:

  • a. (3 points) the threshold is 21 during the 18th transmission round.

    b. (3 points) the threshold is 13 during the 24th transmission round.

    c. (6 points) TCP slow start is operating in the intervals [1-6] and [23-26]

    d. (3 points) the new values of the threshold and window will be 4.

    e. (3 points) After the 16th transmission round, packet loss is recognized by a triple duplicate ACK.

    f. (3 points) After the 22nd transmission round, segment loss is detected due to timeout.

    g. (6 points) TCP congestion avoidance is operating in the intervals [6-16] and [17-22]

    h. (3 points) The threshold is initially 32.

    i. (3 points) Hence 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; packets15-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.  

    (3 points)Thus packet 70 is sent in the 7th transmission round.

第四章

1. (分析题)

Consider a datagram network using 32-bit host address. Suppose a router has four links, numbered 0 through 3, and packets are to be forwarded to the link interface as follows:


Destination  Address  Range                                                    Link  Interface

11100000 00000000 00000000 00000000

Through                                                                               0

11100000 11111111 11111111 11111111

 

11100001 00000000 00000000 00000000

Through                                                                               1

11100001 00000000 11111111 11111111

 

11100001 00000001 00000000 00000000

Through                                                                               2

11100001 11111111 11111111 11111111

 

Otherwise                                                                             3


a. Provide a forwarding table that has four entries, uses longest prefix matching, and forwards packets to the correct link interfaces.

b. Describe how your forwarding table determines the appropriate link interface for datagrams with destination address.:

11001000 10010001 01010001 01010101

11100001 00000000 11000011 00111100

11100001 10000000 00010001 01110111

  • 正确答案:

  • a. (4 points)

    Prefix Match                                  Interface

    11100000                                             0

    11100001 00000000                            1

    11100001                                             2

    Otherwise                                            3


    b. (6 points)

    Destination address                                           Interface

    11001000 10010001 01010001 01010101                          3

    11100001 00000000 11000011 00111100                          1

    11100001 10000000 00010001 01110111                          2

2. (分析题)Consider sending a 8000-byte datagram into a link that has an MTU of 1500bytes. Suppose the original datagram is stamped with the identification number 612. How many fragments are generated? What are their characteristics?

  • 正确答案:

  • The maximum size of data field in each fragment = 1480 (20 bytes IP header). 

    Thus the number of required fragments : (8000-20)/(1500-20)=6


3. (计算题)For the given topology of the network, use Dijkstra’s shortest path algorithm to compute the shortest path from node D to all network nodes. Please give the computing tabel and the shortest path tree and the forwarding table of node D.

  • 正确答案:

  • computing table (20 points):

spanning tree (15 points):


routing table (15 points):

4. (分析题)Consider the network fragment shown below. has only two attached neighbors, and yhas a minimum-cost path to destination (not shown) of 5, and has a minimum-cost path to of 6. The complete paths from and to (and between 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 will inform its neighbors of a new minimum-cost path to 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 will not inform its neighbors of a new minimum-cost path to as a result of executing the distance-vector algorithm.

  • 正确答案:

  • a. Dx(y) = 4, Dx(w) = 2,  Dx(u) = 7


    b. First consider what happens if c(x,y) changes. If c(x,y)  becomes larger or smaller (as long as c(x,y) > 0), the least cost path from x to u will still have cost at least 7. Thus a change in c(x,y) will not cause x to inform its neighbors of any changes. Now consider if c(x,w) changes. If c(x,w) = e £ 1, then the least-cost path to u continues to pass through w and its cost changes to 5 + e;  x will inform its neighbors of this new cost. If c(x,w) = d > 6, then the least cost path now passes through y and has cost 11; again x will inform its neighbors of this new cost.


    c. Any change in link cost c(x,y) will not cause x to inform its neighbors of a new minimum-cost path to u .


第五章

1. (计算题, 10分)

Consider the 4-bit generator G is 1011, and suppose that D has the value 11111010. What is the value of R?

Consider the previous problem, but suppose that D has the value10010001,What is the value of R?



正确答案:

2. (单选题, 5分)Which of the followings is a link protocol used in point-to-point link?

  • A. CSMA/CA

  • B. PPP

  • C. CSMA/CD

  • D. P2P

正确答案: B


3. (单选题, 5分)Which of the following options is not correct about MAC address?

  • A. MAC address is a 32-bit address 

  • B. MAC address is used in data link layer

  • C. MAC address is a 48-bit address

  • D. FF-FF-FF-FF-FF-FF is MAC broadcast(广播) address

正确答案: A


4. (单选题, 5分)With CDMA, each node is assigned(分配给) a different____.

  • A. frequency

  • B. data rate

  • C. time slot

  • D. code

正确答案: D


5. (多选题, 5分)Choose the right options about 100BaseT Ethernet(以太网) .

  • A. twisted-pair lines be used in this networking

  • B. 100Gbps rate in this networking

  • C. Ethernet is a LAN technology

  • D. Base-band(基带) data transferring be used in this networking

正确答案: ACD


6. (多选题, 5分)Which protocol works in Link layer?

  • A. CSMA/CD

  • B. RARP

  • C. ICMP

  • D. ARP

正确答案: ABD


7. (分录题, 15分)

About the functions of router, which options are right? Please write “Y” or “N” in the blanks.

Traffic isolation           (1)        

Plug and play           (2)        

Optimal routing           (3)       

  • 正确答案:

  • (1) Y

  • (2) N

    (3) Y


    8. (完型填空, 20分)

    Answer the following questions.


When host A sends frames to host B, it will use ARP table to get R’s MAC address.But now, it’s ARP table doesn’t contain MAC address of R. Host A initiates an ARP query.(Proxy ARP not used)

In this ARP query, the IP address of sending node is          1         , the MAC address of sending node          2         , the IP address of receiving node          3         , the MAC address of receiving node is           4         .


  • (1)

  • A.192.168.0.2

  • B.192.168.0.3

  • C.192.168.1.2

  • D.192.168.1.3

  • E.255.255.255.255

  • (2)

  • A.1111-2222-AAAA

  • B.1111-2222-BBBB

  • C.5555-6666-7777

  • D.5555-6666-8888

  • E.FFFF-FFFF-FFFF

  • (3)

  • A.192.168.0.2

  • B.192.168.0.3

  • C.192.168.1.2

  • D.192.168.1.3

  • E.255.255.255.255

  • (4)

  • A.1111-2222-AAAA

  • B.1111-2222-BBBB

  • C.5555-6666-7777

  • D.5555-6666-8888

  • E.FFFF-FFFF-FFFF

  • 正确答案:

  • (1) A(2) A(3) B(4) E

9. (计算题, 30分)

Consider sending a packet of 3000bits over a path of 5 links. Each link transmits at 1000bps. Queuing delays, propagation delay and processing delay are negligible.

(1).Suppose the network is a packet-switched virtual circuit network. VC setup time is 0.1 seconds. Suppose the sending layers add a total of 500 bits of header to each packet. How long does it take to send the packet from source to destination?

(2).Suppose the network is a packet-switched datagram network and a connectionless service is used. Now suppose each packet has 200 bits of header. How long does it take to send the packet?

(3).Suppose that the network is a circuit-switched network. Further suppose that the transmission rate of the circuit between source and destination is 200bps. Assuming 0.02s setup time and 200 bits of header appended to the packet, how long does it take to send the packet?

  • 正确答案:

  • (1). t=5*(3000+500)/1000+0.1=17.6s  

    (2). t=5*(3000+200)/1000=16s  

    (3). t=(3000+200)/200+0.02=16.02s


《计算机网络》习题及答案的评论 (共 条)

分享到微博请遵守国家法律