edited by
4,619 views
9 votes
9 votes

In what protocols it is possible for sender to receive an ACK for a packet that falls outside of its window . Please justify ur answer .

a)Stop and wait

b)SR

c) GBN

d) all


My approach

Ws = 3
t=0  sends packets 1,2,3
                                                       t=1 reveiver ACK 1,2,3
t=2 sender time out and resent 1,2,3
                                                       t=3 receiver receive duplicates and re ACK
t=4 sender receives ACK and advances Ws

t=5 sender receives ACK receiver sent at t=3 This is outside window

The above is true for GBN and SR .
What about Stop and Wait ?
Answer is given as Stop and wait
 

edited by

1 Answer

Best answer
16 votes
16 votes
For GBN and SR...

Suppose the sender has a window size of 3 and sends packets 1, 2, 3 at 0t. At 1t the receiver ACKS 1, 2, 3. At 2t the sender times out and resends 1, 2, 3. At 3t the receiver receives the duplicates and re-acknowledges 1, 2, 3. At 4t the sender receives the ACKs that the receiver sent at 1t and advances its window to 4, 5, 6. At 5t the sender receives the ACKs 1, 2, 3 the receiver sent at 2t. These ACKs are outside its window.

For stop and wait..

Let sender at t0 send 0th packet. At t1 received by receiver and send ack1 (ack for 0th packet and expecting packet 1). Eventually sender time out and send 0th packet again at receiver side it is discarded as expecting packet is 1. Ack1 has been send again.

When first ack1 is received sender sends packet1 and expecting ack0. Suppose after t time second ack1 arrives but expected ack  is ack0 so ack1 is discarded.

So it is also true for stop and wait protocol.

Correct me ...
selected by

Related questions

2 votes
2 votes
2 answers
3
JAYKISHAN asked May 3, 2018
745 views
Why sender and receiver window size are same in selective repeat?