计算机网络作业一

更新时间:2023-10-02 02:43:01 阅读量: 综合文库 文档下载

说明:文章内容仅供预览,部分内容可能不全。下载后的文档,内容与下面显示的完全一致。下载之前请确认下面内容是否您想要的,是否完整无缺。

Computer Network 2015fall

Homework 1

作业提交地址: ftp://my.ss.sysu.edu.cn/~zhgf/ComputerNetwork2015/

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

答:(1) 基本相同,经常互换。

(2) web服务器、PC机、手机、平板电脑。 (3) 是的。

2. What are the five layers in the Internet protocol stack? What are the principal responsibilities of each of these layers?

答:(1) 应用层、运输层、网络层、链路层和物理层。

(2) 应用层是网络应用程序及其应用层协议存留的地方;运输层提供了在应用程序端点之间传送应用层报文的服务;网络层将称为数据报的网络层分组从一台主机移动到另一台主机;链路层将分组从一个节点(主机或路由器)移动到路径上的下一个节点;物理层将该帧中的一个一个比特从一个节点移动到下一个节点。

3. What is an application-layer message? A transport-layer segment? A network layer datagram? A link-layer frame?

答:(1) 应用层报文是位于应用层的信息分组。(2) 运输层报文段由应用层报文和运输层首部信息构成。(3) 网络层数据报由运输层报文段和网络层首部信息构成。(4) 链路层帧由网络层数据报和链路层首部信息构成。

4. 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 = 500 kbps, R2 = 2 Mbps, and R3 = 1 Mbps.

a. Assuming no other traffic in the network, what is the throughput for the file transfer?

答:R1=0.5Mbps

b. Suppose the file is 4 million bytes. Dividing the file size by the throughput, roughly how long will it take to transfer the file to Host B? 答:4Mb?0.5Mbps?8s

c. Repeat (a) and (b), but now with R2 reduced to 100 kbps.

答:R2=0.1Mbps,所以thoughput为0.1Mbps,t?4?0.1?40s

5. This elementary problem begins to explore propagation delay and

transmission delay, two central concepts in data networking. Consider two hosts, 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. 答:dprop?m/s

b) Determine the transmission time of the packet, dtrans in terms of Land R. 答:dtrans?L/R

c) Ignoring processing and queuing delays, obtain an expression for the end-to-end delay.

答:tdelay?dprop?dtrans?m/s?L/R

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? 答:刚离开主机A。

e) Suppose dprop is greater than dtrans . At time t=dtrans, where is the first bit of the packet?

答:在链路上,距离主机A:S?(L/R)。

f) Suppose dprop is less than dtrans . At time t=dtrans, where is the first bit of the packet?

答:已到达主机B。

g) Suppose s=2.5*10, L=100 bits and R=28 kbps. Find the distance m so that

dprop equals dtrans.

8

s?L2.5*108*102??892.86km 答:m/s?L/R,?m?3R28*10

6. Suppose two hosts, A and B, are separated by 10,000 kilometers and are

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

8

link is 2.5*10 meters/sec.

a) Calculate the bandwidth-delay product, R*tprop. 答:R*tprop?R*d/s?4*104bits

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 is the maximum number of bits that will be in the link at any given time?

答:文件大小为400,000 = 4*105 bits > 4*104 bits,所以最大字节量应为4*104。

c) Provide an interpretation of the bandwidth-delay product.

答:the maximum number of bits that will be in the link at any given time。即在给定时刻,链路中字节数的最大值。

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

107?250m。是。 答:

4*104e) Derive a general expression for the width of a bit in terms of the propagation speed s, the transmission rate R, and the length of the link m.

答:

ms? mRR*s7. Referring to problem 6, suppose we can modify R. For what value of R is the width of a bit as long as the length of the link?

答:设一个bit的长度为m,由6(e)知,m?

8. Refer again to problem 6.

ss,?R?。 Rma) How long does it take to send the file, assuming it is sent continuously?

答:tprop107L4*105??0.04s,t总??0.04s??0.04?0.44s 8662.5*101*1010b) Suppose now the file is broken up into 10 packets with each packet containing

40,000 bits. Suppose that each 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?

4*104?0.04s。因为只有完全发送完一个包才可以发送下一个,所答:ttrans?610以t总?(0.04?0.04)*10?0.8s。

c) Compare the results from (a) and (b).

答:0.8>0.44。整个文件连续传输时,t?Lm?;分成包时,设包的数量为RsLmLmN,则t?(N?)*N??*N,则分的包越多,越慢。

RsRs

本文来源:https://www.bwwdw.com/article/hutd.html

Top