1

I am simulating TCP and I don't know when it should send the Acknowledgment.

For example as soon as a segment dropped should we send the Acknowledgment or should we take some time, maybe the segment arrives after a little delay if so, how much time should we wait?

1
  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you can provide and accept your own answer. – Ron Maupin Feb 19 '18 at 20:15
3

I recommend reading RFC 1122 "Requirements for Internet Hosts -- Communication Layers", section 4.2.3.2 "When to Send an ACK Segment", and follow up from there.

https://tools.ietf.org/html/rfc1122

Jonathan.

0

TCP does not send acknowledgements in response to dropped packets. I believe what you are asking is, at what point should a sender retransmit a segment.

In a typical TCP implementation there is a designated 'timeout' period, and if the acknowledgement is not received by that time or if three duplicate acknowledgements of a higher sequence number are received, than the original segment it is retransmitted.

After three duplicate ACKs have been received by the sender or once the 'timeout' period has passed, it is assumed that the packet has been dropped. This is why it is important to properly set your initial 'timeout' based on the estimated RTT (round trip time) of a packet. See the following to understand how to set your initial timeout: https://www.quora.com/How-does-TCP-round-trip-time-RTT-estimation-work-How-different-is-the-implementation-across-operating-systems

Once you can grok how to set, and subsequently increase your 'timeout' period, you will be able to solve your problem. Also remember to retransmit once you have received three duplicate ACKS, as at this point, most likely the packet has been dropped.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.