Find a randomly injected network misconfiguration by working up the layers
Task
Have one of five network misconfigurations injected into lin-b at random -- wrong mask, wrong gateway, wrong DNS server, a wrong A record, or a firewall rule blocking the web port -- and find it by testing in order: link, own address, neighbour, gateway, name, service. Record each test's result; the first failing test names the layer.
Steps
- Run the injected fault on lin-b (or on win-srv, for the DNS record) without reading it.
- From lin-b, run the ladder and record each result in
lab/netfault/ladder.csvwith headerorder,test,command,result, where result isokorfail: link state, own address, ping lin-srv, ping the gateway, resolvelin-srv.lab.internal, and fetch a page from lin-srv's web server. - From lin-srv, request lin-b's web page, and save the result to
lab/netfault/inbound.txt. - Write
lab/netfault/diagnosis.txtwith a line beginningcause:and the fix, apply the fix, and rerun the ladder, appending to the CSV. - Only now read
injected.txtand record inlab/netfault/match.txtwhether your cause matched.
Verify
These checks run in a POSIX shell: Terminal on macOS or Linux, and on Windows Git Bash (it comes with Git for Windows) or WSL. A stock Windows PowerShell or Command Prompt has no awk or grep, so there the first line fails.
awk -F, 'NR>1 && $4!="ok" {print "first failure: "$1" "$2; exit}' lab/netfault/ladder.csv
awk -F, 'NR>1 {n++} END {print n" ladder result(s)"}' lab/netfault/ladder.csv
grep -c '^cause:' lab/netfault/diagnosis.txt
grep -Eic 'match|yes|correct' lab/netfault/match.txt
The ladder names a first failing test, which should point at the injected layer: a wrong gateway fails at the gateway, a DNS fault at name resolution, a firewall rule at the service, and a wrong mask can fail at the neighbour. The second run's rows all pass. Repeat with different random faults until each of the five has been found once.
Notes
A firewall fault shows most clearly as a timeout rather than a refusal: a refused connection reached a host with nothing listening, while a dropped one simply gets no answer.
This is an independent study companion for CompTIA Server+ SK0-005 and is not produced by or endorsed by CompTIA.