0

I've been reading more about TCP and found out that since multiple flags can be set at once, basically every packet after the initial SYN has the ACK flag set, and serves as an acknowledgment of all the packets up to that point.

That sounds like a great and efficient idea! But wait, then why do I usually see individual ACK packets sent in TCP conversations? In fact, I often see an individual ACK sent, then immediately afterward the same machine sends out a data packet that also has ACK set, with the same acknowledgment number! The lone ACK and the data packet seem to be serving the same purpose!

What's the reason for sending ACK packets separately from the data? Are they more likely to get through network congestion faster or something?

1 Answer 1

3

Receiving segments and sending out ACKnowledgments is an ongoing process. The sender can summarily ACK segments, but it must not delay the ACKs too much to keep data flowing - only when data has been ACKed can the sender advance the sliding window and send more data.

Lone ACKs are often preferred (=advanced in the egress queue) by WAN routers (traffic shaping), so it might make sense to use them to maximize throughput. How exactly a host stack uses the TCP mechanism is up to its implementation.

4
  • Cool, so it's basically because small packets often get prioritized?
    – Nick S
    Feb 10, 2019 at 10:38
  • 1
    Not necessarily small packets, but ACKs especially.
    – Zac67
    Feb 10, 2019 at 10:50
  • Thanks! Just what I suspected. Would you mind if I edit your answer to clarify a little?
    – Nick S
    Feb 11, 2019 at 8:24
  • 1
    Go right ahead - if necessary I can reedit.
    – Zac67
    Feb 11, 2019 at 15:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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