P1.

Design and describe an application-level protocol to be used between an automatic teller machine and a bank’s centralized computer. Your protocol should allow a user’s card and password to be verified, the account balance (which is maintained at the centralized computer) to be queried, and an account withdrawal to be made (that is, money disbursed to the user). Your protocol entities should be able to handle the all-too-common case in which there is not enough money in the account to cover the withdrawal. Specify your protocol by listing the messages exchanged and the action taken by the automatic teller machine or the bank’s centralized computer on transmission and receipt of messages. Sketch the operation of your protocol for the case of a simple withdrawal with no errors, using a diagram similar to that in Figure 1.2 . Explicitly state the assumptions made by your protocol about the underlying end-to-end transport service.
设计并描述一种在银行中心服务器和自动柜员机间通信的应用层协议,你的协议应当允许验证用户卡和口令,査询账目结算(这些都在中央计算机中进行维护),支取账目(即向用户支付钱)。 你的协议实体应当能够处理取钱时账目中钱不够的常见问题。通过列出自动柜员机和银行中央计算机在报文传输和接收过程中交换的报文和采取的动作来定义你的协议。使用类似于图1.2所示的图,拟定在简单无差错取钱情况下该协议的操作。明确地阐述在该协议中关于底层端到端运输服务所做的假设。

答案:
从柜员机到服务器发送的消息:

服务器向柜员机发送的消息:

握手与校对

假如钱不够了

P2.

Equation 1.1 gives a formula for the end-to-end delay of sending one packet of length L over N links of transmission rate R. Generalize this formula for sending P such packets back-to-back over the N links. 式1.1(d端到端=NLRd_{端到端}=N\frac{L}{R}d端到端​=NRL​) 给出了经传输速率为R的N段链路发送长度L的一个分组的端到端时延。对于经过N段链路一个接一个地发送P个这样的分组,一般化地表示出这个公式。

答案:
(N+P−1)LR(N+P-1)\frac{L}{R}(N+P−1)RL​

P3.

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. Would a packet-switched network or a circuit-switched network be more appropriate for this application? Why?
b. Suppose that a packet-switched network is used and the only traffic in this network comes from such applications as described above. Furthermore, assume that the sum of the application data rates is less than the capacities of each and every link. Is some form of congestion control needed? Why?
考虑某一应用以稳定速率传输数据(比如每k个时间段发送N比特数据块,k是一个小的常数),且该应用一旦开始服务,就会持续长时间运行,回答下列问题,并且简要地论证你的答案。
a, 应当选择分组交换网络还是电路交换网络?为什么?
b,假设使用分组交换网络,并且该网络上的流量仅来自于上面描述的应用。并且假设应用的数据总和低于每段链路的传输能力。这种情况需不需要设置拥塞控制机制呢?

答案:

a, 电路交换网络。 应用需要持续地传输速率,也就是线路不会存在闲置时间。传输速率是一定的,这样很方便预留一定速率的网络,既不会速率不足也不会浪费。 而假如使用分组交换网络,会增加分组管理开销(比如时延)。
b,不需要。当链路的传输能力始终能满足传输的数据量时,不会存在拥堵和排队的情况,也就不需要有拥塞控制机制。

P4.

Consider the circuit-switched network in Figure 1.13 . Recall that there are 4 circuits on each link. Label the four switches A, B, C, and D, going in the clockwise direction.
a. What is the maximum number of simultaneous connections that can be in progress at any one time in this network?
b. Suppose that all connections are between switches A and C. What is the maximum number of simultaneous connections that can be in progress?
c. Suppose we want to make four connections between switches A and C, and another four connections between switches B and D. Can we route these calls through the four links to accommodate all eight ­connections?
考虑图1.13中的情况,每段链路有4段电路,将四个交换机按顺时针顺序标记为A、B、C、D。
a,在该网络中最多可以有多少连接同时存在?
b, 假设所有的连接都在A和C之间,在该网络中最多可以同时存在多少连接?
c, 假定我们要在交换机A和C之间建立4条连接,在交换机B和D之间建立另外4条连接。我们能够让这些呼叫通过这4条链路建立路由以容纳所有8条连接吗?

答案:
a,16条(每两个路由器之间可以建立4条)
b,8条 (4条A-B-C,4条A-D-C)
c, 可以。A-C之间的四条:A-B-C两条、A-D-C两条。 B-D之间的两条: B-C-D两条,B-A-D两条。

P5.

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.

回顾在1.4节中的车队的类比。假定传播速度为100km/h
a,假定车队旅行150km:在一个收费站前面开始,通过第二个收费站,并且正好在第三个收费站后 面结束。其端到端时延是多少?
b,重复(a),现在假定车队中有8辆汽车而不是10辆。

答案:
a, 传播时延为90min,传输时延为31012s = 6min, 端到端时延是96min
b, 传输时延不变,端到端时延为3812s = 4min48s, 端到端时延是94min48s

P6.

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 dpropd_{prop}dprop​, in terms of m and s.
b. Determine the transmission time of the packet, dtransd_{trans}dtrans​ , in terms 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=0t = 0t=0. At time t=dtranst = d_{trans}t=dtrans​ , where is the last bit of the packet?
e. Suppose dpropd_{prop}dprop​ is greater than dtransd_{trans}dtrans​. At time t=dtranst = d_{trans}t=dtrans​, where is the first bit of the packet?
f. Suppose dpropd_{prop}dprop​ is less than dtransd_{trans}dtrans​ . At time t=dtranst = d_{trans}t=dtrans​, where is the first bit of the packet?
g. Suppose s = 2.5×1082.5\times10^82.5×108 , L = 120bits and R = 56kbps find the distance m so that dpropd_{prop}dprop​ equals dtransd_{trans}dtrans​

