Linux Network Troubleshooting

Troubleshooting Tools

Tool Description Usage Notes
ping Test network connectivity ping baidu.com
traceroute Route tracing traceroute ip
route Routing table route -n
netstat Network connections netstat -ano
nslookup DNS resolution nslookup baidu.com
ifconfig Network configuration ifconfig
arp ARP cache arp -a
nbtstat NetBIOS nbtstat -n
netsh Network configuration netsh
net Network configuration net
tcpdump Network packet capture tcpdump
wireshark Network packet capture wireshark
ip Network configuration ip addr show
ss Network connections ss -tunlp
netstat View network connection status netstat -anp
tcpdump Packet capture tool tcpdump -i eth0 -nn -s 0 -c 1000 -w /tmp/tcpdump.pcap
iptables Firewall iptables -L -n -v -t nat -t mangle -t filter
ss netstat alternative ss -anp
ifconfig View network interface information ifconfig eth0
ip View network interface information ip addr show eth0
route View routing table route -n
traceroute View route hops traceroute www.baidu.com
ping Test network connectivity ping www.baidu.com
telnet Test port connectivity telnet www.baidu.com 80
nslookup Domain name resolution nslookup www.baidu.com
dig Domain name resolution dig www.baidu.com
arp View ARP cache arp -a
netcat Network debugging tool nc -l 1234
nmap Port scanning tool nmap -sT -p 80 www.baidu.com
mtr Network connectivity testing tool mtr www.baidu.com
iperf Network performance testing tool iperf -s -p 1234
iptraf Network traffic monitoring tool iptraf -i eth0
ipcalc IP address calculation tool ipcalc
iftop Network traffic monitoring tool iftop -i eth0
iostat Disk I/O monitoring tool iostat -x 1 10
vmstat Virtual memory monitoring tool vmstat 1 10
sar System performance monitoring tool sar -n DEV 1 10
lsof View open files lsof -i:80
strace Trace system calls strace -p 1234
tcpflow Packet capture tool tcpflow -i eth0 -c -C -p -o /tmp/tcpflow
tcpick Packet capture tool tcpick -i eth0 -C -p -o /tmp/tcpick
tcptrace Packet capture tool tcptrace -i eth0 -C -p -o /tmp/tcptrace
tcpslice Packet capture tool tcpslice -i eth0 -C -p -o /tmp/tcpslice
tcpstat Packet capture tool tcpstat -i eth0 -C -p -o /tmp/tcpstat
tcpdump Packet capture tool tcpdump -i eth0 -C -p -o /tmp/tcpdump
tshark Packet capture tool tshark -i eth0 -C -p -o /tmp/tshark
wireshark Packet capture tool wireshark -i eth0 -C -p -o /tmp/wireshark
socat Network debugging tool socat -d -d TCP-LISTEN:1234,fork TCP:www.baidu.com:80
ncat Network debugging tool ncat -l 1234 -c ’ncat www.baidu.com 80'
netperf Network performance testing tool netperf -H www.baidu.com -l 60 -t TCP_STREAM
netcat Network debugging tool netcat -l 1234
nc Network debugging tool nc -l 1234
netpipe Network performance testing tool netpipe -l 1234
netkit Network debugging tool netkit -l 1234
bridge Bridge utility bridge -s