Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I use firefox to visit a web server running on a computer on my LAN. I notice that sometimes TCP doesn't acknowledge the packets it receives. For example, in the following captured packets:

https://docs.google.com/file/d/0B-LaBUj9KtQhS0RYNXF1RjZTa2M/edit?usp=sharing

the 7th 9th and 11th packets are duplicated ACK, the browser receives TCP packets 6,8 and 10, but the browser TCP stack doesn't acknowledge the received packets, why?

share|improve this question
1  
Possible duplicate of: Why is client side tcp sometimes not sending ACKs, leading to retransmits? (on Stack Overflow). I also don't think this is constructive as it sits, as it really depends on so many things (what software/browser is being used, the NIC driver, the inner workings of the OS's TCP/IP stack, and how any network equipment routes the data). –  Breakthrough Jun 19 '13 at 20:41
    
it is in LAN, and firefox. The question in stackoverflow is not answered... –  misteryes Jun 19 '13 at 21:05
1  
@misteryes Firefox is not involved at all in this. Individual packets are handled by the network (LAN), NIC driver, OS and the TCP/IP stack. If I can remember correctly, it's possible for an ACK to respond for multiple packets, i.e., the ACK for packets 10 and 11 might be combined into a single ACK packet. –  Darth Android Jun 19 '13 at 21:54
    
@breakthrough I think the underlying problem is quite instructive as it exposes some of the more subtle aspects of TCP and thereby challenges common misconceptions. –  artistoex Jun 28 '13 at 10:33

2 Answers 2

It does.

You're probably seeing TCP Delayed Acknowledgement, in which the recipient can delay up to 500ms in order to send a combined ACK packet which acknowledges multiple packets that were received. This is good for reducing overhead when you have a lot of packets and don't particularly care about latency.

This can increase perceived latency, and so this feature is what you see disabled in many "TCP Fixes" that you can find for games: by setting the TCP_ACKNOWLEDGE_DELAY to 0, Windows will send all ACKs immediately instead of trying to group them. This has the downside of creating more network traffic, with little benefit. It gives the appearance of lowering latency, but the data packets aren't sent any faster.

share|improve this answer
    
did you see my captured packets? I think TCP delayed ACK can't explain the captured packets –  misteryes Jun 20 '13 at 9:06
    
The comment about ack delay also ignores Nagle. When the early ack arrives, it tells the sending site to send the next packet immediately. This does lower latency. –  MSalters Jun 28 '13 at 12:23

It doesn't.

It just acknowledges each byte of the stream, which is quite different. For some reason, the receiver's TCP (the one with the browser running on top of it) misses segment #6. As the receiver immediately requests its retransmission, it must have received it with a checksum mismatch.

All subsequently received segments (8, 10, 12) are out-of-order segments and trigger duplicate acks, woose purpose is to request retransmission of segment #6. As the communcation path between receiver and sender experiences some latency, the sender notices this a bit late, reduces its pipe length (aka congestion window) and retransmits the data contained in segment #6.

Then another interesting thing happens in segment #15: the receiver does not send a cumulative acknowledgement over 8, 10, 12 but acknowledges only segment #14 which means it has discarded 8, 10 and 12, either because they were as well subject to data corruption or because it's a very simple TCP implementation. You can enable TCP checksum evaluation in wireshark, (it fails here at each outgoing segment due to the OS leaving the checksum field invalid for the ethernet card to evaluate) and it confirms the former interpretation: checksum errors on 8, 10, 12. There must be a very noisy link on the path.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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