The Gateway to Computer Science Excellence
+53 votes

Consider a source computer $(S)$ transmitting a file of size $10^{6}$ bits to a destination computer $(D)$ over a network of two routers $(R_{1}\text{ and }R_{2})$ and three links $(L_{1},L_{2},\text{ and } L_{3})$. $L_{1}$ connects $S$ to $R_{1}$; $L_{2}$ connects $R_{1}$ to $R_{2}$; and $L_{3}$ connects $R_{2}$ to $D$. Let each link be of length $\text{100 km}$. Assume signals travel over each link at a speed of $10^{8}$ meters per second. Assume that the link bandwidth on each link is $\text{1 Mbps}$. Let the file be broken down into $1000$ packets each of size $1000$ bits. Find the total sum of transmission and propagation delays in transmitting the file from $S$ to $D$?

  1. $\text{1005 ms}$
  2. $\text{1010 ms}$
  3. $\text{3000 ms}$
  4. $\text{3003 ms}$
in Computer Networks by Veteran
edited by | 8k views
after 6 ms, when when first packet reaches at D, the next packet reaches R2 because of pipelining.

now R2 will transmit this packet in 1 ms and then it will propagate to D in 1 ms. so D will get the next packet 2ms after getting the first and same thing for other 998 packets so total time should be

6 + 999*2 = 2004 ms.
@I  got 2004 ms

becoz  by pipelining remaining 999 packet are at router R2 ,on that case transmission time =1ms propagation time =1ms

@ bikram sir

then it will be 999*2 +(for first packet 3*2)=2004ms

I have a question: do we always have to treat a router as a store and forward device (i.e. stores the entire packet into a memory buffer before starting forwarding it)? Because most modern routers are cut-through?



The question asks Find the total sum of transmission and propagation delays in transmitting the file from S to D? Not how long does it take for the file to reach the destination computer?

We should not be concerned with pipelining since every packet will need to be transmitted and propagated, and will therefore contribute to the total sum of transmission and propagation delays in transmitting the file from S to D.

Shouldn't the answer be 3003ms?

6 Answers

+91 votes
Best answer
routers are store and forward devices.
Propagation time $=\dfrac{100\ km}{10^8\ m/s}=1\text{ milli second}$
Transmission time for a packet $=\dfrac{1000}{10^6}=1\text{ milli second}$

Packets will be forwarded in a pipelined manner after the first packet reaches the receiver,
in every $1\ ms$ a new one arrives.

now Time taken by packet no $1$ to reach destination is :
$\text{1 ms (TT at sender) + 1 ms (PT from sender to R1) + 1ms  (TT at R1)}$
$\text{+ 1ms(PT from R1 to R2) + 1ms (TT at R2) + 1ms ( PT from R2 to destination) = 6ms}$

So, time for packet,

$1000=6\ ms + 999\ ms$
$=1005\ ms$

Correct Answer: $A$
by Boss
edited by

I have one doubt here , for next 999 packets being sent we consider Tp or Tt ie propagation time or transmission time? Since here both are same so I am unable to [email protected], @Digvijay Pandey

its transmission time for 999 pkts
can somebody give more emphasis on "999" need some clarity ?
Ya can someone please explain this further.. What is the meaning of pipelined manner? does it mean that after a packet reaches a intermediate node the next one is forwarded?

If we consider that there are only two packets then their journey will be as shown in pic,now time taken for 1st packet=3(Tt+Tp)=6ms

and time taken for last packet=Tp=1ms,so total time=7ms,since here Tt and Tp are equal to 1ms,but if both are different then why would we take time taken for last packet as Tt ,it should be Tp always??

pls clearify


No, the time considered for the last packet is Tt and not Tp. Consider a simple source, link and, destination with Tt = 2ms and Tp = 1ms. At t=2, the 1st packet is put on the link and it reaches the destination at t=3. But at t=3, the 2nd packet is not transmitted from the source, it is transmitted at t=4 (since Tt is 2ms). So, the 2nd packet will reach the destination at t=5. So the difference between the arrival of the two packets is 2ms (= Tt).

Check the image:

It is similar to Pipeline concept, where no of processes are 1000,no of stages = 6 ,stage delay = 1ms.

Total time = 6 + 999*1= 1005 ms.
i understand pipelining concept but how 6 stages here...????plzz explain m having doubt in dis qn
@ Sumaiya23

Hey will you varify once...
I tried the method u applied for getting time difference.
But I found that its not Tx  ,  its max( Tx,Tp)

Please check once.
but in case of  router processing time is given then what to do,only taken transfer time ???

or transfer time with peocessing time both include?? plz explain arjun sir plzz
always Tt shall only be considered for pipelining
Its Tt only..because 1st packet will follow remaining packets
After first packet reaches the destination, transmission time and propagation time overlaps.
+52 votes
First all data needs to be transmitted from source and after all packets transmission from source, just focus on last packet jorney, and u will get it.

Transmission time for all packets from Source:= $\frac{10^6}{1\times 10^6}$ = 1 sec = $1000$ms.
(Now the last packet is our main focus, bcoz the moment last packet reaches, all previous are already reached to Destination)

