1、Mtr介紹: 一個不錯的網(wǎng)絡(luò)連通性判斷工具
2、安裝: yum install mtr -y 或者 dnf install mtr -y
3、基本使用: mtr 96.45.189.193

使用界面
4、名詞解釋
Host:主機ip地址
Lost:每個對應(yīng)IP的丟包率
Snt: 設(shè)置發(fā)送的ping次數(shù), 默認值是10 可以通過參數(shù) -c 來指定
Last: 最近一次的返回延時
Avg:是平均值 發(fā)送ping包的平均延時
Best: 最短的延時
Wrst: 最長的延時
StDev: 標(biāo)準(zhǔn)偏差
5、常規(guī)用法

mtr -n 96.45.189.193 不顯示host名稱
① mtr -c 5 96.45.189.193 設(shè)置發(fā)送5次之后自動停止
② mtr -s 256 96.45.189.193 設(shè)置每次發(fā)送的數(shù)據(jù)包大小為 256
6、MTR的參數(shù)
| 簡寫 | 全稱 | 詳細描述 |
|---|---|---|
| -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數(shù)據(jù)包的大小 (常用)
|
| -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 設(shè)置發(fā)送的ping次數(shù),通常到達次數(shù)后會自動退出 (常用)
|
| -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 |