Problems 1. For a 5 Kbytes packets sent over a 10 Mbps transmission link, what is the transmission time of the packet? (5K x 8) / 10M = 4 msec 2. A 600-byte packet is sent over a 20 Kbps point-to-point link whose propagation delay is 10 msec. After how much delay will the packet reach the destination? 10 msec + (600 x 8) / 20K = 250 msec 3. Given a 1 Gbps point to point copper wire (propagation speed 200m/μs) with a length of 2km. Ignoring the acknowledgments, a) how much is the transmission time for a 10 MB file? Transmission time= Data Length/Data Rate=L/R= (10*10^6*8) /(1*10^9)=0.08secb) how much is the propagation delay? Propagation delay=Distance/propagation=D/V =(2*10^3)/(200/10^-6)=10μsec 4 .What is the throughput when retrieving a 1MB file across a 1Gbps network with a round trip time of 100msec, again disregarding ACKs? Throughput =TransferSize/Transfer time Transfer time =RTT+(1/Bandwidth)*Transfer Size = (100*10^3)+(1/10^9)*(8*10^6)=108msec Throughput=(8*10^6)/(108*10^-3)=74.074 Mbps 5. Consider a point-to-point link 2 km in length. At what bandwidth would propagation delay (at a speed of 2 × 108 m/s) equal transmit delay for 100-byte packets? What about 512-byte packets? Solution: Since transmit = size/bandwidth and propagation = distance/speedoflight = 2*103 m / (2*108 m/s) = 1*10-5 s, we can conclude that bandwidth = size / (distance/speed of light). 100 byte / 1*10-5 s = 10 MB/s = 80 Mbps 512 byte / 1*10-5s = 409.6 Mbp 6. How “wide” is a bit on a 1-Gbps link? How long is a bit in copper wire, where the speed wide” of propagation is 2.3*108m/s? Solution: 1Gbps = 109bps, and 1 bit on a 1-Gbps link is 1/109bps= 109s wide. If the speed of propagation is 2.3*108 m/s, then the length of a bit is (2.3*108 m/s) * (10-9 s) =0.23m 7. Suppose a 100-Mbps point-to-point link is being set up between Earth and a new lunar colony. The distance from the moon to Earth is 385000 km and data travels over the link at colony. the speed 3 x 108m/s. (a) Calculate the minimum RTT for the link. (b) Using the RTT as the delay, calculate the delay*bandwidth product for the link. (c) What is the significance of the delay*bandwidth product computed in (b). (d) A camera on the lunar base takes pictures of Earth and saves them in digital format to disk. Suppose Mission Control on Earth wishes to download the most current image, which is 25MB. What is the minimum amount of time that will elapse between when the request for the data goes out and the transfer is finished? Solution: (a) RTT = 2*distance/speed = 2*3.85*108m / (3*108m/s) = 2.567s (b) Delay*bandwidth = 2.567s*100Mbps = 256.7Mb = 32.09 MB (c) The delay*bandwidth product corresponds to how many bits the sender must transmit before the first bit arrives at the receiver. (d) Total transfer time = RTT + transmit time = 2.567s + size/bandwidth = 2.567s + (25*8/100) s =4.567s 8. Calculate the latency (from first bit sent to last bit received) for the following: (a) A 10-Mbps Ethernet with a single store-and-forward switch in the path, and a packet size of 5000 bits. Assume that each link introduces a propagation delay of 10 μs, and that the switch begins retransmitting immediately after it has finished receiving the packet. (b) Same as (a) but with 3 switches. (c) Same as (a) but assume the switch implements “cut-through” switching: it is able to begin cut-through” retransmitting the packet after the first 200 bits have been received. Solution: (a) Each line has a transmit delay = size / bandwidth = 5000 bits / 10 Mbps = 5*10-4 s. There are 2 links, each produces 2*10*10-6 s = 2*10-5s. So the latency is 2*transmit delay + propagation delay = 1.02*10-3 s. (b) 3 switches have 4 lines. The latency is 4*transmit delay + 4*propagation delay = 2.04*10-3 s. (c) With “cut-through” switching, the transmit delay of the first line is 200 bits / 10 Mbps = 2*10-5s. So the latency = 2*propagation delay + first transmit delay + second transmit delay = 2*10-5s +2*10-5 s + 5*10-4 s = 5.4*10-4 s. 9. Suppose that a certain communications protocol involves a per-packet overhead of 100 bytes for headers and framing. We send 1 million bytes of data using this protocol; however, one data type is corrupted and the entire packet containing it is thus lost. Give the total lost. number of overhead + loss bytes for packet data sizes of 1000, 5000, 10000, and 20000 bytes. Which size is optimal? Solution: Packet number = 1*106 / Data Size. Total overhead = 100 bytes * Packet number = 100*(1*106 / Data Size) Lose = data size Total size = total overhead + lose = 100*(1*106 / Data Size) + data size 1000 bytes: 1*108 / 1000 + 1000 =1.01*105 5000 bytes: 1*108 / 5000 + 5000 = 2.5*104 10000 bytes: 1*108 / 10000 + 10000 =2*104 20000 bytes: 1*108 / 20000 + 20000 =2.5*104 The 10000 bytes is optimal. 10. Assume you wish to transfer an n-byte file along a path composed of the source, destination, seven point-to-point links, and five switches. Suppose each link has a propagation delay of 2 ms, bandwidth of 4 Mbps, and that the switches support both circuit and packet switching. Thus you can either break the file up into 1-KB packets, or set up a circuit through the switches and send the file as one contiguous bit stream. Suppose that packets have 24 bytes of packet header information and 1000 bytes of payload, that store-and-forward packet processing at each switch incurs a 1-ms delay after the packet has been completely received, that packets may be sent continuously without waiting for acknowledgments, and that circuit setup requires a 1-KB message to make one round-trip on the path incurring a 1-ms delay at each switch after the message has been completely received. Assume switches introduce no delay to data traversing a circuit. You may also assume that file size is a multiple of 1000 bytes. (a) For what file size n bytes is the total number of bytes sent across the network less for circuits than for packets? (b) For what file size n bytes is the total latency incurred before the entire file arrives at the destination less for circuits than for packets? Solution: A) Packet switching: packets pay an ongoing per packet cost of 24 Bytes for a total count of 1024 x (number of packets) = 1024 * n / 1000 bytes Circuit switching: circuits pay an up-front penalty of 1KB being sent across the network twice for a total data count of 2000 + n bytes So the question really asks how many packet headers does it take to exceed 2000 bytes, which is ~ 83.34. Thus, for files longer than ~ 83,340 bytes, using packets results in more total data sent. B Packet switching: Total transfer latency = (transmit delay for all pkts at the source)+ (per-pkt transmit delay introduced by each switch)+ (per-pkt processing delay introduced by each switch)+ (propagation delay for all links) = (c*t) + (x*t) + (x*0.001) + ((x+1) * 0.001) = 2.731*10-6n + 0.01992 c: number of packets = n/1000 t: transmission time of a packet = 1024*8bit/3Mbps x: number of switches = 4 b: bandwidth = 3Mbps Circuit switching: Total transfer latency = (transmit delay for the whole file at source)+(propagation delay for all links)+ (setup time for the circuit) = 8n/b + ((x+1)*0.001)+ 2*(1000*8/b + (x*1000*8/b) + (x*0.001) + ((x+1)*0.001)) = 2.667*10-6n + 0.04967seconds 2.731*10-6n + 0.01992 > 2.667*10-6n + 0.04967 Solving => n > 465KB (rounding to the next 1000 bytes) 11. Consider a point-to-point link 2km in length. At what bandwidth would propagation delay (at a speed of 2 x 108m/s) equal transmit time for 100-byte packets? What about 512-byte packets?-Propagation delay=D/V= (2*10^3)/(2*10^8)=10^-5 secTransmission time for 100 bytespackets=L/R=(100*8)/R=10^-5, so R= 80Mbps Transmission time for 512 bytespackets=L/R=(512*8)/R=10^-5, R= 409.6Mbps