Validate service availability using layered checks: confirm basic
network reachability with ping, then test HTTP
behavior using curl. Capture evidence for redirects
and header-level status to separate “network down” from “web app
down.”
A web service is reportedly down. Your job is to test both
basic connectivity and HTTP-level behavior for
example.com. You will verify ICMP reachability,
make an HTTP request, inspect headers only, and then follow an
HTTP redirect to confirm the service is accessible over HTTPS.
A host can be reachable while the web service is failing, or
a web service can be healthy while ICMP is blocked by policy.
Use ping and curl together to avoid
false conclusions and to produce actionable evidence.
example.com using
ICMP.
ping -c to validate reachability and loss.
curl to test HTTP connectivity and capture output.
curl -I.
curl -L.
example.com.
ping -c 4 example.com
This confirms whether the host responds to ICMP echo requests and provides packet loss and latency signals.
PING example.com (93.184.216.34) 56(84) bytes of data.
64 bytes from 93.184.216.34: icmp_seq=1 ttl=56 time=22.4 ms
64 bytes from 93.184.216.34: icmp_seq=2 ttl=56 time=22.1 ms
64 bytes from 93.184.216.34: icmp_seq=3 ttl=56 time=21.9 ms
64 bytes from 93.184.216.34: icmp_seq=4 ttl=56 time=22.3 ms
--- example.com ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3006ms
rtt min/avg/max/mdev = 21.900/22.175/22.400/0.199 ms
curl.
curl http://example.com
This tests HTTP connectivity and returns the response body. Many sites redirect plain HTTP to HTTPS, which can appear as a 301 response.
<html>
<head><title>301 Moved Permanently</title></head>
<body>
<center><h1>301 Moved Permanently</h1></center>
<p>Resource has moved to <a href="https://example.com/">https://example.com/</a></p>
</body>
</html>
curl -I http://example.com
Headers are often enough to validate the HTTP status code,
the Location redirect target, and the server’s
response metadata.
HTTP/1.1 301 Moved Permanently
Location: https://example.com/
Content-Type: text/html; charset=UTF-8
Content-Length: 162
Date: Thu, 06 Nov 2025 10:15:42 GMT
Server: ECD (example)
curl -L http://example.com
Following redirects validates the final destination content and confirms that the HTTPS endpoint is reachable and serving responses.
* Redirecting to: https://example.com/
* Successfully fetched via HTTPS
<!doctype html>
<html>
<head>
<title>Example Domain</title>
<meta charset="utf-8" />
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
</head>
<body>
<div>
<h1>Example Domain</h1>
<p>This domain is for use in illustrative examples in documents. You may use this
domain in literature without prior coordination or asking for permission.</p>
<p><a href="https://www.iana.org/domains/example">More information...</a></p>
</div>
</body>
</html>
ping -c <N> <host>
: Sends N ICMP echo requests to test reachability and loss.
curl http://<host>
: Makes an HTTP request and prints the response body.
200 success, 301/302
redirects, or 4xx/5xx errors.
curl -I http://<host>
: Fetches headers only (status line, redirect Location, metadata).
curl -L http://<host>
: Follows redirects until the final destination is reached.