socket state
The stage a TCP socket has reached in its lifecycle, such as LISTEN, SYN-SENT, ESTABLISHED or TIME-WAIT.
In more detail
A state is evidence about where a connection stopped. A client stuck in SYN-SENT sent its SYN but got no reply; ESTABLISHED means both ends can exchange bytes. ss shows the state of each socket, and comparing both endpoints explains a stalled exchange.
Example
client=SYN-SENT server=LISTEN next=reply points to a missing or blocked reply.Related terms
- TCP three-way handshake — The three messages that open a TCP connection: the client sends SYN, the server replies SYN-ACK, and the client answers ACK.
- SYN — The TCP flag meaning synchronize, set on the first packet a client sends to open a connection and on the server's reply.
- network socket — One end of a two-way network connection between programs, identified by an IP address and a port number.
- listening socket — A socket that has claimed a local address and port and is waiting to accept incoming connections.
Taught in
- The Handshake, And The States A Socket Passes Through — Linux Fundamentals & Systems Administration
- Firewalls: Default Deny, State And Rule Order — Linux Fundamentals & Systems Administration
- Twelve Lines, Ten Warnings: Dockerfile Instructions And hadolint — Docker Certified Associate (DCA) Exam Prep