Network Troubleshooting
网络故障排除常用命令
ping
traceroute
mtr
nslookup
telnet
tcpdump
netstat
ss
前4个用于检测到目标主机之间的连接问题,后4个用于排查主机上更细致的问题。
命令解释
Command
Description
ping
send ICMP ECHO_REQUEST to network hosts
traceroute
print the route packets trace to network host
mtr
a network diagnostic tool
nslookup
query Internet name servers interactively
telnet
user interface to the TELNET protocol
tcpdump
dump traffic on a network
netstat
print network connections, routing tables, interface statistics, masquerade con- nections, and multicast memberships
ss
another utility to investigate sockets
Command
Function
ping
检测当前主机与目标主机是否畅通(不通时除了网络中断还可能存在防火墙)
traceroute
检测网络质量,追踪到服务器的每一跳(ping通但还是异常)
mtr
检测到目标主机之间是否有数据包丢失(ping通但还是异常)
nslookup
域名方式访问时显示域名对应的ip
telnet
检测端口的连接状态
tcpdump
分析数据包
netstat
ss
命令演示
Last updated