{"id":176020,"date":"2020-04-17T11:11:35","date_gmt":"2020-04-17T03:11:35","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=176020"},"modified":"2020-04-02T19:12:35","modified_gmt":"2020-04-02T11:12:35","slug":"network-mtr-tool","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/network-mtr-tool.html","title":{"rendered":"\u9047\u5230\u7f51\u7edc\u95ee\u9898\uff1f\u522b\u614c\uff01MTR\u6765\u5e2e\u60a8"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\nMTR\u662f\u529f\u80fd\u5f3a\u5927\u7684\u7f51\u7edc\u8bca\u65ad\u5de5\u5177\uff0c\u53ef\u8ba9\u7cfb\u7edf\u7ba1\u7406\u5458\u8bca\u65ad\u548c\u5b9a\u4f4d\u7f51\u7edc\u9519\u8bef\uff0c\u5e76\u5411\u4e0a\u6e38\u63d0\u4f9b\u5546\u63d0\u4f9b\u7f51\u7edc\u72b6\u6001\u62a5\u544a\u3002 mtr\u5728\u5355\u4e2a\u7f51\u7edc\u8bca\u65ad\u5de5\u5177\u4e2d\u7ed3\u5408\u4e86traceroute\u548cping\u7a0b\u5e8f\u7684\u529f\u80fd\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

\"\"<\/p>\n

\u5728\u542f\u52a8mtr\u65f6\uff0c\u5b83\u5c06\u901a\u8fc7\u53d1\u9001\u5177\u6709\u6545\u610f\u4f4eTTL\u7684\u6570\u636e\u5305\u6765\u8c03\u67e5\u8fd0\u884c\u5176\u7684\u4e3b\u673amtr\u548cHOSTNAME\u4e4b\u95f4\u7684\u7f51\u7edc\u8fde\u63a5\u3002 \u5b83\u7ee7\u7eed\u53d1\u9001\u4f4eTTL\u7684\u6570\u636e\u5305\uff0c\u5e76\u6ce8\u610f\u4e2d\u95f4\u8def\u7531\u5668\u7684\u54cd\u5e94\u65f6\u95f4\u3002 \u8fd9\u4f7fmtr\u53ef\u4ee5\u6253\u5370\u5230HOSTNAME\u7684Internet\u8def\u7531\u7684\u54cd\u5e94\u767e\u5206\u6bd4\u548c\u54cd\u5e94\u65f6\u95f4\u3002 \u6570\u636e\u5305\u4e22\u5931\u6216\u54cd\u5e94\u65f6\u95f4\u7684\u7a81\u7136\u589e\u52a0\u901a\u5e38\u8868\u793a\u94fe\u8def\u4e0d\u826f\uff08\u6216\u53ea\u662f\u8fc7\u8f7d\uff09\u3002<\/p>\n

\u901a\u5e38\u5c06\u7ed3\u679c\u62a5\u544a\u4e3a\u5f80\u8fd4\u54cd\u5e94\u65f6\u95f4\uff08\u4ee5\u6beb\u79d2\u4e3a\u5355\u4f4d\uff09\u548c\u6570\u636e\u5305\u4e22\u5931\u7684\u767e\u5206\u6bd4\u3002<\/p>\n

\u5b89\u88c5mtr<\/strong><\/div>\n

Ubuntu\/Debian<\/strong><\/p>\n

sudo apt install mtr<\/pre>\n

CentOS<\/strong><\/p>\n

sudo yum install mtr<\/pre>\n

Arch Linux<\/strong><\/p>\n

pacman -S mtr<\/pre>\n

MacOS<\/strong><\/p>\n

brew install mtr<\/pre>\n
\u4f7f\u7528<\/strong><\/div>\n
[root@ecs-0bca0b85-450b ~]# mtr -h\r\nusage: mtr [-BfhvrwctglxspQomniuT46] [--help] [--version] [--report]\r\n\t\t[--report-wide] [--report-cycles=COUNT] [--curses] [--gtk]\r\n\t\t[--csv|-C] [--raw] [--xml] [--split] [--mpls] [--no-dns] [--show-ips]\r\n\t\t[--address interface] [--filename=FILE|-F]\r\n\t\t[--ipinfo=item_no|-y item_no]\r\n\t\t[--aslookup|-z]\r\n\t\t[--psize=bytes\/-s bytes] [--order fields]\r\n\t\t[--report-wide|-w] [--inet] [--inet6] [--max-ttl=NUM] [--first-ttl=NUM]\r\n\t\t[--bitpattern=NUM] [--tos=NUM] [--udp] [--tcp] [--port=PORT] [--timeout=SECONDS]\r\n\t\t[--interval=SECONDS] HOSTNAME\r\n\r\n<\/pre>\n

\u5728Linux\u6216MacOS\u4e0a\u5b89\u88c5MTR\u540e\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u8bed\u6cd5\u751f\u6210MTR\u62a5\u544a\uff1a<\/p>\n

mtr -rw [destination_host]<\/pre>\n

\u4f8b\u5982\uff0c\u8981\u6d4b\u8bd5\u5230\u4e3b\u673ameterpreter.org\u7684\u8def\u7531\u548c\u7f51\u7edc\u8fde\u63a5\u7684\u8d28\u91cf\uff0c\u8bf7\u5728\u6e90\u4e3b\u673a\u4e0a\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n

mtr -rw www.linuxidc.com\r\nStart: 2020-03-26T09:23:10+0800\r\nHOST: linux    Loss%  Snt  Last  Avg  Best  Wrst StDev\r\n  1.|-- _gateway  0.0%    10    0.3  0.3  0.2  0.5  0.1\r\n  2.|-- ???      100.0    10    0.0  0.0  0.0  0.0  0.0\r\n\r\n<\/pre>\n

\u8fd9\u6837\uff0c\u6211\u4eec\u5c31\u53ef\u4ee5\u5f97\u5230\u6240\u7ecf\u8fc7\u7f51\u7edc\u8bbe\u5907\u53ca\u76ee\u7684\u5730\u7684\u5ef6\u8fdf\u548c\u4e22\u5305\u7387\u4e86\uff0c\u901a\u8fc7\u5206\u6790\u8def\u5f84\u4e0a\u7684\u4e22\u5305\u7387\u80fd\u591f\u5e2e\u52a9\u6211\u4eec\u5224\u65ad\u7f51\u7edc\u95ee\u9898\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

\u5728\u542f\u52a8mtr\u65f6\uff0c\u5b83\u5c06\u901a\u8fc7\u53d1\u9001\u5177\u6709\u6545\u610f\u4f4eTTL\u7684\u6570\u636e\u5305\u6765\u8c03\u67e5\u8fd0\u884c\u5176\u7684\u4e3b\u673amtr\u548cHOSTNAME\u4e4b\u95f4\u7684\u7f51\u7edc\u8fde\u63a5\u3002 […]<\/p>\n","protected":false},"author":317,"featured_media":135903,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-176020","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/176020","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/317"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=176020"}],"version-history":[{"count":2,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/176020\/revisions"}],"predecessor-version":[{"id":176023,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/176020\/revisions\/176023"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/135903"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=176020"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=176020"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=176020"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}