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

Connections to a server alternate between working and "Connection refused" on every other attempt.

IntermediateTroubleshootingConnectivity: refused, timed out, no route
Answer

Likely causes → The name or VIP maps to two backends and one has the service down; a load balancer with one dead target and no health check; duplicate IP on the subnet (two MACs answering ARP).

Diagnose →

dig +short app.internal                 # multiple A records?
for i in $(seq 10); do curl -s -o /dev/null -w '%{remote_ip} %{http_code}\n' http://app.internal; done
arping -c 4 -I eth0 10.0.1.50           # replies from two MACs = duplicate IP

Fix → Restart or remove the bad backend; fix the health check; remove the duplicate IP assignment.

Prevent → Use DHCP/IPAM to avoid manual IP reuse; health checks on every pool.

All Networking questions Roadmap: Networking for DevOps

More on Connectivity: refused, timed out, no route