Last packet time = $3\times \text{propagation time of link} + 2 \times \text{tranmsion time of router} $ (Transmission time for source is already included in above $1000$ msec)
= $(3 \times 1) + (2 \times 1)$ = 5ms

Total time= $1000+5 = 1005 \text{ms}$
by Boss
1000msec = 1 msec

when it started happening

above you have written TRANMISSION TIME 1 SEC and below 1MSEC

can you explain?
For 999 packets why not 999*2 ( 1 ms - Tx + 1 ms  - Tp ) ??
@Sachin sir what an easy and clean explanation!
Consider, $T_p=1ms$(same )
$T_t=2 ms$ ($1000$ packets each of $2000$ bits)
Method 1 (as pipeline): $9 + 999 * 2ms$(transmission time)$= 2007$
Method 2(considering last packet arrival): total $T_t$(for all packets)$= \frac{2*10^{6}}{1*10^{6}}= 2000 ms$
Last packet time $= 3 *T_p +2*T_t = 3 *2 + 2*1=8$
Total time$= 2008$
Pls verify. Can anybody explain why there is a difference in answer??

@Manoja Rajalakshmi forget the last packet time method. The pipeline method gives accurate answer in other questions.

For $n$ packets and $r$ intermediate routers with transmission delay of one packet being $T_t$, overall transmission time from source to destination is:


From this, you can see the transmission delay becomes:
$(1+2)\times \frac{10^3}{10^6}+(n-1)\times\frac{10^3}{10^6}=(3)\times 10^{-3}+(999)\times 10^{-3} sec=1002\  msec$.
Add 3 msec of propagation delay and you get 1005 msec as answer.

@Sachin wir, really nice explanation, but one small doubt, don't we need to consider the Transmission delay at the Destination also?

So I am getting 1006.

Please help, thanks:)
Best way to solve this question
@Manoja rajalakshmi A

It's because , you have swapped the values of propagation delay and transmission delay . Please double check it. :)

It's   3*1+2*2= 7
+2 votes
S------R1--------R2--------D        here we will use the concept of packet switching first of all ,transmission time = L/B which is equal to 1mili second from S to D  total  Tt= s to R1(1milisec) +R1to R2(1milisec) +R2 to D(1milisec)=3milisec  ,now for remaining 999 packets it will be 999*1milisec=999milisec   (We send 1 packet and now we are sending remaining 999 packets)

so total Tt=3+999=1002

now the propogation delay Tp=D/V , here it is mentioned that (Let each link be of length 100 km) Total distance from S To D is  300km    so Tp=300*10^3/10^8=3milisec.

now the sum of Tt + Tp=1002+3=1005 milisecond. ANSWER IS A.
by Junior
can u solve this question  for Tt =3 sec and Tp =6??????
+2 votes
A common doubt is why after the first packet arrives, every other packet arrives in 1 ms when clearly there is transmission and propagation delay (1ms + 1ms) to consider.

To see why this is so, consider a single link connecting the source to destination. Lets say there is 1ms transmission time and 1ms propagation time. So the first packet reaches the destination in 2 ms. But does the next packet require 2ms too?

No, because the sender has already finished transmission of the second packet (at t = 2ms) when the first packet reached the destination. Hence there is only the 1ms propagation delay to consider now.

Apply that same logic here. The first packet takes ms to reach the destination. But after that, the following packet needs only 1ms propagation delay to reach the destination. This gives our answer of 6ms + 999 ms = 1005ms.
0 votes

We have been given following info:

Signal Speed = 10^8 m/s

Bandwidth, BW = 1 Mbps = 10^6 bps

Propagation time, Tp = Link Distance/ Link Speed = (100x10^3)/(10^8) = 10^-3 sec = 1 ms.

[Propagation time is the time taken by packet to travel through the link]

Transmission time for 1 packet, Tt = Packet Size / BW = 1000 / 10^6 = 10^-3 sec = 1 ms.

[Transmission time is the time taken by source or router to process or put the data on Link]

Link filling time can be calculated as:

Pipeline Filling time
Time L1 R1 L2 R2 L3 D
t=1 P1          
t=2 P2 P1        
t=3 P3 P2 P1      
t=4 P4 P3 P2 P1    
t=5 P5 P4 P3 P2 P1  
t=6 P6 P5 P4 P3 P2 P1

This way time taken by packet P1 to reach Destination (D) = 6 ms

Now, as you can see, at every ms, 1 packet will reach D.

Therefore, time taken for remaining 999 packets = 999 ms.

So, total time taken to transmit 1000 packets = 999 + 6 = 1005 ms.

Hence Option (A) is correct answer.


by Junior
–2 votes

BW=10^3 Kbps


i.e., 1Kb (or 1 packet) is put on link in 1 ms

So, by the time 1st packet reaches R1, the IInd packet will already have been put on the 1st link.

(Please note Router processing time has been ignored here )

In other words, all the subsequent packets will be 1ms behind each other on the path

that's why after 6 second of packet 1's journey, it's +1ms+1ms ...    till 999 ms

Hope it helped :)

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
52,215 questions
60,009 answers
94,696 users