计算机网络第一周作业

计算机网络第一周作业
计算机网络第一周作业

Review

1. The word protocol is often used to describe diplomatic relations. Give an example of a diplomatic protocol.

答:比如说联合国宪章、世界贸易组织协定。

2. What is the difference between a host and an end system? List the types of end systems. Is a Web server an end system?

答没有不同,主机系统和终端设备可以互换。终端系统包括PC、工作站、web服务器、邮件服务器等等。WEB服务器也是端系统。

3. List six access technologies. Classify each one as residential access, company access, or

mobile access.

答:住宅接入:数字用户线DSL、混合光纤同轴电缆

公司接入:无线网接入、网线接入

无线接入:无线局域网、广域无线局域网

4. What is a client program? What is a server program? Does a server program request and

receive services from a client program?

答:端系统或者主机,他们都连接在Internet上,根据不同的服务又分为客户机、服务器。客户机程序是这样一种运行在端系统上的程序上的程序,它发出请求,并且从运行在其他端设备上的程序接受服务。而服务器程序就是给那些客户机程序,提供服务的程序。

5. List the available residential access technologies in your city. For each type of access, provide

the advertised downstream rate, upstream rate, and monthly price.

答:光纤接入(HFC)100Mbits/s 20Mbits/s 20RMB/月

6. What are some of the physical media that Ethernet can run over?

答:同轴电缆、双绞线都可以作为以太网的传输媒介。

8.Describe the most popular wireless Internet access technologies today. Compare and contrast

them.

答:主要有两种接入方式:

* IEEE 802.11技术无线LAN接入,用户距离接入点的几十米的范围内。通过连接到有线网的基站间接将用户连接到有线网上。

* 3G与LET网络。在这些系统中通过用于拨打电话的网络硬件设施,为在基站范围内的用户提供无线网络接入。

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

答:拨号调制解调器的速率通常是56K左右,这个是很早的技术与速率,带宽是独占的。DSL的速率是上下行不对称的,根据费用不同分为512K、1M、2M三种,还有不限速的上网,带宽是专用的。HFC的速率优于10M、100M、1G、10G的速率,带宽是共享的。

10.What is the transmission rate of Ethernet LANs?…….

答:以太网拥有10Mbps、100Mbps、1Gbps和10Gbps几种。不能,带宽是在该线路上的用户共享。

11.Suppose there is exactly one packet s witch between a sending host and a receiving host……

答:延时为两段延时之和,L/R1+L/R2。

14.Suppose users share a 2Mbps link. Also suppose each user requires 1Mbps when transmitting。。。

答a:2个,一人分1Mbps的专有带宽;b:当有两个人或一个人使用网络时,最高带宽占用为2Mbps,所以绝对不会有排队延时出现。但是,当3个及以上人使用时,最高需要3Mbps,但是最高提供2Mbps,所以会出现延时;c:0.2;d:3人同时传输的概率是0.008;所以时间增长的时间出现也是0.008

15.Why is it said that packet switching employs statistical multiplexing?.......

答:统计复用是对通信链路的一种高效的利用方法。所有链路上被按需分配,是一种按照概率统计的方法假设在一个时间段内,只有某几个用户在使用链路。TDM中的统计复用是对所有用户的事先分配了链路上的所有资源,传输速率是恒定的。按照预定分配,标记适合于处理恒定传输速率的业务,比如电话电路。而分组交换是按需分配,对链路的利用效率更高,资源共享,速率不恒定。

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

答:节点总时延由处理时延、传输时延、传播时延和排队时延组成。所有这些时延除了排队时延都是固定的。

18. Suppose Host A wants to send a large file to Host B. The path from Host A to Host B has

three links, of rates R1 = 250 kbps, R2 = 500 kbps, and R3 = 1 Mbps.

答:a:R = min{R1,R2,R3} = min{500kbp,2Mbps,1Mbps} = 500kbps

b:T = 4000KB / (500Kbps / 8) = 64s

c:R = min{R1,R2,R3} = min{500kbps,100kbps,1Mbps} = 100Kpbs;

T = 4000KB / (100Kbps / 8) = 320s

20.How long does it take a packet of length 1,000 bytes to propagate over a link of distance 2,500 km, propagation speed 2.5 · 108 m/s...

答:10 ^ -5 s; L/s; 否;否

