2
votes

I know that TCP receiver will hold on 500ms to wait for another in-order packet before sending ACK. Also TCP receiver will send immediate DUPLICATE ACK when there is a gap detected. However, I am not very sure about the receiver behaviour in the next scenario:

Suppose sender send packets whose size are 1000 bytes. Packets with sequence number 2000, 3000, 4000 are sent.

On the way to receiver, packet with seqNum 3000 is lost. The rest two packets are received within 500ms interval.

Receiver, when received packet of seqNum 2000, will hold off to expect packet of seqNum 3000, but it receives that of seqNum 4000 instead.

My question is, how many ACK packet of seqNum 3000 will be fired by receiver? Is it 1 or 2?

1

1 Answers

1
votes

If your system supports selective ACK (most likely it does), then you will see an ACK return with the lower acknowledgement number (last seen) in it, but with the selective ACK option set listing the later segments that have also been seen. This will allow the sender to resend only the missing piece instead of everything from 3000 and up.