"Time Wait" with TCP connection setup
Why with TCP connections do I have to wait five seconds after setup until I can initiate connection setup again?
This behavior is due to the interaction of the RFCs describing the TCP/IP.
RFC 793 describes the TCP protocol with its mechanisms; the connection setup is also defined in it.
A detailed definition of this mechanism is also available in RFC 1337, which deals specifically with the "TIME-WAIT" time factor.
The calculations and the proposed values for this factor are described in this RFC.
The time factor is intended to prevent messages - which are theoretically still in the network and transferred late to the node via the router - from interfering with the connection clear-down and setup.
In RFC 1337 the time factor is assigned some of the proposed values ranging from 2 minutes to 4.55 hours.
In order to avoid such time periods, a fixed value of 5 seconds has be set in the CP firmware.
During this time it is not possible to set up a new connection via a port whose connection has just been cleared down or receive a message. Such messages are acknowledged with the last acknowledge message that closed the connection.
Connection setup after connection interrupt