当前位置:网站首页>Can ping command still play like this?
Can ping command still play like this?
2022-07-19 14:19:00 【Manon breakthrough】
Click on the above “ Manon break through ”, Pay attention now
This is the first stop of manong charging , reply “666”, Get a special gift bag
True love, , Please set up “ Star standard ” Or click “ Looking at ”

author :Pheenet Finette
https://www.toutiao.com/a6783191796659782148
Some friends reported that , Can you talk about ping Use of commands , In fact, we have mentioned some of the use of commands before , But yes ping The command didn't explain too much , Generally, we use its basic functions , Today, let's take a detailed look at ping The command is used in detail .
One 、ping Basic use details
In the network ping It's a very powerful TCP/IP Tools . Its main function is :
1、 Used to detect network connectivity and analyze network speed
2、 Get the server according to the domain name IP
3、 according to ping Back to TTL Value to determine the operating system used by the other party and the number of packets passing through the router .
We usually use it to directly ping ip Address , To test network connectivity .

Like this , direct ping ip Address or gateway ,ping The above data will be displayed , A friend might ask ,bytes=32;time<1ms;TTL=128 What do these mean .
bytes value : Packet size , That's byte .
time value : response time , The smaller the time , The faster you connect to this address .
TTL value :Time To Live, Express DNS Recorded in the DNS The time that exists on the server , It is IP A value of the protocol package , Tell the router when the packet needs to be discarded . Can pass Ping Back to TTL Value size , Roughly, the target system type is Windows Series or UNIX/Linux series .
By default ,Linux Systematic TTL The value is 64 or 255,WindowsNT/2000/XP Systematic TTL The value is 128,Windows98 Systematic TTL The value is 32,UNIX The host TTL The value is 255.
So in general TTL value :
100~130ms Between ,Windows System ;
240~255ms Between ,UNIX/Linux System .
Of course , The main thing we know today is not that , It is ping Other references for .
ping In addition to direct orders ping Online ip Address , Verify that the network is smooth and fast , It also has these uses .

Two 、ping -t Use
Without interruption Ping Specify the computer , Until the administrator interrupts .

This shows that the computer is connected to the router , The network works very well . Next, press and hold the key Ctrl+c Stop it and continue ping down , It will stop , It sums up how many packets are running , How many are on and off .
3、 ... and 、ping -a Use
ping-a Resolve the computer name and NetBios name . It's through ping its ip Address , You can parse the host name .

Four 、ping -n Use
By default , Generally only four packets are sent , With this command, you can define the number of messages you want to send , It's very helpful to measure network speed , For example, I want to test sending 10 What is the average return time of packets , What's the fastest time , What is the slowest time can be learned from the following :

From the above I can know that we are giving 47.93.187.142 send out 10 In the process of creating a packet , Back to 10 individual , There is no loss , this 10 Among the packets, the fastest return speed is 32ms, The slowest is 55ms, The average speed is 37ms. It shows that my network is good .
If for some bad networks , For example, the monitoring system is very stuck , Test like this , The returned results may show that some of them are missing , If you lose more , That means the network is not good , Can be very intuitive to determine the situation of the network .
5、 ... and 、ping -l size Use
-l size: send out size Packets of the specified size to the target host .
By default Windows Of ping The packet size sent is 32byt, It's best to send 65500byt. When the number of packets sent at one time is greater than or equal to 65500byt when , It may cause the receiver computer to go down . So Microsoft limited that number ; This parameter is very harmful when combined with other parameters , For example, attackers can combine - t Parameter implementation DOS attack .( So it's dangerous , Don't use the computer easily to others ).
for example :ping -l 65500 -t 211.84.7.46
It will continue to IP Address execution ping command , Until the user Ctrl+C interrupt .

So it's going to keep going to 211.84.7.46 The size of the computer transmission is 65500byt Data packets of , If you only have one computer, it may not work , But if you have a lot of computers, you can completely paralyze each other , The network is seriously blocked , From this we can see that the power is not small .
6、 ... and 、ping -r count Use
stay “ Record routes ” Field to record the route of outgoing and returned packets , Detect the passing
Number of routes , But at most it can only be traced to 9 Routes .
ping -n 1 -r 9 202.102.224.25 ( Send a packet , Maximum records 9 Routes )

