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?