Network utility for testing reachability and measuring round-trip latency to a remote host.
ping {flag-3} {flag-a} {flag-c} {flag-d} {flag-e} ๐ flag-3 ๐ flag-a ๐ flag-c ๐ flag-d ๐ flag-e ping {flag-3} {flag-a} {flag-c} {flag-d} {flag-e} Sandbox: execFile · Timeout: 60s
network.diagnostic.reachability network.diagnostic.latency network.diagnostic.packetloss network.discovery.host | Name | Type | Required | Default | Description | Aliases |
|---|---|---|---|---|---|
flag-3 | string | No | - | RTT precision (do not round up the result time) | -3 |
flag-a | string | No | - | use audible ping | -a |
flag-c | string | No | - | stop after <count> replies | -c |
flag-d | string | No | - | use SO_DEBUG socket option | -d |
flag-e | string | No | - | define identifier for ping session, default is random for | -e |
flag-f | string | No | - | flood ping | -f |
flag-h | string | No | - | print help and exit | -h |
flag-I | string | No | - | either interface name or address | -I |
flag-i | number | No | - | seconds between sending each packet | -i |
flag-l | integer | No | - | send <preload> number of packages while waiting replies | -l |
flag-m | string | No | - | tag the packets going out | -m |
flag-M | string | No | - | define path MTU discovery, can be one of <do|dont|want|probe> | -M |
flag-n | string | No | - | no reverse DNS name resolution, override -H | -n |
flag-p | string | No | - | contents of padding byte | -p |
flag-q | string | No | - | quiet output | -q |
flag-Q | string | No | - | use quality of service <tclass> bits | -Q |
flag-s | integer | No | - | use <size> as number of data bytes to be sent | -s |
flag-S | string | No | - | use <size> as SO_SNDBUF socket option value | -S |
flag-t | string | No | - | define time to live | -t |
flag-v | string | No | - | verbose output | -v |
flag-w | number | No | - | reply wait <deadline> in seconds | -w |
flag-W | string | No | - | time to wait for response | -W |
flag-4 | string | No | - | use IPv4 | -4 |
flag-b | string | No | - | allow pinging broadcast | -b |
flag-T | string | No | - | define timestamp, can be one of <tsonly|tsandaddr|tsprespec> | -T |
flag-6 | string | No | - | use IPv6 | -6 |
flag-F | string | No | - | define flow label, default is random | -F |
flag-N | string | No | - | Set the flag-N parameter | -N |
O | boolean | No | - | report outstanding replies | -O |
R | boolean | No | - | record route | -R |
U | boolean | No | - | latency | -U, -to-user |
| Type | Description | MIME | Schema | Trust |
|---|---|---|---|---|
network.diagnostic.ping.result | Ping statistics and round-trip times | text/plain | - | verified |
Inputs
network.target.host Target hostname or IP address to ping
Outputs
network.diagnostic.ping.result Ping response statistics including min/avg/max RTT and packet loss
network_traffic Produces
network.diagnostic.ping.resultConsumes
network.target.host| Resource | Value |
|---|---|
| CPU | low |
| Memory | 8 MB |
| Network | low |
| Disk I/O | none |
Standard connectivity test with 4 pings
ping -c 4 google.com Continuous ping with timestamp
ping -D google.com Flood ping for network stress testing
sudo ping -f -c 1000 localhost Custom packet size test
ping -s 1472 -c 10 google.com Basic usage of ping to check connectivity to a host
ping hostname_or_IP_address Specify the number of echo requests to send
ping -c 4 hostname_or_IP_address Set the interval between sending each packet in seconds
ping -i 2 hostname_or_IP_address Flood ping, sending requests as fast as possible (requires root)
ping -f hostname_or_IP_address Ping with a specified packet size in bytes
ping -s 100 hostname_or_IP_address Set time to live to control the number of hops
ping -t 64 hostname_or_IP_address Use IPv4 explicitly (equivalent to ping)
ping -4 hostname_or_IP_address Use IPv6 explicitly
ping -6 ipv6_address Display the version of the ping command
ping -V Ping is one of the most fundamental network diagnostic tools. It sends ICMP Echo Request packets and measures the time taken for Echo Reply responses, providing immediate feedback on network connectivity, latency, and packet loss.
PING google.com (142.250.80.14): 56 data bytes
64 bytes from 142.250.80.14: icmp_seq=0 ttl=118 time=12.345 ms
64 bytes from 142.250.80.14: icmp_seq=1 ttl=118 time=11.892 ms
--- google.com ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max/stddev = 11.892/12.119/12.345/0.227 ms
| Metric | Interpretation |
|---|---|
| time | Round-trip latency in milliseconds |
| packet loss | Percentage of packets not returned (should be 0%) |
| ttl | Time To Live โ decremented by each router hop |
| stddev | Jitter โ variance in round-trip time |
| Symptom | Possible Cause |
|---|---|
| 100% packet loss | Host down, firewall blocking ICMP, network disconnected |
| High latency (>200ms) | Geographic distance, satellite link, congestion |
| Increasing latency | Network congestion, throttling, route flapping |
| Variable latency (jitter) | Wireless interference, bufferbloat, QoS issues |
| TTL expired in transit | Routing loop or hop count exceeded |