{"id":274,"date":"2006-06-30T16:53:09","date_gmt":"2006-06-30T08:53:09","guid":{"rendered":"https:\/\/www.ecjtu.com\/keith\/archives\/274"},"modified":"2006-06-30T01:21:04","modified_gmt":"2006-06-29T17:21:04","slug":"ping%e5%91%bd%e4%bb%a4%e8%af%a6%e8%a7%a3","status":"publish","type":"post","link":"https:\/\/www.ecjtu.com\/keith\/archives\/274","title":{"rendered":"ping\u547d\u4ee4\u8be6\u89e3"},"content":{"rendered":"<p>ping\u53ea\u6709\u5728\u5b89\u88c5\u4e86TCP\/IP\u534f\u8bae\u4ee5\u540e\u624d\u53ef\u4ee5\u4f7f\u7528:<\/p>\n<p>ping [-t] [-a] [-n count] [-l length] [-f] [-i ttl] [-v tos] [-r count] [-s count] [[-j computer-list] | [-k computer-list]] [-w timeout] destination-list<\/p>\n<p>Options:<\/p>\n<p>-t Ping the specified host until stopped.To see statistics and continue &#8211; type Control-Break;To stop &#8211; type Control-C.<\/p>\n<p>\u4e0d\u505c\u7684ping\u5730\u65b9\u4e3b\u673a\uff0c\u76f4\u5230\u4f60\u6309\u4e0bControl-C\u3002<\/p>\n<p>\u6b64\u529f\u80fd\u6ca1\u6709\u4ec0\u4e48\u7279\u522b\u7684\u6280\u5de7\uff0c\u4e0d\u8fc7\u53ef\u4ee5\u914d\u5408\u5176\u4ed6\u53c2\u6570\u4f7f\u7528\uff0c\u5c06\u5728\u4e0b\u9762\u63d0\u5230\u3002<\/p>\n<p>-a Resolve addresses to hostnames.<\/p>\n<p>\u89e3\u6790\u8ba1\u7b97\u673aNetBios\u540d\u3002<\/p>\n<p>\u793a\u4f8b:C:\\&gt;ping -a 192.168.1.21<\/p>\n<p>Pinging iceblood.yofor.com [192.168.1.21] with 32 bytes of data:<\/p>\n<p>Reply from 192.168.1.21: bytes=32 time&lt;10ms TTL=254<\/p>\n<p>Reply from 192.168.1.21: bytes=32 time&lt;10ms TTL=254<\/p>\n<p>Reply from 192.168.1.21: bytes=32 time&lt;10ms TTL=254<\/p>\n<p>Reply from 192.168.1.21: bytes=32 time&lt;10ms TTL=254<\/p>\n<p>Ping statistics for 192.168.1.21:<\/p>\n<p>Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),Approximate round trip times in milli-seconds:<\/p>\n<p>Minimum = 0ms, Maximum = 0ms, Average = 0ms<\/p>\n<p>\u4ece\u4e0a\u9762\u5c31\u53ef\u4ee5\u77e5\u9053IP\u4e3a192.168.1.21\u7684\u8ba1\u7b97\u673aNetBios\u540d\u4e3aiceblood.yofor.com\u3002<\/p>\n<p>-n count Number of echo requests to send.<\/p>\n<p>\u53d1\u9001count\u6307\u5b9a\u7684Echo\u6570\u636e\u5305\u6570\u3002<\/p>\n<p>\u5728\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u4e00\u822c\u90fd\u53ea\u53d1\u9001\u56db\u4e2a\u6570\u636e\u5305\uff0c\u901a\u8fc7\u8fd9\u4e2a\u547d\u4ee4\u53ef\u4ee5\u81ea\u5df1\u5b9a\u4e49\u53d1\u9001\u7684\u4e2a\u6570\uff0c\u5bf9\u8861\u91cf\u7f51\u7edc\u901f\u5ea6\u5f88\u6709\u5e2e\u52a9\uff0c\u6bd4\u5982\u6211\u60f3\u6d4b\u8bd5\u53d1\u900150\u4e2a\u6570\u636e\u5305\u7684\u8fd4\u56de\u7684\u5e73\u5747\u65f6\u95f4\u4e3a\u591a\u5c11\uff0c\u6700\u5feb\u65f6\u95f4\u4e3a\u591a\u5c11\uff0c\u6700\u6162\u65f6\u95f4\u4e3a\u591a\u5c11\u5c31\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u83b7\u77e5:<\/p>\n<p>C:\\&gt;ping -n 50 202.103.96.68<\/p>\n<p>Pinging 202.103.96.68 with 32 bytes of data:<\/p>\n<p>Reply from 202.103.96.68: bytes=32 time=50ms TTL=241<\/p>\n<p>Reply from 202.103.96.68: bytes=32 time=50ms TTL=241<\/p>\n<p>Reply from 202.103.96.68: bytes=32 time=50ms TTL=241<\/p>\n<p>Request timed out.<\/p>\n<p>\u2026\u2026\u2026\u2026\u2026\u2026<\/p>\n<p>Reply from 202.103.96.68: bytes=32 time=50ms TTL=241<\/p>\n<p>Reply from 202.103.96.68: bytes=32 time=50ms TTL=241<\/p>\n<p>Ping statistics for 202.103.96.68:<\/p>\n<p>Packets: Sent = 50, Received = 48, Lost = 2 (4% loss),Approximate round trip times in milli-seconds:<\/p>\n<p>Minimum = 40ms, Maximum = 51ms, Average = 46ms<\/p>\n<p>\u4ece\u4ee5\u4e0a\u6211\u5c31\u53ef\u4ee5\u77e5\u9053\u5728\u7ed9202.103.96.68\u53d1\u900150\u4e2a\u6570\u636e\u5305\u7684\u8fc7\u7a0b\u5f53\u4e2d\uff0c\u8fd4\u56de\u4e8648\u4e2a\uff0c\u5176\u4e2d\u6709\u4e24\u4e2a\u7531\u4e8e\u672a\u77e5\u539f\u56e0\u4e22\u5931\uff0c\u8fd948\u4e2a\u6570\u636e\u5305\u5f53\u4e2d\u8fd4\u56de\u901f\u5ea6\u6700\u5feb\u4e3a40ms\uff0c\u6700\u6162\u4e3a51ms\uff0c\u5e73\u5747\u901f\u5ea6\u4e3a46ms\u3002<\/p>\n<p>-l size Send buffer size.<\/p>\n<p>\u5b9a\u4e49echo\u6570\u636e\u5305\u5927\u5c0f\u3002<\/p>\n<p>\u5728\u9ed8\u8ba4\u7684\u60c5\u51b5\u4e0bwindows\u7684ping\u53d1\u9001\u7684\u6570\u636e\u5305\u5927\u5c0f\u4e3a32byt\uff0c\u6211\u4eec\u4e5f\u53ef\u4ee5\u81ea\u5df1\u5b9a\u4e49\u5b83\u7684\u5927\u5c0f\uff0c\u4f46\u6709\u4e00\u4e2a\u5927\u5c0f\u7684\u9650\u5236\uff0c\u5c31\u662f\u6700\u5927\u53ea\u80fd\u53d1\u900165500byt\uff0c\u4e5f\u8bb8\u6709\u4eba\u4f1a\u95ee\u4e3a\u4ec0\u4e48\u8981\u9650\u5236\u523065500byt\uff0c\u56e0\u4e3aWindows\u7cfb\u5217\u7684\u7cfb\u7edf\u90fd\u6709\u4e00\u4e2a\u5b89\u5168\u6f0f\u6d1e(\u4e5f\u8bb8\u8fd8\u5305\u62ec\u5176\u4ed6\u7cfb\u7edf)\u5c31\u662f\u5f53\u5411\u5bf9\u65b9\u4e00\u6b21\u53d1\u9001\u7684\u6570\u636e\u5305\u5927\u4e8e\u6216\u7b49\u4e8e65532\u65f6\uff0c\u5bf9\u65b9\u5c31\u5f88\u6709\u53ef\u80fd\u6321\u673a\uff0c\u6240\u4ee5\u5fae\u8f6f\u516c\u53f8\u4e3a\u4e86\u89e3\u51b3\u8fd9\u4e00\u5b89\u5168\u6f0f\u6d1e\u4e8e\u662f\u9650\u5236\u4e86ping\u7684\u6570\u636e\u5305\u5927\u5c0f\u3002\u867d\u7136\u5fae\u8f6f\u516c\u53f8\u5df2\u7ecf\u505a\u4e86\u6b64\u9650\u5236\uff0c\u4f46\u8fd9\u4e2a\u53c2\u6570\u914d\u5408\u5176\u4ed6\u53c2\u6570\u4ee5\u540e\u5371\u5bb3\u4f9d\u7136\u975e\u5e38\u5f3a\u5927\uff0c\u6bd4\u5982\u6211\u4eec\u5c31\u53ef\u4ee5\u901a\u8fc7\u914d\u5408-t\u53c2\u6570\u6765\u5b9e\u73b0\u4e00\u4e2a\u5e26\u6709\u653b\u51fb\u6027\u7684\u547d\u4ee4:(\u4ee5\u4e0b\u4ecb\u7ecd\u5e26\u6709\u5371\u9669\u6027\uff0c\u4ec5\u7528\u4e8e\u8bd5\u9a8c\uff0c\u8bf7\u52ff\u8f7b\u6613\u65bd\u4e8e\u522b\u4eba\u673a\u5668\u4e0a\uff0c\u5426\u5219\u540e\u679c\u81ea\u8d1f)<\/p>\n<p>C:\\&gt;ping -l 65500 -t 192.168.1.21<\/p>\n<p>Pinging 192.168.1.21 with 65500 bytes of data:<\/p>\n<p>Reply from 192.168.1.21: bytes=65500 time&lt;10ms TTL=254<\/p>\n<p>Reply from 192.168.1.21: bytes=65500 time&lt;10ms TTL=254<\/p>\n<p>\u8fd9\u6837\u5b83\u5c31\u4f1a\u4e0d\u505c\u7684\u5411192.168.1.21\u8ba1\u7b97\u673a\u53d1\u9001\u5927\u5c0f\u4e3a65500byt\u7684\u6570\u636e\u5305\uff0c\u5982\u679c\u4f60\u53ea\u6709\u4e00\u53f0\u8ba1\u7b97\u673a\u4e5f\u8bb8\u6ca1\u6709\u4ec0\u4e48\u6548\u679c\uff0c\u4f46\u5982\u679c\u6709\u5f88\u591a\u8ba1\u7b97\u673a\u90a3\u4e48\u5c31\u53ef\u4ee5\u4f7f\u5bf9\u65b9\u5b8c\u5168\u762b\u75ea\uff0c\u6211\u66fe\u7ecf\u5c31\u505a\u8fc7\u8fd9\u6837\u7684\u8bd5\u9a8c\uff0c\u5f53\u6211\u540c\u65f6\u4f7f\u752810\u53f0\u4ee5\u4e0a\u8ba1\u7b97\u673aping\u4e00\u53f0Win2000Pro\u7cfb\u7edf\u7684\u8ba1\u7b97\u673a\u65f6\uff0c\u4e0d\u52305\u5206\u949f\u5bf9\u65b9\u7684\u7f51\u7edc\u5c31\u5df2\u7ecf\u5b8c\u5168\u762b\u75ea\uff0c\u7f51\u7edc\u4e25\u91cd\u5835\u585e\uff0cHTTP\u548cFTP\u670d\u52a1\u5b8c\u5168\u505c\u6b62\uff0c\u7531\u6b64\u53ef\u89c1\u5a01\u529b\u975e\u540c\u5c0f\u53ef\u3002<\/p>\n<p>-f Set Don&#8217;t Fragment flag in packet.<\/p>\n<p>\u5728\u6570\u636e\u5305\u4e2d\u53d1\u9001\u201c\u4e0d\u8981\u5206\u6bb5\u201d\u6807\u5fd7\u3002<\/p>\n<p>\u5728\u4e00\u822c\u4f60\u6240\u53d1\u9001\u7684\u6570\u636e\u5305\u90fd\u4f1a\u901a\u8fc7\u8def\u7531\u5206\u6bb5\u518d\u53d1\u9001\u7ed9\u5bf9\u65b9\uff0c\u52a0\u4e0a\u6b64\u53c2\u6570\u4ee5\u540e\u8def\u7531\u5c31\u4e0d\u4f1a\u518d\u5206\u6bb5\u5904\u7406\u3002<\/p>\n<p>-i TTL Time To Live.<\/p>\n<p>\u6307\u5b9aTTL\u503c\u5728\u5bf9\u65b9\u7684\u7cfb\u7edf\u91cc\u505c\u7559\u7684\u65f6\u95f4\u3002<\/p>\n<p>\u6b64\u53c2\u6570\u540c\u6837\u662f\u5e2e\u52a9\u4f60\u68c0\u67e5\u7f51\u7edc\u8fd0\u8f6c\u60c5\u51b5\u7684\u3002<\/p>\n<p>-v TOS Type Of Service.<\/p>\n<p>\u5c06\u201c\u670d\u52a1\u7c7b\u578b\u201d\u5b57\u6bb5\u8bbe\u7f6e\u4e3a tos \u6307\u5b9a\u7684\u503c\u3002<\/p>\n<p>-r count Record route for count hops.<\/p>\n<p>\u5728\u201c\u8bb0\u5f55\u8def\u7531\u201d\u5b57\u6bb5\u4e2d\u8bb0\u5f55\u4f20\u51fa\u548c\u8fd4\u56de\u6570\u636e\u5305\u7684\u8def\u7531\u3002<\/p>\n<p>\u5728\u4e00\u822c\u60c5\u51b5\u4e0b\u4f60\u53d1\u9001\u7684\u6570\u636e\u5305\u662f\u901a\u8fc7\u4e00\u4e2a\u4e2a\u8def\u7531\u624d\u5230\u8fbe\u5bf9\u65b9\u7684\uff0c\u4f46\u5230\u5e95\u662f\u7ecf\u8fc7\u4e86\u54ea\u4e9b\u8def\u7531\u5462?\u901a\u8fc7\u6b64\u53c2\u6570\u5c31\u53ef\u4ee5\u8bbe\u5b9a\u4f60\u60f3\u63a2\u6d4b\u7ecf\u8fc7\u7684\u8def\u7531\u7684\u4e2a\u6570\uff0c\u4e0d\u8fc7\u9650\u5236\u5728\u4e869\u4e2a\uff0c\u4e5f\u5c31\u662f\u8bf4\u4f60\u53ea\u80fd\u8ddf\u8e2a\u52309\u4e2a\u8def\u7531\uff0c\u5982\u679c\u60f3\u63a2\u6d4b\u66f4\u591a\uff0c\u53ef\u4ee5\u901a\u8fc7\u5176\u4ed6\u547d\u4ee4\u5b9e\u73b0\uff0c\u6211\u5c06\u5728\u4ee5\u540e\u7684\u6587\u7ae0\u4e2d\u7ed9\u5927\u5bb6\u8bb2\u89e3\u3002\u4ee5\u4e0b\u4e3a\u793a\u4f8b:<\/p>\n<p>C:\\&gt;ping -n 1 -r 9 202.96.105.101 (\u53d1\u9001\u4e00\u4e2a\u6570\u636e\u5305\uff0c\u6700\u591a\u8bb0\u5f559\u4e2a\u8def\u7531)<\/p>\n<p>Pinging 202.96.105.101 with 32 bytes of data:<\/p>\n<p>Reply from 202.96.105.101: bytes=32 time=10ms TTL=249<\/p>\n<p>Route: 202.107.208.187 -&gt;<\/p>\n<p>202.107.210.214 -&gt;<\/p>\n<p>61.153.112.70 -&gt;<\/p>\n<p>61.153.112.89 -&gt;<\/p>\n<p>202.96.105.149 -&gt;<\/p>\n<p>202.96.105.97 -&gt;<\/p>\n<p>202.96.105.101 -&gt;<\/p>\n<p>202.96.105.150 -&gt;<\/p>\n<p>61.153.112.90<\/p>\n<p>Ping statistics for 202.96.105.101:<\/p>\n<p>Packets: Sent = 1, Received = 1, Lost = 0 (0% loss),<\/p>\n<p>Approximate round trip times in milli-seconds:<\/p>\n<p>Minimum = 10ms, Maximum = 10ms, Average = 10ms<\/p>\n<p>\u4ece\u4e0a\u9762\u6211\u5c31\u53ef\u4ee5\u77e5\u9053\u4ece\u6211\u7684\u8ba1\u7b97\u673a\u5230202.96.105.101\u4e00\u5171\u901a\u8fc7\u4e86202.107.208.187 \uff0c202.107.210.214 , 61.153.112.70 , 61.153.112.89 , 202.96.105.149 , 202.96.105.97\u8fd9\u51e0\u4e2a\u8def\u7531\u3002<\/p>\n<p>-s count Timestamp for count hops.<\/p>\n<p>\u6307\u5b9a count \u6307\u5b9a\u7684\u8dc3\u70b9\u6570\u7684\u65f6\u95f4\u6233\u3002<\/p>\n<p>\u6b64\u53c2\u6570\u548c-r\u5dee\u4e0d\u591a\uff0c\u53ea\u662f\u8fd9\u4e2a\u53c2\u6570\u4e0d\u8bb0\u5f55\u6570\u636e\u5305\u8fd4\u56de\u6240\u7ecf\u8fc7\u7684\u8def\u7531\uff0c\u6700\u591a\u4e5f\u53ea\u8bb0\u5f554\u4e2a\u3002<\/p>\n<p>-j host-list Loose source route along host-list.<\/p>\n<p>\u5229\u7528 computer-list \u6307\u5b9a\u7684\u8ba1\u7b97\u673a\u5217\u8868\u8def\u7531\u6570\u636e\u5305\u3002\u8fde\u7eed\u8ba1\u7b97\u673a\u53ef\u4ee5\u88ab\u4e2d\u95f4\u7f51\u5173\u5206\u9694(\u8def\u7531\u7a00\u758f\u6e90)IP \u5141\u8bb8\u7684\u6700\u5927\u6570\u91cf\u4e3a 9\u3002<\/p>\n<p>-k host-list Strict source route along host-list.<\/p>\n<p>\u5229\u7528 computer-list \u6307\u5b9a\u7684\u8ba1\u7b97\u673a\u5217\u8868\u8def\u7531\u6570\u636e\u5305\u3002\u8fde\u7eed\u8ba1\u7b97\u673a\u4e0d\u80fd\u88ab\u4e2d\u95f4\u7f51\u5173\u5206\u9694(\u8def\u7531\u4e25\u683c\u6e90)IP \u5141\u8bb8\u7684\u6700\u5927\u6570\u91cf\u4e3a 9\u3002<\/p>\n<p>-w timeout Timeout in milliseconds to wait for each reply.<\/p>\n<p>\u6307\u5b9a\u8d85\u65f6\u95f4\u9694\uff0c\u5355\u4f4d\u4e3a\u6beb\u79d2\u3002<\/p>\n<p>\u6b64\u53c2\u6570\u6ca1\u6709\u4ec0\u4e48\u5176\u4ed6\u6280\u5de7\u3002<\/p>\n<p>ping\u547d\u4ee4\u7684\u5176\u4ed6\u6280\u5de7:\u5728\u4e00\u822c\u60c5\u51b5\u4e0b\u8fd8\u53ef\u4ee5\u901a\u8fc7ping\u5bf9\u65b9\u8ba9\u5bf9\u65b9\u8fd4\u56de\u7ed9\u4f60\u7684TTL\u503c\u5927\u5c0f\uff0c\u7c97\u7565\u7684\u5224\u65ad\u76ee\u6807\u4e3b\u673a\u7684\u7cfb\u7edf\u7c7b\u578b\u662fWindows\u7cfb\u5217\u8fd8\u662fUNIX\/Linux\u7cfb\u5217\uff0c\u4e00\u822c\u60c5\u51b5\u4e0bWindows\u7cfb\u5217\u7684\u7cfb\u7edf\u8fd4\u56de\u7684TTL\u503c\u5728100-130\u4e4b\u95f4\uff0c\u800cUNIX\/Linux\u7cfb\u5217\u7684\u7cfb\u7edf\u8fd4\u56de\u7684TTL\u503c\u5728240-255\u4e4b\u95f4\uff0c\u5f53\u7136TTL\u7684\u503c\u5728\u5bf9\u65b9\u7684\u4e3b\u673a\u91cc\u662f\u53ef\u4ee5\u4fee\u6539\u7684\uff0cWindows\u7cfb\u5217\u7684\u7cfb\u7edf\u53ef\u4ee5\u901a\u8fc7\u4fee\u6539\u6ce8\u518c\u8868\u4ee5\u4e0b\u952e\u503c\u5b9e\u73b0:<\/p>\n<p>[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters]<\/p>\n<p>&#8220;DefaultTTL&#8221;=dword:000000ff<\/p>\n<p>255&#8212;FF<\/p>\n<p>128&#8212;80<\/p>\n<p>64&#8212;-40<\/p>\n<p>32&#8212;-20<\/p>\n","protected":false},"excerpt":{"rendered":"<p>ping\u53ea\u6709\u5728\u5b89\u88c5\u4e86TCP\/IP\u534f\u8bae\u4ee5\u540e\u624d\u53ef\u4ee5\u4f7f\u7528: ping [-t] [-a] [-n count] [- [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[71],"tags":[133],"_links":{"self":[{"href":"https:\/\/www.ecjtu.com\/keith\/wp-json\/wp\/v2\/posts\/274"}],"collection":[{"href":"https:\/\/www.ecjtu.com\/keith\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ecjtu.com\/keith\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ecjtu.com\/keith\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ecjtu.com\/keith\/wp-json\/wp\/v2\/comments?post=274"}],"version-history":[{"count":1,"href":"https:\/\/www.ecjtu.com\/keith\/wp-json\/wp\/v2\/posts\/274\/revisions"}],"predecessor-version":[{"id":275,"href":"https:\/\/www.ecjtu.com\/keith\/wp-json\/wp\/v2\/posts\/274\/revisions\/275"}],"wp:attachment":[{"href":"https:\/\/www.ecjtu.com\/keith\/wp-json\/wp\/v2\/media?parent=274"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ecjtu.com\/keith\/wp-json\/wp\/v2\/categories?post=274"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ecjtu.com\/keith\/wp-json\/wp\/v2\/tags?post=274"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}