Interview Q&A / Computer Networks

BeginnerQuick answer1 min readUpdated 3 Oct 2026

What do the TCP flags SYN, ACK, FIN and RST mean?

SHORT ANSWER

SYN starts a connection and syncs sequence numbers, ACK acknowledges received data, FIN politely closes one direction, and RST aborts the connection immediately. PSH asks the receiver to hand data to the app without waiting.

Explain it simply

Treat a TCP connection like a phone call. SYN is dialling, ACK is "yes, got that", FIN is "I have nothing more to say, bye", and RST is slamming the phone down because you got a wrong number.

Example

text
SYN        start; carries initial sequence number
ACK        acknowledgement number is valid (set on almost every packet after SYN)
FIN        sender has finished sending
RST        reset: connection refused or broken, drop everything
PSH        deliver to application now

When you connect to a port where nothing is listening, the server's OS replies with RST, and you see "connection refused". If a firewall silently drops the SYN instead, you see no reply and the attempt times out. That difference helps diagnose problems: refused means the host is reachable but the port is closed, while a timeout suggests filtering or an unreachable host.

An RST also arrives if one side crashed and the other keeps sending on the old connection.

What to say in the interview

"SYN opens, ACK confirms, FIN closes gracefully, RST aborts. A reset means connection refused or an invalid connection, while silence usually points to a firewall dropping packets."

Common mistakes

  • Thinking RST and FIN are the same. FIN is orderly; RST discards unsent data.

#tcp#flags#connection

Related questions

Practise more Computer Networks questions

Test your recall with short answers, then return to the detailed explanations when you need context.

Open Computer Networks quick answers →

Get new questions like this by email

One short email when something new and useful lands. No spam, unsubscribe in one tap.

By subscribing you agree to the Privacy Policy.