文档库 最新最全的文档下载
当前位置:文档库 › 计算机网络期中考试试题_2013_答案

计算机网络期中考试试题_2013_答案

中山大学软件学院2010级软件工程专业(2012学年秋季学期)

《S E-301计算机网络》期中试题(A卷)

(考试形式:闭卷考试时间:2小时)

考试作弊不授予学士学位

方向:姓名:______ 学号:

1.(6 points) What’s the difference between HTTP and FTP?

HTTP是带内连接,而FTP是带外连接;(3 points)

HTTP是无状态的,而FTP是有状态的(在会话期间需要ID密码)。(3 points)

端口号、协议命令、返回码(一点一分,最多两分)

3.(8 points) What are the changes (or advantages) of IPv6, compare to IPv4?

/*(a).header format helps speed processing/forwarding (3 points)

(b).header changes to facilitate QoS (3 points)*/

1.扩大地址容量(128bits)

2.简单高效的首部(各种其它解释)

3.不允许分片重组;

4.取消校验和。

答1点3分,2点5分,3点7分,4点8分。

4.(8 points) How can UDP detect bit error for a received segment? Please describe such mechanism.

/*使用checksum(1分)

sender: checksum is addition (1’s complement sum) of se gment contents. puts

checksum value into UDP checksum field(3分)

receiver:compute checksum of received segment. check if computed checksum equals checksum field value(3分)

note:when adding numbers, a carryout from the most significant bit needs to be added to the result(1分)*/

检查和(2分)

发送方:求和(溢出要回卷),补1运算得到checksum(3分)

接收方:所有字段求和(包括checksum),不全为1则有bit-error(3分)

6.(10 points) Consider an e-commerce site that wants to keep a purchase record for each

of its customers. Describe how this can be done with cookies.

a.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.

b. During each subsequent visit (and purchase), the browser sends the cookie number

b ack to the site. Thus the site knows when this user (more precisely, this browser) is

v isiting the site.

1.(6 points) In our rdt protocols, why did we need to introduce timers?

To handle losses in the channel.(3 points) if not received within the duration of the timer for the packet, the packet (or its ACK or NACK) is assumed to have been lost.(3 points)

2.(9 points) Install and compile the Java programs TCPClient and UDPClient on one

host and TCPServer and UDPServer on another host.

a.Suppose you run TCPClient before you run TCPServer. What happens? Why?

b.Suppose you run UDPClient before you run UDPServer. What happens? Why?

c.What happens if you use different port numbers for the client and server sides?

a) the client will attempt to make a TCP connection with a non-existent server process.

A TCP connection will not be made.(3 points)

b) UDP Client doesn't establish a TCP connection with the server. Thus, everything

should work fine if you first run UDP Client, then run UDP Server, and then type some input into the keyboard.(3 points)

c) the client will attempt to establish a TCP connection with the wrong process or a

non-existent process. Errors will occur.(3 points)(这一问觉得可以有不同理解,所以按自己理解的答就行)

3.(10 points) 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?

The delay components are processing delays, transmission delays, propagation delays, and queuing delays.(1.5 points per delay) All of these delays are fixed, except for the queuing delays, which are variable.(1 point per delay)

4.(12 points) Consider a datagram network using 8-bit host addresses. Suppose a router

5.(15 points) Suppose two hosts, A and B, are separated by 10,000 km and are

connected by a direct link of R=2 Mbps. Suppose the propagation speed over the

link is 2.5*108 m/s.

a)Calculate the bandwidth-delay product, R*d prop.(5 points)

b)Consider sending a file of 400,000 bits from Host A to Host B. Suppose the

file is sent continuously as one large message. What’s the maximum number

of bits that will be in the link at any given time?(5 points)

c)What is the width (in meters) of a bit in the link? Is it longer than a football

field (105 m long with FIFA standard)?(5 points)

a)R * dprop= R * d / s = 2 Mbps * 10000 km / 2.5 * 108 m/s = 80 Kb.

b)Since 400,000bits>80kb, thus the maximum number of bits that will be in the link is R

* dprop = 80 Kb.

c)X = 20000 km / (R *dprop ) = 10000 km / 80 Kb = 125 m>105m

6.(16 points)

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.

TCP slowstart is operating in the intervals [1,6] and [23,26] (2 points)

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

TCP congestion avoidance is operating in the intervals [6,16] and [17,22] (2 points)

c.After the 16th transmission round, is segment loss detected by triple duplicate

ACK or by a timeout?

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. (2

points)

d.After the 22nd transmission round, is segment loss detected by a triple duplicate

ACK or by a timeout?

After the 22nd transmission round, segment loss is detected due to timeout, and hence the congestion window size is set to 1. (2 points)

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

The threshold is initially 32, since it is at this window size that slowtart stops and congestion avoidance begins. (2 points)

f.What is the value of Threshold at the 18th transmission round?

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. (2 points)

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

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 16-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. (2 points)

h.Suppose TCP Tahoe is used (instead of TCP Reno), and assume that triple

duplicate ACKs are received at the 16th round. What are the threshold and the

congestion window size at the 19th round?

Threshold is 21, and congestion window size is 4. (2 points)

相关文档
相关文档 最新文档