Explain the full TCP connection lifecycle from three-way handshake through graceful shutdown, covering socket states, TIME_WAIT behavior, half-open connections, and how connection tracking works at the kernel level.
## Problem
Explain the complete lifecycle of a TCP connection from initial handshake through data transfer to connection teardown. Your explanation should cover the three-way handshake mechanics, all TCP socket states and their transitions, the differences between graceful (FIN) and abortive (RST) connection closure, and the purpose and implications of the TIME_WAIT state. Include how the Linux kernel manages connection tracking, SYN queues, and accept queues.
Sign up to access the full problem
Design canvas, rubric, hints, and model solutions.