Essential common network test commands (ping command)
Copyright: This is an original post by the blogger and may not be reproduced without the blogger's permission. https://blog.csdn.net/huyuyang6688/article/details/8936493
ping (Packet InterNet Groper packet Internet probe)
It is a DOS command that can check connectivity between two hosts, using the uniqueness of machine IP addresses on the network, sending an ICMP packet to the target IP address, and then asking the other party to return a packet of the same size to determine the connectivity and connectivity delay of the two network machines. So using it well can be very helpful in analyzing to determine network faults and detecting the speed of network connections. The following is a specific list of its uses.
1、 format：ping [-t] [-a] [-n count] [-l length] [-f] [-i ttl] [-v tos] [-r count] [-s count] [-j computer-list] | [-k computer-list] [-w timeout] [-R ] [-S srcaddr] [-4] [-6] target_name
2, a brief description of a few key parameters (other parameters in the DOS command directly enter ping enter will be described, or want to know more can go online to check the information).
-t: indicates that datagrams will be sent to the target IP without interruption until we force it to stop. Example: ping 192.168.0.1 -t, when we execute the above command will keep sending datagrams to the host with IP 192.168.0.1.
-l:Define the size of the packet to be sent, default is 32 bytes, maximum can be defined up to 65500 bytes. Example: ping 192.0.1 -l 64, here is to send a 64-byte datagram to the target host.
-n:Defines the number of packets to be sent to the target IP, default is 4 times. At this point someone might be wondering (if -t and -n are used together will "n" datagrams be sent to the target or will they always be sent? For example, if the -t parameter is used together with the -n parameter, the ping command is based on the later parameter, e.g. "pingIP -t -n 4", although the -t parameter is used, it does not ping all the time, but only 4 times.
A final note.， in useping The command can be used whenpingIP， Or you can justping Hosting Domain， for example“ping blog.csdn.net/huyuyang6688”, This will automatically get the host'sIP and sent a datagram to the target host。
Here's a screenshot to give a more visual example.