in Computer Networks
1,469 views
7 votes
7 votes
In packet switching network packet are routed from source to destination along a single path having 2 intermediate nodes ,if message size is 48 bytes and each packet contain header of 6 bytes then find optimal packet size...
in Computer Networks
1.5k views

1 comment

0
0

2 Answers

2 votes
2 votes

(Basic Assumption is that all packets are of same size)

The key here to solve this problem is the fact that packet transmissions from intermidiate switches (routers here) can be overlapped.

Case(1): Message is not at all splitted and no. of packets (of 54B each) is 1...

Transmission Time @ source = 54/bandwidth

Transmission Time @ switch R1 = 54/bandwidth

Transmission Time @ switch R2 = 54/bandwidth

Hence total time= 3*54/bandwidth = 162/bandwidth

Case(2): Message is split in 2 packets (30B each)

Transmission Time @ source = 2*30/bandwidth

Transmission Time @ switch R1 = 30/bandwidth  ......{note 2 packets are transmitted on the line in parallel}

Transmission Time @ switch R2 = 30/bandwidth

Hence total time = 120/bandwidth

----------------

Similarly perform with 3 packets of 22B each : Total Time = 110/bandwidth

With 4 packets of 18B each: Total time = 72/b + 18/b + 18/b = 108/bandwidth

With 6 packets of 14B each : Total time = 84/b + 14/b + 14/b = 112/bandwidth

------------

Thus for sending entire file in minimum time with error-free channel (to save retransmissions of bigger packet sizes) one should go for a split of 4 packets where each packet is having the size of 18B.

------------

TIP - There was a question in Gate-14 (Set 1) which is based on this very concept :)

4 Comments

By the way there is a very nice shortcut for finding out optimal packet size (Shortcut credit goes to Shrakul on gateoverflow) : Opt. Packet Size = Data part + Header part where Data Part Size = sqrt[h*D/(k-1)] h=header size D=original message size k= total hops taken to reach source You can verify by putting above values. Similar question was asked in 2005, concept was repeated in 2014. I guess this is important concept, therefore. Btw, where did you find above question? Which book?
1
1
why didnt we divide the packet into 2 packets with size of 27. why did we divide it into packets of size of 30.
0
0
@bikram sir

tushar shinde formula is right?
0
0
edited by

@  hem chandra joshi 

packet size  P = p+h   where  h is  header  size  and  p = √ (hx / k-1)    where  x  is  message  size  and  k is  no of  hops.  

here , message size is 48 bytes = x

and each packet contain header of 6 bytes = h

it says , " single path having 2 intermediate nodes" that means k=3 

so, p =  √(6 * 48 / 2)

= √ 144

= 12

hence packet size P = 12 + 6 = 18

so yes, his formula is correct :)

0
0
1 vote
1 vote
packet size  P = p+h   where  h is  header  size  and  p = √ (hx / k-1)    where  x  is  message  size  and  k is  no of  hops.  

here , message size is 48 bytes = x

and each packet contain header of 6 bytes = h

it says , " single path having 2 intermediate nodes" that means k=3

so, p =  √(6 * 48 / 2)

= √ 144

= 12

Hence packet size P = 12 + 6 = 18
edited by

3 Comments

@bikram sir

not get  this ->>it says , " single path having 2 intermediate nodes" that means k=3
0
0
Does it means we will take all nodes except receiver ?
0
0

packet are routed from source to destination along a single path having 2 intermediate nodes

  Source ----------- A------------B---------------- Destination   [ A and B these two are intermediate nodes ]

            1st hop       2nd hop       3rd hop

so it is clear that k ,  which is no of  hops = 3

hem chandra joshi  number of hops are  here 2 , with one intermediate node.

like this    A----B----C there are 2 hops

1
1
Answer:

Related questions