🌐

Network Diagnostics

Verified

by Community

Systematic network troubleshooting using ping, traceroute, dig, netstat, and tcpdump with interpretation guidance for diagnosing connectivity, DNS, and performance problems.

systemnetworkdiagnosticstroubleshootingDNSconnectivity

Network Diagnostics

Troubleshoot network connectivity and performance issues systematically. Uses standard diagnostic tools with result interpretation to identify and resolve network problems.

Usage

Describe the network issue: what's not working, error messages, and when it started. The guide provides a systematic diagnostic approach from simple connectivity tests to deep packet analysis.

Parameters

  • Issue: No connectivity, Slow connection, Intermittent, DNS resolution, or Port access
  • Layer: Physical, Network (IP), Transport (TCP/UDP), or Application (HTTP/DNS)
  • Scope: Single host, Network segment, or Internet connectivity
  • System: Linux, macOS, Windows, or Docker network

Examples

  1. Website Unreachable: Systematic diagnosis from local network to remote server — ping gateway, trace route to server, check DNS resolution, test specific port, and verify application layer.
  1. DNS Resolution Failure: Debug DNS issues — check /etc/resolv.conf, test with dig against specific servers, check for DNSSEC validation failures, and flush DNS cache.
  1. Slow Application: Diagnose network latency vs. application slowness — measure RTT with ping, check for packet loss, analyze TCP connection times, and identify bandwidth bottlenecks.
  1. Docker Networking: Debug container-to-container and container-to-host connectivity — inspect Docker networks, check iptables rules, verify DNS resolution within containers, and test port mapping.

Guidelines

  • Diagnosis follows the OSI model bottom-up: physical → network → transport → application
  • Each diagnostic command is explained with output interpretation for normal vs. abnormal results
  • ping tests basic connectivity and measures latency and packet loss
  • traceroute/mtr identifies where in the network path issues occur
  • dig/nslookup diagnoses DNS resolution with authority chain tracing
  • netstat/ss shows active connections, listening ports, and connection states
  • tcpdump/wireshark captures packets for deep analysis when simpler tools don't reveal the issue
  • curl -v diagnoses HTTP-level issues including TLS handshake and redirect chains
  • MTU issues are checked when large packets fail but small ones succeed
  • Firewall rules (iptables, ufw) are checked as a common cause of blocked connectivity