HW1Solutions

advertisement
Computer Networking
Homework 1
Solutions
3. We will count the transfer as completed when the last data bit arrives at its destination. An alternative interpretation would be to count until the last ACK arrives back at
the sender, in which case the time would be half an RTT (25 ms) longer.
(a) 2 initial RTT’s (100ms) + 1000KB/1.5Mbps (transmit) + RTT/2 (propagation = 25ms)
≈ 0.125 + 8Mbit/1.5Mbps = 0.125 + 5.333 sec = 5.458 sec. If we pay more careful
attention to when a mega is 106 versus 220, we get 8,192,000 bits/1,500,000 bps = 5.461
sec, for a total delay of 5.586 sec.
(b) To the above we add the time for 999 RTTs (the number of RTTs between when
packet 1 arrives and packet 1000 arrives), for a total of 5.586 + 49.95 = 55.536.
(c) This is 49.5 RTTs, plus the initial 2, for 2.575 seconds.
(d) Right after the handshaking is done we send one packet. One RTT after the
handshaking we send two packets. At n 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 .575 sec.
5. Propagation delay is 4×103m/(2×108m/s)=2×10−5sec=20μs.100bytes/20μs
is 5 bytes/μs, or 5 MBps, or 40 Mbps. For 512-byte packets, this rises to 204.8 Mbps.
10. STDM and FDM both work best for channels with constant and uniform band- width
requirements. For both mechanisms bandwidth that goes unused by one channel is simply
wasted, not available to other channels. Computer communications are bursty and have
long idle periods; such usage patterns would magnify this waste.
FDM and STDM also require that channels be allocated (and, for FDM, be as- signed
bandwidth) well in advance. Again, the connection requirements for computing tend to be
too dynamic for this; at the very least, this would pretty much preclude using one channel
per connection.
FDM was preferred historically for TV/radio because it is very simple to build receivers;
it also supports different channel sizes. STDM was preferred for voice because it makes
somewhat more efficient use of the underlying bandwidth of the medium, and because
channels with different capacities was not originally an issue.
11. 10 Gbps = 1010 bps, meaning each bit is 10−10 sec (0.1 ns) wide. The length in the
wire of such a bit is .1 ns × 2.3 × 108 m/sec = 0.023 m or 23mm.
13.
(a) The minimum RTT is 2×385,000,000m/3×108m/s=2.57seconds.
(b) The delay × bandwidth product is 2.57s×1Gbps=2.57Gb=321MB.
(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 from sending the request before the first bit of the picture
could begin arriving at the ground (TCP would take longer). 25 MB is 200Mb. Assuming
bandwidth delay only, it would then take 200Mb/1000Mbps = 0.2 seconds to finish
sending, for a total time of 0.2 + 2.57 = 2.77 sec until the last picture bit arrives on
earth.
16. (a)
On a 100 Mbps network, each bit takes 1/108 = 10 ns to transmit. One packet consists of
12000 bits, and so is delayed due to bandwidth (serialization) by 120 μs along each link.
The packet is also delayed 10 μs on each of the two links due to propagation delay, for a
total of 260 μs.
(b) With three switches and four links, the delay is
4 × 120μs + 4 × 10μs = 520μs
(c) With cut-through, the switch delays the packet by 200 bits = 2 μs. There is still one
120 μs delay waiting for the last bit, and 20 μs of propagation delay, so the total is 142
μs. To put it another way, the last bit still arrives 120μs after the first bit; the first bit now
faces two link delays and one switch delay but never has to wait for the last bit along the
way.
18. (a) The effective bandwidth is 100 Mbps; 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.
(b) The data packet takes 520 μs as in 16(b) above to be delivered; the 400 bit ACKs take
4 μs/link to be sent back, plus propagation, for a total of 4 × 4 μs +4 × 10μs = 56μs;
thus the total RTT is 576μs. 12000 bits in 576μs is about 20.8 Mbps.
(c) 100×4.7×109bytes/12hours=4.7×1011bytes/(12×3600s)≈10.9MBps = 87 Mbps.
26.
(a) 640 × 480 × 3 × 30 bytes/sec = 26.4 MB/sec
(b) 160 × 120 × 1 × 5 = 96,000 bytes/sec = 94KB/sec
(c) 650MB/75 min = 8.7 MB/min = 148 KB/sec
(d) 8 × 10 × 72 × 72 pixels = 414,720 bits = 51,840 bytes. At 14,400 bits/sec, this
would take 28.8 seconds (ignoring overhead for framing and acknowledgments).
Download