21.Suppose end system A wants to send a large file to end system B. At a very high level, describe how end system A creates packets from the file. When one of these packets arrives to a packet switch, what information in the packet does the switch use to determine the link onto which the packet is forwarded? Why is packet switching in the Internet analogous to driving

from one city to another and asking directions along the way?

答:将文件拆成多个小块。并为每个块添加标头,从而从文件生成多个数据包。每个数据包中的标头包括目的地址的IP。分组交换机使用该IP地址确定输出链路。在给定数据包的目的地址情况下,询问哪条路要类似于这个的数据包,询问它应该转发哪个输出链路。

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

答: 路由器处理第1层到第3层。链路层交换机处理1到2.主机处理所有5各层。

23.List five tasks that a layer can perform. Is it possible that one (or more) of these tasks could

be performed by two (or more) layers?

答:五个通用任务是错误控制、流控制、分段和重组、多路复用和连接设置。这些任务可以在不同的层重复。

25. What are the five layers in the Internet protocol stack? What are the principal

responsibilities of each of these layers?

答:应用层:应用层是网络应用层协议存留的地方;运输层:因特网的运输层在应用程序端点之间传输报文;网络层:因特网的网络层负责将成为数据报的网络层分组从一台主机移动到另一台主机;链路层:因特网的网络层通过源和目的地之间的一系列路由器路由数据报;物理层:将帧的一个个比特从一个结点转移到另一个结点。

Problem

1 Consider the circuit-switched network in Figure 1.8. Recall that there are n circuits on each link

答a:4n;b:2n。

2.Consider an application that transmits data at a steady rate (for example, the sender

generates an N-bit unit of data every k time units, where k is small and fixed). Also, when such

an application starts, it will continue running for a relatively long period of time. Answer the

following questions, briefly justifying your answer:

答:a:电路交换非常适合这个应用,因为传输速率已知并且会话为长会话,不会造成带宽的大量浪费。b:在最坏的情况下,所有应用程序都通过一条链路传输数据,因为还未达到链路最大带宽所以不会发生拥堵,所以网络不需要拥塞控制机制。

3.Review the car-caravan analogy in Section 1.

4. Assume a propagation speed of 100 km/hour.

a. Suppose the caravan travels 150 km, beginning in front of one tollbooth, passing

through a second tollbooth, and finishing just after a third tollbooth. What is the

end-to-end delay?

b. Repeat (a), now assuming that there are eight cars in the caravan instead of ten.

答:2min+60min+2min+60min=124min;1.4min+60min+1.4min+60min=122.8min

4. (未留)

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

答:dprop=m/s;dtrans=L/R;end-to-end delay = m/s+L/R;刚刚离开host A;还在链路上,未到达host B;已经到达了host B;m=L/R*s = 892.86km

6. Suppose users share a 1 Mbps link. Also suppose each user requires 100 kbps when

transmitting, but each user transmits only 10 percent of the time. (See the discussion of packet

switching versus circuit switching in Section 1.3.)

答:a:1Mbps/100kbps = 10;b:p=0.1;c:(C40,n)\*(p)\^n\*(1-p)\^(40-n);d:P(11人或以上人使用)=

7.In this problem, we consider sending real-time voice from Host Ato Host B over a

packet-switched network (VoIP). Host Aconverts analog voice to a digital 64 kbps bit stream on

the fly. Host Athen groups the bits into 48-byte packets. There is one link between Hosts Aand

B; its transmission rate is 1 Mbps and its propagation delay is 2 msec. As soon as Host Agathers

a packet, it sends it to Host B. As soon as Host B receives an entire packet, it converts the

packet’s bits to an analog signal. How much time elapses from the time a bit is created (from

the original analog signal at Host A) until the bit is decoded (as part of the analog signal at Host

B)?

答:考虑包中的第一个bit,在这个比特被传输之前,包中的所有比特都必须被生成。这需要

传输数据包所需的时间是

传播延迟为2 msec。解码之前的延迟是

7 msec + 896μsec + 2msec= 9.896msec

因此延迟为9.896 msec。

Consider the discussion in Section 1.3 of packet switching versus circuit switching in which an

example is provided with a 1 Mbps link. Users are generating data at a rate of 100 kbps when

busy, but are busy generating data only with probability p = 0.1. Suppose that the 1 Mbps link

