- 8777701917
- info@saikatinfotech.com
- Basirhat W.B
When troubleshooting a network, there are several command-line tools available for diagnosing and resolving issues. Here’s a comprehensive list of network troubleshooting commands commonly used in both Windows and Linux/Unix environments. These commands help you identify problems with connectivity, latency, DNS, routing, and more.
ping [destination IP or domain]tracert [destination IP or domain]traceroute [destination IP or domain]tracert google.com
traceroute google.com
mtr [destination IP or domain]ping and traceroute to provide a real-time report of network latency and packet loss across multiple hops.mtr google.com
nslookup [domain name]nslookup google.com
nslookup 8.8.8.8
dig [domain name]nslookup.dig google.com
dig @8.8.8.8 google.com
host [domain name]host google.com
host 8.8.8.8
ipconfig [options]ipconfig
ipconfig /all
ipconfig /release
ipconfig /renew
ifconfigifconfig
ifconfig eth0
ip [options]ifconfig in many modern Linux distributions. It can be used to configure network interfaces, routing, and IP addresses.ip a
ip link show
ip route show
route printroute -nroute print
route -n
netstat [options]netstat -a
netstat -tuln
netstat -r
tcpdump [options]tcpdump -i eth0
tcpdump -i eth0 port 80
tcpdump -i eth0 -w capture.pcap
tcpdump, but you can run it from the command line with tshark.tshark -i eth0
tshark -r capture.pcap
iperf3iperf server on one host and the client on the other.iperf3 -s # On server
iperf3 -c [server IP] # On client
speedtest-clispeedtest-cli
telnet [hostname or IP] [port]telnet google.com 80
telnet 192.168.1.1 22
ssh [user]@[hostname or IP]ssh user@192.168.1.1
curl [options] [URL]curl google.com
curl -I google.com
netsh advfirewall firewall show rule name=alliptables -Liptables -L
ping -l [size] [destination] (Windows) or ping -s [size] [destination] (Linux)ping -l 1500 google.com # Windows
ping -s 1500 google.com # Linux
pathping [destination IP or domain]ping and traceroute, providing both route and packet loss information.pathping google.com
nc [options]nc -zv google.com 80
nc -l 12345
arp -aarp -narp -a
arp -n
| Command | Purpose | Example Usage |
|---|---|---|
| ping | Check connectivity | ping google.com |
| tracert | Trace route to a destination | tracert google.com |
| nslookup | DNS resolution | nslookup google.com |
| ifconfig | View network interface configuration | ifconfig (Linux/Unix) |
| ipconfig | View network interface configuration | ipconfig (Windows) |
| netstat | Network statistics and active connections | netstat -a |
| mtr | Combine ping and traceroute | mtr google.com |
| tcpdump | Capture network packets | tcpdump -i eth0 |
| iperf | Measure bandwidth | iperf3 -c serverIP |
| curl | Make HTTP requests and check URLs | curl -I google.com |
| telnet | Test port connectivity | telnet google.com 80 |
| netcat (nc) | Network testing tool | `nc – |