让我们简单地探究一下数据网络中的两个核心问题:传输时延和传播时延。假设有两个主机A和B, 通过一条速率为R bps的链路连接。假设两个主机距离m米,传播速率是s 米/秒, A要向B发送一个大小为L比特的包。
a, 用m和s表示传播时延dpropd_{prop}dprop​
b, 根据L和R,确定传输时延dtransd_{trans}dtrans​
c, 忽略处理和排队时延,求出端到端时延的表达式
d, 假设A在t = 0时开始发送该分组,在dtransd_{trans}dtrans​时,分组的最后一个比特正处在什么位置?
e, 假设传播时延大于传输时延,在dtransd_{trans}dtrans​时,分组的第一个比特正处在什么位置?
f, 假设传播时延小于传输时延,在dtransd_{trans}dtrans​时,分组的第一个比特正处在什么位置?
g, 假设s = 2.5×1082.5\times10^82.5×108 , L = 120 and R = 56kbps, 求出使得传输时延与传播时延相等的距离m

答案:
a, dprop=m/sd_{prop} = m/sdprop​=m/s
b, dtrans=L/Rd_{trans} = L/Rdtrans​=L/R
c, d=m/s+L/Rd = m/s+L/Rd=m/s+L/R
d, 临近主机A的链路上
e, AB之间的链路上
f, 主机B的缓冲区中
g, 535714 m

P7.

In this problem, we consider sending real-time voice from Host A to Host B over a packet-switched network (VoIP). Host A converts analog voice to a digital 64 kbps bit stream on the fly. Host A then groups the bits into 56-byte packets. There is one link between Hosts A and B; its transmission rate is 2 Mbps and its propagation delay is 10 msec. As soon as Host A gathers 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)?
本题中,我们假设从主机A到主机B通过分组交换网发送实时的声音数据(IP电话)。主机A动态地将模拟声音信号转换为64kbps的数字信号,并将其打包为56字节的分组。在A和B之间有一条传输速率是2 Mbps、传播时延是10毫秒的通路,当A打包完成一个分组后,它立即将其发送到主机B,B接收到整个分组后,它将分组的比特流转换为模拟信号。一个比特从创建到解码为模拟信号花费的时间是多少?

答案:
A收集整个分组所用时间:d1=56×864×103=0.07s=7msd_1=\frac{56\times8}{64\times10^3} =0.07s = 7msd1​=64×10356×8​=0.07s=7ms
A发送整个分组所用的时间: d2=56×82×106=0.000224s=0.224msd_2=\frac{56\times8}{2\times10^6}=0.000224s=0.224msd2​=2×10656×8​=0.000224s=0.224ms
传播时延d3=10msd_3=10msd3​=10ms
总时延d=d1+d2+d3=17.224msd_1+d_2+d_3=17.224msd1​+d2​+d3​=17.224ms

P8.

Suppose users share a 3 Mbps link. Also suppose each user requires 150 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. When circuit switching is used, how many users can be supported?
b. For the remainder of this problem, suppose packet switching is used. Find the probability that a given user is transmitting.
c. Suppose there are 120 users. Find the probability that at any given time, exactly n users are transmitting simultaneously. (Hint: Use the binomial distribution.)
d. Find the probability that there are 21 or more users transmitting ­simultaneously

假设用户共享一条3Mbps的链路,且每个用户的传输所需的速率是150kbps,但是每个用户仅占用10%的时间(可参照1.3节关于分组交换和电路交换的比较)。
a, 使用电路交换时,最多可以支持多少用户?
b, 假如使用分组交换,给出某位用户正在传输的概率
c, 假设有120位用户,求出在某个时间恰好有n个用户正在传输的概率。(提示:使用二项分布)
d,计算出同时传输的用户数量大于等于21的概率

答案:
a,20
b,0.1
c, C(n,120)∗0.1n∗0.9120−nC(n,120)*0.1^n*0.9^{120-n}C(n,120)∗0.1n∗0.9120−n
d, 0.079

P9.

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.
考虑在1.3节中分组交换和电路交换的对比,原题中提供的是一个1Mbps的链路,用户使用时的速率是100kbps,用户的使用概率p=0.1。假设原本的1Mbps链路更改为1Gbps。

a, 若使用电路交换,最大能支撑多少用户?
b, 考虑分组交换,用户数量为M,求出使用的用户数量大于N的概率(用符号p,M,n表示)。

答案:
a, 10000
b,

P10.

Consider a packet of length L that begins at end system A and travels over three links to a destination end system. These three links are connected by two packet switches. Let did_idi​ , sis_isi​ , and RiR_iRi​ denote the length, propagation speed, and the transmission rate of link i, for i=1,2,3 . The packet switch delays each packet by dprocd_{proc}dproc​ . Assuming no queuing delays, in terms of did_idi​ , sis_isi​ , RiR_iRi​,(i = 1,2,3), and L, what is the total end-to-end delay for the packet? Suppose now the packet is 1,500 bytes, the propagation speed on all three links is 2.5×108m/s2.5\times10^8m/s2.5×108m/s , the transmission rates of all three links are 2 Mbps, the packet switch processing delay is 3 msec, the length of the first link is 5,000 km, the length of the second link is 4,000 km, and the length of the last link is 1,000 km. For these values, what is the end-to-end delay?
假设一个分组长度为L,它从端系统A出发经过3段链路到达目的端系统,三段链路由两个分组交换机连接。 设链路i的长度、传播速率、传输速率分别为did_idi​ , sis_isi​ , RiR_iRi​(i取值为1,2,3),分组交换时延是dprocd_{proc}dproc​,忽略排队时延,端到端时延是多少?
如果分组长度是1500字节,所有链路的传播速率是2.5×108m/s2.5\times10^8m/s2.5×108m/s,传播速率是2Mbps,处理时延是3ms, 三段链路的长度分别为5000km, 4000km, 1000km, 这时的端到端时延是?

