ybaidukuai 发表于 2018-5-17 10:49:27

linux 网络troubleshooting

  1)检查物理层 physical layer
  ip link is etho , 看网卡stat是否up, ip link set eth0 up来up网卡
  或者ifconfig eth0是否能获取到ip
  

  2) 检查数据链路层 data link layer
  arp -n 是否学到了mac
  

  3)网络层 network layer
  ping
  route -n 是否学到了路由
  traceroute 或者 mtr -n 8.8.8.8
  netstat -anl 是否监听IP 或者ss -ant
  dig @dns server destination ip
  #如果禁ping,可以用telnet测试,ping是icmp协议,telnet是tcp ip协议
  

  4) 传输层 tansport layer
  netstat -anl 是否port在监听
  iptable -L 是否port被drop或者reject掉了 或者ss -l
  
页: [1]
查看完整版本: linux 网络troubleshooting