ping (command)
Jump to navigation
Jump to search
↑ https://linux.die.net/man/8/ping
↑ https://www.paessler.com/manuals/prtg/ping_sensor
ping
(1983) command is available in almost all operating systems. The command-line options of the ping utility and its output vary between the numerous implementations. Options may include among others:
- Count of tests: (
-c
)[1] (Linux and macOS), (-n
Windows) - Size of the payload
- Limits for the number of network hops (
TTL
) that probes traverse
Timing options:
- Timeout for exiting:
-t
(macOS), Linux not implemented. - Interval between the requests
- Time to wait for a response (
-W
) miliseconds for macOS and seconds for Linux
Output format:
- Include timestamp on each line: Linux (
-D
)
Contents
Linux
man page: https://linux.die.net/man/8/ping
$ ping -c 5 www.example.com PING www.example.com (93.184.216.34): 56 data bytes 64 bytes from 93.184.216.34: icmp_seq=0 ttl=56 time=11.632 ms 64 bytes from 93.184.216.34: icmp_seq=1 ttl=56 time=11.726 ms 64 bytes from 93.184.216.34: icmp_seq=2 ttl=56 time=10.683 ms 64 bytes from 93.184.216.34: icmp_seq=3 ttl=56 time=9.674 ms 64 bytes from 93.184.216.34: icmp_seq=4 ttl=56 time=11.127 ms --- www.example.com ping statistics --- 5 packets transmitted, 5 packets received, 0.0% packet loss round-trip min/avg/max/stddev = 9.674/10.968/11.726/0.748 ms
ping -i google.com
Audible ping
ping -a IP
ping hostwithoutdomain ping: hostwithoutdomain: Name or service not known
ping www.google.com ping: bad address
ping 10.10.xx.xx PING 10.10.xx.xx (10.10.xx.xx) 56(84) bytes of data. From xx.56.242.XX icmp_seq=1 Packet filtered ^C --- 10.10.25.10 ping statistics --- 3 packets transmitted, 0 received, +1 errors, 100% packet loss, time 2012ms
macOS
ping -c1 -t1 www.example.com -t timeout (not available in Linux)
PAN-OS
ping host 10.10.10.xxx
nmap
nmap -sn 10.10.10.*
Cisco IOS
ping 10.10.10.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 10.10.10.1, timeout is 2 seconds: ..... Success rate is 0 percent (0/5)
- See also: ios_ping Ansible module
Activities
Advanced
- Review source code of different ping implementation:
- Windows:
netsh advfirewall firewall add rule name="ICMP Allow incoming V4 echo request" protocol=icmpv4:8,any dir=in action=allow
Related commands
mtr
- traceroute
- ping (Cisco IOS)
- Collectd ping plugin
- Smokeping
kill -SIGINT PID
- PRTG ping sensor [2]
- ping -D timestamp
jfrog rt ping
check_ping
Nagios
See also
- broadcast address
ping
,nping
,arping
,fping, gping
,hping
,mtr
,traceroute
,tcptraceroute
,tracepath
,Test-Connection
Powershell cmdlet,iperf
, Ping (PAN-OS), BWPing,check_ping
,ping -M
,ios ping, ping -a
- ICMP, 3-Tuple,
ping
- TCP/IP, Transport protocol, UDP, SCTP, QUIC, subnet mask, Routing protocols: BGP, routing table, Policy based routing, multicast, TCP Fast Open, RDP, TTL, RTT, MPTCP, Large send offload (LSO): (TSO, GRO, GSO, TCP checksum),
ethtool
, SCTP, 5-Tuple, Check TCP connectivity, TCP window size,/proc/sys/net/ipv4/tcp_rmem
, ack, List of TCP ports, localhost, broadcast address - Pingdom
- Network monitoring: Cacti, PRTG, MRTG,
ntop
,ntopng
,ping
,nethogs
,netperf
Advertising: