Advanced use of Advanced ping
I'm sure you're familiar with the ping in Windows, but there's not a lot of people who can do the most of the ping, and I'm not saying I can get the most out of ping, and I'm just using ping as a tool, and I've summed up some small experience, Now share with you.
Now I'll refer to the ping command's help to tell you the techniques I use to ping, and Ping will only be available 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] [-w timeout] Destination-list
Options:
-T Ping the specified host until stopped. To statistics and Continue-type control-break; To Stop-type Control-c.
Ping the local host non-stop until you press CONTROL-C.
There is no particular technique for this feature, but it can be used with other parameters, as mentioned below.
-a Resolve addresses to hostnames.
Resolves the computer NetBIOS name.
Example: C:\>ping-a 192.168.1.21
Pinging iceblood.yofor.com [192.168.1.21] with 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 trips times in Milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
From the above you can know that the IP-192.168.1.21 computer NetBIOS name is iceblood.yofor.com.
-N count number of ECHO requests to send.
Sends the number of ECHO packets specified by count.
By default, typically only four packets are sent, by using this command, you can define the number of messages you send, which is helpful for measuring the speed of your network, for example, I want to test the average time of return of 50 packets, the fastest time and the slowest time can be learned by the following:
C:\>ping-n 50 202.103.96.68
Pinging 202.103.96.68 with 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 = Received = Lost = 2 (4% loss), approximate round trips 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, 48 were returned, two of which were lost for unknown reasons, the fastest return in the 48 packets is 40ms, the slowest is 51ms, the average speed is 46ms.
-L size Send buffer size.
Defines the ECHO packet size.
By default, Windows Ping sends a packet size of 32byt, we can also define its size, but there is a size limit, that is, the maximum can only send 65500byt, perhaps someone will ask why to limit to 65500byt, Because the Windows family system has a security vulnerability (and perhaps other systems) is when the packet sent to each other is greater than or equal to 65532, the other side is very likely to block the machine, so Microsoft to resolve this security vulnerability so that the ping packet size limit. Although Microsoft has already made this restriction, this parameter is still very powerful with other parameters, such as we can use the-t parameter to implement an offensive command: (The following introduction is dangerous, only for testing, do not easily apply to others on the machine, otherwise the consequences of the ego)
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
..................
So it's going to keep sending packets with a size of 65500byt to the 192.168.1.21 computer, if you have only one computer may have no effect, but if there are many computers so that can make the other person completely paralyzed, I have done this experiment, when I also use more than 10 computers ping a Win200 0Pro system computer, in less than 5 minutes each other's network has been completely paralyzed, the network is seriously blocked, HTTP and FTP service completely stopped, this shows the power.
-F Set Don ' t Fragment flag in packet.
Sends a "Do not fragment" flag in a packet.
In general, the packets you send will be sent to each other through the routing segment, and the route will not be processed again after this parameter is added.
-I TTL time to Live.
Specifies the time that the TTL value stays in the other's system.
This parameter also helps you to check the operation of the network.
-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 outgoing and returned packets in the Record route field.
In general, you send packets are routed to the other side, but in the end is what route? This parameter allows you to set the number of routes you want to explore, but limited to 9, that is, you can only trace 9 routes, if you want to explore more, can be implemented through other commands, I will be in the future article to explain. Here's an example:
C:\>ping-n 1-r 9 202.96.105.101 (send a packet, record up to 9 routes)
Pinging 202.96.105.101 with 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 trips times in Milli-seconds:
Minimum = 10ms, Maximum = 10ms, Average = 10ms
From the above I can know from my computer to 202.96.105.101 altogether through the 202.107.208.187, 202.107.210.214, 61.153.112.70, 61.153.112.89, 202.96.105.149, 202.96.105.97 these few routes.
-S count Timestamp for Count hops.
Specifies the timestamp of the metric specified by count.
This parameter is almost the same as-R, except that this parameter does not record the route that the packet returns, and records only 4.
-j host-list Loose Source route along Host-list.
Routes packets using the list of computers specified by Computer-list. Continuous computers can be separated by intermediate gateways (routing sparse source) IP allows the maximum number of 9.
-K host-list Strict source route along Host-list.
Routes packets using the list of computers specified by Computer-list. Continuous computers cannot be separated by intermediate gateways (strict source routing) the maximum number of IP allowed is 9.
-W timeout timeout in milliseconds to wait for each reply.
Specifies the time-out interval, in milliseconds.