Computer Network Homework 1
13331130 李有才
计算机网络
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?
两个概念表示的含义相同;PC,智能手机;Web服务器也是端系统。
2. What are the five layers in the Internet protocol stack? What are the principal responsibilities of each of these layers?
应用层:网络应用程序及其应用层协议存留的地方;
运输层:在应用程序端点之间传输应用层报文;
网络层:负责将称为数据报的网络层分组从一台主机移动到另一台主机;
链路层:在节点之间传送帧;
物理层:将帧中的一个一个比特从一个节点移动到下一个节点。
3. What is an application-layer message? A transport-layer segment? A network layer datagram? A link-layer frame?
应用层报文:端系统中的应用程序与另一个端系统交换的心息分组;
运输层报文段:对报文进行封装,添加运输层头信息后的运输层分组数据;
网络层数据报:对报文段封装后的分组信息;
链路层帧:对数据报封装后的分组信息。
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?
500kbps
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?
4∗106/103∗8/500=64s
c. Repeat (a) and (b), but now with R2 reduced to 100 kbps.
(a)100 kbps
(b)4∗106/103∗8/100=320s
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 seconds
b) Determine the transmission time of the packet, dtrans in terms of Land R.
dtrans=L/R seconds
c) Ignoring processing and queuing delays, obtain an expression for the end-to-end delay.
dend−end=dprop+dtrans=(m/s+L/R) seconds
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?
恰好离开Host A
e) Suppose dprop is greater than dtrans . At time t=dtrans, where is the first bit of the packet?
正在传播的路线上,还未到达Host B
f) Suppose dprop is less than dtrans . At time t=dtrans, where is the first bit of the packet?
Host B
g) Suppose s=2.5∗108, L=100 bits and R=28 kbps. Find the distance m so that dprop equals dtrans.
m/s=L/R→m=L/R∗s=8.93∗105 m
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 link is 2.5∗108 meters/sec.
a) Calculate the bandwidth-delay product, R∗tprop.
R∗tprop=40,000 bits
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?
由于传播时延小于传输时延,所以链路中最多有40,000 bits
c) Provide an interpretation of the bandwidth-delay product.
链路中最大的二进制位数量
107/(4∗104)=250 m,大于足球场长度。
e) 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.
tprop=m/s;
m/(R∗tprop)=s/R
7. 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?
R=s/m=2.5∗108/107=25 bps
8. Refer again to problem 6.
a) How long does it take to send the file, assuming it is sent continuously?
tend−end=ttrans+tprop=400,000/106+0.04 s=0.44 s
b) 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?
(40,000/106+0.04)∗10=0.8 s
c) Compare the results from (a) and (b).
一次性传输整个文件效率更高