Recap: Reachability
Lesson 19 of 47 in Coddy's Networking with the Terminal course.
Diagnosis is a ladder, and each rung rules something out.
Is the machine there? Ping it. Remember that a failed ping proves little, since many hosts ignore ICMP.
Is the port open? nc -z. This is where "the server is up but the site is down" gets caught.
Is the service answering? Make a real request with curl and read the exit code: 0 worked, 7 refused, 28 timed out.
Climb in that order and each answer narrows the next question. Skipping to the top is how people end up restarting things at random.
Challenge
HardClimb the whole ladder against a server you start yourself.
- Create
index.htmlcontainingup - Serve the folder on port 9109
- Print
1:and the ping result (ok) - Print
2:and the port result (ok) - Print
3:and the page you fetched
Expected output:
1: ok
2: ok
3: upTry it yourself
This lesson includes a short quiz. Start the lesson to answer it and track your progress.
All lessons in Networking with the Terminal
4Is It Reachable?
ICMP and pingReading Ping OutputWhen Ping LiesRefused or Timed OutRecap: ReachabilityPractice on your own: Terminal playground