{"id":743,"date":"2019-04-17T16:49:30","date_gmt":"2019-04-17T08:49:30","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=743"},"modified":"2019-04-29T00:04:19","modified_gmt":"2019-04-28T16:04:19","slug":"traceroute","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/traceroute","title":{"rendered":"traceroute\u547d\u4ee4 – \u8ffd\u8e2a\u6570\u636e\u5305\u5728\u7f51\u7edc\u4e0a\u7684\u4f20\u8f93\u65f6\u7684\u5168\u90e8\u8def\u5f84"},"content":{"rendered":"\n

traceroute\u547d\u4ee4\u7528\u4e8e\u8ffd\u8e2a\u6570\u636e\u5305\u5728\u7f51\u7edc\u4e0a\u7684\u4f20\u8f93\u65f6\u7684\u5168\u90e8\u8def\u5f84\uff0c\u5b83\u9ed8\u8ba4\u53d1\u9001\u7684\u6570\u636e\u5305\u5927\u5c0f\u662f40\u5b57\u8282\u3002\u901a\u8fc7traceroute\u6211\u4eec\u53ef\u4ee5\u77e5\u9053\u4fe1\u606f\u4ece\u4f60\u7684\u8ba1\u7b97\u673a\u5230\u4e92\u8054\u7f51\u53e6\u4e00\u7aef\u7684\u4e3b\u673a\u662f\u8d70\u7684\u4ec0\u4e48\u8def\u5f84\u3002\u5f53\u7136\u6bcf\u6b21\u6570\u636e\u5305\u7531\u67d0\u4e00\u540c\u6837\u7684\u51fa\u53d1\u70b9\uff08source\uff09\u5230\u8fbe\u67d0\u4e00\u540c\u6837\u7684\u76ee\u7684\u5730(destination)\u8d70\u7684\u8def\u5f84\u53ef\u80fd\u4f1a\u4e0d\u4e00\u6837\uff0c\u4f46\u57fa\u672c\u4e0a\u6765\u8bf4\u5927\u90e8\u5206\u65f6\u5019\u6240\u8d70\u7684\u8def\u7531\u662f\u76f8\u540c\u7684\u3002<\/p>\n\n\n\n

traceroute\u901a\u8fc7\u53d1\u9001\u5c0f\u7684\u6570\u636e\u5305\u5230\u76ee\u7684\u8bbe\u5907\u76f4\u5230\u5176\u8fd4\u56de\uff0c\u6765\u6d4b\u91cf\u5176\u9700\u8981\u591a\u957f\u65f6\u95f4\u3002\u4e00\u6761\u8def\u5f84\u4e0a\u7684\u6bcf\u4e2a\u8bbe\u5907traceroute\u8981\u6d4b3\u6b21\u3002\u8f93\u51fa\u7ed3\u679c\u4e2d\u5305\u62ec\u6bcf\u6b21\u6d4b\u8bd5\u7684\u65f6\u95f4(ms)\u548c\u8bbe\u5907\u7684\u540d\u79f0\uff08\u5982\u6709\u7684\u8bdd\uff09\u53ca\u5176ip\u5730\u5740\u3002<\/p>\n\n\n\n

\u8bed\u6cd5\u683c\u5f0f\uff1a<\/strong>traceroute [\u53c2\u6570] [\u57df\u540d\u6216\u8005IP]<\/p>\n\n\n\n

\u5e38\u7528\u53c2\u6570\uff1a<\/strong><\/p>\n\n\n\n
-d<\/td>\u4f7f\u7528Socket\u5c42\u7ea7\u7684\u6392\u9519\u529f\u80fd<\/td><\/tr>
-f<\u5b58\u6d3b\u6570\u503c><\/td>\u8bbe\u7f6e\u7b2c\u4e00\u4e2a\u68c0\u6d4b\u6570\u636e\u5305\u7684\u5b58\u6d3b\u6570\u503cTTL\u7684\u5927\u5c0f<\/td><\/tr>
-F<\/td>\u8bbe\u7f6e\u52ff\u79bb\u65ad\u4f4d<\/td><\/tr>
-g<\u7f51\u5173><\/td>\u8bbe\u7f6e\u6765\u6e90\u8def\u7531\u7f51\u5173\uff0c\u6700\u591a\u53ef\u8bbe\u7f6e8\u4e2a<\/td><\/tr>
-i<\u7f51\u7edc\u754c\u9762><\/td>\u4f7f\u7528\u6307\u5b9a\u7684\u7f51\u7edc\u754c\u9762\u9001\u51fa\u6570\u636e\u5305<\/td><\/tr>
-I<\/td>\u4f7f\u7528ICMP\u56de\u5e94\u53d6\u4ee3UDP\u8d44\u6599\u4fe1\u606f<\/td><\/tr>
-m<\u5b58\u6d3b\u6570\u503c><\/td>\u8bbe\u7f6e\u68c0\u6d4b\u6570\u636e\u5305\u7684\u6700\u5927\u5b58\u6d3b\u6570\u503cTTL\u7684\u5927\u5c0f<\/td><\/tr>
-n<\/td>\u76f4\u63a5\u4f7f\u7528IP\u5730\u5740\u800c\u975e\u4e3b\u673a\u540d\u79f0<\/td><\/tr>
-p<\u901a\u4fe1\u7aef\u53e3><\/td>\u8bbe\u7f6eUDP\u4f20\u8f93\u534f\u8bae\u7684\u901a\u4fe1\u7aef\u53e3<\/td><\/tr>
-r<\/td>\u5ffd\u7565\u666e\u901a\u7684Routing Table\uff0c\u76f4\u63a5\u5c06\u6570\u636e\u5305\u9001\u5230\u8fdc\u7aef\u4e3b\u673a\u4e0a<\/td><\/tr>
-s<\u6765\u6e90\u5730\u5740><\/td>\u8bbe\u7f6e\u672c\u5730\u4e3b\u673a\u9001\u51fa\u6570\u636e\u5305\u7684IP\u5730\u5740<\/td><\/tr>
-t<\u670d\u52a1\u7c7b\u578b><\/td>\u8bbe\u7f6e\u68c0\u6d4b\u6570\u636e\u5305\u7684TOS\u6570\u503c<\/td><\/tr>
-v<\/td>\u8be6\u7ec6\u663e\u793a\u6307\u4ee4\u7684\u6267\u884c\u8fc7\u7a0b<\/td><\/tr>
-w<\/td>\u8bbe\u7f6e\u7b49\u5f85\u8fdc\u7aef\u4e3b\u673a\u56de\u62a5\u7684\u65f6\u95f4<\/td><\/tr>
-x<\/td>\u5f00\u542f\u6216\u5173\u95ed\u6570\u636e\u5305\u7684\u6b63\u786e\u6027\u68c0\u9a8c<\/td><\/tr><\/tbody><\/table>\n\n\n\n

\u53c2\u8003\u5b9e\u4f8b<\/strong><\/p>\n\n\n\n

\u8ffd\u8e2a\u672c\u5730\u6570\u636e\u5305\u5230www.linuxprobe.com\u7684\u4f20\u8f93\u8def\u5f84\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# traceroute www.linuxprobe.com
<\/pre>\n\n\n\n

\u8df3\u6570\u8bbe\u7f6e\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# traceroute -m 7 www.linuxprobe.com
<\/pre>\n\n\n\n

\u663e\u793aIP\u5730\u5740\uff0c\u4e0d\u67e5\u4e3b\u673a\u540d \uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# traceroute -n www.linuxprobe.com
<\/pre>\n\n\n\n

\u628a\u63a2\u6d4b\u5305\u7684\u4e2a\u6570\u8bbe\u7f6e\u4e3a\u503c4\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# traceroute -q 4 www.linuxprobe.com
<\/pre>\n\n\n\n

\u628a\u5bf9\u5916\u53d1\u63a2\u6d4b\u5305\u7684\u7b49\u5f85\u54cd\u5e94\u65f6\u95f4\u8bbe\u7f6e\u4e3a3\u79d2\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# traceroute -w 3 www.linuxprobe.com
<\/pre>\n","protected":false},"excerpt":{"rendered":"

traceroute\u547d\u4ee4\u7528\u4e8e\u8ffd\u8e2a\u6570\u636e\u5305\u5728\u7f51\u7edc\u4e0a\u7684\u4f20\u8f93\u65f6\u7684\u5168\u90e8\u8def\u5f84\uff0c\u5b83\u9ed8\u8ba4\u53d1\u9001\u7684\u6570\u636e\u5305\u5927\u5c0f\u662f40\u5b57\u8282\u3002\u901a\u8fc7tra […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/743"}],"collection":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/comments?post=743"}],"version-history":[{"count":8,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/743\/revisions"}],"predecessor-version":[{"id":1525,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/743\/revisions\/1525"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=743"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=743"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=743"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}