|
figure c: The Life-Cycle of TCP/IP Connections
In the process of opening and closing, a TCP connection progresses
through a series of states, as illustrated at right.
An HTTP connection is a type of TCP/IP connection.
It follows the TCP/IP life-cycle.
A connection opens with a pair of SYNchronization messages.
It closes with a pair of FINish messages.
The messages are in pairs because they go one in each direction.
This is the so-called "handshake" between two TCP/IP stacks.
Note that each state name is associated with a code number, "1 closed" for example.
That code is the value used by an SNMP MIB
(simple network management protocol, management information base).
|
| | | |
| Remote, Client* |
|
Local, Server* |
| *or vice-versa, though requests typically originate at clients. |
| | |
| |
2 Listening
Awaiting connection request.
|
3 Syn-Sent
Sent connection-request.1
Awaiting acknowledgement.1
Awaiting connection-request.2
|
 |
|
Received acknowledgement.1
Received connection-request.2
Sent acknowledgement.2
|
|
4 Syn-Received
Received connection-request.1
Sent acknowledgement.1
Sent connection-request.2
Awaiting acknowledgement.2
|
| | |
5 Established
The connection is open.
Data moves both directions.
|
 |
5 Established
Received acknowledgement.2
The connection is open.
Data moves both directions.
|
| | |
6 Fin-Wait.1
Sent close-request.a
Awaiting acknowledgement.a
Awaiting close-request.b
|
 |
|
|
|
8 Close-Wait
Received close-request.a
Sent acknowledgement.a
When finished sending data,
will send close-request.b
|
7 Fin-Wait.2
Received acknowledgement.a
Still awaiting close-request.b
|
 |
|
| or |
|
|
10 Closing
Received close-request.b
Sent acknowledgement.b
Still awaiting acknowledgement.a
|
 |
9 Last-Ack
Sent close-request.b
Awaiting acknowledgement.b
|
| | |
11 Time-Wait
Received acknowledgement.a
Received close-request.b
Sent acknowledgement.b
Allowing time for delivery
of acknowledgement.b
|
 |
|
| | |
1 Closed
A "fictional" state;
there is no connection.
|
|
2 Listening
Awaiting connection request.
|
| | |
|