CIS 427 – COMPUTER NETWORKS

advertisement
CIS 527 – COMPUTER NETWORKS
SOLUTION – HOMEWORK #1
1. (10 points) Consider a LAN with a maximum distance of 2 km. At what bandwidth
would propagation delay (at a speed of 2 x 108 m/s) equal transmit delay (insertion
delay) for 512 byte packets? What about 2000 byte packets?
Solution:
Case (a): Packet Size = 512 bytes
Maximum Distance = 2 km
Speed of Light = 2 x 108 m/s
Propagation = Distance / Speed of Light
= 2000 m / 2 x 108 m/s
Transmit = Size / Bandwidth
= 512 x 8 bits / Bandwidth
Therefore,
Bandwidth = Size x Speed of Light / Distance
= (512 x 8) bits x 2 x 108 m/s / 2000 m
= 4096 x 105 bits / sec
= 409.6 Mbits/sec
Case (b): Packet Size = 2000 bytes
Maximum Distance = 2 km
Speed of Light = 2 x 108 m/s
Propagation = Distance / Speed of Light
= 2000 m / 2 x 108 m/s
Transmit = Size / Bandwidth
= 2000 x 8 bits / Bandwidth
Therefore,
Bandwidth = Size x Speed of Light / Distance
= (2000 x 8) bits x 2 x 108 m/s / 2000 m
= 16000 x 105 bits / sec
= 1600 Mbits/sec
2. (20 points) Suppose a 100-Mbps point-to-point link is being set up between the earth
a new lunar colony. The distant from the moon to the earth is approximately 385,000
km, and data travels over the link at the speed of light – 3 x 108 m/s.
Solution:
a) Calculate the minimum RTT for the link
Minimum RTT = 2 x Propagation
Propagation = Distance / Speed of Light
= 2 x 385000 km / 3 x 108 m/s
= 2 x 385000000 m / 3 x 108 m/s
= 2 x 385 / 300 sec
= 2.57 sec
b) Using the RTT as the delay, calculate the delay x bandwidth product for the
link.
Delay x Bandwidth = 2.57 sec x 100 Mbits/sec
= 257 Mbits
= 257/8 MB
= 32MB
c) What is the significance of the delay x bandwidth product computed in (b)?
This represents the amount of data the sender can send before it would be
possible to receive a response.
d) A camera on the lunar base takes pictures of the earth and saves them in
digital format to disk. Suppose Mission Control on earth wishes to
download the most current images, which is 30MB. What is the minimum
amount of time that will elapse between the request for the data goes out
and the transfer is finished?
We require at least one RTT before the picture could begin arriving at the ground
(TCP would take two RTTs). Assuming bandwidth delay only, it would then take
= 30MB/100Mbps
= (30 x 8 Mbits) / 100Mbps
= 240Mbits / 100 Mbits/sec
= 2.4 sec to finish sending,
for a total time of 2.4 + 2.57 = 4.97 sec until the last picture bit arrives on earth.
3. (20 points) In the following figure, hosts A and B are each connected to a switch via
10-Mbps links. The propagation delay on each link is 40µs. S is a store-and-forward
device; it begins retransmitting a received packet 20µs after it has finished received
it. Calculate the total time required to transmit 10,000 bits from A to B
(a) as a single packet
(b) as two 5,000-bit packets sent one right after the other.
Solution:
Case (a): as a single packet
Per link Transmit Delay = Size / Bandwidth
=104 bits / 10 x 106 bits/sec
= 1000 s
Total Transmission Time = (2 x 1000 + 2 x 40 + 20) s
= (2000 + 80 + 20) s
= 2100 s
Case (b): as two 5,000-bit packets sent one right after the other
When sending as two packets, here is a table of times for various events:
Transmit delay = 5000 bits/ 10 x 106 bits/sec
= 500s
T=0 start
T=500 A finishes sending packet 1, starts packet 2
T=540 packet 1 finishes arriving at S
T=560 packet 1 departs for B
T=1000 A finishes sending packet 2
T=1060 packet 2 departs for B
T=1100 bit 1 of packet 2 arrives at B
T=1600 last bit of packet 2 arrives at B
Expressed algebraically,
Transmit delay = 5000 bits/ 10 x 106 bits/sec
= 500s
Total Transmit time = (3 x 500 + 2 x 40 + 1 x 20) s
= (1500 + 80 + 20) s
= 1600 s
Hence, Small packets are faster.
Download