答案:
1)
传播时延: dprop=∑i=13disid_{prop}=\sum_{i=1}^{3}\frac{d_i}{s_i}dprop​=∑i=13​si​di​​
传输时延: dtrans=∑i=13LRid_{trans}=\sum_{i=1}^{3}\frac{L}{R_i}dtrans​=∑i=13​Ri​L​
处理时延:2dproc2d_{proc}2dproc​/注意处理时延和交换机数量有关!!!/
端到端时延:dend−to−end=∑i=13(disi+LRi)+2dprocd_{end-to-end}=\sum_{i=1}^{3}(\frac{d_i}{s_i}+\frac{L}{R_i})+2d_{proc}dend−to−end​=∑i=13​(si​di​​+Ri​L​)+2dproc​

带入1)中的式子:
dend−to−end=64msd_{end-to-end}=64msdend−to−end​=64ms

P11.

In the above problem, suppose R1=R2=R3=RR_1=R_2=R_3=RR1​=R2​=R3​=R and dproc=0d_{proc}=0dproc​=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?
接着讨论上一题(P10),这次我们假设R1=R2=R3R_1=R_2=R_3R1​=R2​=R3​ 且dproc=0d_{proc}=0dproc​=0,并且分组交换不使用存储转发传输,而是收到每一个比特后立即将其发出。端到端时延是多少?

答案:
传播时延:dprop=d1/s1+d2/s2+d3/s3d_{prop} = d_1/s_1 + d_2/s_2+ d_3/s_3dprop​=d1​/s1​+d2​/s2​+d3​/s3​
传输时延: dtrans=L/Rd_{trans} = L/Rdtrans​=L/R
端到端时延: dend−to−end=d1/s1+d2/s2+d3/s3+L/Rd_{end-to-end} = d_1/s_1 + d_2/s_2+ d_3/s_3+L/Rdend−to−end​=d1​/s1​+d2​/s2​+d3​/s3​+L/R

按P10的数据,dend−to−end=46msd_{end-to-end} = 46msdend−to−end​=46ms

主要是要理解传输时延的变化。当分组交换不使用存储转发传输后,分组交换机也就不会再增加传输时延了。

P12.

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?

一个分组交换机收到了一个分组,且已确定好下一步将它发送到某条目的链路。这时在目的链路中,另一个分组已经传输了一半并且另外4个分组正在排队等待。分组按抵达顺序依次处理。
假设所有的分组都是1500字节且链路传输速率是2Mbps, 该分组的排队时延是多少?
将题目一般化,假设所有分组长度为L,传输速率是R,当前正在传输的分组已经传输了x比特,n个分组正在排队,此时的排队时延是多少?

答案:
1)4.5×1500×8/2000000=0.027s=27ms4.5\times1500\times8/2000000=0.027s=27ms4.5×1500×8/2000000=0.027s=27ms
2) (nL+(L−x))/R(nL + (L - x))/R(nL+(L−x))/R

P13.

a. 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?
b. Now suppose that N such packets arrive to the link every LN/R seconds. What is the average queuing delay of a packet?
a, 假设有N个分组同时抵达,此时分组交换机没有分组正在处理。每个分组的长度是L且链路的传输速率是R,N个分组的平均排队时延是?
b, 假设每隔LN/R都会有N个上述的分组依次抵达分组交换机,平均排队时延是?

答案:
a, (N−1)L2R\frac{(N-1)L}{2R}2R(N−1)L​
b, (N−1)L2R\frac{(N-1)L}{2R}2R(N−1)L​(这个时间间隔恰好能使分组处理完毕)

P14.

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. Provide a formula for the total delay, that is, the queuing delay plus the transmission delay.
b. Plot the total delay as a function of L/R
考虑在路由器缓冲区的排队时延问题。 定义I来表示流量强度(I = La/R),假设当I<1时排队时延表示为IL/R(1−I)IL/R(1-I)IL/R(1−I)
a, 给出总时延的表达式(也就是排队时延+传输时延)
b, 将总时延表示为L/R的函数并绘出函数图像

答案:
a,

b,
设L/R = x
d=x1−axd=\frac{x}{1-ax}d=1−axx​
图略。

P15.

Let a denote the rate of packets arriving at a link in packets/sec, and let μ denote the link’s transmission rate in packets/sec. Based on the formula for the total delay (i.e., the queuing delay plus the transmission delay) derived in the previous problem, derive a formula for the total delay in terms of a and μ.
用a表示分组到达链路的速率(单位是:分组/秒),μ\muμ表示链路的传输速率(单位是:分组/秒)。根据上一题中推导出的时延公式,试用a和μ\muμ表示出总时延。

答案:
1μ−a\frac{1}{\mu-a}μ−a1​(关键代换:μ=R/L\mu=R/Lμ=R/L)

P16.

