SciFunLab Mascot
SciFunLab
Explore. Discover. Learn.
Home
Explore
Learn
Community
Videos
Donate
LEARN ✦ BUILD ✦ INNOVATE ✦ DISCOVER ✦ CREATE ✦
LEARN ✦ BUILD ✦ INNOVATE ✦ DISCOVER ✦ CREATE ✦
LEARN ✦ BUILD ✦ INNOVATE ✦ DISCOVER ✦ CREATE ✦
LEARN ✦ BUILD ✦ INNOVATE ✦ DISCOVER ✦ CREATE ✦
LEARN ✦ BUILD ✦ INNOVATE ✦ DISCOVER ✦ CREATE ✦
LEARN ✦ BUILD ✦ INNOVATE ✦ DISCOVER ✦ CREATE ✦
LEARN ✦ BUILD ✦ INNOVATE ✦ DISCOVER ✦ CREATE ✦
LEARN ✦ BUILD ✦ INNOVATE ✦ DISCOVER ✦ CREATE ✦
SYSTEM IDENTITY
SciFunLab Mascot
SciFunLab
Explore. Discover. Learn.

The interactive laboratory for the next generation of scientists.

MODULES
  • Science
  • Technology
  • Engineering
  • Mathematics
  • All Collections
COMM_LINK

> status: waiting_for_input

Join the Lab

Get weekly experiments sent to your inbox.

Servers Online|v3.0.0
VideosPrivacyTermsSupport

TCP 3-Way Handshake

💻
Client
CLOSED
🖥️
Server
LISTEN
Press Connect to establish a TCP connection step by step.
Client → Server: SYN seq=100
Server → Client: SYN-ACK seq=300, ack=101
Client → Server: ACK seq=101, ack=301
Client → Server: DATA GET /index.html
Server → Client: DATA + ACK 200 OK (page)
Client → Server: FIN seq=520
Server → Client: ACK ack=521
Server → Client: FIN seq=940
Client → Server: ACK ack=941

TCP 3-Way Handshake — Interactive Connection Simulator

Before any data flows, TCP opens a connection with a three-way handshake. This simulator steps through SYN → SYN-ACK → ACK, shows the sequence and acknowledgement numbers, tracks each side's TCP state, and then closes the connection with the FIN/ACK teardown.

What you can do in this simulation

  • Step through the SYN, SYN-ACK, and ACK messages that open a TCP connection
  • See the sequence and acknowledgement numbers, and why ACK = received seq + 1
  • Watch each side move through TCP states (CLOSED → SYN_SENT → ESTABLISHED)
  • Include the graceful teardown (FIN / ACK) to close the connection
  • Understand why three steps are needed to confirm both directions are ready

Concepts covered

TCP handshake · SYN · ACK · sequence numbers · connection setup · TCP state machine · FIN teardown

Free to use in your browser — no signup required. Found a bug or have an idea to make it better? Tell us.