当前位置:网站首页>Network packet loss, network delay? This artifact helps you get everything done!
Network packet loss, network delay? This artifact helps you get everything done!
2022-07-27 13:39:00 【Weisi xmws】
frequently-used ping,tracert,nslookup It is generally used to judge the network connectivity of the host , Actually Linux There is a better tool for judging network connectivity , It can combine ping nslookup traceroute To judge the relevant characteristics of the network , The order is mtr.
mtr Full name my traceroute, It's a handful ping and traceroute A network diagnostic tool incorporated into a program .
traceroute By default UDP Packet detection , and mtr By default ICMP Message detection ,ICMP In some routing nodes, the priority is lower than other packets , So the test data may be lower than the actual situation .
Installation method
1. Windows The system can be directly in https://cdn.ipip.net/17mon/besttrace.exe download BestTrace Tools and install . It can also be in https://github.com/oott123/WinMTR/releases GitHub Upload and download MTR Special tools , The tool is installation free , After downloading, you can use it directly .
2. Linux You can run the command directly to install .
# Debian/Ubuntu Systemsudo apt install mtr# RedHat/CentOS Systemsudo yum install mtr
3. Apple The client can be in App store Search for Best NetTools Download and install
4. Android client : Can be in Google Play Upload and download TracePing, But because of the domestic Google Play cannot access , I download it by myself , You can directly access https://dwz.cn/KCdNPH4c download TracePing.
Use
MTR Very simple to use , View this machine to qq.com Run the following command directly :
mtr qq.com
MTR qq.com Test interface
The specific output parameters mean :
The first column is IP Address
Packet loss rate :Loss
Number of packets sent :Snt
The delay of the last packet :Last
Average delay :Avg
Minimum delay :Best
Worst case delay :Wrst
variance ( stability ):StDev
Parameter description
-r or -- report
Use mtr -r qq.com To print the report , If not used -r or -- report Parameters mtr It's going to keep moving . Use report Options , mtr Will send to qq.com Host send 10 individual ICMP package , And then output the result directly . Usually mtr It takes a few seconds to output the report .mtr The report consists of a series of hops , Each hop means that packets reach the destination host through nodes or routers .
In general mtr The first few jumps were local ISP, The last few hops belong to the service provider , such as Tencent data center , Intermediate hops are intermediate nodes , If the first few jumps are abnormal , Need to contact local ISP In terms of service provision , On the contrary, if something goes wrong with the last few jumps , You need to contact your service provider , There's something wrong with the middle jump , You need to contact the operator for handling .
By default -r Parameters to generate reports , Just send 10 A packet , If you want to customize the number of packets , have access to -c Parameters .
-s or -- packetsize
Use -s To specify the ping Packet size
mtr -s 100 qq.com100 bytes Packets will be used to send , test , If it is set to a negative number , The size of each packet sent will be a random number .
-c
Specify the number to send
mtr -c 100 qq.com-n
No host interpretation
Use -n Options to make mtr Only the output IP, Instead of the host host name Explain
mtr -n qq.comMTR Result analysis
When we analyze MTR At the time of the report , It's best to find any problems with each jump . In addition to being able to see the path between two servers ,MTR It provides a lot of valuable statistical reports in its seven columns of data .Loss% Column shows the packet loss rate per hop .Snt Column Record how many packets are sent out . Use –report Parameters will be sent by default 10 A packet . If you use –report-cycles=[number-of-packets] Options ,MTR Will follow [number-of-packets] Send out in a specified quantity ICMP Data packets .
Last, Avg, Best and Wrst Columns all identify the round trip time of the packet , Using milliseconds ( ms ) Unit means .Last Represents the time taken by the last packet , Avg It means evaluation time , Best and Wrst Represents the minimum and maximum time . in the majority of cases , average time ( Avg) We need to pay special attention to .
The last column StDev Provides the standard deviation of data packets in each host . If the higher the standard deviation , The more different the delay of this node is . The standard deviation will let you know whether the average delay is the center point of the true delay time , Or the measurement data is disturbed by some problems .
for example , If the standard deviation is large , The delay of data packet is uncertain . Some packets have little latency ( for example :25ms), Other packets have a lot of latency ( for example :350ms). When 10 After all packets are sent , The average delay obtained may be normal , But the average delay does not reflect the actual situation very well . If the standard deviation is very high , Using the best and worst latencies to determine the average latency is a good solution .
in the majority of cases , You can put MTR The output is divided into three blocks . According to the configuration , The second or third jump is usually your local ISP, The last two or three hops are usually for your destination host ISP. The middle node is the router through which the packets pass .
When analyzing MTR Output of , You need to pay attention to two points :loss and latency.
Network packet loss
If you see loss Percent of , This shows that there may be something wrong with this jump . Of course , Many service providers are limiting ICMP The rate of transmission , This can also lead to this problem . So how to specify artificial restrictions ICMP The transmission still has packet loss ? At this point, you need to see the next hop . If there is no packet loss in the next hop , It shows that the last one is artificially limited . The following example :

