6,272 views
2 votes
2 votes

Consider the GBN protocol with a sender window size of 4 and a sequence number range of 1,024. Suppose that at time t, the next in-order packet that the receiver is expecting has a sequence number of k. Assume that the medium does not reorder messages. What are all possible values of the ACK field in all possible messages currently propagating back to the sender at time t?

  1.   k-5 → k-1
  2.    k-4 → k-1
  3.    k-5 → k
  4.    k-4 → k

2 Answers

0 votes
0 votes

Suppose, the sequence numbers of packets to be sent are 1,2,3,4,5,6,7,8 and here we are using a sender window size of 4 here. Hence, at the first instant, the sender sends packets 1,2,3,4 and we assume all packets arrive correctly at the receiver. Hence, receiver expects packet with sequence number 5 and also sends ACK 5.It might also happen that one of the 4 ACKs did not arrive successfully at the sender in time. Hence, in my opinion, ans should be option D) k-4->k

0 votes
0 votes

In GBN , N is sender window size . N is given 4 here .

K = Sequence number ..

and K > N always  .

Now, in question it says , " that at time t, the next in-order packet that the receiver is expecting has a sequence number of k." ~ it means receiver expects k, so last 4 ACKs are k‐1, k‐2, k‐3, k-4 ( as window size is 4 , given ) .

That is if receiver is waiting for packet K, then it has received (and ACKed) packet (K− 1) and the  (N− 1) packets before that.

Our requirement is : "all possible values of the ACK field in all possible messages currently propagating back to the sender at time t " ~ That means the range of packets that can already send by the sender .

So till now ,  receiver expect Kth packet next ,  means it already received up to (k-1)th packets and (N-1) packets are acknowledged.

Suppose , those N ACKs that receiver send , none of them yet received by the sender, then ACK messages with values of                  [ K−N to K− 1] may still be propagating back to the sender.

That means if receiver expect packet 5 and window size is 4  then it receive from (5-4) to (5-1) = 1 to 4 packets already. And sender also send 1 to 4 packets already .

Now the sender has sent packets [K − N, K− 1], it must be the case that the sender has already received an ACK for ( K−N − 1).

because to send packet (k-N) it need to receive acknowledge for packet (k-N-1) .

Now sender receive ACK for (K-N-1) means receiver send that ACK for  (K-N-1) already .

Once the receiver has sent an ACK for ( K − N− 1) , it will never send an ACK that is less than (K −N − 1).

So that means all possible ACK values that is propagating from receiver towards sender , can range from  (K −N − 1) to (K − 1) ....(i) 

because receiver next expect K th packet so that range must be up to ( K-1 ) starting from (K-N-1) .

Now , in question the value of N is given , that is 4.

Put this value in (i) and we get (K-4-1) to (K-1) = (K - 5) to (K-1) 

which is option 1.

edited by
Answer:

Related questions

0 votes
0 votes
1 answer
3