Interview Prep/Networking/Connectivity: refused, timed out, no route

A connection to a remote port hangs for exactly 21 seconds on Windows clients or ~127 seconds on Linux before failing.

IntermediateTroubleshootingConnectivity: refused, timed out, no route
Answer

Likely causes → SYN retransmissions with exponential backoff. Linux default net.ipv4.tcp_syn_retries = 6 gives roughly 127 s. This always means silent drops, never a reachable closed port.

Diagnose →

sysctl net.ipv4.tcp_syn_retries
sudo tcpdump -ni any 'tcp[tcpflags] == tcp-syn' and host <dst>

Fix → Find the dropping filter. In the app, set connect timeouts explicitly rather than relying on kernel retries.

Prevent → Every client library call gets a connect timeout of a few seconds.

All Networking questions Roadmap: Networking for DevOps

More on Connectivity: refused, timed out, no route