Consider a router buffer preceding an outbound link. In this problem, you will use Little’s formula, a famous formula from queuing theory. Let N denote the average number of packets in the buffer plus the packet being transmitted. Let a denote the rate of packets arriving at the link. Let d denote the average total delay (i.e., the queuing delay plus the transmission delay) experienced by a packet. Little’s formula is N=a⋅dN=a·dN=a⋅d. Suppose that on average, the buffer contains 10 packets, and the average packet queuing delay is 10 msec. The link’s transmission rate is 100 packets/sec. Using Little’s formula, what is the average packet arrival rate, assuming there is no packet loss?

考虑在出链路之前有一个路由器的缓冲区。在该题中,你会用到利特尔公式,一个排队理论的著名公式。假定N表示处于缓冲区和正在发送的分组数目之和的平均值,d表示一个分组所经历的总时延的平均值(也就是排队时延加传输时延),a表示分组到达链路的速率。利特尔公式是N=a⋅dN=a·dN=a⋅d.假设平均有10个分组处于缓冲区,且每个分组的平均排队时延是10ms,链路的传输速率是100分组/秒,假设不存在丢包,使用利特尔公式,求出平均的分组到达速率。

答案:
550分组/秒

就是求利特尔公式中的a
d = 10ms(排队时延) + 10ms(传输时延) = 0.02s
N = 11
a = N/d = 550分组/秒

P17.

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 d at each node.

a, 对于不同的处理速率、传输速率和传播时延,给岀1.4.3节中式(1-2)的一般表达式
答案:

答案:
b, 重复(a),不过此时假定在每个节点有平均排队时延。

P18.

Perform a Traceroute between source and destination on the same continent at three different hours of the day.
a. Find the average and standard deviation of the round-trip delays at each of the three hours.
b. Find the number of routers in the path at each of the three hours. Did the paths change during any of the hours?
c. Try to identify the number of ISP networks that the Traceroute packets pass through from source to destination. Routers with similar names and/or similar IP addresses should be considered as part of the same ISP. In your experiments, do the largest delays occur at the peering interfaces between adjacent ISPs?
d. Repeat the above for a source and destination on different continents. Compare the intra-continent and inter-continent results
在一天的3个不同的小时内,在同一个大陆上的源和目的地之间执行Traceroute.
a.在这3个小时的每个小时中,求出往返时延的均值和方差。
b,在这3个小时的每个小时中,求出路径上的路由器数量。在这些时段中,该路径发生变化了吗?
c, 试图根据源到目的地Traceroute分组通过的情况,辨明ISP网络的数量。具有类似名字和/或类似
的IP地址的路由器应当被认为是同一个ISP的一部分。在你的实验中,在相邻的ISP间的对等接
口处岀现最大的时延了吗?
d,对位于不同大陆上的源和目的地重复上述内容,比较大陆内部和大陆之间的这些结果。

**答案:**略

P19.

a. Visit the site www.traceroute.org and perform traceroutes from two different cities in France to the same destination host in the United States. How many links are the same in the two traceroutes? Is the transatlantic link the same?
b. Repeat (a) but this time choose one city in France and another city in Germany.
c. Pick a city in the United States, and perform traceroutes to two hosts, each in a different city in China. How many links are common in the two traceroutes? Do the two traceroutes diverge before reaching China?
a, 访问www.traceroute.org并且从法国的两个城市到美国的同一个目的主机执行traceroutes。在两次的traceroute中,哪些链路是相同的?
b, 重复(a), 但是这次的起点设为一个法国的城市和一个德国的城市。
c, 选择一个美国的城市为起点,向中国的两个城市的两个主机执行traceroute,两次的traceroute哪些链路是相同的?他们在到达中国之前分开了吗?

**答案:**略

P20.


Consider the throughput example corresponding to Figure 1.20(b) . Now suppose that there are M client-server pairs rather than 10. Denote RsR_sRs​ , RcR_cRc​ , 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,andMR_s, R_c,and MRs​,Rc​,andM
考虑图1.20(b)中吞吐量的例子。假设现在有M个C-S对而不是10个,定义RsR_sRs​ , RcR_cRc​ , 和 R分别表示服务器、客户端、网络链路的速率。假设其他的链路容量都是富余的并且没有其他的流量。根据Rs,Rc,和MR_s, R_c,和 MRs​,Rc​,和M推导出吞吐量公式。

答案:
min{Rc,Rs,R/M}min\{R_c,R_s,R/M\}min{Rc​,Rs​,R/M}

P21.

Consider Figure 1.19(b) . Now suppose that there are M paths between the server and the client. No two paths share any link. Path k(k = 1,…,M) consists of N links with transmission rates R1k,R2k,...,RNkR_{1k},R_{2k},...,R_{Nk}R1k​,R2k​,...,RNk​. If the server can only use one path to send data to the client, what is the maximum throughput that the server can achieve? If the server can use all M paths to send data, what is the maximum throughput that the server can achieve?
考虑图1.9(b).假设在服务器和客户端之间有M条通路。所有通路之间不共享任何链路。通路k包括N条链路,传输速率分别是R1k,R2k,...,RNkR_{1k},R_{2k},...,R_{Nk}R1k​,R2k​,...,RNk​。如果服务器仅能通过一条路线发送数据,最大吞吐量是多少? 如果服务器可以通过所有M条链路发送数据,服务器能达到的最大吞吐量是多少?

