The FIN flag is a TCP control bit set to 1 when a host has finished sending data and is closing its direction of the connection. section 22.2.1
A typical TCP termination sequence works as follows:
- One host sends a TCP segment with FIN after completing its data exchange. section 22.2.1
- The other host acknowledges that FIN with an ACK segment, then sends its own FIN when it is finished. section 22.2.1
- The first host acknowledges the second FIN, producing the typical FIN, ACK, FIN, ACK four-way handshake. section 22.2.1 section 22.3
Exam sequence
After connection establishment and data exchange, PC1 sends FIN. SRV1 replies with ACK, sends its own FIN, and receives PC1's final ACK. Remember: SYN, SYN-ACK, ACK establishes TCP; FIN, ACK, FIN, ACK typically terminates it. section 22.2.1
