Appendix A: TCP Connect States

The following information is taken from RFC793 and explains the TCP/IP connect states. A connection progresses through a series of states during its lifetime. The states are listed in the table below. Note that CLOSED is a fictional state because it represents the state when there is no TCB, and therefore, no connection.

LISTEN

represents waiting for a connection request from any remote TCP and port.

SYN-SENT

represents waiting for a matching connection request after having sent a connection request.

SYN-RECEIVED

represents waiting for a confirming connection request acknowledgment after having both received and sent a connection request.

ESTABLISHED

represents an open connection, data received can be delivered to the user. The normal state for the data transfer phase of the connection.

FIN-WAIT-1

represents waiting for a connection termination request from the remote TCP, or an acknowledgment of the previous connection termination request.

FIN-WAIT-2

represents waiting for a connection termination request from the remote TCP.

CLOSE-WAIT

represents waiting for a connection termination request from the local user.

CLOSING

represents waiting for a connection termination request acknowledgment from the remote TCP.

LAST-ACK

represents waiting for an acknowledgment of the connection termination request previously sent to the remote TCP (which includes an acknowledgment of its connection termination request).

TIME-WAIT

represents waiting for enough time to pass to be sure the remote TCP received the acknowledgment of its connection termination request.

CLOSED

represents no connection state at all.

A TCP connection progresses from one state to another in response to events. The events are:

·         the user calls: OPEN, SEND, RECEIVE, CLOSE, ABORT, and STATUS

·         the incoming segments, particularly those containing the SYN, ACK,

  RST and FIN flags, and timeouts.