答案:
1) max{min{R11,R21,...,RN1},min{R12,R22,...,RN2},...,min{R1M,R2M,...,RNM}}max\{min\{R_{11},R_{21},...,R_{N1}\},min\{R_{12},R_{22},...,R_{N2}\},...,min\{R_{1M},R_{2M},...,R_{NM}\}\}max{min{R11​,R21​,...,RN1​},min{R12​,R22​,...,RN2​},...,min{R1M​,R2M​,...,RNM​}}
2) ∑i=1Mmin{R1i,R2i,...,RNi}\sum^M_{i=1}min\{R_{1i},R_{2i},...,R_{Ni}\}∑i=1M​min{R1i​,R2i​,...,RNi​}

P22.

Consider Figure 1.19(b) . Suppose that each link between the server and the client has a packet loss probability p, and the packet loss probabilities for these links are independent. What is the probability that a packet (sent by the server) is successfully received by the receiver? If a packet is lost in the path from the server to the client, then the server will re-transmit the packet. On average, how many times will the server re-transmit the packet in order for the client to successfully receive the packet?
考虑图1.19(b), 假设每个服务器和客户端之间的链路都有一个丢包率p,且每一段链路的丢包率是独立的,一个分组被成功发送到接收端的概率是多少?如果一个分组在从服务器到客户端传输时丢失,服务器需要重新发送分组,平均下来一个包需要再次发送多少次才能被成功传输?

答案:
一次发送成功的概率ps=(1−p)Np_s = (1-p)^Nps​=(1−p)N
发送次数的期望: 1ps\frac{1}{p_s}ps​1​
再次发送次数的期望:1ps−1\frac{1}{p_s}-1ps​1​−1

P23.

Consider Figure 1.19(a) . Assume that we know the bottleneck link along the path from the server to the client is the first link with rate RsR_sRs​ bits/sec. Suppose we send a pair of packets back to back from the server to the client, and there is no other traffic on this path. Assume each packet of size L bits, and both links have the same propagation delay dpropd_{prop}dprop​.
a. What is the packet inter-arrival time at the destination? That is, how much time elapses from when the last bit of the first packet arrives until the last bit of the second packet arrives?
b. Now assume that the second link is the bottleneck link (i.e., Rc<RsR_c<R_sRc​<Rs​). Is it possible that the second packet queues at the input queue of the second link? Explain. Now suppose that the server sends the second packet T seconds after sending the first packet. How
large must T be to ensure no queuing before the second link? Explain.


考虑图1.19(a). 假设我们已经知道了从服务器到客户端的瓶颈是第一个链路且它的速率是Rsbits/secR_s bits/secRs​bits/sec,假设我们从服务器到客户端不间断地发送两个分组,且路径上不存在其他流量。假设每个分组的长度是L比特,且每一段链路的传播时延是dpropd_{prop}dprop​
a, 到达目的地的包间到达时间是多少?也就是说,从第一个数据包的最后一位到达到第二个数据包的最后一位到达经过了多少时间?
b, 现在假定第二段链路是瓶颈链路(即Rc<RsR_c < R_sRc​<Rs​) 第二个分组在第二段链路输入队列中排队是可能的吗?请解释原因。现在假定服务器在发送第一个分组T秒之后再发送第二个分组。为确保在第二段链路之前没有排队,T必须要有多长?试解释原因。

答案:
a, L/RsL/R_sL/Rs​ 第二个分组在一开始要等待第一个分组发送,因此多了一个排队时延
b, 第二个分组在第二段链路会排队。第一个分组d1=L/Rs+dpropd_1=L/R_s+d_{prop}d1​=L/Rs​+dprop​时到达第二个路由 ,在d2=L/Rs+L/Rc+dpropd_2=L/R_s+L/R_c+d{prop}d2​=L/Rs​+L/Rc​+dprop时离开。第二个分组在d3=2L/Rs+dpropd_3=2L/R_s+d{prop}d3​=2L/Rs​+dprop时到达第二个分组转发器,由于R_c<R_s, 所以d1<d3<d2d_1<d_3<d_2d1​<d3​<d2​, 即第二个分组到达第二个转发器时,第一个分组尚未发送完毕,必然会有时延。
T = d2−d3=L/Rc−L/Rsd_2-d_3=L/R_c-L/R_sd2​−d3​=L/Rc​−L/Rs​

P24.

Suppose you would like to urgently deliver 40 terabytes data from Boston to Los Angeles. You have available a 100 Mbps dedicated link for data transfer. Would you prefer to transmit the data via this link or instead use FedEx over-night delivery? Explain.
假设你急需从波士顿到洛杉矶发送40T数据,你有一条100Mbps的专用线路,会选择用这条专用线路还是使用FedEx(某快递公司)的隔夜抵达的快递呢?解释一下。

答案:
假设使用网络:
t=8×40×1012100×106=3.2×106s=888.9ht = \frac{8\times40\times10^{12}}{100\times 10^6} =3.2\times 10^6s =888.9ht=100×1068×40×1012​=3.2×106s=888.9h

显然慢于快递。所以应该使用快递

P25.

Suppose two hosts, A and B, are separated by 20,000 kilometers and are connected by a direct link of R=2Mbps. Suppose the propagation speed over the link is 2.5×1082.5\times 10^82.5×108meters/sec.
a. Calculate the bandwidth-delay product, R⋅dpropR\cdot d{prop}R⋅dprop.
b. Consider sending a file of 800,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?
c. Provide an interpretation of the bandwidth-delay product.
d. What is the width (in meters) of a bit in the link? Is it longer than a ­football field?
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
假设有两个主机,分别是A和B,间隔20000千米并且由一条2Mbps的链路连接。假设传播速率是2.5×108m/s2.5\times 10^8m/s2.5×108m/s.
a, 求出带宽和时延之积,即 R⋅dpropR\cdot d{prop}R⋅dprop.
b,考虑从A向B发送800000比特,假设文件是一个连续的庞大的报文,在链路上最多同时有多少比特?
c, 给出你对带宽和时延之积的理解
d, 在链路上,一个比特的宽度是多少,他比一个足球场的长度更长吗?
e,根据传播速率s, 传播速率R,链路长度m,给出一个比特长度的表达式。

