Copyright (c) 2026 MindMesh Academy. All rights reserved. This content is proprietary and may not be reproduced or distributed without permission.

5.5.2. Network Diagnostic Commands and Tools

💡 First Principle: Every network diagnostic command serves a specific diagnostic purpose. Using the wrong command for the question you're asking wastes time and produces misleading results. Know what each command tests and what its output tells you.

Diagnostic Command Reference
CommandPlatformWhat It TestsKey Use
ipconfigWindowsIP configurationShow current IP, mask, gateway, DNS
ip addrLinuxIP configurationShow interfaces and addresses
ip routeLinuxRouting tableShow routes; confirm default gateway
route printWindowsRouting tableShow routing table
pingBothLayer 3 connectivityTests IP reachability and latency
tracertWindowsRoute tracingShows path and each hop's latency
tracerouteLinuxRoute tracingSame as tracert; identifies where packets stop
nslookupBothDNS resolutionResolves names to IPs; tests DNS server
digLinuxDNS resolutionMore detailed DNS query output than nslookup
netstatBothActive connectionsShows listening ports, active sessions, routing table
nbtstatWindowsNetBIOSResolves NetBIOS names, shows NetBIOS cache
telnetBothPort connectivityTests TCP connection to specific port (e.g., telnet server 443)
nc (netcat)LinuxPort connectivityVersatile; test TCP/UDP connections, banner grab
Systematic Diagnostic Sequence
Physical Checks
  • Check link lights: No link light = physical problem. Don't proceed to logical until physical is confirmed.
  • Confirm power supply: If the server isn't on, it can't communicate.
  • Verify cable integrity: Check for damage; try a known-good cable.
  • Check appropriate cable selection: Straight-through vs. crossover; correct fiber type (single vs. multimode).

⚠️ Exam Trap: ping success does not prove a service is working — it only proves Layer 3 reachability. A web server that responds to ping but returns errors may have a service failure, a firewall blocking port 80/443, or a misconfigured virtual host. Use telnet server 80 or nc -zv server 80 to test the specific port.

Reflection Question: A user reports that a web application is unreachable. You ping the web server's IP address and get a response. You then try telnet webserver 80 and get "Connection refused." What does this tell you about the problem?

Alvin Varughese
Written byAlvin Varughese
Founder18 professional certifications