11 State Transition Diagram CLOSED LISTEN SYN_RCVDSYN_SENT ESTABLISHED CLOSE_WAIT LAST_ACKCLOSING TIME_WAIT FIN_WAIT_2 FIN_WAIT_1 Passive openClose Send/SYN SYN/SYN + ACK SYN + ACK/ACK SYN/SYN + ACK ACK Close/FIN FIN/ACKClose/FIN FIN/ACK ACK + FIN/ACK Timeout after two segment lifetimes (2 * MSL) FIN/ACK ACK Close/FIN Close CLOSED Active open/SYN Open  Active open A client connect( )  Passive open A server listen( ) Can change active Close  Active close A client or a server First close( ) Both side can be active  Passive close A client or server close( ) in response to the first close( ) CSS432: End-to-End Protocols