Will go through 9 All the routes are displayed , Look at the picture .
ping This is the most common command 6 Class , You may use it in the project .
7、 ... and 、 Batch Ping Network segment
For a network segment ip There are so many addresses , If a single test is really cumbersome , Then we can directly batch ping Network segment detection , that ip There's something wrong with the address , Be clear at a glance .
Look at the code first , Enter... Directly in the command line window :
for /L %D in (1,1,255) do ping 10.168.1.%D
IP Change the address field to the one you want to check IP Address segment .

When you enter the batch command , Then it will automatically put all the ip All the addresses are ping It's over .
So this one “for /L %D in(1,1,255) do ping 10.168.1.%D” What does code mean ?
This one in the code (1,1,255) Is the beginning and beginning of network segment , It's detecting network segments 192.168.1.1 To 192.168.1.255 Between all the ip Address , Every time it goes up 1, Direct to 1 To 255 this 255 individual ip Until it's done .
( End ) Code farmer breakthrough information link 1、 Oh my god ! Bytes to beat 《 Chinese Manual of algorithm 》 became angry , Full version PDF Open download !
2、 Computer basic knowledge summary and operating system PDF download
3、 Emma , Finally here !《LeetCode Java An explanation of the title of the edition 》.PDF
4、Github 10K+,《LeetCode Brush problem C/C++ Version answers 》 Baked .PDF
Welcome to add Yuge's personal wechat :smartfish2020, Join the fan group or circle of friends .边栏推荐
- [Flink] Flink will report an error if it fails to set checkpoints once. Setlerablecheckpointfailurenumber does not work
- Optimal Biking Strategy【DP + 二分】
- 洛谷P2422 良好的感觉 题解
- Some puzzles about data dictionary
- Huawei wireless device configuration user CAC
- 暑期rhcsa培训第三天作业
- topy库的安装(拓扑优化软件)
- 同一宿主机不同容器网络通信流程分析
- How to quickly calculate the FID, is, sfid, precision, recall and other key evaluation indicators of the generated model?
- What are the ways to realize load balancing?
猜你喜欢

FreeRTOS个人笔记-支持多优先级

非凸優化問題經典必看綜述“從對稱性到幾何性”,羅切斯特大學等

NO.6浮点数的表示与运算

uniapp 高德地图定位功能

Version announcement | Apache Doris 1.1 release version officially released!

(附源码)多种机器学习模型(KNN\LR\RF\Ada\Xg\GBDT...)下的降水降尺度中的模型训练
![[7.15] code source - [neat array 2] [ternary cycle] [reverse pair on tree] [sequence of cochlea]](/img/86/8300586819e76502134e8467dc28a3.png)
[7.15] code source - [neat array 2] [ternary cycle] [reverse pair on tree] [sequence of cochlea]

Redis源码与设计剖析 -- 3.字典

数据库的增删改查

Huawei technologies:jonathan Krolikowski | from design to deployment, zero contact deep reinforcement learning WLANs
随机推荐
JVM性能优化
Tencent cloud object storage operation process
谷歌浏览器开发者工具的使用(掌握!)
Luogu p3512 [poi2010] PIL pilots problem solution
[7.15] code source - [neat array 2] [ternary cycle] [reverse pair on tree] [sequence of cochlea]
(附源码)多种机器学习模型(KNN\LR\RF\Ada\Xg\GBDT...)下的降水降尺度中的模型训练
Microservice calling component feign practice
After 2000, he was hired as a special associate researcher of Nanjing University. He went to primary school at the age of 4 and was admitted to Nanjing University at the age of 14!
华为无线设备配置用户CAC
NO.6浮点数的表示与运算
Initial understanding of functions - next
Robotics at Google:Laura Graesser | i-Sim2Real:在紧密的人机交互循环中强化学习机器人策略
unity 字幕滚动
版本通告|Apache Doris 1.1 Release 版本正式发布!
暑期rhcsa培训第一天作业
NO.4位、字节、信息存储
matplotlib绘制多折线图(解决matplotlib中文无法显示问题)
Huawei Technologies:Jonatan Krolikowski | 从设计到部署零接触深度强化学习WLANs
分析并HOOK SSHD来劫持密码
unity 实现UI-背包装备拖拽功能