is replaced by a 1 Gbps link.

a. What is N, the maximum number of users that can be supported simultaneously under

circuit switching?

b. Now consider packet switching and a user population of M users. Give a formula (in

terms of p, M, N) for the probability that more than N users are sending data.

答:a).10000 b). Cnm * P^n *(1-q)^(m-n))

9.In the above problem, suppose R1 = R2 = R3 = R and dproc = 0. Further suppose the packet

switch does not store-and-forward packets but instead immediately transmits each bit it

receives before waiting for the entire packet to arrive. What is the end-to-end delay?

答:由于bits是立即传输的,包交换不引入任何延迟;因此不引入传输延迟。

D(end-end)= L/R + d1/s1 + d2/s2

->8 + 24 + 12 = 44 msec。

10.Consider the queuing delay in router buffer (preceding an outbound link). Suppose all packets are L bits, the transmission rate is R bps, and that N packets simultaneously arrive at the buffer every LN/R seconds. Find the average queuing delay of a packet. (Hint:The queuing delay for the first packet is zero; for the second packet L/R; for the third packet 2L/R.The Nth

packet has already been transmitted when the second batch of packets arrives.) 答:总延迟=(0+1+…+ n -1) L/R

平均延迟= (n -1)L/2R

11. Suppose N packets arrive simultaneously to a link at which no packets are currently being transmitted or queued. Each packet is of length L and the link has transmission rate R. What is

the average queuing delay for the N packets?

答(L/R + 2L/R + ....... + (N-1)L/R)/N = L/(RN) * (1 + 2 + ..... + (N-1)) = L/(RN) * N(N-1)/2 = LN(N-1)/(2RN) = (N-1)L/(2R)

12.Consider a packet of length L which begins at end system A, travels over one link to a packet switch, and travels from the packet switch over a second link to a destination end system. Let d i, s i, and R i denote the length, propagation speed, and the transmission rate of link i, for i = 1, 2. The packet switch delays each packet by d proc. Assuming no queuing delays, in terms of d i, s i, R i, (i = 1, 2), and L, what is the total end-to-end delay for the packet?

答:第一个端系统需要L/R1时间将数据包传输到第链路上,包花费d1/s1在一个链路上,交换机在接收到整个数据包后处理延迟为dproc,包交换机需要L/R2将数据包传输到第二个链路上;包花费d2/s2在第二个链路上传播,d(end-end)= L/R1+ L/R2 + d1/s1 + d2/s2 + dproc。代入方程,得到8 + 8 + 16 + 4+ 1 = 37msec。

13.Consider the queuing delay in a router buffer. Let I denote traffic intensity; that is, I = La/R. Suppose that the queuing delay takes the form IL/R (1 – I) for I < 1.

a. Plot the total delay as a function of L/R.

b. Provide a formula for the total delay, that is, the queuing delay plus the

答:令x=L/R, Total delay = x/(1-ax)

Total delay = IL/R(1-I) + L/R = L/R(1-I);

14.a. Generalize Equation 1.2 in Section 1.4.3 for heterogeneous processing rates, transmission rates, and propagation delays.

b. Repeat (a), but now also suppose that there is an average queuing delay of dqueue at each node.

答:a.

d end-end =N( d proc + d trans + d prop)

b.

d end-end =N( d proc + d trans + d prop)+d queue()

15. Perform a Traceroute between source and destination on the same continent at three different hours of the day.

a).第一次实验的路由器数:24

第二次实验中的路由器数:23

第三次实验中的路由器数:25

Ip地址不会改变。

b)数值太多,计算平均值和方差太浪费时间,意义不大

C)211.136.94.18

211.136.94.17等很多组如上图都是是相似的IP地址。它们应该被认为是同一ISP的一部分。延迟并不影响相邻的ISP。

16.A packet switch receives a packet and determines the outbound link to which the packet

should be forwarded. When the packet arrives, one other packet is halfway done being

transmitted on this outbound link and four other packets are waiting to be transmitted. Packets

are transmitted in order of arrival. Suppose all packets are 1,500 bytes and the link rate is 2

Mbps. What is the queuing delay for the packet? More generally, what is the queuing delay

when all packets have length L, the transmission rate is R, x bits of the

currently-being-transmitted packet have been transmitted, and n packets are already in the

queue?

