Troubleshooting Linux Network Issues

Troubleshooting Tools

ToolDescriptionUsageNote
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
tcpdumpPacket capturetcpdump
wiresharkPacket capturewireshark
ipNetwork configurationip addr show
ssNetwork connectionsss -tunlp
netstatView network connection statenetstat -anp
tcpdumpPacket-capture utilitytcpdump -i eth0 -nn -s 0 -c 1000 -w /tmp/tcpdump.pcap
iptablesFirewalliptables -L -n -v -t nat -t mangle -t filter
ssnetstat replacementss -anp
ifconfigView NIC informationifconfig eth0
ipView NIC informationip addr show eth0
routeView routing tableroute -n
tracerouteView routing hopstraceroute www.baidu.com
pingTest network connectivityping www.baidu.com
telnetTest port connectivitytelnet www.baidu.com 80
nslookupDomain resolutionnslookup www.baidu.com
digDomain resolutiondig www.baidu.com
arpView ARP cachearp -a
netcatNetwork debugging toolnc -l 1234
nmapPort-scanning toolnmap -sT -p 80 www.baidu.com
mtrNetwork connectivity testermtr www.baidu.com
iperfNetwork performance testeriperf -s -p 1234
iptrafNetwork traffic monitoriptraf -i eth0
ipcalcIP address calculatoripcalc
iftopNetwork traffic monitoriftop -i eth0
iostatDisk I/O monitoriostat -x 1 10
vmstatVirtual memory monitorvmstat 1 10
sarSystem performance monitorsar -n DEV 1 10
lsofShow open file usagelsof -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 testernetperf -H www.baidu.com -l 60 -t TCP_STREAM
netcatNetwork debugging toolnetcat -l 1234
ncNetwork debugging toolnc -l 1234
netpipeNetwork performance testernetpipe -l 1234
netkitNetwork debugging toolnetkit -l 1234
bridgeBridge toolbridge -s