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) = =0.04(s) R =8.0 (b) b) N= R =8.0 (b)
c) The bandwidth-delay product of a link is the maximum number of bits that can be in the link
d) w= =125(m/b),1 bit is 125 meters long, which is longer than a football field e) w= = 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 link? 依题意,w=m=1.0 (m),又w= 所以,R= =25(bps) P20
Consider problem P18 but now with a link of R=1Gbps. a) R =4.0 (b)
b) N=4.0 4.0 4.0 c) w= =0.25(m/b)
=
=
P21
Refer again to problem P18. a) = ttrans + tprop =
+ =0.2+0.04=0.24(s)
b) =10 (ttrans +2 tprop)=1(s) c) P24
In modern packet-switched networks, the source host segments long, application-layer messages into smaller packets and sends the packets into the network. The receiver then reassembles the packets back into original message.We refer to this process as message segmentation.
8.0106sec4sec6a) Time to send message from source host to first packet switch =210.
With store-and-forward switching, the total time to move message from source host to destination host =4sec3hops12sec b) T= =0.001(s)=1ms
Time at which 2nd packet is received at the first switch = time at which 1st packet is received at the second switch = 21msec2msec c)
Number 1st 2nd 4000th Arrival 3 5 4002
time at which last (4000th) packet is received=3ms3999*1ms4.002s. 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 the 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 are 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 from Host A to Host B. Disregard propagation dealy.
Time at which the 1st packet is received at the destination:T=one packet is received at destination every =
总
(s),After this,
sec
+( )(
)= ( )(
)
To calculate the value of S which leads to the minimum delay, =0总F140S1()0S40F RSS2R
Chapter 2
P7
The total amount of time to get the IP address is
RTT1RTT2RTTn.
Once the IP address is known, RTTO elapses to set up the TCP connection and another RTTO elapses to request and receive the small object. The total response time is
T=2RTToRTT1RTT2RTTn
P8
a) Non-persistent HTTP with no parallel TCP connections:
=T+3 2
b) Non-persistent HTTP with parallel TCP connections:
=T+2
c) Persistent HTTP:
=T+
P9
a) = =0.06(s), =10, =0.6 /(1- )=0.15(s) =2+0.15=2.15(s)
b)
the average access delay is /(1-0.6 ) =(0.06 sec)/[1 – (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 = 20 Mbps dmin = di = 1 Mbps
Client-Server Dcs = max {NF/us, F/dmin} Dcs 100kps 250kps 500kps
10 5120 5120 5120 N 100 25600 25600 25600 1000 256000 256000 256000 u Peer to Peer
DP2Pmax{F/us, F/dmin, NF/(us ui)}
i1NDp2p 100kps 250kps 500kps P19
10 5120 5120 5120 N 100 17201.0 11527.9 5120 1000 43516.6 19383.6 5120 u 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 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) 100 400=4 =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 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 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 number 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 datagram 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
P1
a) AS b) BS c) SA d) SB
e) Yes. f) No. P3
source port numbers 467 513 23 23 destination port numbers 23 23 467 513 0110101001001111
10111001
1011100101110011
100101100
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 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
P23
There are 2324,294,967,296 possible sequence numbers. a)
2324,294,967,296
2324.19 Gbytes
b)
232n=2,941,758,66n=194,156,028 1460总=232194,156,0283,591107 总/(100 )=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 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 arriving segment, the acknowledgement number is 359, indicating that it is still waiting for bytes 359 and onwards. d.
Timeout
interval
Timeout interval
Host A
Host B
Seq = 359, 50 bytes Seq = 409, 80 bytes Ack = 409 Ack = 489 Seq = 359, 50 bytes Ack = 489
P28
a)Denote EstimatedRTT(n) for the estimate after the nth sample.
EstimatedRTT(1)SampleRTT1
EstimatedRTT(2)xSampleRTT1(1x)SampleRTT2 EstimatedRTT(3)xSampleRTT1
(1x)[xSampleRTT2(1x)SampleRTT3]
xSample1R TTT(1Tx)xSample2R
TT (1x)2SampleR3
EstimatedRTT(4)xSampleRTT1(1x)EstimatedRTT(3)
xSample1R TTT(1Tx)xSample2R
RT(1Tx)3SampleR (1x)2xSample34 TT
b)
EstimatedRTT(n)x(1x)jSampleRTTj
j1n1
(1x)nSampleRn TT
c)x=0.16
EstimatedRTT()x(1x)jSampleRTTj 1xj14SampleRTT 0.8j4j
21j1The weight given to past samples decays exponentially.
P34
a) TCP slowstart is operating in 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 transmission 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 when 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 during 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 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.
因篇幅问题不能全部显示,请点此查看更多更全内容