603 views
A $3000$ km long trunk operates at $1.536\times 10^6$ bps and is used to transmit $64$ byte frames using sliding window protocol. If the propagation speed is $6$ microseconds/km then the number of bits needed for the sequence number for maximum efficiency is _______

@ sir,

So answer should be 1 for this question am I  right ??

That was a typo, corrected now.

@Bikram sir, @Arjun sir

Please change 3000 km to 3000 m in question.

Formula :  Number of bits in seq number field is ceil[log(1+2a)]  where a is Tp/Tt

in Stop n wait : ( it is simplest sliding window protocol )

L= 64B = 64*8

B= 1.536 Mbps

Tt =L/ B =333.33 microsec

now propagation delay for 1 km is 6 microsec,

propagation delay Tp=6∗3000=18000 microsec

hence 1+2a=1+2(Tp / Tt)=109.01

hence no. of bits required for sequence number are ⌈log2(1+2a)⌉=7

number of bits are 7

by

what about the above phrase which has been given by rishabh gupta

@Arjun

On calculating, we get window size greater than 1, so it can't be Stop and Wait. Next simple protocol used is Go Back N. So we will consider that (also because the selective repeat protocol is highly complex to implement in trunking).

In Stop and Wait, Sender needs only one frame number, and so does Receiver. Hence, total numbers required = 2, and total bits required = 1. ALWAYS.

For GBN, it'll be 7 bits. Because Sender needs 109 numbers and Receiver needs just 1. Total would be 110 numbers, and we need 7 bits to uniquely identify them.

For SR, it'll be 8 bits. Because Sender needs 109 numbers and so does Receiver. Total would be 218 numbers, and we need 8 bits to uniquely identify them.
For maximum efficiency, the sender should be transmitting for the entire RTT (till ACK comes back).

RTT = Transmission Time for Packet + Propagation Time for Packet + Transmission Time for ACK (taking as 0) + Propagation Time for ACK

Transmission Time for Packet = Packet Size $\div$ bandwidth $=(64 \times 8) \div (1.536 \times 10^6) s = 333.33 \mu s.$

Propagation Time (same for Packet and ACK) $=3000 \; km \times 6 \mu s / km = 18000 \mu s$

So, RTT $= 333.33 + 2 \times 18000 = 36333.33 \; \mu s$

So, No. of packets needed for $100\%$ efficiency $= \lceil \frac{36333.33}{333.33} \rceil= 109.$

No. of bits needed to represent $109 = \log_2 109 = 7.$
by

### 1 comment

@Arjun sir, it seq number bits will be log(109+1)=7 { because seq number>= sender window size+receiver window size} isn't it? Moreover, I think answer will be different depending on language of question. Suppose, question asks " MINIMUM number of sequence bits required for maximum efficiency" then ans will be log(109+1)=7 bits {in case of GBN}. and if question asks "MAXIMUM number of sequence bits required for maximum efficiency " then ans will be log(109+109)=8 bits { if SR is used}. Correct me if i am wrong sir.

For maximum efficiency, $W_s=1+2a=109$

• For Stop and Wait: $2$ numbers are always enough. So, bits = $1$.

• For Go Back N, we need $110$ numbers. So, bits = $7$.

• For Selective Repeat, we need $218$ numbers. So, bits = $8$.

1 vote
1
240 views
1 vote