Ping a host to check connectivity
Read-only
What do risk levels mean?
- Read-only
- Inspects state without changing anything.
- Low risk
- Reversible with a routine follow-up command.
- Medium risk
- Changes state; undo path documented.
- Destructive
- Deletes or overwrites; confirmation required.
Sends a fixed number of ICMP echo requests to a host to confirm basic network reachability and measure round-trip latency.
networkpingconnectivitylatency
Parameters
Hostname or IP address to ping.
Number of echo requests to send.
Commands
Send a bounded number of echo requests and report latency statistics
ping -c 4 <host>Verification
ping -c 1 <host>A reply line with a time value confirms the host is reachable; 100% packet loss means it is not.
Undo
Not undoable
This recipe only sends echo requests and changes nothing.
Pitfalls
- Many hosts and firewalls drop ICMP, so no reply does not prove the host is down; test a TCP port as a second signal.
- Name resolution failures surface here as "unknown host" — that is a DNS problem, not a connectivity problem.
- The verification command uses macOS/Linux syntax; on Windows use "ping -n 1 {{host}}".