Link to home
Start Free TrialLog in
Avatar of expertblr
expertblr

asked on

TCP - TIME_WAIT

Hi,

    After a connection is closed the socket will be in TIME_WAIT state. Can someone please explain me in detail what exactly happens? I went through stevens "2.7 - Please explain the TIME_WAIT state" article and I couldn't understand it.  What all I know is - It is normal for a connection to be in TIME_WAIT state after it has been closed. I want to know why it is required and what happens in that period when it is finally released by the  server....


Thanks,
expertblr
Avatar of ravenpl
ravenpl
Flag of Poland image

After tcp strem is closed it enters TCP_WAIT because
- some packets may arrive that are destined to this connection (original packet was queued on some router, and was retransmitted)
- since it's not totally close, You can't(and it's good from point of TCP view, see first -) spawn identical connection - slot occupied
Avatar of expertblr
expertblr

ASKER

Thanks ravenpl..:), is it possible for you to  explain (with example) on this like how the FIN and ACK packets flow during that time....


Thanks again.
ASKER CERTIFIED SOLUTION
Avatar of ravenpl
ravenpl
Flag of Poland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks ravenpl...