TCP connection termination closes a connection after data exchange. Each host sends a segment with the FIN flag and acknowledges the other host’s FIN with ACK. section 22.2.1
The usual termination sequence is:
- PC1 sends a FIN segment. section 22.2.1
- SRV1 acknowledges PC1’s FIN with an ACK segment. section 22.2.1
- SRV1 sends its own FIN segment. section 22.2.1
- PC1 replies with an ACK segment, completing the usual four-way handshake. section 22.2.1
PC1 and SRV1
After PC1 and SRV1 finish exchanging data, PC1 sends FIN. SRV1 returns ACK, sends FIN when ready, and PC1 returns ACK.
