• Company
    • About Us
    • Case Studies
    • Press Center
    • Careers
    • Blog
    • Contact us
  • Contact us
  • Login
 
  • English
    • Deutsch
    • Español
    • Français
    • Italiano
    • Português
Paessler
                    - The Monitoring Experts
  • Products
    • Paessler PRTG
      Paessler PRTGMonitor your whole IT infrastructure
      • PRTG Network Monitor
      • PRTG Enterprise Monitor
      • PRTG Hosted Monitor
      • PRTG UVexplorer
      • PRTG extensionsExtensions for Paessler PRTGExtend your monitoring to a new level
    • Icon Features
      FeaturesExplore all monitoring features
      • Maps & dashboards
      • Alerts & notifications
      • Multiple user interfaces
      • Distributed monitoring
      • Customizable reporting
  • Solutions
    • Industries
      IndustriesMonitor various industry sectors
      • Industrial
      • Healthcare
      • Data Center
      • Education
      • Finance
      • Government
    • IT Topics
      IT TopicsMonitor all areas of IT
      • Network Monitoring
      • Bandwidth Monitoring
      • SNMP Monitor
      • Network Mapping
      • WiFi Monitoring
      • Server Monitoring
  • Pricing
  • Resources
    • Getting Started
      Getting StartedModules for self-paced learning
    • How-to Guides
      How-to GuidesGet the most out of PRTG
    • Videos & Webinars
      Videos & WebinarsLearn from Paessler experts
    • IT  Knowledge
      IT KnowledgeExpand your IT knowledge
    • PRTG Manual
      PRTG ManualFull documentation
    • Knowledge Base
      Knowledge BaseShare community knowledge
    • PRTG Sensor Hub
      PRTG Sensor HubGet sensors, scripts & templates
    • Trainings
      PRTG TrainingLearn how to work with PRTG
  • Partners
    • Icon Handshake
      Become a PartnerFor resellers and channel partners
    • Icon MSP
      Become an MSPDeliver monitoring as a managed service
    • icon partner
      Partner PortalLog in to your partner account
    • Deal Registration
      Deal RegistrationRegister your sales opportunities
    • icon search
      Find a PartnerFind partners selling Paessler products
    • icon technology
      Technology AlliancesSee Paessler technology partnerships
    • Partner HubTools for Your Success
  • Company
    • About Us
    • Case Studies
    • Press Center
    • Careers
    • Blog
    • Contact us
  • Contact us
  • Login
  • English
    • Deutsch
    • Español
    • Français
    • Italiano
    • Português
  • Get a quote
  • Free trial
  1. Home>
  2. IT Explained>
  3. Ping

 

Ping

  • A simple yet powerful tool to check device availability
  • Measures response time and detects network issues
  • Understand why “pinging” is still vital for IT troubleshooting

What you will find on this page

