TCP from handshake to teardown
Summary
Hannes Mehnert explains TCP in interaction with IP, UDP and ICMP, as well as connection setup, states, teardown, tuning and congestion control. Reliability comes from state machines, timers and feedback rather than from a reliable network. Many apparent application errors can only be explained through TCP states and packet flows.
Ideas
- The three-way handshake synchronises the sequence numbers of both endpoints.
- Acknowledgements and retransmissions create a reliable byte stream.
- Flow control protects receivers, while congestion control takes the network into account.
- Connection teardown handles both data directions independently.
Recommendations
- Analyse problematic connections with tcpdump or Wireshark on both sides.
- Distinguish between receive window, packet loss and network congestion when diagnosing.
References
Links to the original source and the Web Archive open in a new tab.