617 views
Q.   If maximum sequence number in Go back N ( arq) protocol is 'n' then  window size (sender) is ?

If your answer is 'n' or 'n'+1' then please design GBN for sender window 5 and 11 .
asked | 617 views
max window size and max sequence number is depend on how many bits u r using.

if no of bits are n then max sequence no will be 2^n-1

and sender window size < 2^n.

Maximum sequence number in GBN is same as window size.

For sequence bits = n, number of sequence numbers = 2n and window size = 2n - 1

Consider n = 3, sequence numbers will be 23 = 8 ( i.e. from 0 - 7 )

and maximum window size = 23 - 1 = 7 i.e  window will carry frames  from 0 to 6 which are 7 in number.

Now, for sender window = 5

number of sequence bits needed = ceil (log2(1+window size)) = 3

So, sequence numbers generated would be 0 to 7 but window will carry frames from 0 to 4 which is 5 in number (same as window size)

answered by Boss (7.5k points) 3 16 57
selected by
If maximum sequence no is N so in case of sender window 5 , N = 7 .. so is there a relationship between maximum sequence number and sender window in GBN .... As sender window changes
It should consider from 0 to n ,so maximum n is possible

@just_bhavana the best explanation..thanks:)

welcome :)
Let sender window = 5 so it can send 0-4 ,the maximum sequence number is 7 (I don't see sender window=maximum sequence number) . For your information if 3 bits used then maximum sequence number will be 7, & sender window can be 1to 7. If You think this is not the case pls watch nptl video and focus on example they used .... That example is same as used in frozen
@abhi Consider this :

The relation should be sequence_numbers(N) >= Sender_Window_Size(S) + Receiver_Window_Size(R)

Thus N >= 5+1 and N should be at least 6. Thus the sequence numbers will be from 0 to 5 (6 sequences)

The question says 'Maximum' sequence number which can be lot greater than sender window size .. even as big as the number of packets ... thus there is no relation IFF maximum sequence number is given.

I don't agree with the best chosen answer.
According to the question: if the maximum sequence no is n what is the sender window size (WS).

# of sequence numbers = sender window size + receiver window size

= WS+ 1

Maximum sequence number is n :(0 1 2 3 ...........n)

so total sequence numbers= n+1

n+1 = WS + 1;

WS= n

Hence according to (# of seq numbers>= WS+WR) there should be atleast n+1 distinct sequence numbers for window size of n.

Please share if u feel something is wrong.
+1 vote

in any of the flow control mechanism, it is always true: sequence number >= (sws + rws) however for GBN we know rws=1 always.

as per question sequence number =n out of which 1 is given to rws, therefore, sws must be less or equal to n-1.

answered by Active (1.8k points) 1 4 18
Maximum sequence no he ... Read answer above yours
hmmm i have read it and i find the answer above my answer is contradictory and confusing.. as per my study and facts the answer i have given is correct.. if maximum seq no is equals to sender window size then obviously we dont have seq no. for rws. anyways i will surely dig into it. until then lets see someone else would get something
In this question we are not talking about maximum sender window , we are saying sender window ..... I think we have no relationship between maximum sequence number and sender window in GBN as well as SR....... This question was in my test..... And all options are wrong....
you cannot say there is no relation between maximum seq. number and sender window size because in GBN or in SRA we have suff to calculate the sws..nd ofcousre it is also true that with the help of only sequence number we can say about maximum sender window size but not about exact sws...for exact one we should have other relevant information.

however in ur question only seq. number given so we can tell about only maximum sender window size... which will be in case of GBN is n-1 or u can say the sws< or = (n-1)
The best answer chosen had me doubt my learnings completely. I agree with your answer. I'll research more to see if it is true.
Maximum window size at sender will be 'n-1'(As in question,no of sequence no is given not the no of bits used in sequence no)
answered by (97 points) 1 6

+1 vote