Validate service availability with layered checks: confirm basic
reachability with ping, then validate HTTP behavior
with curl. Capture status and redirect evidence so
you can 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, and then follow the redirect to confirm the
HTTPS endpoint is reachable.
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 produce actionable evidence.
example.com using
ICMP.
ping is useful but not authoritative (ICMP
can be blocked while the service is healthy).
Location and
status without downloading full content.
example.com.
ping -c 4 example.com
This tests whether the target responds to ICMP echo requests and provides packet loss and latency signals. If ICMP is blocked, treat this as “inconclusive,” not “down.”
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 prints the response body. Many sites redirect plain HTTP to HTTPS, which can show up 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 confirm the HTTP status code and the
Location
redirect target without downloading full content.
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 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>
ICMP is often blocked by policy. If
ping
fails, validate HTTP behavior with
curl
before declaring the service down.
A redirect is usually expected when HTTP is upgraded to
HTTPS. Confirm the redirect target with
curl -I
and validate the final endpoint with
curl -L
.
Use
curl -I
to capture status and
Location
without noise. This is often the most useful artifact for
incident notes and escalation.
A local DNS issue, proxy policy, or egress restriction can affect only the source you are testing from. When results are unexpected, validate from a second host or network.
This lab is read-only. Cleanup is documenting results and saving the header evidence you would include in an incident update or ticket.
ping -c 4 example.com
curl -I http://example.com
curl -L http://example.com
You can state whether the host is reachable by ICMP, what HTTP status is returned, where the request redirects, and whether the HTTPS endpoint serves content.
ping -c <N> <host>
: Sends N ICMP echo requests to test reachability and loss.
-c <N>
limits the count so the test completes quickly.
curl http://<host>
: Makes an HTTP request and prints the response body.
curl -I http://<host>
: Fetches headers only (status line, redirect Location, metadata).
-I
requests headers without downloading the full body.
curl -L http://<host>
: Follows redirects until the final destination is reached.
-L
is required when services enforce HTTPS or redirect to a
canonical hostname.