コンテンツへスキップ
uencoder

TCP Protocol リファレンス

リファレンス 用 TCP: three-way handshake, flow control, congestion control, および state machine.

Connection Management

TCP establishes connections via a three-way handshake: SYN, SYN-ACK, ACK. Connection teardown uses FIN-ACK sequences, with TIME_WAIT state lasting 2*MSL. The state machine includes LISTEN, SYN_SENT, SYN_RCVD, ESTABLISHED, FIN_WAIT, CLOSE_WAIT, and TIME_WAIT states. Sequence numbers track byte positions; acknowledgments confirm receipt. TCP options negotiate MSS, window scaling, timestamps, and SACK during handshake.

handshake
SYN, SYN-ACK, ACK
3-way
TIME_WAIT
2*MSL duration
resource cleanup
options
MSS, SACK, window scale
handshake negotiation

Flow and Congestion Control

Flow control uses a sliding window advertised by the receiver to prevent overwhelming it. Congestion control (Cubic, BBR, Reno) probes for bandwidth and backs off on loss. Slow start, congestion avoidance, fast retransmit, and fast recovery are the classic phases. SACK (Selective ACK) improves loss recovery by acknowledging non-contiguous ranges. ECN (Explicit Congestion Notification) signals congestion without packet loss. Nagle's algorithm coalesces small segments.

flow control
Sliding window
receiver-driven
congestion
Cubic/BBR/Reno
sender-driven
SACK
Selective ACK
non-contiguous ranges

関連ツール

参考链接