how to calculate end-to-end delay in this scenario

Ross picture Ross · Jul 15, 2016 · Viewed 20.4k times · Source

Here is my question: We wish to send a message of size 150,000 bytes over the network. There are four hops, each of length 20km and running at 100 Mb/s. However, before sending we split the message into 1500 byte packets. What is the end-to-end delay of the message? Use speed of light in copper = c = 2 * 10^8 m/s, and round your answer to the nearest integer millisecond.

What I have so far is 48ms, which I calculated in the following fashion: 1500 bytes = 12,000 bits 12,000 bits/(100x10^6)[100Mb/s] = 0.00012s 20km/(2*10^8)[speed of light in this equation] = 1e-7 Add them up and you get 0.0001201s per hop x 4 hops = 0.0004804s -> 48ms rounded to nearest integer.

Apparently this is not correct and I cannot figure out my error. My online course has no assistance available so I'm turning to SO. If anyone can point me in the right direct, I would appreciate the help.

Answer

Kluyg picture Kluyg · Sep 11, 2016

Edit:

I think I got it finally. The network topology looks like this:

source - link#1 - router#1 - link#2 - router#2 - link#3 - router#3 - link#4 - dest

Let's first consider it from the perspective of the source. We're sending the message packet by packet. As soon as we put the first packet on the wire, we're sending the second one, then the 3rd, etc. How long does it take to put all 100 packets on the wire?

100 * 1500B * 8(b/B) / 100 Mb/s = 12 ms

End to end delay is the time it takes to transfer the whole message from source to dest. So now that the source just put the packet #100 on the link#1, let's follow that last packet life. For that last packet it takes

20km/(2 * 10^8 m/s) = 0.1 ms - to get to the router#1
1500B * 8(b/B) / 100 Mb/s = 0.12 ms - to put it on the link#2
20km/(2 * 10^8 m/s) = 0.1 ms - to get to the router#2
1500B * 8(b/B) / 100 Mb/s = 0.12 ms - to put it on the link#3
20km/(2 * 10^8 m/s) = 0.1 ms - to get to the router#3
1500B * 8(b/B) / 100 Mb/s = 0.12 ms - to put it on the link#4
20km/(2 * 10^8 m/s) = 0.1 ms - to get to the dest

so in total it takes the last packet 0.76 ms to get to the final destination after it was put on the link#1 by the source. Which gives us the final answer:

12 ms + 0.76 ms = 12.76 ms ~= 13 ms

Original answer:

Below is apparently a correct answer but I don't understand why we don't multiply the second part of the sum by 4, there are 4 hoops after all. If somebody can explain, I would be very grateful.

EXPLANATION

13ms. We calculate the end-to-end delay as follows:

4 * (1500B * 8(b/B) / 100 Mb/s + 20km/2 * 10^8 m/s)
+ (150,000/1500 - 1) * (1500 * 8 (b/B) / 100Mb/s) = 12.76 ms