Table of content

    PRTG Is Compatible With All Major Vendors, Products, and Systems

    compatible with all major vendors, products, and systems

    What is Ping?

    Ping is a command-line utility, available on virtually any operating system with network connectivity, that acts as a test to see if a networked device is reachable.

    The ping command sends a request over the network to a specific device. A successful ping results in a response from the computer that was pinged back to the originating computer.

    What does Ping stand for?

    According to the author, the name Ping comes from sonar terminology. In sonar, a ping is an audible sound wave sent out to find an object. If the sound hits the object, the sound waves will reflect, or echo, back to the source. The distance and location of the object can be determined by measuring the time and direction of the returning sound wave.

    Similarly, the ping command sends out an echo request. If it finds the target system, the remote host sends back an echo reply. The distance (number of hops) to the remote system can be determined from the reply, as well as the conditions in-between (packet loss and time to respond). While the author of the ping utility said the name of the program was simply based on the sound of sonar, others sometimes say that Ping is an acronym for Packet InterNet Groper.

    PRTG makes ping monitoring as easy as it gets

    Custom alerts and data visualization let you quickly identify and prevent network health and performance issues.

    free downLoad

    How does Ping work?

    The Ping utility uses the echo request, and echo reply messages within the Internet Control Message Protocol (ICMP), an integral part of any IP network. When a ping command is issued, an echo request packet is sent to the address specified. When the remote host receives the echo request, it responds with an echo reply packet.

    By default, the ping command sends several echo requests, typically four or five. The result of each echo request is displayed, showing whether the request received a successful response, how many bytes were received in response, the Time to Live (TTL), and how long the response took to receive, along with statistics about packet loss and round trip times.

    Ping message format

    The echo request ("ping") is structured as follows:

    Byte 0Byte 1Byte 2Byte 3

    Type (8 = IPv4, ICMP; 128 = IPv6, ICMP6)

    Code

    Header Checksum

    Identifier

    Sequence Number

    Payload

    The echo reply must include the exact payload received in the request:

    Byte 0Byte 1Byte 2Byte 3

    Type (0 = IPv4, ICMP; 129 = IPv6, ICMP6)

    Code

    Header Checksum

    Identifier Content

    Sequence Number

    Payload

    The Ping utility

    The ping utility has been incorporated into virtually every operating system with network support. While echo request and echo reply are ICMP messages, the exact implementation of the Ping utility varies slightly among manufacturers.

    In its simplest form, the ping utility can be run with nothing more than the ping command and a destination. The remote host can be specified either by name or address.

    ping 168.93.37.2

    ping ftp.microsoft.com

    The following is the output of a simple ping to the target host paessler.com:

    ping paessler.com
    Pinging paessler.com [104.16.182.252] with 32 bytes of data:
    Reply from 104.16.182.252: bytes=32 time=4ms TTL=57
    Reply from 104.16.182.252: bytes=32 time=4ms TTL=57
    Reply from 104.16.182.252: bytes=32 time=4ms TTL=57
    Reply from 104.16.182.252: bytes=32 time=4ms TTL=57

    Ping statistics for 104.16.182.252:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
    Approximate round trip times in milli-seconds:
    Minimum = 4ms, Maximum = 4ms, Average = 4ms

    However, the ping utility also provides several customizable options.

    Find the root cause of the problem with our PRTG ping monitoring tool

    Real-time notifications mean faster troubleshooting so that you can act before more serious issues occur.

    free downLoad

    Ping switches and variables

    There are numerous switches available for the ping command that allow the default settings to be customized for more specific purposes. Unfortunately, there is no consistency across platforms for the different switches. For example, Windows uses a -n (number) to set how many pings to send, while most Unix systems use a -c (count).

    Here are some examples of ping command switches. Generally, using ping -?  will result in a list of switches along with the corresponding letter to use the switch on the operating system.

    Number (or count) – sets the number of echo requests, or pings, to be sent. By default, this number is four on most Windows systems, and five on most Unix systems. Setting a higher number allows the ping to continue to run either as a way of gathering more data, for example, to see if the reply time varies, or as a way of ensuring that a system continues to be responsive.

    Timeout – changes the timeout before the utility waits for a reply from the destination. On Windows systems, the default value is 4,000 milliseconds, or 4 seconds.

    Size – changes the size of the ping packet. The default value on Windows is 32 bytes, many Unix/Linux systems default to 64 bytes.

    TTL – sets a different TTL.

    IP4 or IP6 – responds with IPv4 or IPv6 addresses. (ping -4/ping -6 in Windows, ping or ping6 in Linux)

    Until stopped – keeps running the ping until stopped by the user (-t in Windows)

    Ping command syntax for Windows

    -t  Pings the specified host until stopped. To stop - type Control-C
    -a Resolve adresses to hostnames
    -nNumber of echo requests to send 
    -l Send buffer size
    -f Set Don't Fragmet flag in packet (IPv4-only)
    -i Set Time To Live
    -v Set Type of Service (Setting has been deprecated)
    -r Record route for count hops (IPv4-only)
    -s Timestamp for count hops (IPv4-only)
    -j Loose source route along host-list (IPv4-only)
    -k Strict source route along host-list (IPv4-only)
    -w Timeout in milliseconds to wait for each reply
    -R Use routing header to test reverse route also (IPv6-only, deprecated per RFC 5095)
    -S Source address to use
    -c Routing compartment identifier
    -p Ping a Hyper-V Network Virtualization provider address
    -4 Force using IPv4
    -6 Force using Ipv6

    Ping with PRTG in 2 minutes

    Free download
    PRODUCT OVERVIEW

    Our Users Give Top Ratings for Monitoring With Paessler PRTG

    Gartner peer insights
    spiceworks
    G2
    Capterra

    How to use Ping

    For such a small, basic utility, the ping command can be a valuable tool in numerous situations. As a command-line based utility, ping lends itself to easy use in various scripts, allowing for numerous pings to run and be recorded for all manner of usage. For example, the output of the ping command can easily be piped to a text file for later review.

    Troubleshooting with Ping

    Perhaps the most common use of the ping utility is in troubleshooting. When trying to use applications or systems over a network, the most important thing to know is if there is actually a working connection. A series of ping commands can help determine what the problem is.

    A quick ping by IP address will confirm that the system is on, that there is a connection, and that the two machines can talk to each other.

    Ping 172.168.9.13

    If the ping is successful by name and IP address, but the response times are long, there may be a routing, network speed, or congestion issue. Even unsuccessful pings can provide valuable troubleshooting information.

    If a ping by IP address is successful, but a ping by name fails, then there is a name resolution issue. If the ping fails altogether, you can try to ping other parts of the network to isolate the issue. A successful ping of the default gateway confirms that the network connection is functioning, but that something is interfering with a connection to the remote system.

    If you can ping successfully with the same subnet of the remote system, but not the target system itself, then the network connectivity of the remote host is in doubt. If the default gateway cannot be pinged, but the loopback address (127.0.0.1) results in a successful ping, then you would know that the network interface is functioning, but there is no connection to the network.

    Ping error

    If ping gets no response from the target host, most implementations of ping display nothing or a timeout notification. The result may look like this, for example:

    Pinging 121.242.124.9 with 32 bytes of data:
    Request timed out.
    Request timed out.
    Request timed out.
    Request timed out.

    Discovery

    Ping can be used as a quick and dirty discovery tool. Since virtually any network connected device will respond to a ping, pinging a range of addresses, for example, would allow an administrator to find all the attached devices in that range, regardless of type of device or operating system.

    Monitoring

    Ping can be used to monitor the network availability of devices. A ping command running as a scheduled task can offer rudimentary polling of any networked computer or device without the need to install any additional software agents, and without the need to open additional ports. The most basic of any up/down monitor could be accomplished by running a ping with the ‘run until stopped’ option. When the pings start failing, there is an issue reaching the system.

    Obviously, these solutions are greatly improved upon by the addition of a monitoring tool like PRTG, which, while using underlying ping commands, does not rely on someone watching the output, or piping the output to some sort of record.

    The standard Ping Sensor runs ping commands in the background. These can be configured to run at specific intervals, or in response to another event. For example, if a sensor reports a connection failure, a ping can determine if there is still a network connection. Or, monitors can be configured to alert an administrator if ping times get too long, or if there is too much packet loss.

    Another interesting ping-based sensor is the Cloud Ping Sensor, which pings monitored systems from a remote cloud of distributed systems. This provides the all-important, but difficult to detect, alert when everything is running just fine on your end, but for whatever reason, your systems are unreachable from the outside by remote users or clients.

     Do you need a professional ping monitoring solution?

    PRTG is a comprehensive network monitoring software and keeps track of your entire IT infrastructure.

    free downLoad

    Hundreds of Thousands of Customers Worldwide Love Paessler PRTG

    customer success stories


    What customers say about us

    Security

    Simply knowing a system exists and is connected to the network may be enough information for an attacker to begin. Careful analysis of ping replies may yield additional information such as which operating system the target is running, where the machine is located, and so on.

    Many hacking tools take advantage of “walking the range”, by pinging every IP address on a targeted network to get a list of what systems are reachable and will respond. As a result, many firewalls are configured to block ping requests from untrusted networks.

    Sources

    Discover more
    • Solutions: Ping Monitoring
    • Sensors: Ping Sensor
    • Sensors: Cloud Ping Sensor
    View article sources
    • https://datatracker.ietf.org/doc/html/rfc792
    • https://www.cisco.com/c/en/us/support/docs/ios-nx-os-software/ios-software-releases-121-mainline/12778-ping-traceroute.html
    • https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/cc732509(v=ws.10)?redirectedfrom=MSDN
    • https://www.webcitation.org/5saCKBpgH
    PRTG Logo

    Start monitoring with PRTG and see how it can make your network more reliable and your job easier.

    Free download
    PRODUCT OVERVIEW

    Products

    • Paessler PRTG
      Paessler PRTGMonitor your whole IT infrastructure
      • PRTG Network Monitor
      • PRTG Enterprise Monitor
      • PRTG Hosted Monitor
      • PRTG UVexplorer
      • PRTG extensions
        Extensions for Paessler PRTGExtend your monitoring to a new level
    • Icon Features
      FeaturesExplore all monitoring features

    Monitoring with PRTG

    • Network monitoring
    • Bandwidth monitoring
    • SNMP monitoring
    • Network mapping
    • Wi-Fi monitoring
    • Server monitoring
    • Network traffic analyzer
    • NetFlow monitoring
    • Syslog server

    Useful Links

    • PRTG Manual
    • Knowledge Base
    • Customer Success Stories
    • About Paessler
    • Subscribe to newsletter
    • PRTG Support
    • PRTG Consulting
    • PRTG Feedback & Roadmap

    Contact

    Paessler GmbH
    Thurn-und-Taxis-Str. 14, 
    90411 Nuremberg 
    Germany

    [email protected]

    +49 911 93775-0

    • Contact us
    ©2026 Paessler GmbHTerms & ConditionsPrivacy PolicyImprintReport VulnerabilityDownload & InstallSitemap
    Solutions Solutions Solutions