Interview Prep/Networking/Performance, MTU, Latency & Tools

What does the TCP three-way handshake look like in a capture?

BeginnerScenarioPerformance, MTU, Latency & Tools
Answer

Situation read → Reading SYN, SYN-ACK, ACK in tcpdump helps spot where a connection fails.

What I'd do →

  1. Client sends SYN, server returns SYN-ACK, client sends ACK
  2. In tcpdump look for flags [S], [S.], [.]
  3. Only [S] repeated means packets are dropped or the server is unreachable
  4. [R.] after [S] means the port is closed
  5. Capture with tcpdump -ni eth0 'host 10.0.1.5 and tcp port 22'

Why → The pattern of flags tells you whether the problem is a drop, a reject or an application issue.

Interview tip → Say repeated SYN means firewall drop; RST means closed port.

All Networking questions Roadmap: Networking for DevOps

More on Performance, MTU, Latency & Tools