Ping command learning

xiaoxiao2021-04-02  212

With reference to the help of ping commands, the skills will be used when ping, and ping can only be used after the TCP / IP protocol is installed: ping [-t] [-a] [-n count] [-l length] [-f ] [-i TTL] [-V TOS] [-r count] [-s count] [-j computer-list]

[-k computer-list] Destination-list options: -t ping the specified host uncle stopped.to see statistics and continuous - type control-break; to stop - type control-c. non-stop Ping Place The host until Control-C is pressed. This feature does not have special skills, but it can be used with other parameters will be mentioned below. -A resolve address to hostnames. Resolve the 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 above, IP is 192.168.1.21 Computer NetBIOS name Iceblood.yofor.com. -N count number of echo requests to send. Send count specified by the ECHO packet.

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: 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 = 241 Request 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 above, you can know that in the process of sending 50 packets to 202.103.96.68, it returns 48, two of which are due to unknown reasons. Lost, the return speed is the fastest speed of 40ms in the 48 packets, the speed is 51ms, the average speed is 46ms. l Size Send Buffer Size. Define the Echo Packet Size. In the default, the packet size sent by Windows is 32BYT, or you can define its size, but there is a size limit, that is, the maximum can only send 65500BYT, maybe someone will ask why you want to limit to 65500Byt, because Windows The series of systems have a safe vulnerability (perhaps other

The system) is 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 the packet size of ping to solve this security vulnerability. 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 continue to send a size of 65500BYT to 192.168.1.21 computers. If there is only one computer, there is no effect, but if there are many computers, you can make the other party completely paralyzed, I have done like this. Test, when using more than 10 computers of a 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, and 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 routing of the outgoing and returning packets in 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. The computer list specified using computer-list routing packets. 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 \Sys Tem \currentControlSet \Services\tcpip \Parameters]

"Defaultttl" = DWORD: 000000FF

255 --- ff

128 --- 80

64 ---- 40

32 ---- 20

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

New Post(0)