Cyberlium

Networking › Module 5 › Lesson 3

BeginnerModule 5Lesson 3/4

Lab — Diagnose a Broken Connection

Walk through a structured troubleshooting scenario step by step

25 min+40 XP3 quiz
Module progress3 of 4

Opening

Evidence before opinion

A user says "the site won't load." You do not reboot blindly and you do not disable the firewall. You walk the ladder from the last lesson on YOUR connection: loopback, gateway, DNS, then HTTPS headers. This lab stays in scope even if every step succeeds. Healthy output is still a baseline. You will write findings to $HOME/cyberlium-lab/net-diag.txt and chmod 600. No LAN sweep. No nmap. No probing classmates, café strangers, or random neighbors. Own machine, own VM, or WSL — and your own default gateway only. Permission is the first packet.

1. What isolation actually means

Each rung answers one question. Loopback ICMP: can this kernel speak IP to itself? If no — stop; the ticket is the host, not the website. Gateway ICMP: can you reach the first hop on a network you own? If no — link, Wi-Fi, local firewall dropping ICMP, or a down CPE — not yet DNS. Name lookup: does getent/nslookup return an A or AAAA for a host you already use? If no — resolver, DHCP DNS option, or filtering of UDP/53 — not yet TLS. curl -I: do TCP and TLS complete, and what HTTP status returns? Timeout vs connection refused vs certificate error vs 200/301/403 are different diagnoses. If loopback works, gateway works, DNS works, and HTTPS works, you write "all rungs healthy" and you still record the commands. That file is how you will compare a future failure. If one rung fails, you do not keep "fixing" layers below a pass.

Isolation is a discipline: one hypothesis per command, one conclusion per rung. Jumping from "site won't load" to "disable ufw" mixes layers and destroys evidence. Jumping from a local timeout to nmap of the /24 leaves your authorized path and becomes unauthorized recon of other hosts. The ladder only needs your interfaces, your default via, your resolver, and one HTTPS URL you are allowed to request.

2. Reading failures without guessing

Gateway ping timed out does not always mean "LAN dead." Many home routers or host firewalls drop ICMP while TCP still works. Record ICMP-filtered if later HTTPS succeeds. Empty getent with curl "Could not resolve host" is DNS — not a missing certificate. Connection refused after a resolved IP is an open path to a closed port or a rejecting host. TLS errors after TCP connects are certificate or SNI problems — you already cleared IP and name. Write the symptom class in the conclusions block so next-week-you can trust the notes.

Healthy all-green runs still earn the mission. Paste the same commands next month when something breaks and compare. A baseline file with mode 600 is cheaper than guessing under pressure. Never "enrich" the notes by sweeping neighbors, classmates, or café devices — that is not diagnosis; it is unauthorized recon.

3. Wrong vs right: shotgun fixes and off-scope probes

