1、Chapter 1 P18 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. a) dprop=ms=0.04(s) R∙dprop=8.0×104(b) b) N= R∙dprop=8.0×104(b) c) The bandwidth-delay product of a
2、 link is the maximum number of bits that can be in the link d) w=mN=125(m/b),1 bit is 125 meters long, which is longer than a football field e) w=mN=mR∙dprop=mR∙ms=sR P19 Referring to problem P18, suppose we can modify R. For what value of R is the width of a bit as long as the length of the l
3、ink? 依题意,w=m=1.0×107(m),又w=sR 所以,R=sw=25(bps) P20 Consider problem P18 but now with a link of R=1Gbps. a) R∙dprop=4.0×107(b) b) N=4.0×107>4.0×105 ∴Nmax=4.0×105 c) w=mN=0.25(m/b) P21 Refer again to problem P18. a) Ta= ttrans + tprop =4.0×105R+ms=0.2+0.04=0.24(s) b) Tb=10×(ttrans +
4、2 tprop)=1(s)
c) Ta 5、tion.
a) Time to send message from source host to first packet switch =. With store-and-forward switching, the total time to move message from source host to destination host =
b) T=20002×106=0.001(s)=1ms
Time at which 2nd packet is received at the first switch = time at which 1st packet is r 6、eceived at the second switch =
c)
Number
Arrival
1st
3
2nd
5
⋮
⋮
⋮
⋮
4000th
4002
time at which last (4000th) packet is received=. It can be seen that delay in using message segmentation is significantly less (almost 1/3rd).
d) Drawbacks:
i. Packets have to be put in sequence at th 7、e destination.
ii. Message segmentation results in many smaller packets. Since header size is usually the same for all packets regardless of their size, with message segmentation the total amount of header bytes is more.
P26
Consider sending a large file of F bits for Host A to Host B. There ar 8、e two links between A and B, and the links are uncongested. Host A segments the file into segments of S bits each and adds 40 bits of header to each segment, forming packets of L=40+S bits. Each link has a transmission rate of R bps. Find the value of S that minimizes the delay of moving the file fr 9、om Host A to Host B. Disregard propagation dealy.
Time at which the 1st packet is received at the destination:T=S+40R×2(s),After this, one packet is received at destination everyS+40Rsec
T总=S+40R×2+(FS-1)( S+40R)= (FS+1)( S+40R)
To calculate the value of S which leads to the minimum delay,
T总' 10、0
Chapter 2
P7
The total amount of time to get the IP address is
.
Once the IP address is known, elapses to set up the TCP connection and another elapses to request and receive the small object. The total response time is
T=
P8
a) Non-persistent HTTP wi 11、th no parallel TCP connections:
Ta=T+3∙2RTT0
b) Non-persistent HTTP with parallel TCP connections:
Tb=T+2RTT0
c) Persistent HTTP:
Tc=T+RTT0
P9
a)∆=9×1051.5×107=0.06(s),β=10,∆β=0.6
∆/(1-∆β)=0.15(s)
Ttotal=2+0.15=2.15(s)
b)
the average access delay is ∆/(1-0.6∆β) =(0.06 sec)/[1 – ( 12、0.6)(0.6)] = 0.09375 seconds.
the average response time is0 .12 sec +2 sec =2.09375 sec for cache misses
the average response time is (0.4)(0 sec) + (0.6)(2.09375 sec) =1.25625 seconds.
Thus the average response time is reduced from 2.6 sec to 1.25625sec.
P16
F = 5Gbits = 5 * 1024 Mbits
us 13、 20 Mbps
dmin = di = 1 Mbps
Client-Server
Dcs = max {NF/us, F/dmin}
Dcs
N
u
10
100
1000
100kps
5120
25600
256000
250kps
5120
25600
256000
500kps
5120
25600
256000
Peer to Peer
Dp2p
N
u
10
100
1000
100kps
5120
17201.0
43516.6
250kps
5120
11 14、527.9
19383.6
500kps
5120
5120
5120
P19
There are N nodes in the overlay network. There are N(N-1)/2 edges.
P21
Alice sends her query to at most N neighbors. Each of these neighbors forwards the query to at most M = N-1 neighbors. Each of those neighbors forwards the query to at most M 15、neighbors. Thus the maximum number of query messages is
N + NM + NM2 + … + NM(K-1)
= N(1 + M + M2 + … + M(K-1) )
= N(1-MK)/(1-M)
= N[(N-1)K- 1]/(N-2)
P23
In this problem we explore designing a hierarchical overlay that has ordinary peers, super peers, and super-duper peers.
a 16、) 100×400=4×104 4×1064×104=100
Therefore, we would need about 100 super-duper peers to support 4 million nodes.
b) Each super peer might store the meta-data for all of the files its children are sharing. A super-duper peer might store all of the meta-data that its super-peer children store. An 17、 ordinary node would first send a query to its super peer. The super peer would respond with matches and then possibly forward the message to its super-duper peer. The super-duper peer would respond (through the overlay network) with its matches. The super-duper peer may further forward the query to 18、 other super-duper peers.
P24
With the original line, UDPClient does not specify a port number when it creates the socket. In this case, the code lets the underlying operating system choose a port number. With the replacement line, when UDPClient is executed, a UDP socket is created with port nu 19、mber 5432 .
UDPServer needs to know the client port number so that it can send packets back to the correct client socket. Glancing at UDPServer, we see that the client port number is not “hard-wired” into the server code; instead, UDPServer determines the client port number by unraveling the data 20、gram it receives from the client (using the .getPort() method). Thus UDP server will work with any client port number, including 5432. UDPServer therefore does not need to be modified.
Before:
Client socket = x (chosen by OS)
Server socket = 9876
After:
Client socket = 5432
Chapter 3
21、P1
source port
numbers
destination port
numbers
a) AS
467
23
b) BS
513
23
c) SA
23
467
d) SB
23
513
e) Yes.
f) No.
P3
One's complement = 1 0 0 1 0 1 1 0 0
To detect errors, the receiver adds the four words (the three original words and the checksum). If the sum 22、 contains a zero, the receiver knows there has been an error. All one-bit errors will be detected, but two-bit errors can be undetected (e.g., if the last digit of the first word is converted to a 0 and the last digit of the second word is converted to a 1).
P14
0.8=(0.008n)/30.016
n=3002
P2 23、3
There are possible sequence numbers.
a)
b)
n=,66n=194,156,028
总=
总/(100×106)=359.1(s)
P24
a. In the second segment from Host A to B, the sequence number is 409, source port number is 1028 and destination port number is 80.
b. If the 24、 first segment arrives before the second, in the acknowledgement of the first arriving segment, the acknowledgement number is 409, the source port number is 80 and the destination port number is 1028.
c. If the second segment arrives before the first segment, in the acknowledgement of the first arr 25、iving segment, the acknowledgement number is 359, indicating that it is still waiting for bytes 359 and onwards.
d.
Host B
Host A
Seq = 359, 50 bytes
Seq = 409, 80 bytes
Ack = 409
Timeout interval
Ack = 489
Seq = 359, 50 bytes
Ack = 489
Timeout interval
26、
P28
a)Denote for the estimate after the nth sample.
b)
c)x=0.16
The weight given to past samples decays exponentially.
P34
a) TCP slowstart is operating in 27、the intervals [1,6] and [23,26]
b) TCP congestion advoidance is operating in the intervals [6,16] and [17,22]
c) 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.
d) After the 22nd t 28、ransmission round, segment loss is detected due to timeout, and hence the congestion window size is set to 1.
e) The threshold is initially 32, since it is at this window size that slowtart stops and congestion avoidance begins.
f) The threshold is set to half the value of the congestion window wh 29、en 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.
g) The threshold is set to half the value of the congestion window when packet loss is detected. When loss is detected dur 30、ing transmission round 22, the congestion windows size is 26. Hence the threshold is 13 during the 24th transmission round.
h) 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 31、 sent in the 4th transmission round; packets15-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.
i) The congestion window and threshold will be set to half the current value of the congestion window (8) when the loss occurred. Thus the new values of the threshold and window will be 4.
©2010-2025 宁波自信网络信息技术有限公司 版权所有
客服电话:4009-655-100 投诉/维权电话:18658249818