Detailed explanation and use tips under Windows

zhaozj2021-02-17  53

For Windows under the ping command, I have been familiar with it, but it is not a lot of people who can play the function of ping. Of course, I don't say that I can let Ping play the biggest function. I only use it. Ping this tool, also summarizes some little experience, now share it with you.

Now I will tell you about the help of ping commands to tell you how I use ping, and ping can only be used after installation of the TCP / IP protocol:

Ping [-t] [-a] [-n count] [-l length] [-f] [-i ttl] [-V TOS] [-r count] [-s count] [[-j computer-list ] | [-K computer-list] [-w timeout] destination-list

Options:

-t ping the specified host uncle stopped.to see statistics and continue - Type Control-Break; to Stop - Type Control-C.

Keep Ping Local Host until you press Control-C.

This feature does not have special skills, but it can be used with other parameters will be mentioned below.

-a resolve addresss to hostnames.

Analyze computer NetBIOS name.

Example: c: \> ping -a 192.168.1.21

Pinging Iceblood.yofor.com [192.168.1.21] with 32 bytes of data:

Reply from 192.168.1.21: Bytes = 32 TIME <10MS TTL = 254

Reply from 192.168.1.21: Bytes = 32 TIME <10MS TTL = 254

Reply from 192.168.1.21: Bytes = 32 TIME <10MS TTL = 254

Reply from 192.168.1.21: Bytes = 32 TIME <10MS TTL = 254

Ping Statistics for 192.168.1.21:

Packets: SENT = 4, Received = 4, Lost = 0 (0% Loss), Approximate Round Trip Times in Milli-Seconds:

Minimum = 0ms, maximum = 0ms, Average = 0ms

From the above, you can know the computer NetBIOS named Iceblood.Yofor.com with IP 192.168.1.21.

--N Count Number of echo requests to send.

Send count of the ECHO packet specified by COUNT.

By default, only four packets are usually sent. You can define the number of sent by this command. It is very helpful to measure the network speed. For example, I want to test the average time of the return of 50 packets, how much time is How much is the fastest time, the slowest time can be learned by the following:

C: \> ping -n 50 202.103.96.68

Pinging 202.103.96.68 with 32 bytes of data:

Reply from 202.103.96.68: Bytes = 32 TIME = 50ms TTL = 241

Reply from 202.103.96.68: Bytes = 32 TIME = 50ms TTL = 241

Reply from 202.103.96.68: Bytes = 32 Time = 50ms TTL = 241REQUEST TIMED OUT.

..................

Reply from 202.103.96.68: Bytes = 32 TIME = 50ms TTL = 241

Reply from 202.103.96.68: Bytes = 32 TIME = 50ms TTL = 241

Ping statistics for 202.103.96.68:

Packets: SENT = 50, Received = 48, Lost = 2 (4% Loss), Approximate Round Trip Times in Milli-Seconds:

Minimum = 40ms, maximum = 51ms, Average = 46ms

From the above, I can know that in the process of sending 50 packets to 202.103.96.68, it returns 48, two of which are lost due to unknown reasons, the 48 packets return speed is the fastest 40MS, the slowest 51MS, the average speed is 46ms.

-l size send buffer size.

Define the ECHO packet size.

In the default case, the packet size sent by Windows is 32byt, and we can also define its size, but there is a size limit, that is, the maximum can only send 65500byt, maybe someone will ask why it is 65500Byt, because The Windows Series systems have a security vulnerability (perhaps other systems) is that when the data packet sent by the other party is greater than or equal to 65532, the other party is very likely to block, so Microsoft has restricted this security vulnerability. Ping's packet size. Although Microsoft has made this limit, this parameter is still very powerful after this parameter is still very powerful. For example, we can implement an aggressive command by mating -t parameters: (The following introduction is dangerous, only In the test, do not easily apply on the machine, otherwise the consequences are at your own risk)

C: \> ping -l 65500 -t 192.168.1.21

Pinging 192.168.1.21 with 65500 BYTES of DATA:

Reply from 192.168.1.21: Bytes = 65500 Time <10ms TTL = 254

Reply from 192.168.1.21: Bytes = 65500 Time <10ms TTL = 254

..................

This will send a size of 65500BYT to 192.168.1.21, if you have only one computer, but if you have a lot of computers, you can make it completely embarrassing, I have done like this. Test, when I use more than 10 computer PING PING WIN2000PRO system, less than 5 minutes, the network has been completely paralyzed, the network is seriously blocked, and the HTTP and FTP services are completely stopped, thereby visible that the power is not as small.

-f set don't fragment flag in packet.

Send a "Do not segment" flag in the packet.

In the general packet you send, you will be sent to the other party via routing segmentation, plus the route will not reside again.

-i TTL TIME TO LIVE.

Specifies the time to stay in the system in the other party.

This parameter also helps you check the network operation.

-V TOS TYPE OF Service.

Set the Service Type field to the value specified by TOS.

-r Count Record Route for Count HOPS. Record the route from the "Record Routing" field.

In general, the packet you sent is to the other party through a route, but what is the route? Through this parameter, you can set the number of routes you want to detect, but the limit is 9, that is, you can only track 9 routes. If you want to detect more, you can implement it through other commands, I will Explain to everyone in future articles. The following is an example:

C: \> ping -n 1 -r 9 202.96.105.101 (send a packet, record up to 9 routing)

Pinging 202.96.105.101 with 32 bytes of data:

Reply from 202.96.105.101: bytes = 32 TIME = 10ms TTL = 249

Route: 202.107.208.187 ->

202.107.210.214 ->

61.153.112.70 ->

61.153.112.89 ->

202.96.105.149 ->

202.96.105.97 ->

202.96.105.101 ->

202.96.105.150 ->

61.153.112.90

Ping statistics for 202.96.105.101:

Packets: SENT = 1, Received = 1, Lost = 0 (0% LOSS),

Approximate Round Trip Times in Milli-Seconds:

Minimum = 10ms, maximum = 10ms, Average = 10ms

From above I can know that from my computer to 202.96.105.101, I have adopted 202.107.208.187, 202.112.70, 6153.112.89, 202.96.105.149, 202.96.105.97 These routes.

-s Count Timestamp for Count HOPS.

Specifies the timestamp of the number of hops specified by count.

This parameter and -R are similar, but this parameter does not record the route passed by the packet, and only 4 is recorded.

-j host-list loose source route along host-list.

Routing the packet using the computer list specified using computer-list. A continuous computer can be separated by the intermediate gateway (routing sparse source) IP allowed to be 9.

-k Host-List strict source route along host-list.

Routing the packet using the computer list specified using computer-list. Continuous computers cannot be separated by intermediate gateway (routing strict source) IP allowed to 9.

-w Timeout Timeout in MilliseConds to wait for each reply.

Specifies a timeshoot, unit is millisecond.

This parameter has no other techniques.

Other Tips for ping commands: In general, you can also return the other party to your TTL value size, the system type of the rough judgment target host is a Windows Series or a UNIX / Linux series, in general, the Windows series system returns The TTL value is between 100-130, and the TTL value returned by the UNIX / Linux series is between 240-255, and of course the value of TTL is modified in the other's host, and the system of Windows series can be registered Table The following key value is implemented:

[HKEY_LOCAL_MACHINE \System \currentControlset \Services\tcpip \parameters] "defaultttl" = dword: 000000FF

255 --- ff

128 --- 80

64 ---- 40

32 ---- 20

Ok, the ping command is basically completely explained, there are -J, -K parameters I have not described in detail, because some reasons also include the information I have collected, there is no more introduction to everyone, please Everyone is forgive me if you have a friend who knows more than me, and other use skills I hope you can tell me and thank you here.

转载请注明原文地址:https://www.9cbs.com/read-29521.html

New Post(0)