Domain 2 capstone: a connectivity runner that stops at the first failed layer
Task
Assemble the domain into a runner that works outward layer by layer, stops at the first failure, and names the layer -- and prove it stops in the right place by breaking each layer in turn.
Steps
- Write
lab/net-runner.shthat runs the sequence from lesson 40 in order -- interface, address, loopback, local host, gateway, external address, name resolution -- and STOPS at the first failure, printing the layer that failed. - The runner must write
lab/net/run.csvwith headertimestamp,layer,result,detailwith one row per step attempted. - It must have a NOT MEASURED outcome for any step it could not attempt -- no gateway configured, for instance -- distinct from a failure. Three outcomes, not two.
- Break each of four layers in turn on your own machine and run the runner each time, recording in
lab/net/proof.csvwith headerbroken_layer,runner_said,matchedwhether it named the right one. - Revert every break, run the runner clean, and record the clean run in
lab/net/clean.txt.
Verify
test -s lab/net-runner.sh && echo "runner present"
grep -c 'NOT MEASURED' lab/net-runner.sh
awk -F, 'NR>1 && NF>=4 {n++} END {print n" step(s) recorded"}' lab/net/run.csv
awk -F, 'NR>1 && NF>=3 {n++} END {print n" break(s) tested"}' lab/net/proof.csv
awk -F, 'NR>1 && tolower($3)=="yes" {n++} END {print n+0" correctly named"}' lab/net/proof.csv
grep -c . lab/net/clean.txt
A runner containing the NOT MEASURED path, four or more breaks tested with the runner naming the right layer each time, and a clean run recorded. A runner that has only ever been run against a working network has not been shown to fail, which means it is not yet a check.
Notes
The three-outcome rule is the important part. A step that could not be attempted is not a step that passed, and a runner that reports the two as the same will eventually report a network with no gateway as healthy.
This is an independent study companion for CompTIA A+ Core 1 220-1201 and is not produced by or endorsed by CompTIA.