linux網路問題定位

排障工具

工具 說明 用法 說明
ping 測試網路連通性 ping baidu.com
traceroute 路由追蹤 traceroute ip
route 路由表 route -n
netstat 網路連接 netstat -ano
nslookup DNS 解析 nslookup baidu.com
ifconfig 網路配置 ifconfig
arp ARP 快取 arp -a
nbtstat NetBIOS nbtstat -n
netsh 網路配置 netsh
net 網路配置 net
tcpdump 網路抓包 tcpdump
wireshark 網路抓包 wireshark
ip 網路配置 ip addr show
ss 網路連接 ss -tunlp
netstat 查看網路連接狀態 netstat -anp
tcpdump 抓包工具 tcpdump -i eth0 -nn -s 0 -c 1000 -w /tmp/tcpdump.pcap
iptables 防火牆 iptables -L -n -v -t nat -t mangle -t filter
ss netstat 的替代品 ss -anp
ifconfig 查看網卡資訊 ifconfig eth0
ip 查看網卡資訊 ip addr show eth0
route 查看路由表 route -n
traceroute 查看路由跳數 traceroute www.baidu.com
ping 測試網路連通性 ping www.baidu.com
telnet 測試端口連通性 telnet www.baidu.com 80
nslookup 域名解析 nslookup www.baidu.com
dig 域名解析 dig www.baidu.com
arp 查看 arp 快取 arp -a
netcat 網路調試工具 nc -l 1234
nmap 端口掃描工具 nmap -sT -p 80 www.baidu.com
mtr 網路連通性測試工具 mtr www.baidu.com
iperf 網路性能測試工具 iperf -s -p 1234
iptraf 網路流量監控工具 iptraf -i eth0
ipcalc IP 地址計算工具 ipcalc
iftop 網路流量監控工具 iftop -i eth0
iostat 磁碟 IO 監控工具 iostat -x 1 10
vmstat 虛擬記憶體監控工具 vmstat 1 10
sar 系統性能監控工具 sar -n DEV 1 10
lsof 查看檔案開啟情況 lsof -i:80
strace 追蹤系統呼叫 strace -p 1234
tcpflow 抓包工具 tcpflow -i eth0 -c -C -p -o /tmp/tcpflow
tcpick 抓包工具 tcpick -i eth0 -C -p -o /tmp/tcpick
tcptrace 抓包工具 tcptrace -i eth0 -C -p -o /tmp/tcptrace
tcpslice 抓包工具 tcpslice -i eth0 -C -p -o /tmp/tcpslice
tcpstat 抓包工具 tcpstat -i eth0 -C -p -o /tmp/tcpstat
tcpdump 抓包工具 tcpdump -i eth0 -C -p -o /tmp/tcpdump
tshark 抓包工具 tshark -i eth0 -C -p -o /tmp/tshark
wireshark 抓包工具 wireshark -i eth0 -C -p -o /tmp/wireshark
socat 網路調試工具 socat -d -d TCP-LISTEN:1234,fork TCP:www.baidu.com:80
ncat 網路調試工具 ncat -l 1234 -c ’ncat www.baidu.com 80'
netperf 網路性能測試工具 netperf -H www.baidu.com -l 60 -t TCP_STREAM
netcat 網路調試工具 netcat -l 1234
nc 網路調試工具 nc -l 1234
netpipe 網路性能測試工具 netpipe -l 1234
netkit 網路調試工具 netkit -l 1234
bridge 網橋工具 bridge -s