1、Mtr介绍: 一个不错的网络连通性判断工具

2、安装: yum install mtr -y 或者 dnf install mtr -y

3、基本使用: mtr 96.45.189.193

使用界面

4、名词解释

Host:主机ip地址
Lost:每个对应IP的丢包率
Snt: 设置发送的ping次数, 默认值是10 可以通过参数 -c 来指定
Last: 最近一次的返回延时
Avg:是平均值 发送ping包的平均延时
Best: 最短的延时
Wrst: 最长的延时
StDev: 标准偏差

5、常规用法

mtr -n 96.45.189.193   不显示host名称

mtr -c 5 96.45.189.193 设置发送5次之后自动停止
mtr -s 256 96.45.189.193 设置每次发送的数据包大小为 256

6、MTR的参数

简写 全称 详细描述
-F, –filename FILE read hostname(s) from a file
-4 use IPv4 only
-6 use IPv6 only
-u, –udp use UDP instead of ICMP echo
-T, –tcp use TCP instead of ICMP echo
-a, –address ADDRESS bind the outgoing socket to ADDRESS
-f, –first-ttl NUMBER set what TTL to start
-m, –max-ttl NUMBER maximum number of hops
-U, –max-unknown NUMBER maximum unknown host
-P, –port PORT target port number for TCP, SCTP, or UDP
-L, –localport LOCALPORT source port number for UDP
-s, –psize PACKETSIZE set the packet size used for probing 用来指定ping数据包的大小 (常用)
-B, –bitpattern NUMBER set bit pattern to use in payload
-i, –interval SECONDS ICMP echo request interval
-G, –gracetime SECONDS number of seconds to wait for responses
-Q, –tos NUMBER type of service field in IP header
-e, –mpls display information from ICMP extensions
-Z, –timeout SECONDS seconds to keep probe sockets open
-M, –mark MARK mark each sent packet
-r, –report output using report mode
-w, –report-wide output wide report
-c, –report-cycles COUNT set the number of pings sent
-j, –json output json
-x, –xml output xml
-C, –csv output comma separated values 设置发送的ping次数,通常到达次数后会自动退出 (常用)
-l, –raw output raw format
-p, –split split output
-t, –curses use curses terminal interface
–displaymode MODE select initial display mode
-n, –no-dns do not resove host names 不对IP地址做域名解析 (常用)
-b, –show-ips show IP numbers and host names
-o, –order FIELDS select output fields
-y, –ipinfo NUMBER select IP information in output
-z, –aslookup display AS number
-h, –help display this help and exit
-v, –version output version information and exit
Logo

更多推荐