答案:

a, R⋅dprop=2⋅106⋅2⋅1072.5⋅108=1.6⋅105R\cdot d{prop}=2\cdot 10^6\cdot\frac{2\cdot 10^7}{2.5\cdot 10^8}=1.6\cdot 10^5R⋅dprop=2⋅106⋅2.5⋅1082⋅107​=1.6⋅105(单位是bits)
b, min{R⋅dprop,L}=1.6⋅105min\{R\cdot d{prop},L\}=1.6\cdot 10^5min{R⋅dprop,L}=1.6⋅105.
c, 在一个传播时延内,第一个比特从链路起点到达链路终点,整个链路刚好被这段时间内传入链路的比特填满。所以传播时延乘以带宽,刚好是链路上同时存在的比特数。
d, 设宽度为w,w=mR⋅dprop=125mw=\frac{m}{R\cdot d{prop}}=125mw=R⋅dpropm​=125m大于一个足球场的长度
e,设宽度为w,w=s/Rw=s/Rw=s/R

P26.

Referring to problem P25, suppose we can modify R. For what value of R is the width of a bit as long as the length of the link?
参考P25,假设我们可以修改R,R值改为多少时一个比特的宽度等于链路长度?

答案:
s/R=m, R = s/m = 12.5bps

P27.

Consider problem P25 but now with a link of 1Gbps.
a. Calculate the bandwidth-delay product, R⋅dpropR\cdot d{prop}R⋅dprop.
b. Consider sending a file of 800,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?
再次考虑P25,但现在链路是1Gbps
a, 计算时延与带宽之积R⋅dpropR\cdot d{prop}R⋅dprop.
b, 考虑从A向B发送800000比特,假设文件是一个连续的庞大的报文,在链路上最多同时有多少比特?
c, 在该链路中,一个比特的长度是多少?

答案:
a,R⋅dprop=1⋅109⋅2⋅1072.5⋅108=8⋅108R\cdot d{prop}=1\cdot10^9\cdot\frac{2\cdot 10^7}{2.5\cdot 10^8}=8\cdot10^8R⋅dprop=1⋅109⋅2.5⋅1082⋅107​=8⋅108.
b, min{R⋅dprop,L}=8⋅105min\{R\cdot d{prop},L\}=8\cdot 10^5min{R⋅dprop,L}=8⋅105.
c, w=s/Rw=s/Rw=s/R=0.25m

P28.

Refer again to problem P25.
a. How long does it take to send the file, assuming it is sent continuously?
b. Suppose now the file is broken up into 20 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?
c. Compare the results from (a) and (b)
再次考虑P25
a,传输该文件所需的时间是多少?假设发送是不间断的。
b, 假定现在该文件被划分为20个分组,每个分组包含40000比特。假定每个分组被接收方确认, 确认分组的传输时间可忽略不计。前一个分组被确认后,发送方才能发送分组。发送该文件需要多长时间?
c,比较(a)(b)的结果

答案:

a,

dtrans+dprop=800000/2⋅106+20000000/2.5⋅108=480msd_{trans}+d_{prop}=800000/2\cdot10^6+20000000/2.5\cdot10^8=480msdtrans​+dprop​=800000/2⋅106+20000000/2.5⋅108=480ms

b,

dtrans+20⋅dprop=800000/2⋅106+20000000/2.5⋅108=2000msd_{trans}+20\cdot d_{prop}=800000/2\cdot10^6+20000000/2.5\cdot10^8=2000msdtrans​+20⋅dprop​=800000/2⋅106+20000000/2.5⋅108=2000ms

注:这里尊重官方提供的答案,但我认为确认分组后,需要将确认消息发送给A,这也需要传播时延,顾应当是dtrans+40⋅dpropd_{trans}+40\cdot d_{prop}dtrans​+40⋅dprop​

P29.

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⋅1082.4\cdot 10^82.4⋅108meters/sec.
a. What is the propagation delay of the link?
b. What is the bandwidth-delay product, R⋅dpropR\cdot d_{prop}R⋅dprop​?
c. Let x denote the size of the photo. What is the minimum value of x for the microwave link to be continuously transmitting?

假设在一个地球同步卫星和它的地面基站之间有一个10Mbps的微波链路,每分钟,该卫星拍摄一张数码照片并将它送到基站中,假设传播速率是2.4⋅1082.4\cdot 10^82.4⋅108meters/sec.
a, 传播时延是?
b, 带宽与时延之积R⋅dpropR\cdot d_{prop}R⋅dprop​是?
c, 设x表示图片大小,假如要使微波持续传输数据,x的最小值是?

答案:

a,dprop36000km2.4⋅108m/s=150msd_{prop}\frac{36000km}{2.4\cdot10^8m/s}=150msdprop​2.4⋅108m/s36000km​=150ms (注:地球同步轨道卫星的高度是36000km)
b,R⋅dprop=10Mbps∗150ms=1.5⋅106bitsR\cdot d_{prop}=10Mbps*150ms=1.5\cdot10^6bitsR⋅dprop​=10Mbps∗150ms=1.5⋅106bits
c, x=10⋅106⋅60=6⋅108bitsx=10\cdot10^6\cdot60=6\cdot10^8bitsx=10⋅106⋅60=6⋅108bits

