Linux Network Troubleshooting

Troubleshooting Tools

ToolDescriptionUsageNotes
pingTest network connectivityping baidu.com
tracerouteRoute tracingtraceroute ip
routeRouting tableroute -n
netstatNetwork connectionsnetstat -ano
nslookupDNS resolutionnslookup baidu.com
ifconfigNetwork configurationifconfig
arpARP cachearp -a
nbtstatNetBIOSnbtstat -n
netshNetwork configurationnetsh
netNetwork configurationnet
tcpdumpNetwork packet capturetcpdump
wiresharkNetwork packet capturewireshark
ipNetwork configurationip addr show
ssNetwork connectionsss -tunlp
netstatView network connection statusnetstat -anp
tcpdumpPacket capture tooltcpdump -i eth0 -nn -s 0 -c 1000 -w /tmp/tcpdump.pcap
iptablesFirewalliptables -L -n -v -t nat -t mangle -t filter
ssnetstat alternativess -anp
ifconfigView network interface informationifconfig eth0
ipView network interface informationip addr show eth0
routeView routing tableroute -n
tracerouteView route hopstraceroute www.baidu.com
pingTest network connectivityping www.baidu.com
telnetTest port connectivitytelnet www.baidu.com 80
nslookupDomain name resolutionnslookup www.baidu.com
digDomain name resolutiondig www.baidu.com
arpView ARP cachearp -a
netcatNetwork debugging toolnc -l 1234
nmapPort scanning toolnmap -sT -p 80 www.baidu.com
mtrNetwork connectivity testing toolmtr www.baidu.com
iperfNetwork performance testing tooliperf -s -p 1234
iptrafNetwork traffic monitoring tooliptraf -i eth0
ipcalcIP address calculation toolipcalc
iftopNetwork traffic monitoring tooliftop -i eth0
iostatDisk I/O monitoring tooliostat -x 1 10
vmstatVirtual memory monitoring toolvmstat 1 10
sarSystem performance monitoring toolsar -n DEV 1 10
lsofView open fileslsof -i:80
straceTrace system callsstrace -p 1234
tcpflowPacket capture tooltcpflow -i eth0 -c -C -p -o /tmp/tcpflow
tcpickPacket capture tooltcpick -i eth0 -C -p -o /tmp/tcpick
tcptracePacket capture tooltcptrace -i eth0 -C -p -o /tmp/tcptrace
tcpslicePacket capture tooltcpslice -i eth0 -C -p -o /tmp/tcpslice
tcpstatPacket capture tooltcpstat -i eth0 -C -p -o /tmp/tcpstat
tcpdumpPacket capture tooltcpdump -i eth0 -C -p -o /tmp/tcpdump
tsharkPacket capture tooltshark -i eth0 -C -p -o /tmp/tshark
wiresharkPacket capture toolwireshark -i eth0 -C -p -o /tmp/wireshark
socatNetwork debugging toolsocat -d -d TCP-LISTEN:1234,fork TCP:www.baidu.com:80
ncatNetwork debugging toolncat -l 1234 -c ’ncat www.baidu.com 80'
netperfNetwork performance testing toolnetperf -H www.baidu.com -l 60 -t TCP_STREAM
netcatNetwork debugging toolnetcat -l 1234
ncNetwork debugging toolnc -l 1234
netpipeNetwork performance testing toolnetpipe -l 1234
netkitNetwork debugging toolnetkit -l 1234
bridgeBridge utilitybridge -s