Ping command and It’s uses

The PING command is perhaps the most used network command-line utility. PING is present in all versions of all operating systems with network support and is a simple and convenient means of polling a host by name or IP address.



To exchange service and diagnostic information on the network, a special ICMP (Internet Control Message Protocol) protocol is used. The ping command allows you to send a control message of type Echo Request (type is 8 and is indicated in the header of the ICMP message) to the addressed node and interpret the response received from it in a form convenient for analysis. The data field of the sent icmp packet usually contains the characters of the English alphabet. In response to such a request, the interrogated node must send an icmp packet with the same data that was received and the Echo Reply message type (the type code in the ICMP header is 0). If there is any problem while exchanging icmp messages, the ping utility will display information for its diagnosis.

Command line format:

ping [-t] [-a] [-n number] [-l size] [-f] [-i TTL] [-v TOS] [-r number] [-s number] [[- jNode list] | [-k list of Nodes]] [-w timeout] finalName

Parameters:

-t- Continuous packet sending. To complete and display statistics, use the keyboard shortcuts Ctrl + Break (display statistics and continued), and Ctrl + C (display statistics and completion).
-a - Determine addresses by hostnames.
-n number - The number of echo requests to send.
-l size - The size of the data field in bytes of the sent request.
-f - Set the flag prohibiting packet fragmentation.
-i TTL - Set the lifetime of the package (field "Time To Live").
-v TOS - Set the type of service (field "Type Of Service").
-r number - Record the route for the specified number of hops.
-s number - The time stamp for the specified number of transitions.
-j list of Nodes - Free route selection from the list of nodes.
-k Node list - Hard route selection from the list of nodes.
-w timeout - The maximum timeout for each response in milliseconds.

Examples of use:

ping google.com - an echo request to a node named google.com with default parameters - the number of packets is 4, the length of the data array = 32 bytes.

ping -6 google.com - ping of the google.com node using the Ipv6 protocol

ping -a 192.168.1.50 - ping with the determination of the name of the horse node at its address.

ping -s 192.168.0.1 computer - ping of the computer node from the source 192.168.0.1. Used when there are several network interfaces on the computer.

ping w 5000 google.com - ping with a wait timeout of 5 seconds (default - 4 seconds).

ping -n 5000 -l 1000 google.com - polling of the google.com node 5000 times, in packets with data of 1000 bytes in length. The permissible maximum data length is 65500.

ping -n 1 -l 3000 -f google.com - ping with the prohibition of packet fragmentation.

ping -n 1-r 3 google.com - send 1 echo request to the google.com node with the display of the first 3 transitions along the route.

ping -i 5 google.com - ping indicating the lifetime TTL = 5. If more destinations are required to reach the end node, the router that interrupted the delivery will reply with the message “Exceeded the lifetime (TTL) during packet transmission.”

Using Ping Online

If you are looking an online version of ping command you can visit Ping Test. Pingtets.net allows you to ping any ip or hosting name online and displaysping result in statndard format.

0 Comments:

Post a Comment