We will count the transfer as completed when the last data bit arrives

advertisement
EE122
Prepared by
Anshuman Sharma
HW1 Solutions
1. P&D 1.5
4 points
We will count the transfer as completed when the last data bit arrives at its destination.
(a) 2 initial RTT’s (200ms) + 1000KB/1.5Mbps (transmit) + RTT/2 (propagation)
0.25 + 8Mbit/1.5Mbps = 0.25sec + 5.46sec = 5.58sec.
Make sure that you use the norm, which is to use power of 2 for representing file sizes and
powers of 10 to represent link speeds. We make use of the fact that since there are no ACKs to be
sent in essence we are sending a 1000KB “chunk” of contiguous data.
_
(b) This is just an extension to the first part. The way this works is that you have the initial
handshaking (200 ms) and then you send a 1KB size data packet, wait 1 RTT and then send the
next data packet. Something like:
Hanshaking(200ms) + 1KB/1.5Mbps + 1RTT + 1KB/1.5Mbps + 1RTT + … + 1KB/1.5Mbps
(last data packet) + RTT/2 (propagation delay for last packet). That is
200 ms + 50 ms + 1000 (1KB/1.5Mbps) + 999RTTs.
 .25s + 5.46s + 99.9s  105.61s
(c) Similar logic as in the previous part except that we are not going to account for the transmit
time due to the infinite bandwidth clause.
Thus we are going to spend 49RTTs on the first 980 packets, plus another 1/2 RTT on the last 20,
and add to that 2 extra RTTs for the handshaking. For a total of 51.5 RTTs = 5.15s
(d) Right after the handshaking is done we send one packet. One RTT after the handshaking
we send two packets. At RTTs past the initial handshaking we have sent 1+2+4+…+2n = 2n+1 -1
packets. At n=9 we have thus been able to send all 1,000 packets;
the last batch arrives 0.5 RTT later. Total time is 2+9.5 RTTs, or 1.15s.
_
2. P&D 1.6
2 points
Propagation delay is 2* 103m/(2*103 m/s) = 1*10-5 sec = 10 s. 100 bytes/10 s is
10 bytes/s, or 10 MB/s, or 80 Mbit/s. For 512-byte packets, this rises to 409.6 Mbit/s.
3. P&D 1.13
4 points
(a) The minimum RTT would be just the twice the propagation delay on the link which is
2*385,000,000m / (3*108 m/s) = 2.57s.
(b) The delay-bandwidth product is (2.57 s)(100 Mb/sec) = 257Mb = 32MB.
(c) This represents the amount of data the sender can send before it would be possible to receive
a response.
(d) We require at least one RTT to account for the picture to be in transit. Assuming bandwidth
delay only, it would then take 25MB/100Mbps = 200Mb/100Mbps = 2.1 sec to finish sending, for
a total time of 2.0 + 2.57 = 4.67s until the picture arrives at earth.
Again remember to use the right powers of 2 and 10 with filesize and link speeds respectively.
EE122
Prepared by
Anshuman Sharma
4. P&D 1.16
3 points
(a) The effective bandwidth is 10Mbps; the sender can send data steadily at this rate and the
switches simply stream it along the pipeline. We are assuming here that no ACKs are
sent, and that the switches can keep up and can buffer at least one packet. The reason
why we don’t worry about propagation delays and transmit times is that after some initial
time the “pipe” (bandwidth x delay) is completely full.
(b) This requires that you solve part b) of 1.15, with three switches and four links. In this
case we do have to worry about propagation delays and transmit times since we would
not be completely utilizing the pipe at all times.
The delay for a data packet of size 5000 bits along the path is:
4*(transmit time for a node) + 4*(propagation delay on each link)
 4*(5000b / 10 Mbps) + 4*(10s)
 2.04ms
We also need to account for the ACK packet which is 50 bytes or 400 bits long.
Therefore we go through the same calculation as above to get 4*(40s) + 4*(10s). So
the total RTT of 2.24ms.
We define effective bandwidth as transfer size/transfer time (of useful data, ACKs do not
count as useful data.) 5000 bits in 2.24ms is about 2.2 Mbps.
NOTE: This works if you regardless of what setup you have, as in whether each switch
sends an independent ACK for the data, or one single ACK travels from end-to-end.
(c) Here we want the average effective bandwidth.
100*6.5*108 bytes/ 12 hrs = 6.5*1010 bytes/(12*3600s)  1.5 MB/s = 12 Mbps.
5. P&D 1.17
3 points
(a) (10*106 bits/s)(10-6s) = 100 bits = 12.5 bytes
(b) The first-bit delay is how long it takes for the first bit to travel from A to B through
switch. The bit leaves A, propagates to S, then waits for the last bit to get there, which is
the transmission time for the packet, and then immediately leaves S to get to B after one
propagation delay. That gives us (10 + 500 + 10)s = 520s.
(10*106 bps)(520*10-6s) = 5200 bits
(c) (1.5*106 bps/s)(50*10-3s) = 75,000 bits = 9375 bytes
(d) The total ground-to-ground interpretation makes one-way travel distance 2*35,900,000
meters. With a propagation speed of c = 3*108 m/s, the propagation delay is thus
2*35,900,00/c = 0.24s. Bandwidthxdelay is thus (1.5*106 bps)(0.24) = 360,000 bits
6. P&D 1.18
4 points
(a) Per link transmit delay is 104 bits / 10*106 bps = 1000s. Total transmission time is:
Transmit timeA-S + PropagationA-S + Queue delay@B + Transmit timeS-B + PropagationS-B
 2*(1000) + 2*20 + 35 = 2075s
EE122
Prepared by
Anshuman Sharma
(b) When sending as two packets, here is a table of times for various events:
T=0
T=500
T=520
T=555
T=1000
T=1055
T=1075
T=1575
start
A finishes sending packet 1, starts packet 2
packet one finishes arriving at S
packet 1 departs for B
A finishes sending packet 2
packet 2 departs for B
bit 1 of packet 2 arrives at B
last bit of packet 2 arrives at B
Smaller is faster here!
Download