By default, Wireshark’s TCP dissector tracks the state of each TCP session and provides additional information when problems or potential problems are detected. Analysis is done once for each TCP packet when a capture file is first opened. Packets are processed in the order in which they appear in the packet list. You can enable or disable this feature via the “Analyze TCP sequence numbers” TCP dissector preference.
For analysis of data or protocols layered on top of TCP (such as HTTP), see Section 7.8.3, “TCP Reassembly”.
TCP Analysis flags are added to the TCP protocol tree under “SEQ/ACK analysis”. Each flag is described below. Terms such as “next expected sequence number” and “next expected acknowledgment number” refer to the following:
Set when the expected next acknowledgment number is set for the reverse direction and it’s less than the current acknowledgment number.
Set when all of the following are true:
Set when all of the following are true:
Supersedes “Out-Of-Order” and “Retransmission”.
Set when the segment size is zero or one, the current sequence number is one byte less than the next expected sequence number, and none of SYN, FIN, or RST are set.
Supersedes “Fast Retransmission”, “Out-Of-Order”, “Spurious Retransmission”, and “Retransmission”.
Set when all of the following are true:
Supersedes “Dup ACK” and “ZeroWindowProbeAck”.
Set when all of the following are true:
Supersedes “Retransmission”.
Set when the SYN flag is set (not SYN+ACK), we have an existing conversation using the same addresses and ports, and the sequence number is different than the existing conversation’s initial sequence number.
Set when the current sequence number is greater than the next expected sequence number.
Checks for a retransmission based on analysis data in the reverse direction. Set when all of the following are true:
Supersedes “Fast Retransmission”, “Out-Of-Order”, and “Retransmission”.
Set when all of the following are true:
Set when the segment size is non-zero, we know the window size in the reverse direction, and our segment size exceeds the window size in the reverse direction.
Set when all of the following are true:
Set when the receive window size is zero and none of SYN, FIN, or RST are set.
The window field in each TCP header advertises the amount of data a receiver can accept. If the receiver can’t accept any more data it will set the window value to zero, which tells the sender to pause its transmission. In some specific cases this is normal — for example, a printer might use a zero window to pause the transmission of a print job while it loads or reverses a sheet of paper. However, in most cases this indicates a performance or capacity problem on the receiving end. It might take a long time (sometimes several minutes) to resume a paused connection, even if the underlying condition that caused the zero window clears up quickly.
Set when the sequence number is equal to the next expected sequence number, the segment size is one, and last-seen window size in the reverse direction was zero.
If the single data byte from a Zero Window Probe is dropped by the receiver (not ACKed), then a subsequent segment should not be flagged as retransmission if all of the following conditions are true for that segment:
This affects “Fast Retransmission”, “Out-Of-Order”, or “Retransmission”.
Set when the all of the following are true:
Supersedes “TCP Dup ACK”.
Some captures are quite difficult to analyze automatically, particularly when the time frame may cover both Fast Retransmission and Out-Of-Order packets. A TCP preference (Fast Retransmission supersedes Out-of-Order interpretation) allows to switch the precedence of these two interpretations at the protocol level.
In addition, interpretations may be different whether the capture was performed server side, client side or anywhere in the middle. While the historical classification algorithm is comparing new packets to almost previous, adjacent Duplicate ACKs, the “Enable Distal Disambiguation Algorithm” TCP preference allows a more neutral interpretation if the iRTT is known (the 3WHS is present in the capture). In this case, the time interval between a missing packet is compared to its supposed retransmission and if it’s between 0,8 and 2,4 it will be considered as a Fast Retransmission if enough Duplicate ACKs were seen. In other cases (not so many Duplicate ACKs seen), packets are considered as a Retransmission (RTO) if the time is over the 2,4 ratio. Otherwise, they are Out-of-Order ones.
| Note | |
|---|---|
|
While RFC 6675 is taken into account in Wireshark’s implementation of Duplicate ACKs, RFC 5827 and 8985 aren’t for now. |
TCP conversations are said to be complete when they have both opening and closing handshakes, independently of any data transfer. However, we might be interested in identifying complete conversations with some data sent, and we are using the following bit values to build a filter value on the tcp.completeness field :
For example, a conversation containing only a three-way handshake will be found with the filter 'tcp.completeness==7' (1+2+4) while a complete conversation with data transfer will be found with a longer filter as closing a connection can be associated with FIN or RST packets, or even both : 'tcp.completeness==31 or tcp.completeness==47 or tcp.completeness==63'
Another way to select specific conversation values is to filter on individual flags, the summary field, or a combination of them. Thus, '(tcp.completeness.fin==1 || tcp.completeness.rst==1) && tcp.completeness.str contains "DASS"' will find all 'Complete, WITH_DATA' conversations, while the 'Complete, NO_DATA' ones will be found with '(tcp.completeness.fin==1 || tcp.completeness.rst==1) && tcp.completeness.data==0 && tcp.completeness.str contains "ASS"'.
The fields "tcp.stream.client.contiguity_count" and "tcp.stream.server.contiguity_count" track the discontinuities of the two TCP streams of a conversation. Any number other than 1 says that either there is no TCP segment at all (0), or that some data is missing (2+). We are only counting the 100 first discontinuities as in most cases it’s enough to conclude the capture cannot be used for data extraction or there was a serious capture issue.