{"id":111639,"date":"2024-12-20T23:09:11","date_gmt":"2024-12-20T15:09:11","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=111639"},"modified":"2024-12-20T23:09:11","modified_gmt":"2024-12-20T15:09:11","slug":"ping-package-timeout","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/ping-package-timeout.html","title":{"rendered":"\u5982\u4f55\u89e3\u51b3ping\u7b2c\u4e00\u5305\u65f6\u95f4\u8fc7\u957f\u7684\u60c5\u51b5"},"content":{"rendered":"
\u516c\u53f8\u4e92\u8054\u7f51\u57df\uff08\u8bf4\u767d\u4e86\u5c31\u662f\u53ef\u4ee5\u8fde\u5916\u7f51\u7684vlan\u533a\u57df\u7684\u4e3b\u673a\uff09\u7684\u51e0\u53f0\u4e3b\u673a\u5728ping\u4e00\u4e2a\u5408\u4f5c\u65b9\u63d0\u4f9b\u7684\u57df\u540d\u65f6\uff0c\u53d1\u73b0\u5728ping \u7b2c\u4e00\u4e2a\u5305\u65f6\uff0c\u65f6\u95f4\u7279\u522b\u957f\uff0c\u540e\u9762\u7b2c2\uff0d\uff0dN\u5305\u5f00\u59cb\u6b63\u5e38\u3002\u76f4\u63a5ping \u8be5\u57df\u540d\u5bf9\u5e94\u7684IP \u6ca1\u8fd9\u4e2a\u95ee\u9898\u3002\u5728\u4f7f\u7528host -a \u3001dig\u3001nslookup \u3001route\u3001nscd -i hosts\u7b49\u8f6e\u756a\u4e0a\u8f6f\u5206\u6790\u5904\u7406\u4e86\u4e00\u901a\u540e\uff0c\u95ee\u9898\u4f9d\u65e7\u3002<\/p>\n
\u672c\u5730nscd \u7684 DNS cache\u90fd\u6e05\u7406\u4e86\u8fd8\u4e0d\u884c\uff0c\u800c\u4e14\u672c\u673a\u4e0a\u53c8\u6ca1\u6709bind DNS\u670d\u52a1\u914d\u7f6e\u3002\u8003\u8651\u5230ping \u91cc\u9762\u6709\u4e00\u4e2a -n \u53c2\u6570\uff0c\u5373\u4e0d\u5bf9\u57df\u540d\u8fdb\u884c\u53cd\u89e3\u6790\uff0c\u8fd9\u91cc\u5c06\u53eaping\u4e00\u4e2a\u5305\u52a0-n\u4e0e\u4e0d\u52a0-n\u7684\u7ed3\u679c\u8fdb\u884c\u4e86\u6bd4\u5bf9\uff0c\u5177\u4f53\u5982\u4e0b\uff1a<\/p>\n
www.361way.com:~ # time ping -n spay2.shuqiapi.com -c 1\r\nPING sqsdou.wx.ucweb.com (211.103.25.41) 56(84) bytes of data.\r\n64 bytes from 211.103.25.41: icmp_seq=1 ttl=50 time=10.7 ms\r\n--- sqsdou.wx.ucweb.com ping statistics ---\r\n1 packets transmitted, 1 received, 0% packet loss, time 0ms\r\nrtt min\/avg\/max\/mdev = 10.705\/10.705\/10.705\/0.000 ms\r\nreal 0m0.015s\r\nuser 0m0.000s\r\nsys 0m0.000s\r\nwww.361way.com:~ # time ping spay2.shuqiapi.com -c 1\r\nPING sqsdou.wx.ucweb.com (211.103.25.41) 56(84) bytes of data.\r\n64 bytes from 211.103.25.41: icmp_seq=1 ttl=50 time=10.6 ms\r\n--- sqsdou.wx.ucweb.com ping statistics ---\r\n1 packets transmitted, 1 received, 0% packet loss, time 0ms\r\nrtt min\/avg\/max\/mdev = 10.640\/10.640\/10.640\/0.000 ms\r\nreal 0m18.172s\r\nuser 0m0.000s\r\nsys 0m0.000s\r\n<\/pre>\n\u53d1\u73b0\u52a0-n \u65f6real \u53ea\u7528\u4e860.015s\uff0c\u51e0\u4e4e\u662f\u7acb\u5373\u56de\u5305\uff1b\u800c\u4e0d\u52a0 -n\u65f6\uff0c\u7b2c\u4e00\u4e2a\u5305\u8981\u4f7f\u752818.172s \u624d\u6709\u56de\u5305\u3002<\/p>\n
\u51fa\u73b0\u8be5\u95ee\u9898\u7684\u539f\u56e0\u662f\u4ec0\u4e48\u5462\uff1f<\/strong><\/p>\n
\u8fd9\u662f\u56e0\u4e3a ping \u7684\u65f6\u5019\u9047\u5230 DNS \u53cd\u5411\u89e3\u6790\u95ee\u9898\uff0c\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u5f53 ping \u4e00\u4e2a\u57df\u540d\u7684\u65f6\u5019\uff0cping \u4ece\u57df\u540d\u670d\u52a1\u5546\u5f97\u5230\u57df\u540d\u7684 IP \u5730\u5740\uff0c\u7136\u540e ping \u8bbf\u95ee\u8fd9\u4e2a IP \u5e76\u8bd5\u56fe\u89e3\u6790\u6210\u4e00\u4e2a\u540d\u5b57\uff0c\u56e0\u4e3a\u6211\u4eec\u4e0d\u63d0\u4f9b DNS \u670d\u52a1\u4e5f\u6ca1\u6709 DNS \u53cd\u5411\u89e3\u6790\uff0c\u6240\u4ee5\u5bfc\u81f4 ping \u9700\u8981\u7b49\u5230 DNS time out \u624d\u8fd4\u56de\uff0c\u8fd9\u6837\u770b\u4e0a\u53bb ping \u56de\u5e94\u5f88\u6162\u3002<\/p>\n
ping \u662f\u8fd9\u6837\u5de5\u4f5c\u7684\uff1aping \u6709\u4e24\u4e2a\u7ebf\u7a0b\u5728\u6267\u884c\uff0c\u4e00\u4e2a\u7528\u6765\u53d1\u5305\uff0c\u4e00\u4e2a\u7528\u6765\u6536\u5305\u548c\u6253\u5370\u7ed3\u679c\uff0c\u53d1\u5305\u7684\u7ebf\u7a0b\u4e0d\u505c\u7684\u53d1\uff0c\u6ca1\u6709\u95ee\u9898\uff0c\u95ee\u9898\u51fa\u5728\u6536\u5305\u7684\u7ebf\u7a0b\uff0c\u8fd9\u4e2a\u65f6\u5019\u6536\u5305\u7ebf\u7a0b\u662f\u88ab\u963b\u585e\u7684\uff08\u56e0\u4e3a\u8fd9\u4e2a\u65f6\u5019 DNS \u53cd\u5411\u89e3\u6790\u4e0d\u6210\u529f\uff0c\u4e00\u76f4\u8981\u7b49\u5230\u8d85\u65f6\uff09\uff0c\u6240\u4ee5\u6536\u5305\u7ebf\u7a0b\u8981\u7b49\u5230 DNS \u8d85\u65f6\u540e\u624d\u6253\u5370\u51fa ping \u7684\u7ed3\u679c\uff0c\u800c\u8fd9\u4e2a\u65f6\u5019\u7ed3\u679c\u662f\u6b63\u786e\u7684\uff0c\u56e0\u4e3a\u7ed3\u679c\u672c\u6765\u5c31\u662f\u5bf9\u7684\uff0c\u53ea\u4e0d\u8fc7\u56e0\u4e3a\u88ab\u963b\u585e\u800c\u63a8\u8fdf\u4e86\u663e\u793a\u7684\u65f6\u95f4\u800c\u5df2\uff0c\u6240\u4ee5\u9020\u6210 ping \u57df\u540d\u95f4\u9694\u5f88\u957f\u7684\u5047\u8c61\u3002\u5982\u679c\u7528ping -n<\/span> \u5173\u95ed\u6389 DNS \u89e3\u6790\u5c31\u4e0d\u4f1a\u6709\u8fd9\u79cd\u95ee\u9898\u4e86\u3002<\/p>\n
\u7531\u4e8e\u672c\u5730\/etc\/resolv.conf \u6587\u4ef6\u91cc\u914d\u7f6e\u7684DNS \u4e3b\u673a\u6211\u5e76\u6709\u67e5\u770b\u6743\u9650\uff0c\u6240\u4ee5\u7ed3\u5408\u4e0a\u9762\u7684\u7406\u8bba\uff0c\u8ba9\u4e1a\u52a1\u4fa7\u53bb\u627e\u4eba\u5206\u6790\u67e5\u770b\u4e86DNS \u7684\u914d\u7f6e\u662f\u4e0d\u662f\u6709\u95ee\u9898\u3002<\/p>\n
\n\u539f\u6587\u6765\u81ea\uff1ahttp:\/\/www.361way.com\/ping-first-package-longtime\/4267.html<\/a><\/p>\n