TCP Connection Termination

This page describes the TCP connection termination process.

TCP Connection Termination is implemented as follows:

  1. One computer sends a FIN packet to the other computer including an ACK for the last data received (N).
  2. The other computer sends an ACK number of N+1
  3. It also sends a FIN with the sequence number of X.
  4. The originating computer sends a packet with an ACK number of N+1. The connection is closed.

Another way to close the connection is for one computer to send a packet with the RST (reset) bit set which will tell the other computer to immediately terminate the connection.