Tell me more ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

When I do netstat -a on my Windows machine, I get a listing of the ports with one of the four states:

  • LISTENING
  • CLOSE_WAIT
  • TIME_WAIT
  • ESTABLISHED

What do CLOSE_WAIT and TIME_WAIT mean/indicate?

share|improve this question

3 Answers

up vote 11 down vote accepted

Due to the way TCP/IP works connections can not be closed immediately. Packets may arrive out of order or be retransmitted after the connection has been closed. CLOSE_WAIT indicates that the other side of the connection has closed the connection. TIME_WAIT indicates that this side has closed the connection. The connection is being kept around so that any delayed packets can be matched to the connection and handled appropriately. The connections will be removed when they time out within four minutes. See http://en.wikipedia.org/wiki/Transmission_Control_Protocol for more details.

share|improve this answer

Basically the "WAIT" states mean that one side closed the connection but the final confirmation of the close is pending.

See e.g. this diagram of TCP states for details:

http://www.jxos.org/Projects/TCP/tcpstate.html

share|improve this answer

RFC's are your friend. RFC 793, RFC 1337, RFC 1323.

share|improve this answer
5  
It would be better if you would extract the interesting parts from these, to provide a directly useful answer. – Gnoupi Aug 9 '10 at 14:06
Last I looked there were limits on the amount of text that could be posted or I would have. I swag'ed the amount of text that would be needed. – dbasnett Aug 9 '10 at 16:01
1  
You could at least try to summarise the relevant information in your own words. – Indrek Dec 12 '12 at 22:59

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.