Worked failure mode — scope and method. The classroom is your path, not the building.

  • Wrong

    You ping every address in the /24 "to see who else is broken," run nmap -sn, or curl random internal IPs you do not own. You sudo ufw disable because one ping timed out. You skip loopback and start at a public IP. You paste the notes file to a public gist with your gateway and listener list. You treat café Wi-Fi neighbors as free lab targets.

  • Right

    ip link / ip addr / ip route on this machine. ping 127.0.0.1. ping YOUR gateway only (the default via from ip route — never invent a stranger's router). getent or nslookup for a name you already use. curl -I to that HTTPS URL. Write pass/fail plus a one-line conclusion per rung in $HOME/cyberlium-lab/net-diag.txt, chmod 600. Leave firewalls on. Stop when the ladder finishes.

4. Hands-on: one notes file, layered checks

Create the lab directory if needed. Redirect command output into net-diag.txt, then add your own conclusion lines. Use the gateway IP that ip route prints — do not invent 192.168.1.1. If ping to the gateway is filtered, say so; do not call the LAN dead without the rest of the ladder. On Windows without ip/ss, use equivalent own-machine tools (ipconfig, ping 127.0.0.1, ping your default gateway, nslookup, curl -I) and save under Documents\cyberlium-lab — still your host only.

Command guide

Diagnose YOUR connection — notes at 600

Command — copy this

mkdir -p "$HOME/cyberlium-lab"
NOTES="$HOME/cyberlium-lab/net-diag.txt"

Command — copy this

{
  echo '=== Cyberlium net-diag (own machine only) ==='
  echo "date: $(date -Is 2>/dev/null || date)"
  echo

Command — copy this

echo '--- 1) link ---'
  ip link
  echo

Command — copy this

echo '--- 2) addr ---'
  ip addr
  echo

Command — copy this

echo '--- 3) route ---'
  ip route
  echo

Command — copy this

echo '--- 4) loopback ICMP ---'
  ping -c 4 127.0.0.1
  echo

Command — copy this

echo '--- 5) gateway ICMP (edit GW from ip route; YOUR gateway only) ---'
  GW=$(ip route | awk '/^default/ {print $3; exit}')
  echo "parsed default via: ${GW:-NONE}"
  if [ -n "$GW" ]; then ping -c 3 "$GW"; else echo 'no default route — skip gateway ping'; fi
  echo

Command — copy this

echo '--- 6) DNS (name you already use) ---'
  getent hosts example.com || true
  command -v nslookup >/dev/null && nslookup example.com || true
  echo

Command — copy this

echo '--- 7) HTTPS headers ---'
  curl -I --connect-timeout 10 https://example.com || true
  echo

Command — copy this

echo '--- conclusions (fill these) ---'
  echo 'loopback: PASS/FAIL —'
  echo 'gateway: PASS/FAIL/ICMP-filtered —'
  echo 'DNS: PASS/FAIL —'
  echo 'HTTPS: PASS/FAIL (timeout|refused|TLS|HTTP code) —'
  echo 'likely layer: link | IP | gateway | DNS | app/TLS | all healthy'
} > "$NOTES"

Command — copy this

chmod 600 "$NOTES"

Review, then edit the conclusion lines in your editor if you want nano "$NOTES" or vim "$NOTES"

NEVER: nmap, ping sweep, or arp scan of the LAN NEVER: sudo ufw disable / iptables -F NEVER: probe hosts that are not yours NEVER: café / dorm / random neighbor scans

Mission: isolate the rung and file the notes

Run the layered checks on your own connection. Isolate: loopback vs your gateway vs DNS vs HTTPS (curl -I). Save findings in $HOME/cyberlium-lab/net-diag.txt and chmod 600. If everything works, write "all layers healthy" and one sentence on what a DNS-only failure would have looked like. Do not scan other networks. Do not disable firewalls. Do not probe café or dorm neighbors.

Stuck? Ask Cyberlium AI Mentor

If curl -I fails but ping of your gateway works, ask Cyberlium AI Mentor for a hint — not an nmap one-liner. Try: "Hint only: loopback and gateway ping work, getent is empty, curl cannot resolve — which file and which test should I re-read before blaming HTTPS?"

You practiced the only diagnosis that is always in scope: your stack, your first hop, your resolver, your HTTPS client — written down, mode 600. Healthy baselines count. Off-scope sweeps do not. Next — Quiz — Troubleshooting & Network Security — APPLY NAT, firewalls, and this layered order before Module 6 opens the LAN (switches, MAC, ARP, DHCP).

Knowledge Check

1

APPLY: Your net-diag.txt shows ping 127.0.0.1 OK, ping to the default via OK, getent hosts empty, curl -I "Could not resolve host." Which isolation is correct?

Multiple choice

Knowledge Check

2

APPLY: Why does this lab forbid nmap of the local /24 even when "the internet is down"?

Multiple choice

Knowledge Check

3

APPLY: True or False: chmod 600 on $HOME/cyberlium-lab/net-diag.txt is appropriate because the file can contain your CIDR, gateway, and listener-adjacent clues you should not share casually.

True or False

← Previous

Answer all 3 knowledge checks to continue. (0/3 answered)