答:Delay1=500bits/(1mbits/s)+4*1000bit/ (1mbits/s)

Delay = (L-x)/R + (n+1)*L/R

17.Consider the throughput example corresponding to Figure 1.20(b). Now suppose that there

are M client-server pairs rather than 10. Denote Rs, Rc, and R for the rates of the server links,

client links, and network link. Assume all other links have abundant capacity and that there is

no other traffic in the network besides the traffic generated by the M client-server pairs. Derive

a general expression for throughput in terms of Rs, Rc, R, and M.

答:Throughput = min{Rs, Rc, R/M}

18. Consider problem P23 but now with a link of R = 1 Gbps.

a.Calculate the bandwidth-delay product, R·d prop .

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

continuously as one big message. What is the maximum number of bits that will be in

the link at any given time?

c.What is the width (in meters) of a bit in the link?

答:a)(1e7/2.5e8)*1e9=40,000,000bit

b)400,000bit(包长度)

c)1e7/4e5=25m

19.Referring to problem P23, suppose we can modify R. For what value of R is the width of a bit as long as the length of the link?

答:2.5e8/1e6=25bps

20.Consider the airline travel analogy in our discussion of layering in Section 1.5, and the addition of headers to protocol data units as they flow down the protocol stack. Is there an equivalent notion of header information that is added to passengers and baggage as they move down the airline protocol stack?

答:有,在传输过程中还加入了标记,用于保障安全

21. Refer again to problem P23

a.How long does it take to send the file, assuming it is sent continuously?

b.Suppose now the file is broken up into 10 packet is acknowledged by the receiver and

the transmission time of an acknowledgment packet is negligible. Finally, assume

that the sender cannot send a packet until the preceding one is acknowledged. How

long does it take to send the file?

答:a)传播时延=1e7/2.5e8=40ms;传输时延=4e5×250/2.5e8=400ms 因此总延时为:440ms b)传播时延=2×40=80ms(发送及返回确认);传输时延=4e4×250/2.5e8=40ms,传送10 个分组,总时延=10 ×(80+40)=1200ms=1.2s

22.Suppose there is a 10 Mbps microwave link between a geostationary satellite and its base station on Earth. Every minute the satellite takes a digital photo and sends it to the base station. Assume a propagation speed of 2.4·108meters/sec.

a. What is the propagation delay of the link?

b. What is the bandwidth-delay product, ?

c. Let x denote the size of the photo. What is the minimum value of x for the microwave

link to be continuously transmitting.

答:

a.3600*103/2.4*108 = 150ms

b. R·tprop = 150*10-3*107 = 1.5*106bits

c. x/107 >=60

x>=6*108

23.Suppose two hosts, A and B, are separated by 10,000 kilometers and are connected by a

direct link of R = 2 Mbps. Suppose the propagation speed over the link is 2.5?108 meters/sec.

答:

.=R*m/s= 1Mbps * 10000*/(2.5*) = 40000bits

a. R?d

prop

b.40000bits

c. 带宽延迟取决于链路中的最大包的bits

d. width = 10000*/40000 = 500m比足球场大

e. width = m+(R*m/s) = s/R

24. In modern packet-switched networks, the source host segments long, application-layer messages (for example, an image or 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 is 8?106bits 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.

答:第一个交换机接收第二个包的时间= 2*1msec = 2m sec

a 7.5/1.5 = 5 sec, 5sec * 3 = 15sec

b.3*1+4999*1= 5.002ms

c从源主机发送第一个包到第一个交换机的时间为1.5*103/1.5*106 = 1ms

d信息包必须按正确的顺序到达目的地。

消息分割导致许多更小的数据包。包头大小对所有数据包都是一样的,因此总字节数更多。

25.Consider sending a large file of F bits from Host A to Host B. There are three links (and two switches·) between A and B, and the links are uncongested (that is, no queuing delays). Host A segments the file into segments of S bits each and adds 80 bits of header to each segment, forming packets of L= 80 + S bits. Each link has a transmission rate of R bps. Find the value of S that minimizes the delay of moving the file from Host A to Host B. Disregard propagation delay.

答:delay = (40+S)/R + (F*(S+40)/S)/R

=40/R + F/R + S/R + (F*40)/S

解得:当S=(F*40)1/2 时最小

=4*(10*F)1/2 + 40/R + F/R

相关主题
相关文档
最新文档