College of Computer & Information Science Fall 2004 Northeastern University Handout 2 CSU640: Network Fundamentals 30 September 2004

Sample Solution to Problem Set 1

1. (10 points) Propagation and transmission delays

Problem 6, page 64.

Answer:

(a) d_{prop} = m/s seconds.

(b) d_{trans} = L/R seconds.

(c) d_{end−to−end} = (m/s + L/R) seconds.

(d) The bit is just leaving Host A.

(e) The first bit is in the link and has not reached Host B.

(f) The first bit has reached Host B.

(g) We need

m = \frac{L}{R}S = \frac{100}{28 × 10^{3}} (2.5 × 10^{8}) = 893km.

2. (10 points) File transfer time

Calculate the total time required to transfer a 1000 KB file in the following cases, assuming an RTT of 100 ms, a packet size of 1 KB data, and an initial 2 × RTT of “handshaking” before data is sent. Assume that the RTT time includes both propagation and queuing delays. The file transmission is complete when the entire file is received at the receiver.

(a) The bandwidth is 1.5 Mbps, and data packets are sent continuously. Answer: The one-way propagation and queueing delay is RTT/2 = 50 ms. The size of each packet is 1KB = 10^{3} bytes = 8000 bits (assuming 1K = 10^{3}). Therefore, the transmit time for a packet is 8000/(1.5 × 10^{6})s = 5.333ms. The transmit time for 1000 packets is 5.333s. Adding the one-way propagation and queueing delay, and 2 RTTs for the handshake, we obtain a total time of 5.583s.

(b) The bandwidth is 1.5 Mbps, but we send only one packet per RTT; that is, after we finish sending each data packet we must wait one RTT before sending the next. Answer: As calculated above, the transmit time for each packet is 5.333ms. Since we wait for 1 RTT = 100ms after sending a packet, we send 1 packet every 105.333 ms. So for 999 packets, the total transmit time is 105.227s. Adding the one-way propagation and queueing delay for the last packet, and 2 RTTs for the handshake, we obtain a total time of 105.477s. (An approximation, in which you calculate the total time as 105.333ms times 1000 + 2RTT = 105.533s, is also acceptable.)

(c) The bandwidth is infinite, meaning that we take transmit time to be zero, and up to 20 packets can be sent per RTT.

Answer: Number of RTTs it will take for 1000 packets to be transmitted is 50. For the last round, we only need to consider the one-way time. So total transfer time is 2RTT + 49RTT + 0.5RTT = 5.15s. (Calculating this as 52RTT is acceptable as an approximation.)

(d) The bandwidth is infinite, and during the first RTT we can send one packet (2^{0}), during the second RTT we can send two packets (2^{1}), during the third we can send four packets (2^{2}), and so on. That is, in the ith RTT, we can send 2^{i−1} packets.

Answer: The sequence of number of packets transmitted in a round is 1, 2, 4, 8, 16, 32, 64, 128, 256, 489 (the last round carrying 489 packets instead of 512, since it completes the transmission of the file). So we have a total of 2RTT + 9RTT + 0.5RTT = 1.15s. (Calculating this as 12RTT is acceptable as an approximation.)

3. (10 points) Message segmentation

Problem 20, pages 66-67.

Answer:

(a) The time taken to send message from source host to first packet switch is (7.5 × 10^{6})/(1.5 × 10^{6}) = 5 seconds. With store-and-forward switching, the total time to move message from source host to destination host (over 3 hops) is 5 × 3 = 15 seconds.

(b) The time taken to send the 1st packet from source host to first packet switch is (1.5 × 10^{3})/(1.5 × 10^{6}) = 1ms. The time at which 2nd packet is received at the first switch = the time at which the 1st packet is received at the second switch = 2 × 1ms = 2ms.

(c) The time at which 1st packet is received at the destination host = 1ms ×3 hops = 3ms. . After this, every 1ms one packet will be received, thus time at which last (5000th) packet is received equals 3ms +4999ms = 5.002s. It can be seen that delay in using message segmentation is significantly less (almost 1/3rd).

(d) Two potential drawbacks of message segmentation are as follows.

– Packets have to be put in sequence at the destination

– Message segmentation results in many smaller packets. Since header size is usually the same for packets regardless of its size, with message segmentation total amount of header bytes sent increases. Thus, an efficient use of message segmentation requires that the segments to be of sufficiently large size.