What Is Ping Command?

Ping Command

The ping command is a Command Prompt order used to evaluate the source computer’s capacity to access a target machine. Usually, the ping command is used as a straightforward manner to check that a laptop can interact with another machine or network device over the network.

The ping command works by transmitting echo request emails to the target device via the Internet Control Message Protocol (ICMP) and hoping for an answer. The two main parts of data that the ping command offers are how many of those answers are transferred and how soon it lasts for them to arrive.

For instance, when pinging a network printer, you might discover that there are no answers, only to figure out that the printer is offline and that its cable demands are substituted. Or perhaps you need to ping a router to confirm that your machine can link to it, to remove it as a possible trigger for a networking problem.

Ping Command Options

Item Explanation-t: Using this option will ping the target until you force it to stop by using Ctrl-C.

-a: This ping command option will resolve, if possible, the hostname of an IP address target.

-n count: This option sets the number of ICMP Echo Requests to send, from 1 to 4294967295. The ping command will send 4 by default if -n isn’t used.

-l size: Use this option to set the size, in bytes, of the echo request packet from 32 to 65,527. The ping command will send a 32-byte echo request if you don’t use the -l option.

-f: Use this ping command option to prevent ICMP Echo Requests from being fragmented by routers between you and the target. The -f option is most often used to troubleshoot Path Maximum Transmission Unit (PMTU) issues.

-i TTL: This option sets the Time to Live (TTL) value, the maximum of which is 255.

-v TOS: This option allows you to set a Type of Service (TOS) value. Beginning in Windows 7, this option no longer functions but still exists for compatibility reasons.

-r count: Use this ping command option to specify the number of hops between your computer and the target computer or device that you’d like to be recorded and displayed. The maximum value for count is 9, so use the tracert command instead if you’re interested in viewing all the hops between two devices.

-s count: Use this option to report the time, in Internet Timestamp format, that each echo request is received and echo reply is sent. The maximum value for count is 4, meaning that only the first four hops can be time stamped.

-w timeout: Specifying a timeout value when executing the ping command adjusts the amount of time, in milliseconds, that ping waits for each reply. If you don’t use the -w option, the default timeout value of 4000 is used, which is 4 seconds.

-R: This option tells the ping command to trace the round trip path.

-S srcaddr: Use this option to specify the source address.

-p: Use this switch to ping a Hyper-V Network Virtualization provider address.

-4: This forces the ping command to use IPv4 only but is only necessary if the target is a hostname and not an IP address.

-6: This forces the ping command to use IPv6 only but as with the -4 option, is only necessary when pinging a hostname.

Target: This is the destination you wish to ping, either an IP address or a hostname.

/?: Use the help switch with the ping command to show detailed help about the command’s several options.

What is a Ping Command?

Ping is a diagnostic network instrument mainly used for testing communication between two nodes or equipment. An Internet Control Message Protocol (ICMP) error query message will be sent to that node to ping a target node. If there is a link, the target node will respond with an echo response. Ping calculates the round trip time of the path of the data packet from its origin to target and home and determines whether there were any parcels wasted during the journey.

Mike Muuss developed the network ping instrument in 1983. It includes nearly 1,000 rows of software and has become the traditional bundled instrument for multiple networks and working software apps.

The ping utility operates by creating an ICMP information device which is then encapsulated in IP datagrams and transferred through the network. The target node prints its payload after obtaining the echo request, burns the initial packet, and produces an echo response with the same payload it got.

The echo request packet’s payload often comprises of American Standard Information Interchange Code (ASCII) symbols with adjustable variable sizes. The round-trip time is calculated by considering the host node clock’s local time when the IP datagram exits the target node and subtract that distance from the period the echo response comes. Ping service performance differs depending on the working scheme.

  • Destination IP address 
  • ICMP sequence number 
  • Time to live (TTL) 
  • Round-trip time 
  • Payload size 
  • The number of packets lost during transmission

The ping tool displays various error messages if a round trip is not completed successfully. They include the following:

TTL Expired in Transit: Determines the maximum amount of time that an IP packet can live on the network before being discarded unless it has reached its destination. To tackle this mistake, use the tel-i button to attempt to boost the TTL valuation.

Destination Host Unreachable: indicates the target node is down or not running on the network. It may even happen because the target source does not have a local or distant path. Change the local path panel or turn the node on to tackle this mistake.

Request Timed Out: Indicates the timing of the ping command as there was no host response. It suggests that owing to network traffic, the inability of the Address Resolution Protocol (ARP) demand message processing or a router mistake, no echo reply signals were obtained. Using the SMS to increase the waiting period –w change can solve this issue.

Unknown host: indicates that there is no IP address or hostname in the network or that it is not possible to resolve the target hostname. To tackle this problem, check the domain name system (DNS) server number and accessibility.

Leave a Reply