AnimG 标志AnimG

TCP Three-Way Handshake

简介

Animates the complete TCP connection lifecycle between a client and server: the three-way handshake (SYN, SYN-ACK, ACK), data transfer phase, and four-way connection teardown (FIN, ACK, FIN, ACK). Each packet is labeled with its flags and sequence/acknowledgment numbers, and a timeline diagram tracks the full exchange.

TCP Three-Way Handshake

Description

Animates the complete TCP connection lifecycle between a client and server: the three-way handshake (SYN, SYN-ACK, ACK), data transfer phase, and four-way connection teardown (FIN, ACK, FIN, ACK). Each packet is labeled with its flags and sequence/acknowledgment numbers, and a timeline diagram tracks the full exchange.


Phases

# Phase Name Duration Description
1 Intro 3s Title, client and server boxes displayed
2 SYN 5s Client sends SYN with seq=0; packet travels to server
3 SYN-ACK 5s Server responds SYN-ACK with seq=0, ack=1
4 ACK 4s Client sends ACK; connection established
5 Data Transfer 8s Bi-directional data packets shown briefly
6 FIN Teardown 12s Four-way teardown: FIN→ACK→FIN→ACK
7 Timeline 8s Full timeline diagram shown from top to bottom
8 Outro 3s "Connection closed" displayed

Layout

+--------------------------------------------------+
|  Title: TCP Three-Way Handshake                  |
+--------------------------------------------------+
|                                                  |
|  [CLIENT]              [SERVER]                  |
|     |                     |                      |
|     |---SYN (seq=0)------>|                      |
|     |<--SYN-ACK (seq=0,   |                      |
|     |    ack=1)-----------|                      |
|     |---ACK (ack=1)------>|                      |
|     |                     |                      |
|     |=== data transfer ===|                      |
|     |                     |                      |
|     |---FIN-------------->|                      |
|     |<--ACK---------------|                      |
|     |<--FIN---------------|                      |
|     |---ACK-------------->|                      |
+--------------------------------------------------+

Area Descriptions

  • Left: CLIENT box with vertical timeline
  • Right: SERVER box with vertical timeline
  • Center: Animated packet arrows with labels
  • Timeline: Shows state transitions (CLOSED→SYN_SENT→ESTABLISHED→etc.)

Assets & Dependencies

  • Fonts: LaTeX / sans-serif
  • Manim version: ManimCE 0.19.1

Notes

  • Packets shown as animated arrows with flag labels
  • Sequence/ack numbers shown on each packet
  • Client state transitions labeled on left (CLOSED → SYN_SENT → ESTABLISHED → etc.)
  • Server state transitions labeled on right (LISTEN → SYN_RCVD → ESTABLISHED → etc.)
受众: Software Engineer类别: Cs
TCP Three-Way Handshake for Software Engineer in Cs | AnimG Library