Interview Prep/Linux/Networking, SSH & Scheduling

Explain the TCP connection states you see in ss.

AdvancedConceptNetworking, SSH & Scheduling
Answer
  • LISTEN: waiting for connections.
  • SYN-SENT / SYN-RECV: handshake in progress.
  • ESTAB: open connection.
  • FIN-WAIT-1/2, CLOSING, TIME-WAIT: active closer side; TIME-WAIT lasts 60 s on Linux.
  • CLOSE-WAIT: the peer closed, but our app has not called close(). Growing CLOSE-WAIT is an application bug (leaked connections).
  • LAST-ACK: passive closer waiting for final ACK.
All Linux questions Roadmap: Linux

More on Networking, SSH & Scheduling