Interview Prep/Networking/Network Models, TCP, UDP & Ports

What are the TCP connection states you see in ss output?

IntermediateConceptNetwork Models, TCP, UDP & Ports
Answer

LISTEN, SYN-SENT, SYN-RECV, ESTABLISHED, FIN-WAIT-1/2, CLOSE-WAIT, LAST-ACK, CLOSING and TIME-WAIT. The ones that signal trouble: many SYN-RECV suggests a SYN flood or a full accept queue, many CLOSE-WAIT means the application is not closing sockets after the peer did (a bug in your code), many TIME-WAIT on one host is usually benign.

ss -tan state close-wait | wc -l
All Networking questions Roadmap: Networking for DevOps

More on Network Models, TCP, UDP & Ports