@Bikram sir,

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

Dark Mode

Bikram
asked
in Computer Networks
Nov 26, 2016

603 views
4 votes

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 *

0

I humbly disagree with your answer @Bikram sir.

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.

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.

1

2 votes

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.$

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.$

@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.

0