TCP FIN RST

TCP FIN RST

TCP FIN and RST are 2 ways in which TCP connection may be terminated. While TCP FIN is pretty softer and graceful way of terminating the TCP connection, TCP RST is pretty straightforward and tends to immediately terminate the connection ( TCP RST being less chatty than TCP FIN packet)

After establishing TCP 3-way handshake and successful data transfer, A FIN packet is usually sent from server or client to terminate a connection. A RST packet is sent either in the middle of the 3-way handshake when the server rejects the connection or is unavailable OR in the middle of data transfer when either the server or client rejects further communication bypassing the formal 4-way TCP connection termination process.

Below table articulates the difference between both FIN and RST packet types as part of TCP connection termination process -