This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

When does delayed ack start?

0
2

I am reading Stevens, Chappell and some Microsoft articles and I am not sure if I have a clear understanding on when delayed acks start.

I think Stevens says the timer is started at basically PC boot up and when a packet arrives needing a ACK a flag is set, so this could occur any where from 200ms to 0ms. So a delayed ack packet can be seen say at 10ms.

But some Microsoft articles seem to say the delayed ack timer starts at the arrival of the packet so would be 200ms from that point.

Is it one or the other or might it depend on the implementation?

Thanks for all answers.

SW

asked 28 Jun '11, 19:24

swjsds's gravatar image

swjsds
1121
accept rate: 0%


One Answer:

3

Short answer: The timer starts at packet arrival.

Longer answer: RFC 1122 says two things about Delayed ACKs:

  1. In a stream of full-sized segments, there should be an ACK for at least every second segment.
  2. An ACK should not be excessively delayed; in particular the delay must be less than 0.5 seconds.

Most systems set the delay at 200 ms.

So, if delayed ACK is implemented, and it's a stream of full-sized segments, the receiver will send ACKs for packets 2, 4, 6, 8, 10, 12, etc. If there were no delayed ACK timer, what would happen if there was an odd number of packets? Suppose there were 5 packets. The receiver would do nothing when packet 1 arrives, ACK packet 2, do nothing when packet 3 arrives, ACK packet 4, do nothing when packet 5 arrives, and then be stuck waiting for packet 6 to arrive.

What happens with the delayed ACK timer?

Packet 1 arrives: Start the 200 ms delayed ACK timer. Before the timer expires,

Packet 2 arrives: Send an ACK

Packet 3 arrives: Start the delayed ACK timer. Before the timer expires,

Packet 4 arrives: Send an ACK

Packet 5 arrives: Start the delayed ACK timer. After 200 ms, the timer expires, send an ACK.

answered 28 Jun '11, 21:41

Jim%20Aragon's gravatar image

Jim Aragon
7.2k733118
accept rate: 24%

2

I feel good that I covered this in Sharkfest! :) At least it's apropos since people are asking about it! MS does not require full MSS packets. So two tiny packets arriving back to back is enough to trigger an immediate ACK (no delayed ack required). Some Unix systems required two full MSS packets before ack'ing. So if only one packet arrives, or two small (less than full MSS) packets arrive, delayed ack timers will be honored. The values range from 50ms, 75ms, 100ms, 150ms or 200ms.

Stevens and Comer can be interpreted two different ways, so I don't blame anyone for being confused!

HSB

(29 Jun '11, 06:04) hansangb