当前位置:网站首页>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 .边栏推荐
- P8346 最澄澈的空与海【无向图拓扑】
- 类3实践
- iVX低代码平台系列详解 -- 概述篇(二)
- 【ACWing】2521. Count colors
- What are the ways to realize load balancing?
- 4某公司在6个城市c1,c2,c3…c6中有分公司,已知城市ci到cj(I,j=1,2,3,…6)的联通情况下及费用的大小列于以下带权邻接矩阵中C中
- Go-Excelize API源码阅读(三)——OpenReader()
- [acwing] solution of the 60th weekly match
- Huawei technologies:jonathan Krolikowski | from design to deployment, zero contact deep reinforcement learning WLANs
- NO.6浮点数的表示与运算
猜你喜欢

Matplotlib draw multi line graph (solve the problem that Matplotlib Chinese cannot be displayed)

(with source code) a variety of machine learning models (knn\lr\rf\ada\xg\gbdt...) Model training in precipitation downscaling under

Introduction:Multiple DataFrames

Importerror: DLL load failed while importing win32api: the specified program cannot be found.

Several small open source projects of mine over the years

Overview report of Chinese AI medical imaging industry in 2022

手册不全,如何手工刨出TongWeb的監控信息?

华为无线设备配置智能漫游

Version announcement | Apache Doris 1.1 release version officially released!

Rotation formula of coordinate simulation matrix
随机推荐
JVM性能优化
非凸优化问题经典必看综述“从对称性到几何性”,罗切斯特大学等
揭开服务网格~Istio Service Mesh神秘的面纱
看一看try{}catch{}
【ACWing】2492. HH Necklace
Interview records
洛谷P3522 [POI2011]TEM-Temperature 题解
009 面试题 SQL语句各部分的执行顺序
洛谷P2422 良好的感觉 题解
AcWing 136. Adjacent value lookup
uniapp 高德地图定位功能
Keil环境下STM32定位hardfault位置方法和遇到的情况
[7.13] code source - [hungry meals] [path count 2] [function sum]
洛谷:P3092 [USACO13NOV]No Change G(状压+二分,独特的状态定义,不写会后悔一辈子的题)
O'Neill's RPS curve compilation method (original by Dr. Tao)
2. Sum of three numbers
研二非科班研究生如何备战秋招
Colliding Mice碰撞老鼠工程分析
通达信开户是真的吗?通达信开户安全吗?
Analyze and hook sshd to hijack password