Pcornel
Browse topics
Options
Recent
Favorites
Networking · Technical reference

TCP Forensics Reference

Direct answer

TCP forensics is working out from a packet capture why a connection was slow, stalled or failed. The timing, sequence numbers, acknowledgments and window sizes show which side was waiting for what at each moment.

When to use this

Use it to test the claim "the network is slow": every pause belongs to the client, the server or the path, and a capture shows which.

First 30 seconds

1. Isolate one connection; read the handshake: round-trip time and options.

2. Find the gaps. Request acknowledged quickly but the response slow → server time.

3. Gap before the client's next request → client time.

4. Retransmissions, duplicate acknowledgments → the path.

5. Zero window → the receiving application. Reset → who sent it, after what?

Operational verification

capture at the right point → one connection isolated → handshake gives latency and options → each pause attributed to client, server or path → first anomaly identified → cause located

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
Protocol standard + deployed implementation
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformProtocol standard
Key commandtcpdump -ni eth0 -s 128 -w /tmp/case.pcap host 192.0.2.10 and tcp port 443
Scope / prerequisiteUse it to test the claim "the network is slow": every pause belongs to the client, the server or the path, and a captur…
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

2 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Verification workflow Verify boundary
tcpdump -ni eth0 -s 128 -w /tmp/case.pcap host 192.0.2.10 and tcp port 443
tshark -r /tmp/case.pcap -q -z conv,tcp
tshark -r /tmp/case.pcap -Y 'tcp.analysis.flags' | head -50
tshark -r /tmp/case.pcap -q -z io,stat,1,'tcp.analysis.retransmission'

The first writes a capture of one connection, keeping only the headers. conv,tcp lists each connection with its duration and bytes in each direction. The tcp.analysis.flags filter shows every packet the analyser flagged — retransmissions, duplicate acknowledgments, window events. The last counts retransmissions per second, showing when the trouble occurred.

Useful display filters in Wireshark: tcp.stream eq N, tcp.analysis.retransmission, tcp.analysis.zero_window, tcp.flags.reset == 1, tcp.time_delta > 1.

Known-good: a handshake at the path's normal latency, data flowing with steady acknowledgments, no flagged packets, and pauses that correspond to the application's own thinking time.

Step 2 Failure isolation workflow Narrow the fault
  • Long gaps before the server's responses; requests acknowledged promptly. Server processing time, not the network.
  • Long gaps before the client's requests. The client application or the user.
  • Retransmissions spread through the transfer. Loss on the path; capture at the other end to see in which direction.
  • Stalls with zero-window packets. The receiving application.
  • The handshake's round-trip time is itself high. Path latency: distance, or a congested or indirect route.
  • Everything looks clean and it is still slow. Many small request–response exchanges, each costing a round trip — an application design that suffers from latency.
  • The two ends' captures disagree. Something in between terminates or rewrites the connection: a proxy, load balancer or firewall.
  • Out-of-order and oversize packets throughout a host capture. Offloading artefacts; repeat the capture on the wire.
Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Command lookup Jump straight to Cisco syntax
Key points

Capture at both ends where possible; a capture on the sending host shows what was sent, not what arrived. The SYN to SYN-ACK delay is the path's latency — judge later delays against it. Start from the first anomaly; the rest are consequences.

Key checks
  • tcpdump -ni <if> -s 128 -w case.pcap host <ip> and tcp port <port> — headers of one connection.
  • tshark -r case.pcap -q -z conv,tcp — connections with duration and bytes.
  • tshark -r case.pcap -Y 'tcp.analysis.flags' — everything the analyser flagged.
  • Wireshark: Expert Information, the time/sequence graph, tcp.time_delta > 1.
ReferenceWhat it is1 section · depth on demand

Mental model

TCP forensics is the practice of working out, from a packet capture, why a connection was slow, stalled or failed. TCP records a great deal in every packet — timing, sequence numbers, acknowledgments, window sizes — and read in order, they show which side was waiting for what at each moment.

ReferenceWhy it matters1 section · depth on demand

Why it matters operationally

"The network is slow" is a claim a capture can test. In any slow exchange, time is being spent in one of three places: the client taking time to send, the server taking time to answer, or packets being delayed or lost in between. A methodical reading assigns each pause to one of those, which settles whether the network is involved at all.

ReferenceHow it works1 section · depth on demand

How it works