Man made restrictions MTR Packet loss
In this case , The first 4 Packet loss occurred in the hop , But there was no packet loss in the next few , It shows that the packet loss of the second hop is artificially limited . If there is a packet loss in the next few items , Then maybe there is something wrong with the second jump . please remember ,ICMP Packet rate limiting and packet loss may occur simultaneously .

MTR Screenshot of packet loss
From the picture above , You can see from page 13 Jump and step 17 It's all about dancing 10% The packet loss rate , From the next few hops, there is packet loss , But in the end 15、16 It's all about 100% The packet loss rate , We can guess 100% In addition to the bad network, the packet loss rate is also artificially limited ICMP. therefore , When we see different packet loss rates , Usually, the last few jumps should prevail .
There are also many times when the problem occurs on the way back to the packet . Packets can reach the destination host successfully , But I encountered “ difficult ” 了 . therefore , When the problem happens , We usually need to collect things in the opposite direction MTR The report .
Besides , Maintenance of Internet facilities or short-term network congestion may lead to short-term packet loss rate , When there is a brief 10% When the packet loss rate , Don't worry about , The application layer program will make up for this loss .
Network delay
Except through MTR Report the packet loss rate , We can also see the delay from local to destination . Because it's a different position , The delay usually increases with the number of bars . therefore , The delay usually depends on the physical distance between nodes and the quality of the line .

MTR View network latency
From the above MTR In the screenshot of the report , We can see from page 11 Jump to the 12 The delay of the jump soared , It directly leads to a great delay later , It may be 11 Jump to the 12 Jump belongs to different regions , Physical distance leads to a sharp increase in delay , It could also be the first 12 The router is not configured properly , Or the line is congested . Specific analysis of specific problems is needed .
However , High latency does not necessarily mean there is a problem with the current router . The reason for the high delay may also be caused during the return process . You can't see the path back from the screenshot of this report , The return path can be a completely different route , So it's usually two-way MTR test .
notes :ICMP Rate limits can also increase latency , But you can usually check the time delay of the last item to determine whether it is the above situation .
according to MTR The result is to solve the network problem
MTR Most of the routing problems shown in the report are temporary . A lot of problems are 24 It was solved within hours . Most of the time , If you find routing problems ,ISP The provider has monitored and is working on it . When you experience network problems , You can choose to remind you of ISP provider . When contacting your provider , It needs to be sent MTR Reports and related data . There's no useful data , The provider has no way to solve the problem .
But most of the time , Routing problem is relatively rare . More common is because the physical distance is too long , Or Internet peak , It makes the network slow . Especially across the Atlantic and Pacific , Sometimes the Internet can be slow . In this case , It is recommended to access the customer's node nearby .
1
边栏推荐
- shell环境变量以及set,env,export的区别
- js回调函数(callback)
- Go language series: how to build a go language development environment?
- Perfect guide | how to use ODBC for agent free Oracle database monitoring?
- MFC FTP creates multi-level folders and uploads files to the specified directory of FTP
- 初学者入门:使用WordPress搭建一个专属自己的博客
- MFC FTP创建多级文件夹、上传文件到FTP指定目录
- Amd adrenalin 22.7.1 driver update: double the performance of OpenGL and support Microsoft win11 22h2 system
- QT clipboard qclipboard copy paste custom data
- Feign's dynamic proxy
猜你喜欢

MFC FTP创建多级文件夹、上传文件到FTP指定目录

eBPF/Ftrace

Image features and extraction

滑环的分类以及用途

Amd adrenalin 22.7.1 driver update: double the performance of OpenGL and support Microsoft win11 22h2 system

What are the precautions for using carbon brushes

leetcode——83,24;机器学习——神经网络

Li Hang, director of ByteDance AI Lab: past, present and future of language model

面试考点:三种图的问题

SCI thesis writing
随机推荐
16 VMware horizon 2203 virtual desktop-win10 automatic desktop pool full clone dedicated (XVI)
Differences between shell environment variables and set, env, export
Getting started for beginners: build your own blog with WordPress
Intranet penetration based on FRP -- SSH Remote connection to intranet server with the help of public server
Product manager experience 100 (XI) - Strategic Product Manager: model and methodology
How to fix the slip ring
电滑环的常用类型
Interface testing practical tutorial 01: interface testing environment construction
Insert sort, positive order, reverse order
How about the strength of database HTAP
Li Hang, director of ByteDance AI Lab: past, present and future of language model
【LeetCode】592. 分数加减运算
Can I only use tidb binlog tool to synchronize tidb to MySQL in real time?
Go语言系列:如何搭建Go语言开发环境?
[2023 Fudan Microelectronics written examination questions in advance] ~ questions and reference answers
Echart line chart displays the last point and vertical dotted line by default
QT clipboard qclipboard copy paste custom data
libevent 之 evconnlistener_new_bind
如何调试JNI程序
面试考点:三种图的问题