P30.

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?
考虑1.5节中我们在讨论分层时用飞机旅行类比,随着协议数据单元向协议栈底层流动,数据头在增加。随着旅客和行李移动到航线协议栈底部,有与和数据头等价的概念吗?

**答案:**略。

P31.

In modern packet-switched networks, including the Internet, the source host segments long, application-layer messages (for example, an image or a 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.27 illustrates the end-to-end transport of a message with and without message segmentation. Consider a message that is 8⋅1068\cdot10^68⋅106 bits long that is to be sent from source to destination in Figure 1.27 . Suppose each link in the figure is 2 Mbps. Ignore propagation, queuing, and processing delays.

a. Consider sending the message from source to destination without message segmentation. How long does it take to move the message from the source host to the first packet switch? Keeping in mind that each switch uses store-and-forward packet switching, what is the total time to move the message from source host to destination host?

b. Now suppose that the message is segmented into 800 packets, with each packet being 10,000 bits long. How long does it take to move the first packet from source host to the first switch? When the first packet is being sent from the first switch to the second switch, the second packet is being sent from the source host to the first switch. At what time will the second packet be fully received at the first switch?

c. How long does it take to move the file from source host to destination host when message segmentation is used? Compare this result with your answer in part (a) and comment.


Figure 1.27 End-to-end message transport: (a) without message ­segmentation; (b) with message segmentation

d. In addition to reducing delay, what are reasons to use message ­segmentation?

e. Discuss the drawbacks of message segmentation

在现代分组交换网络,包括因特网中,源主机将应用层的长报文(比如一个图片)分割为更小的分组并把分组发送到网络上。接收端会把分组组装使消息复原。我们将这一过程称为报文分段。Figure1.27所描绘的是在使用/不使用报文分段时端到端的报文传输。
考虑一个报文长度是8⋅106bits8\cdot10^6 bits8⋅106bits,并在Figure1.27中即将被发送,假设图中每个链路是2Mbps。 忽略传播、排队、处理时延。

a, 考虑不使用报文分段,从起点到终点发送报文,从源主机到第一个分组交换机需要花费多少时间?从源主机到目的主机需要花费多少时间?注意,每个分组交换机使用存储转发的方式。
b, 假设报文被分成800个分组,每个分组长度是10000比特,把第一个分组从源主机移动到第一个分组交换机需要多少时间?当第一个分组发送到第二个分组交换机时,第二个分组正发送到第一个分组交换机。在什么时候第一个分组交换机完整地收到第二个分组呢?
c, 若使用报文分段,把文件从源主机发送到目的主机需要多少时间? 将你的答案与(a)的答案比较,并评价一下。
d, 除了降低时延,报文分段还有什么意义?
e, 讨论报文分段的缺陷。

答案:

a,
从源主机到第一个分组交换机: d1=8⋅1062⋅106=4sd_1=\frac{8\cdot 10^6}{2\cdot 10^6}=4sd1​=2⋅1068⋅106​=4s
从源主机到目的主机: d2=38⋅1062⋅106=12sd_2=3\frac{8\cdot 10^6}{2\cdot 10^6}=12sd2​=32⋅1068⋅106​=12s

b,
第一个分组发送到第一个分组交换机: 10000bits2⋅106bps=5ms\frac{10000bits}{2\cdot10^6bps}=5ms2⋅106bps10000bits​=5ms
第一个分组交换机完整收到第二个分组:210000bits2⋅106bps=10ms2\frac{10000bits}{2\cdot10^6bps}=10ms22⋅106bps10000bits​=10ms

c,
前面已求得,一个分组交换机发送一个分组的时间dprop1=5msd_{prop1}=5msdprop1​=5ms
d=(800+2)dprop1=4010msd=(800+2)d_{prop1}=4010msd=(800+2)dprop1​=4010ms, 花费的时间约为不使用报文分段的1/3。可以理解为:使用报文分段后,源主机和分组交换机可以像流水线一样并行工作,增加了处理能力。

d,
1)降低了对分组交换机缓冲区的要求。(假如发送整个文件,需要很大的缓冲区)
2)假如发送出错,需要重新发送,使用报文分段的话只需要重新发送一个分组,而不是发送整个文件。

e,

  1. 增加了分段与复原带来的处理时延。
  2. 分组的发送必须是有序的
  3. 分组增多会增加数据头的总量

P32.

Experiment with the Message Segmentation applet at the book’s Web site. Do the delays in the applet correspond to the delays in the previous problem? How do link propagation delays affect the overall end-to-end delay for packet switching (with message segmentation) and for message switching?
用本书的Web网站上的报文分段小Java小程序进行实验。该Java程序中的时延与前一个习题中的时延相当吗?链路传播时延是怎样影响分组交换(有报文分段)和报文交换的端到端总时延的。

**答案:**略

P33.

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.
考虑从主机A向主机B发送一个大小为F的大文件。A和B之间有三段链路(两个分组交换机),链路不会拥挤(没有排队时延),主机A将文件分成S比特的分段,并且在每个分段上增加80比特的报文头,整个分组的大小是L=80+S 比特。每个链路的传输速率是Rbps, 请找出使得文件从A发送到B的时延最小的S的值。不考虑传播时延。

答案:

