Production engineering guide for network troubleshooting covering patterns, implementation strategies, and operational best practices.
Network troubleshooting is the practice of diagnosing and resolving connectivity issues across networks, from local subnets to globally distributed systems. It matters when a service is unreachable, latency is high, packets are dropped, or a client reports intermittent failures—especially when the problem spans multiple layers, services, and geographic regions.
When a client cannot reach a service, begin with basic reachability checks using ping and traceroute.
ping -c 4 -W 2 example.com
-c 4: send four ICMP echo requests.-W 2: wait up to 2 seconds for each reply.If ping fails, use traceroute to identify where the path breaks:
traceroute -m 30 -q 3 -w 5 example.com
-m 30: maximum hop count of 30.-q 3: send three probes per hop.-w 5: wait 5 seconds for each probe.A failure at a hop indicates a network segment failure. A consistent increase in latency or packet loss at a specific hop suggests congestion, routing issues, or a bottlenecking device.
Check the network stack using tcpdump on the server:
tcpdump -i eth0 -n -s 0 -v -w /tmp/traceroute.pcap 'host example.com'
-i eth0: capture on the primary interface.-n: do not resolve hostnames.-s 0: capture full packet size.-v: verbose output.-w /tmp/traceroute.pcap: save to file for later analysis.Examine the packet captures with tshark:
tshark -r /tmp/traceroute.pcap -T fields -e frame.number -e ip.src -e ip.dst -e tcp.flags -e tcp.window_size
Look for:
High latency manifests as slow response times, especially in stateful services or real-time applications. Use mtr (My Traceroute) for real-time path analysis:
mtr -c 100 -r -l -i 1 example.com
-c 100: run for 100 iterations.-r: report mode (summary format).-l: continuous mode.-i 1: interval of 1 second between probes.Watch for:
Use curl to measure end-to-end HTTP latency:
curl -w "@latency-format.txt" -o /dev/null -s http://example.com
Where latency-format.txt contains:
time_namelookup: %{time_namelookup}\n
time_connect: %{time_connect}\n
time_appconnect: %{time_appconnect}\n
time_pretransfer: %{time_pretransfer}\n
time_redirect: %{time_redirect}\n
time_starttransfer: %{time_starttransfer}\n
time_total: %{time_total}\n
This reveals:
time_namelookup: DNS resolution time.time_connect: TCP handshake time.time_appconnect: TLS handshake time.time_starttransfer: time to first byte (TTFB).time_total: total request duration.A high time_appconnect suggests TLS handshake issues—check for:
Packet loss and jitter are common in video, voice, and real-time applications. Use ping with large payloads and burst mode:
ping -c 100 -s 1472 -i 0.1 -W 3 example.com
-c 100: 100 ping packets.-s 1472: payload size of 1472 bytes (typical for VoIP).-i 0.1: send a packet every 0.1 seconds (10 Hz).-W 3: wait up to 3 seconds per reply.Examine the output:
Use iperf3 to measure bandwidth, loss, and jitter under sustained load:
iperf3 -c example.com -t 60 -i 1 -u -b 1M -l 1472
-c example.com: connect to server.-t 60: run for 60 seconds.-i 1: send interval every 1 second.-u: use UDP.-b 1M: send at 1 Mbps.-l 1472: packet size of 1472 bytes.Key metrics:
When clients cannot resolve hostnames, inspect DNS query behavior using dig and nslookup.
dig +time=5 +retry=3 +dnssec example.com
+time=5: timeout after 5 seconds.+retry=3: retry up to 3 times on timeout.+dnssec: include DNSSEC validation.Check:
Query time: how long the DNS query took.SERVER: which DNS server responded.ANSWER SECTION: returned records.AUTHORITY SECTION: authoritative servers.ADDITIONAL SECTION: additional records like glue records.Use systemd-resolve to inspect local DNS resolver state:
resolvectl status
Look for:
Current DNS Server: which upstream resolver is active.DNS Servers: list of configured servers.DNS Domain: which domains are resolved via specific servers.DNSSEC: status of DNSSEC validation.Check systemd-resolved logs:
journalctl -u systemd-resolved.service -f
Common issues:
Use tcpdump to capture DNS queries:
tcpdump -i any -n -s 0 -v -w /tmp/dns.pcap 'port 53'
Then analyze with tshark:
tshark -r /tmp/dns.pcap -T fields -e dns.qry.name -e dns.qry.type -e dns.aa -e dns.ad -e dns.rcode
Look for:
dns.rcode values:NOERROR: success.NXDOMAIN: domain does not exist.SERVFAIL: server failure.REFUSED: request refused.dns.aa: authoritative answer.dns.ad: authenticated data (DNSSEC).When a service is up but slow or intermittent, examine TCP connection state using ss and netstat.
ss -tuln -o state established
-tuln: show TCP, UDP, listening, and numeric output.-o: show detailed options including timers.Inspect:
Recv-Q: receive queue backlog.Send-Q: send queue backlog.Timer: connection timer state (e.g., timewait, keepalive, delayedack).Check for:
Use tcpdump to capture handshake and data flow:
tcpdump -i eth0 -n -s 0 -v -w /tmp/tcp-handshake.pcap 'tcp port 8080 and (tcp[13] & 0x02 != 0) or (tcp[13] & 0x01 != 0)'
tcp[13] & 0x02 != 0: capture packets with SYN flag set.tcp[13] & 0x01 != 0: capture packets with FIN flag set.Analyze:
Check TCP options:
WSOPT option present.TSOPT option present.Use ethtool to inspect interface-level TCP settings:
ethtool -c eth0
Look for:
rx-queue and tx-queue settings.coalesce parameters: interrupt coalescing thresholds.adaptive settings: automatic tuning.Use curl to probe service health with realistic payloads:
curl -H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"id": 123, "name": "test"}' \
-X POST http://example.com/api/v1/users \
-w "@health-check-format.txt" \
-o /dev/null -s
Include a health-check-format.txt file:
time_namelookup: %{time_namelookup}\n
time_connect: %{time_connect}\n
time_appconnect: %{time_appconnect}\n
time_pretransfer: %{time_pretransfer}\n
time_starttransfer: %{time_starttransfer}\n
time_total: %{time_total}\n
http_code: %{http_code}\n
Check:
http_code: status code (2xx, 4xx, 5xx).time_starttransfer: time to first byte (TTFB).time_total: full request duration.Use kubectl to check service reachability in Kubernetes:
kubectl get pods -l app=api-server -o wide
kubectl describe pod <pod-name>
kubectl exec <pod-name> -- curl -s http://localhost:8080/healthz
Inspect:
Events: recent container failures, image pulls.Conditions: readiness, liveness, and startup status.Use systemctl to verify service status and logs:
systemctl status api-server.service
journalctl -u api-server.service --since "1 hour ago" --follow
Look for:
Active: active (running) with since.Failed state with recent error messages.Unit file: location and contents of api-server.service.ping -M do -s 1472 example.com to test path MTU discovery.conntrack table: conntrack -L.tcpdump -i any 'tcp[tcpflags] & (tcp-ack|tcp-fin) == 0'.SessionID or Ticket, but server does not accept.openssl s_client -connect example.com:443 -servername example.com -sess_out /tmp/session.dig +all example.com to see full DNS resolution process.These techniques form a coherent workflow: start with reachability, drill into latency and packet loss, validate DNS and TCP, and close with end-to-end service checks. Each step builds on the previous, revealing hidden failures that only surface under real load.
This page was rewritten on 18 October 2026. It replaced a templated version that was not specific to its own title. How these pages are written and checked. If anything here is wrong, tell us at [email protected] and we will correct it.
We use cookies for analytics (Google Analytics) and advertising (Google AdSense) to improve your experience and support free content. Privacy Policy