1. Capture in the right place. A capture shows what passed that point, at that time. On the sending host, it shows what was sent — not what arrived — and is distorted by the network card (oversized segments, checksums not yet filled in). The most reliable view comes from capturing at both ends, or on the wire between them.

2. Isolate one connection by its two addresses and ports.

3. Read the handshake. It gives two things. The options — segment size, window scale, selective acknowledgment — that apply to everything after. And the round-trip time: the delay between SYN and SYN-ACK, seen from the client side, is the latency of the path. Later delays are judged against it.

4. Find where time goes. Step through the exchange and look at the gaps.

GapWhose time it is
Between the server's response ending and the client's next requestThe client or the user
Between a request being acknowledged and the response startingThe server application
Between data being sent and its acknowledgment, beyond the round-trip timeThe network, or the receiver delaying acknowledgments

An acknowledgment that arrives promptly while the response takes seconds shows that the request got there quickly; the wait is in the server.

5. Look for the signs of trouble.

SignMeaning
Retransmissions, duplicate acknowledgmentsLoss or reordering on the path
Zero window, window fullThe receiver cannot keep up
Only large segments retransmittedAn MTU problem
A resetSomebody aborted; find out who and after what
Repeated SYNsThe connection attempt is unanswered
A long silence, then a resetAn idle timeout in between

6. Start from the first anomaly. Problems cascade: one loss causes duplicate acknowledgments, retransmissions and a slower rate. The earliest odd event is the cause; the rest are consequences.

Wireshark aids. Conversations (to pick the connection), Expert Information (a list of everything flagged), the TCP stream graphs — the time/sequence graph shows steady progress, stalls and retransmissions at a glance — and the columns for time since the previous packet in the stream.

ReferenceImportant terms & boundaries1 section · depth on demand

In depth

Building a TCP forensic timeline

TCP forensics reconstructs what happened to a connection from a packet capture. RFC 9293 provides the reference points. The handshake shows the round-trip time and the options negotiated. Sequence and acknowledgement numbers show what was sent and received. Window values show whether the receiver kept up. Flags show how the connection ended. In a slow exchange, time is spent in one of three places: the network (RTT and loss), the receiver (window), or the application (gaps where neither side sends).

A three-question method

QuestionEvidenceTypical answer
Is the network slow?Handshake RTT, retransmissions, duplicate ACKsHigh RTT or loss on the path
Is the receiver slow?Zero windows, window full, small advertised windowsThe application doesn't read fast enough
Is the application slow?Time between a request and the first byte of the response, with the network idleThe server is thinking

Wireshark filters for the timeline

FilterFinds
tcp.flags.syn==1Connection starts and options
tcp.analysis.retransmissionLost or delayed data
tcp.analysis.duplicate_ackGaps reported by the receiver
tcp.analysis.zero_windowReceiver stalls
tcp.time_delta > 0.2Pauses within a stream
tcp.flags.reset==1Aborts
host$ tshark -r slow.pcap -q -z conv,tcp | head -8
host$ tshark -r slow.pcap -Y "tcp.stream==7 && (tcp.analysis.flags || tcp.time_delta > 0.2)" -T fields -e frame.time_relative -e ip.src -e tcp.time_delta -e _ws.expert.message
0.000  10.110.0.64  0.000   Connection establish request (SYN)
0.084  10.30.0.15   0.083   ...
4.311  10.30.0.15   4.201   (no expert flag: gap before server response)
4.390  10.110.0.64  0.012   Duplicate ACK (#1)
host$ tshark -r slow.pcap -Y "tcp.stream==7" -T fields -e tcp.analysis.ack_rtt | sort -n | tail -3

In this example the handshake RTT is 83 ms. The server then takes 4.2 seconds to answer, with the network idle, so most of the delay is the application. The single duplicate ACK afterwards is a minor loss and doesn't explain the slowness.

Capture placement

LocationShows
Near the clientDelays as the user experiences them
Near the serverServer processing time without network RTT
Both, time-synchronisedExactly where packets are lost or delayed

Documented example, not captured output.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docProtocol standard + deployed implementation RFC 9293

Authoritative/upstream documentation reviewed for bounded claims in Network & Protocols → TCP Forensics Reference. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://www.rfc-editor.org/rfc/rfc9293.html · confidence 94%
Terminology layer

Terms & aliases

Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.

Aliases that resolve here
tcp analysistcp reset retransmissiontcp slow
Confirmation

Confirm action

Continue?