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
- 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.
- 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.
- Slow Application: Diagnose network latency vs. application slowness — measure RTT with ping, check for packet loss, analyze TCP connection times, and identify bandwidth bottlenecks.
- 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
pingtests basic connectivity and measures latency and packet losstraceroute/mtridentifies where in the network path issues occurdig/nslookupdiagnoses DNS resolution with authority chain tracingnetstat/ssshows active connections, listening ports, and connection statestcpdump/wiresharkcaptures packets for deep analysis when simpler tools don't reveal the issuecurl -vdiagnoses 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