Decide twenty same-network questions by hand, then check every one

short · 40 min · Objective 2.2

Task

Build the one skill this objective examines -- given two addresses and a mask, can they talk directly -- and grade yourself against a computed answer so the practice is measured rather than felt.

Steps

  1. Write lab/subnet/questions.csv with header id,address_a,address_b,mask,my_answer and twenty rows using only addresses from the private ranges. At least eight rows must use a mask other than 255.255.255.0.
  2. Answer all twenty by hand, using the block-size method, before checking anything.
  3. Write a short script or use a calculator to compute the correct answers into lab/subnet/answers.csv with header id,correct.
  4. Join the two into lab/subnet/graded.csv with header id,my_answer,correct,match and count your score.
  5. For every mismatch, write one line in lab/subnet/errors.md naming which step of the method you got wrong -- block size, boundary, or the comparison.

Verify

awk -F, 'NR>1 && NF>=5 {n++} END {print n" question(s)"}' lab/subnet/questions.csv
awk -F, 'NR>1 && $4!="255.255.255.0" {n++} END {print n+0" non-/24 question(s)"}' lab/subnet/questions.csv
awk -F, 'NR>1 && NF>=2 {n++} END {print n" computed answer(s)"}' lab/subnet/answers.csv
awk -F, 'NR>1 && tolower($4)=="yes" {n++} END {print n+0" correct"}' lab/subnet/graded.csv
awk -F, 'NR>1 && tolower($4)!="yes" {n++} END {print n+0" wrong"}' lab/subnet/graded.csv

Twenty questions with eight or more using a non-/24 mask, twenty computed answers, and a graded total. A score below sixteen means the block-size method needs another pass before the exam, and the errors file says which part.

Notes

Do the hand answers first and completely. Checking as you go turns a test into a tutorial, and the point of this lab is to find out what you actually know.

This is an independent study companion for CompTIA A+ Core 1 220-1201 and is not produced by or endorsed by CompTIA.