Toolkit.
Simulator · Study Hall

TCP Handshake

Visualize the TCP three-way handshake and connection termination process.


Interactive
Push on the parts yourself.

The tcp handshake workspace from the original build will sit here — same logic, same controls, restyled for Study Hall. Prose below covers what you'll be able to do.

TCP establishes reliable connections using a three-way handshake (SYN, SYN-ACK, ACK). Watch packets flow between client and server, simulate packet loss, and understand retransmission behavior.

The handshake process

Client sends SYN with sequence number. Server responds with SYN-ACK, acknowledging the client and providing its own sequence. Client sends ACK, and the connection is established.

Handling failures

If any packet is lost, TCP uses timeouts and retransmissions. The simulator shows how lost SYN or ACK packets are detected and retransmitted to complete the connection.

Good for

  • Learning network protocols
  • Understanding connection latency
  • Debugging connection issues
  • Networking interview preparation

Questions people ask

Why three-way and not two-way?

Three-way handshake ensures both parties can send and receive, and it synchronizes sequence numbers. A two-way handshake cannot confirm the client can receive responses.

What is SYN flood attack?

Attackers send many SYN packets without completing handshakes, exhausting server resources. Defenses include SYN cookies and limiting half-open connections.