zoukankan      html  css  js  c++  java
  • linux命令检查网络问题

      linux命令检查网络问题使用的一般方法:

      下面以 https://api.weixin.qq.com 为例测试liunux 服务器是否连通

    1. 首先考虑使用ping 域名检查网络:ping api.weixin.qq.com
      [root@localhost ~]# ping api.weixin.qq.com
      PING api.weixin.qq.com (183.57.48.62) 56(84) bytes of data.
      ^C
      --- api.weixin.qq.com ping statistics ---
      3 packets transmitted, 0 received, 100% packet loss, time 1999ms
      
      [root@localhost ~]# 
      

       结果并没看到联通,换种方式再试一次

    2. 使用curl 域名检查网络:curl  api.weixin.qq.com
      [root@localhost ~]# curl api.weixin.qq.com
      curl: (7) Failed connect to api.weixin.qq.com:80; Connection refused
      

        结果也没看到联通,可能服务器已被禁ping,考虑使用telnet分析

    3. 使用nslookup 分析api.weixin.qq.com域名情况
      [root@localhost ~]# nslookup api.weixin.qq.com
      Server:         114.114.114.114
      Address:        114.114.114.114#53
      
      Non-authoritative answer:
      Name:   api.weixin.qq.com
      Address: 183.57.48.62
      Name:   api.weixin.qq.com
      Address: 183.3.234.152
      

       使用telnet分析 网络情况

      [root@localhost ~]# telnet 183.57.48.62 443
      Trying 183.57.48.62...
      Connected to 183.57.48.62.
      Escape character is '^]'.
      

       可以连接,证明网络是通的,在手机上测试确实可以访问微信,证明网络没有问题

     

  • 相关阅读:
    第五周任务以及结对编程
    “爆打”团队阿尔法发布 以及 第四周任务
    第三周内容
    爆打第一次站立会议
    3.23日PSP
    NABCD模型
    个人对结对编程的体会
    Fantacy团队第一次站立会议
    图形设想(简图)
    3月20日随笔
  • 原文地址:https://www.cnblogs.com/loytime/p/12218465.html
Copyright © 2011-2022 走看看