分组数:n=F/Sn=F/Sn=F/S
单个分组通过单个分组交换机的时延: d1=(80+S)/Rd_1=(80+S)/Rd1​=(80+S)/R
总时延:d=(n+2)⋅d1=S+80R⋅(FS+2)d=(n+2)\cdot d_1=\frac{S+80}{R}\cdot (\frac{F}{S}+2)d=(n+2)⋅d1​=RS+80​⋅(SF​+2)
求导可得S=40FS=\sqrt{40F}S=40F​时d取得最小值。

计算机网络-自顶向下方法(7th) 第一章 Problems 中英对照相关推荐

  1. 《计算机网络--自顶向下方法》第一章--计算机网络和英特网

    1.1什么是英特网 1.1.1具体构成描述 主机(host)或端系统(end system):所有与因特网相连的计算设备 路由器(router):从一条入通信链路接收到达的分组,并通过一条出通信链路转 ...

  2. 计算机网络自顶向下方法 第三章 3.5 面向连接的运输:TCP

    计算机网络自顶向下方法总结3.5面向连接的运输:TCP 目录 3.5 面向连接的运输:TCP 3.5.1 TCP连接 3.5.2 TCP报文段结构 3.5.3 往返时间的估计与超时 3.5.4 可靠数 ...

  3. 计算机网络自顶向下方法 第三章 运输层 3.4 可靠数据传输原理

    计算机网络自顶向下方法总结3.4可靠数据传输原理 目录 3.4 可靠数据传输原理 3.4.1 构造可带数据传输协议 3.4.2 流水线可靠数据传输协议 3.4.3 回退N步 3.4.4 选择重传 3. ...

  4. 计算机网络自顶向下方法 第三章 运输层 3.6 拥塞控制原理

    计算机网络自顶向下方法总结3.6拥塞控制原理 目录 3.6 拥塞控制原理 3.6.1 拥塞原因与代价 3.6.2 拥塞控制方法 3.6 拥塞控制原理 前面讲到分组丢失时用于可靠数据传输服务的基本原理及 ...

  5. 计算机网络自顶向下方法 第六章 链路层和局域网 6.3 多路访问链路和协议

    计算机网络自顶向下方法总结6.3多路访问链路和协议 目录 6.3 多路访问链路和协议 6.3.1 信道划分协议 6.3.2 随机接入协议 6.3.3 轮流协议 6.3.4 DOCSIS:用于电缆以太网 ...

  6. 《计算机网络教程 自顶向下方法》 第一章

    TCP/IP协议族(Transmission Control Protocol/Internet Protocol,传输控制协议/互联网协议) 层次化结构 路由器只涉及 3 层(网络层.数据链路层.物 ...

  7. 计算机网络自顶向下方法第四章笔记

    前言:适逢期中考.... 本文参考自很多文章.课本.PPT等(其实仔细观察你会发现很多文字甚至图片都是一致的),如有雷同,纯属不巧合(抱拳) 四.网络层 4.1 概述 4.1.1 转发和路由选择 网络 ...

  8. 《计算机网络--自顶向下方法》第二章--应用层

    2.1应用层协议原理 研发网络应用程序的核心是写出能够运行在不同的端系统和同构网络彼此通信的程序,将应用软件限制在端系统,从而促进大量的网络应用程序的迅速研发和部署. 2.1.1网络应用程序体系结构 ...

  9. 计算机网络-自顶向下方法 7th 5.4 BGP协议总结

    中文版翻译得很难理解,这里总结一下. 1.BGP的任务 前面已经讲到了AS内的路由协议,比如OSPF,那么假如两个路由器不在同一个AS内呢?这就要用到BGP. BGP的一个重要任务是不同AS间的路由, ...

最新文章

  1. hbase2.0.0-安装部署
  2. 《评人工智能如何走向新阶段》后记(再续12)
  3. python 封装_python接口自动化学习笔记(封装方法用于读取excel)
  4. 【Python】挑战SQL:图解Pandas的数据合并merge
  5. 多多客DOODOOKE 1.x升级2.x指南
  6. verilog宏功能中dds信号发生器_什么是相位相干性?了解生成相位相干射频信号的三种配置方法...
  7. nginx 带宽_Nginx日志如何分析 GoAccess
  8. LoadRunner中的参数与变量-产生20位的随机数
  9. BZOJ 1037 [ZJOI2008]生日聚会Party(单调DP)
  10. Java中的ObjectOutputStream –将对象写入文件
  11. SCWS中文分词,向xdb词库添加新词
  12. Pylot——跨平台的网站压力测试工具
  13. C4996 'sprintf': This function or variable may be unsafe.
  14. Android期末项目2048小游戏
  15. 易点易动助力叮咚买菜数字化管理固定资产和易耗品
  16. WDM驱动实操No.1
  17. 支付宝获取token 报错signData is Empty
  18. 饿了么api接口 php,饿了么接口:php
  19. 你不知道的网站图片存储格式-base64
  20. scrapy写爬虫的心得

热门文章

  1. R语言中GCC编译的问题(续)
  2. Xamarin 技术全解析
  3. 思考XSS攻击和跨站伪造请求CSRF
  4. 一个页面中,不同子页面见高度不受影响的布局
  5. oracle x kglob,x$kglob x$kgllk x$kglpn
  6. mysql 的 null值_MySQL NULL值
  7. php dat文件,window_Win7系统怎么打开Dat文件 Win7系统打开Dat文件的方法,  在电脑中的Dat文件是很常 - phpStudy...
  8. lsb算法 java,解决:-bash: lsb_release: command not found办法
  9. Android SqlLite数据库的创建、增、删、改、查、使用事务
  10. oracle 归档日志激增,一次归档日志激增的分析.