Unit 9 · Network Troubleshooting
9.3Command-line tools
| Tool | Windows | Linux | Use |
|---|
| Show IP settings | ipconfig /all | ip a, ip route | Check IP, mask, gateway, DNS, MAC |
| Renew address | ipconfig /release and /renew | sudo dhclient -r; sudo dhclient (or sudo networkctl renew <interface>) | DHCP faults |
| Test reachability | ping | ping | Layer 3 connectivity and latency |
| Trace path | tracert | traceroute | Find where packets stop |
| Path quality | pathping | mtr | Loss at each hop |
| DNS lookup | nslookup | dig, nslookup | Test name resolution |
| Connections and ports | netstat -ano | ss -tulpn | See open ports, processes |
| ARP table | arp -a | ip neigh | IP-to-MAC mapping, duplicate IP |
| Port test | Test-NetConnection host -Port 443 | nc -zv host 443 | Is the service reachable? |
| Capture traffic | Wireshark | tcpdump, Wireshark | Deep analysis |
| Web test | browser, curl | curl -I http://site | Check HTTP response |
| Service status | Services, Get-Service | systemctl status name | Is the application running? |
| Logs | Event Viewer | journalctl -xe, /var/log/* | Find the error message |
| Resources | Task Manager, Get-Process | top, free -h, df -h | CPU, RAM, disk full |
Interpreting ping results
| Result | Meaning |
|---|
| Reply from address | Layer 3 path is working |
| Request timed out | Host down, ICMP blocked, or no route back |
| Destination host unreachable | No route or ARP failure; check IP, mask and gateway |
| General failure / transmit failed | Local interface or driver problem |
| High or variable time | Congestion, wireless interference, overloaded device |
| Tool | Shows you | Use it when |
|---|
ping | ICMP reachability and round-trip time | Basic "can I reach X?" |
tracert / traceroute | Each hop on the path | Where packets stop |
ipconfig / ip a | Address, mask, gateway, DNS | Suspect wrong IP config |
ipconfig /all | DHCP, MAC, DNS details | Windows deep check |
nslookup / dig | DNS answers | Names fail but IPs work |
netstat / ss | Sockets and listeners | Port or service questions |
arp -a / ip neigh | IP↔MAC cache | Local delivery / duplicate IP clues |
Tip: ping the loopback (127.0.0.1), then the host's own IP, then the gateway, then a public IP, then a name. Each step isolates a layer of problems.
Remember
- Ping tests reachability, not "the website is fine".
- DNS tools diagnose name failures; address tools diagnose IP failures.