| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
TCP Operational Overview and the TCP Finite State Machine (FSM) (Page 3 of 3) Finite State Machine Steps Represent the Stages of a Connection It's important to remember that this state machine is followed for each connection. This means at any given time TCP may be in one state for one connection to socket X, while in another for its connection to socket Y. Also, the typical movement between states for the two processes in a particular connection is not symmetric, because the roles of the devices are not symmetric: one device initiates a connection, the other responds; one device starts termination, the other replies. There is also an alternate path taken for connection establishment and termination if both devices initiate simultaneously (which is unusual, but can happen). This is shown by the color codings in Figure 210. Thus, for example, at the start of connection establishment, the two devices will take different routes to get to ESTABLISHED: one device (the server usually) will pass through the LISTEN state while the other (the client) will go through SYN-SENT. Similarly, one device will initiate connection termination and take the path through FIN-WAIT-1 to get back to CLOSED; the other will go through CLOSE-WAIT and LAST-ACK. However, if both try to open at once, they each proceed through SYN-SENT and SYN-RECEIVED, and if both try to close at once, they go through FIN-WAIT-1, CLOSING and TIME-WAIT roughly simultaneously.
Home - Table Of Contents - Contact Us The TCP/IP Guide (http://www.TCPIPGuide.com) Version 3.0 - Version Date: September 20, 2005 © Copyright 2001-2005 Charles M. Kozierok. All Rights Reserved. Not responsible for any loss resulting from the use of this site. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||