Networking Tools
2020-05-07
๐ง Everyday Network Troubleshooting: Tools You Should Know (and Actually Use)
Whether you're debugging why a pod can't reach an endpoint or trying to figure out why your app's requests are timing out, networking tools are your first line of defense.
Hereโs a curated, opinionated, and battle-tested list of tools I use (almost) daily. Each one comes with practical examples.
๐ Connectivity & Reachability
๐น ping
Checks if a host is alive using ICMP echo requests.
ping google.com ping -c 4 192.168.1.1 # -c 4 is to send 4 packets
๐ง Tip: If ping doesn't work, the host could be up but blocking ICMP. Check firewall rules.
๐น traceroute
Visualise the path packets take to a remote host. Great for pinpointing bottlenecks.
traceroute google.com traceroute -I 192.168.1.1 # -I is to use ICMP echo requests
๐ง Use case: โWhy is latency high between service A and B?โ โ traceroute.
๐น nslookup
Simple tool for querying DNS. Quick and dirty.
nslookup google.com nslookup 8.8.8.8
๐น dig
More verbose and powerful DNS query tool than nslookup.
dig google.com dig google.com ANY # ANY is to get all records dig google.com A +short # A is to get A records dig google.com AAAA +short # AAAA is to get AAAA records
๐ง Bonus: Use +trace to debug DNS resolution path:
dig +trace google.com dig +trace google.com +short # +short is to get the IP address
๐ Port Scanning & TCP Checks
๐น netcat (nc)
The Swiss Army Knife of TCP/UDP.
nc -zv google.com 80 nc -l 1234 # Listen on port 1234 nc -zv 192.168.1.1 1-65535 # -z is to scan all ports
๐ก Tip: nc can be used to spin up fake HTTP servers or test port exposure in firewalled networks.
๐น telnet
Old school, but works.
telnet google.com 80
๐ฏ Can be used to debug HTTP, SMTP, Redis manually.
๐ Interface & Routing Info
๐น ip (modern)
ip addr show ip route show ip link set eth0 up
๐น ifconfig (legacy but familiar)
ifconfig ifconfig eth0 up
๐น route (macOS)
route -n route add default gw 192.168.1.1
๐ Monitoring Traffic & Usage
๐น netstat
netstat -an netstat -r
๐น ss (modern netstat replacement)
ss -tuln ss -s
๐น tcpdump Capture packets like a boss.
tcpdump -i eth0 tcpdump -i eth0 -w capture.pcap
๐ฏ Combine with wireshark to visualize packets.
๐น tshark CLI version of Wireshark.
tshark -i eth0 tshark -r capture.pcap
๐น vnstat
Track bandwidth usage.
vnstat -l vnstat -d
๐น nload / nethogs
Real-time network I/O monitor per interface or per process.
bash
nload nethogs
๐ถ Wireless Tools
iw iwlist iwconfig
๐ง These are useful on laptops, Raspberry Pi setups, or Linux wireless APs.
๐ Security, Scanning & Recon
๐น nmap
Port scanner and network mapper.
nmap google.com nmap -sP 192.168.1.0/24
๐ง Pro tip: Use with -A for OS detection, versioning, script scanning.
๐น whois
Lookup domain ownership.
whois google.com
๐น lsof
See what ports your system is listening on.
lsof -i :80 lsof -i tcp
๐น arp / arping
arp -a arp -d 192.168.1.1
arping 192.168.1.1
๐ง Use for static IP-to-MAC mapping debugging or LAN sniffing.
๐งช Bandwidth Testing
๐น iperf
Client-server bandwidth tester.
iperf -s # Start server iperf -c <ip> # Run client against server
๐ฆ Works great for diagnosing slow internal links or tunnels.
๐น mtr
Combines ping + traceroute with live stats.
mtr google.com mtr google.com mtr -r google.com
๐ง Instant visibility into jitter, loss, and latency by hop.
๐ง Bonus Mentions
conntrack โ Show conntrack entries ssdp โ Debug multicast/UPnP ncdu โ Disk usage but worth knowing if you're debugging slow apps hostname โ Quick check or change the hostname
๐ฏ My Top 5 Daily Use Tools
| Purpose | Tool | | Ping test | ping | | DNS Resolution | dig | | Port connectivity | nc / telnet | | Interface info | ip addr | | Live traffic debug | tcpdump |
โจ Final Thoughts
These tools are deceptively simpleโbut when chained together, they help you uncover:
- Firewall misconfigurations
- DNS issues
- Interface problems
- Packet loss/jitter
- Port blocks or misroutes
- Host reachability vs app-level downtime
๐ ๏ธ Bookmark this. Refer to it next time you're troubleshooting networking issues.